-
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.
Browse files
Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6962681
commit 4c8bff1
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, '[alice@domain.com](mailto:alice@domain.com)'); | ||
insert into customer.customer(customer_id, email) values(2, '[bob@domain.com](mailto:bob@domain.com)'); | ||
insert into customer.customer(customer_id, email) values(3, '[charlie@domain.com](mailto:charlie@domain.com)'); | ||
insert into customer.customer(customer_id, email) values(4, '[dan@domain.com](mailto:dan@domain.com)'); | ||
insert into customer.customer(customer_id, email) values(5, '[eve@domain.com](mailto:eve@domain.com)'); | ||
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, '[alice@domain.com](mailto:alice@domain.com)'), | ||
(2, '[bob@domain.com](mailto:bob@domain.com)'), | ||
(3, '[charlie@domain.com](mailto:charlie@domain.com)'), | ||
(4, '[dan@domain.com](mailto:dan@domain.com)'), | ||
(5, '[eve@domain.com](mailto:eve@domain.com)'); | ||
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