-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andres Taylor <[email protected]>
- Loading branch information
1 parent
6962681
commit f111075
Showing
7 changed files
with
45 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 36 additions & 23 deletions
59
go/test/endtoend/vtgate/vitess_tester/two_sharded_keyspaces/queries.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
use customer; | ||
create table if not exists customer( | ||
customer_id bigint not null, | ||
email varbinary(128), | ||
primary key(customer_id) | ||
) ENGINE=InnoDB; | ||
insert into customer.customer(customer_id, email) values(1, '[[email protected]](mailto:[email protected])'); | ||
insert into customer.customer(customer_id, email) values(2, '[[email protected]](mailto:[email protected])'); | ||
insert into customer.customer(customer_id, email) values(3, '[[email protected]](mailto:[email protected])'); | ||
insert into customer.customer(customer_id, email) values(4, '[[email protected]](mailto:[email protected])'); | ||
insert into customer.customer(customer_id, email) values(5, '[[email protected]](mailto:[email protected])'); | ||
create table if not exists customer | ||
( | ||
customer_id bigint not null, | ||
email varbinary(128), | ||
primary key (customer_id) | ||
) ENGINE = InnoDB; | ||
|
||
insert into customer.customer(customer_id, email) | ||
values (1, '[[email protected]](mailto:[email protected])'), | ||
(2, '[[email protected]](mailto:[email protected])'), | ||
(3, '[[email protected]](mailto:[email protected])'), | ||
(4, '[[email protected]](mailto:[email protected])'), | ||
(5, '[[email protected]](mailto:[email protected])'); | ||
use corder; | ||
create table if not exists corder( | ||
order_id bigint not null, | ||
customer_id bigint, | ||
sku varbinary(128), | ||
price bigint, | ||
primary key(order_id) | ||
) ENGINE=InnoDB; | ||
insert into corder.corder(order_id, customer_id, sku, price) values(1, 1, 'SKU-1001', 100); | ||
insert into corder.corder(order_id, customer_id, sku, price) values(2, 2, 'SKU-1002', 30); | ||
insert into corder.corder(order_id, customer_id, sku, price) values(3, 3, 'SKU-1002', 30); | ||
insert into corder.corder(order_id, customer_id, sku, price) values(4, 4, 'SKU-1002', 30); | ||
insert into corder.corder(order_id, customer_id, sku, price) values(5, 5, 'SKU-1002', 30); | ||
create table if not exists corder | ||
( | ||
order_id bigint not null, | ||
customer_id bigint, | ||
sku varbinary(128), | ||
price bigint, | ||
primary key (order_id) | ||
) ENGINE = InnoDB; | ||
insert into corder.corder(order_id, customer_id, sku, price) | ||
values (1, 1, 'SKU-1001', 100), | ||
(2, 2, 'SKU-1002', 30), | ||
(3, 3, 'SKU-1002', 30), | ||
(4, 4, 'SKU-1002', 30), | ||
(5, 5, 'SKU-1002', 30); | ||
|
||
select co.order_id, co.customer_id, co.price | ||
from corder.corder co | ||
left join customer.customer cu on co.customer_id = cu.customer_id | ||
where cu.customer_id = 1; | ||
|
||
select co.order_id, co.customer_id, co.price from corder.corder co left join customer.customer cu on co.customer_id=cu.customer_id where cu.customer_id=1; | ||
# This query was accidentally disallowed by https://github.com/vitessio/vitess/pull/16520 | ||
select 1 | ||
from customer.customer | ||
where customer_id in (select customer_id from corder.corder where price > 50); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters