Skip to content

Commit

Permalink
fix user keyword test in vtexplain test
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Feb 15, 2021
1 parent c23bf6a commit cf9a8b6
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 121 deletions.
40 changes: 20 additions & 20 deletions go/vt/vtexplain/testdata/multi-output/comments-output.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
----------------------------------------------------------------------
SELECT * from user

1 ks_sharded/-40: select * from user limit 10001
1 ks_sharded/40-80: select * from user limit 10001
1 ks_sharded/80-c0: select * from user limit 10001
1 ks_sharded/c0-: select * from user limit 10001
1 ks_sharded/-40: select * from `user` limit 10001
1 ks_sharded/40-80: select * from `user` limit 10001
1 ks_sharded/80-c0: select * from `user` limit 10001
1 ks_sharded/c0-: select * from `user` limit 10001

----------------------------------------------------------------------
select /* ; */ 1 from user

1 ks_sharded/-40: select /* ; */ 1 from user limit 10001
1 ks_sharded/40-80: select /* ; */ 1 from user limit 10001
1 ks_sharded/80-c0: select /* ; */ 1 from user limit 10001
1 ks_sharded/c0-: select /* ; */ 1 from user limit 10001
1 ks_sharded/-40: select /* ; */ 1 from `user` limit 10001
1 ks_sharded/40-80: select /* ; */ 1 from `user` limit 10001
1 ks_sharded/80-c0: select /* ; */ 1 from `user` limit 10001
1 ks_sharded/c0-: select /* ; */ 1 from `user` limit 10001

----------------------------------------------------------------------
select 1 from user where x=';'

1 ks_sharded/-40: select 1 from user where x = ';' limit 10001
1 ks_sharded/40-80: select 1 from user where x = ';' limit 10001
1 ks_sharded/80-c0: select 1 from user where x = ';' limit 10001
1 ks_sharded/c0-: select 1 from user where x = ';' limit 10001
1 ks_sharded/-40: select 1 from `user` where x = ';' limit 10001
1 ks_sharded/40-80: select 1 from `user` where x = ';' limit 10001
1 ks_sharded/80-c0: select 1 from `user` where x = ';' limit 10001
1 ks_sharded/c0-: select 1 from `user` where x = ';' limit 10001

----------------------------------------------------------------------
select 1 from user where x='/* hello */'

1 ks_sharded/-40: select 1 from user where x = '/* hello */' limit 10001
1 ks_sharded/40-80: select 1 from user where x = '/* hello */' limit 10001
1 ks_sharded/80-c0: select 1 from user where x = '/* hello */' limit 10001
1 ks_sharded/c0-: select 1 from user where x = '/* hello */' limit 10001
1 ks_sharded/-40: select 1 from `user` where x = '/* hello */' limit 10001
1 ks_sharded/40-80: select 1 from `user` where x = '/* hello */' limit 10001
1 ks_sharded/80-c0: select 1 from `user` where x = '/* hello */' limit 10001
1 ks_sharded/c0-: select 1 from `user` where x = '/* hello */' limit 10001

----------------------------------------------------------------------
select 1 from user where x='/* ; */'

1 ks_sharded/-40: select 1 from user where x = '/* ; */' limit 10001
1 ks_sharded/40-80: select 1 from user where x = '/* ; */' limit 10001
1 ks_sharded/80-c0: select 1 from user where x = '/* ; */' limit 10001
1 ks_sharded/c0-: select 1 from user where x = '/* ; */' limit 10001
1 ks_sharded/-40: select 1 from `user` where x = '/* ; */' limit 10001
1 ks_sharded/40-80: select 1 from `user` where x = '/* ; */' limit 10001
1 ks_sharded/80-c0: select 1 from `user` where x = '/* ; */' limit 10001
1 ks_sharded/c0-: select 1 from `user` where x = '/* ; */' limit 10001

----------------------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ delete from music_extra where id=1 and extra='abc'
delete from user where id=1

1 ks_sharded/-40: begin
1 ks_sharded/-40: select id, `name` from user where id = 1 limit 10001 for update
1 ks_sharded/-40: select id, `name` from `user` where id = 1 limit 10001 for update
2 ks_sharded/40-80: begin
2 ks_sharded/40-80: delete from name_user_map where `name` = 'name_val_2' and user_id = 1 limit 10001
3 ks_sharded/-40: delete from user where id = 1 limit 10001
3 ks_sharded/-40: delete from `user` where id = 1 limit 10001
4 ks_sharded/-40: commit
5 ks_sharded/40-80: commit

Expand All @@ -29,10 +29,10 @@ delete from user where name='billy'
1 ks_sharded/c0-: begin
1 ks_sharded/c0-: select `name`, user_id from name_user_map where `name` in ('billy') limit 10001 for update
2 ks_sharded/-40: begin
2 ks_sharded/-40: select id, `name` from user where `name` = 'billy' limit 10001 for update
2 ks_sharded/-40: select id, `name` from `user` where `name` = 'billy' limit 10001 for update
3 ks_sharded/40-80: begin
3 ks_sharded/40-80: delete from name_user_map where `name` = 'name_val_2' and user_id = 1 limit 10001
4 ks_sharded/-40: delete from user where `name` = 'billy' limit 10001
4 ks_sharded/-40: delete from `user` where `name` = 'billy' limit 10001
5 ks_sharded/c0-: commit
6 ks_sharded/-40: commit
7 ks_sharded/40-80: commit
Expand Down
12 changes: 6 additions & 6 deletions go/vt/vtexplain/testdata/multi-output/insertsharded-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ insert into user (id, name) values(1, 'alice')
1 ks_sharded/40-80: begin
1 ks_sharded/40-80: insert into name_user_map(`name`, user_id) values ('alice', 1)
2 ks_sharded/-40: begin
2 ks_sharded/-40: insert into user(id, `name`) values (1, 'alice')
2 ks_sharded/-40: insert into `user`(id, `name`) values (1, 'alice')
3 ks_sharded/40-80: commit
4 ks_sharded/-40: commit

Expand All @@ -14,7 +14,7 @@ insert into user (id, name) values(2, 'bob')
1 ks_sharded/c0-: begin
1 ks_sharded/c0-: insert into name_user_map(`name`, user_id) values ('bob', 2)
2 ks_sharded/-40: begin
2 ks_sharded/-40: insert into user(id, `name`) values (2, 'bob')
2 ks_sharded/-40: insert into `user`(id, `name`) values (2, 'bob')
3 ks_sharded/c0-: commit
4 ks_sharded/-40: commit

Expand All @@ -25,7 +25,7 @@ insert ignore into user (id, name) values(2, 'bob')
1 ks_sharded/c0-: insert ignore into name_user_map(`name`, user_id) values ('bob', 2)
2 ks_sharded/c0-: select `name` from name_user_map where `name` = 'bob' and user_id = 2 limit 10001
3 ks_sharded/-40: begin
3 ks_sharded/-40: insert ignore into user(id, `name`) values (2, 'bob')
3 ks_sharded/-40: insert ignore into `user`(id, `name`) values (2, 'bob')
4 ks_sharded/c0-: commit
5 ks_sharded/-40: commit

Expand All @@ -36,7 +36,7 @@ insert ignore into user (id, name, nickname) values(2, 'bob', 'bob')
1 ks_sharded/c0-: insert ignore into name_user_map(`name`, user_id) values ('bob', 2)
2 ks_sharded/c0-: select `name` from name_user_map where `name` = 'bob' and user_id = 2 limit 10001
3 ks_sharded/-40: begin
3 ks_sharded/-40: insert ignore into user(id, `name`, nickname) values (2, 'bob', 'bob')
3 ks_sharded/-40: insert ignore into `user`(id, `name`, nickname) values (2, 'bob', 'bob')
4 ks_sharded/c0-: commit
5 ks_sharded/-40: commit

Expand All @@ -47,7 +47,7 @@ insert into user (id, name, nickname) values(2, 'bob', 'bobby') on duplicate key
1 ks_sharded/c0-: insert ignore into name_user_map(`name`, user_id) values ('bob', 2)
2 ks_sharded/c0-: select `name` from name_user_map where `name` = 'bob' and user_id = 2 limit 10001
3 ks_sharded/-40: begin
3 ks_sharded/-40: insert into user(id, `name`, nickname) values (2, 'bob', 'bobby') on duplicate key update nickname = 'bobby'
3 ks_sharded/-40: insert into `user`(id, `name`, nickname) values (2, 'bob', 'bobby') on duplicate key update nickname = 'bobby'
4 ks_sharded/c0-: commit
5 ks_sharded/-40: commit

Expand All @@ -58,7 +58,7 @@ insert into user (id, name, nickname, address) values(2, 'bob', 'bobby', '123 ma
1 ks_sharded/c0-: insert ignore into name_user_map(`name`, user_id) values ('bob', 2)
2 ks_sharded/c0-: select `name` from name_user_map where `name` = 'bob' and user_id = 2 limit 10001
3 ks_sharded/-40: begin
3 ks_sharded/-40: insert into user(id, `name`, nickname, address) values (2, 'bob', 'bobby', '123 main st') on duplicate key update nickname = values(nickname), address = values(address)
3 ks_sharded/-40: insert into `user`(id, `name`, nickname, address) values (2, 'bob', 'bobby', '123 main st') on duplicate key update nickname = values(nickname), address = values(address)
4 ks_sharded/c0-: commit
5 ks_sharded/-40: commit

Expand Down
16 changes: 8 additions & 8 deletions go/vt/vtexplain/testdata/multi-output/options-output.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
----------------------------------------------------------------------
select * from user where email='[email protected]'

1 ks_sharded/-40: select * from user where email = '[email protected]' limit 10001
1 ks_sharded/40-80: select * from user where email = '[email protected]' limit 10001
1 ks_sharded/80-c0: select * from user where email = '[email protected]' limit 10001
1 ks_sharded/c0-: select * from user where email = '[email protected]' limit 10001
1 ks_sharded/-40: select * from `user` where email = '[email protected]' limit 10001
1 ks_sharded/40-80: select * from `user` where email = '[email protected]' limit 10001
1 ks_sharded/80-c0: select * from `user` where email = '[email protected]' limit 10001
1 ks_sharded/c0-: select * from `user` where email = '[email protected]' limit 10001

----------------------------------------------------------------------
select * from user where id in (1,2,3,4,5,6,7,8)

1 ks_sharded/-40: select * from user where id in (1, 2) limit 10001
1 ks_sharded/40-80: select * from user where id in (3, 5) limit 10001
1 ks_sharded/c0-: select * from user where id in (4, 6, 7, 8) limit 10001
1 ks_sharded/-40: select * from `user` where id in (1, 2) limit 10001
1 ks_sharded/40-80: select * from `user` where id in (3, 5) limit 10001
1 ks_sharded/c0-: select * from `user` where id in (4, 6, 7, 8) limit 10001

----------------------------------------------------------------------
insert into user (id, name) values (2, 'bob')

1 ks_sharded/c0-: begin
1 ks_sharded/c0-: insert into name_user_map(`name`, user_id) values ('bob', 2)
2 ks_sharded/-40: begin
2 ks_sharded/-40: insert into user(id, `name`) values (2, 'bob')
2 ks_sharded/-40: insert into `user`(id, `name`) values (2, 'bob')
3 ks_sharded/c0-: commit
4 ks_sharded/-40: commit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
----------------------------------------------------------------------
select * from user

1 ks_sharded/-20: select * from user limit 10001
1 ks_sharded/20-40: select * from user limit 10001
1 ks_sharded/40-60: select * from user limit 10001
1 ks_sharded/60-80: select * from user limit 10001
1 ks_sharded/80-a0: select * from user limit 10001
1 ks_sharded/a0-c0: select * from user limit 10001
1 ks_sharded/c0-e0: select * from user limit 10001
1 ks_sharded/e0-: select * from user limit 10001
1 ks_sharded/-20: select * from `user` limit 10001
1 ks_sharded/20-40: select * from `user` limit 10001
1 ks_sharded/40-60: select * from `user` limit 10001
1 ks_sharded/60-80: select * from `user` limit 10001
1 ks_sharded/80-a0: select * from `user` limit 10001
1 ks_sharded/a0-c0: select * from `user` limit 10001
1 ks_sharded/c0-e0: select * from `user` limit 10001
1 ks_sharded/e0-: select * from `user` limit 10001

----------------------------------------------------------------------
select * from user where id in (1, 2)

1 ks_sharded/-20: select * from user where id in (1, 2) limit 10001
1 ks_sharded/-20: select * from `user` where id in (1, 2) limit 10001

----------------------------------------------------------------------
Loading

0 comments on commit cf9a8b6

Please sign in to comment.