Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-16.0] Fix bug in vtexplain around JOINs (#12376) #12384

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions go/vt/vtexplain/testdata/multi-output/unsharded-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ select ID from t1
1 ks_unsharded/-: select ID from t1 limit 10001

----------------------------------------------------------------------
select t1.id, t2.c2 from t1 join t2 on t1.id = t2.t1_id where t2.c2 in (1)

1 ks_unsharded/-: select t1.id, t2.c2 from t1 join t2 on t1.id = t2.t1_id where t2.c2 in (1) limit 10001

----------------------------------------------------------------------

This file was deleted.

6 changes: 6 additions & 0 deletions go/vt/vtexplain/testdata/test-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ create table t1 (
floatval float not null default 0,
primary key (id)
);
create table t2 (
id bigint(20) unsigned not null,
t1_id bigint(20) unsigned not null default 0,
c2 bigint(20) null,
primary key (id)
);

create table user (
id bigint,
Expand Down
1 change: 1 addition & 0 deletions go/vt/vtexplain/testdata/test-vschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"sharded": false,
"tables": {
"t1": {},
"t2": {},
"table_not_in_schema": {}
}
},
Expand Down
1 change: 1 addition & 0 deletions go/vt/vtexplain/testdata/unsharded-queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ update t1 set floatval = 9.99;
delete from t1 where id = 100;
insert into t1 (id,intval,floatval) values (1,2,3.14) on duplicate key update intval=3, floatval=3.14;
select ID from t1;
select t1.id, t2.c2 from t1 join t2 on t1.id = t2.t1_id where t2.c2 in (1);
Loading