-
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 <[email protected]> Co-authored-by: Andrés Taylor <[email protected]>
- Loading branch information
1 parent
8126eea
commit bae3c5f
Showing
9 changed files
with
166 additions
and
10 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
26 changes: 26 additions & 0 deletions
26
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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])'); | ||
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); | ||
|
||
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; |
72 changes: 72 additions & 0 deletions
72
go/test/endtoend/vtgate/vitess_tester/two_sharded_keyspaces/vschema.json
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"keyspaces": { | ||
"customer": { | ||
"sharded": true, | ||
"vindexes": { | ||
"hash": { | ||
"type": "hash", | ||
"params": {}, | ||
"owner": "" | ||
} | ||
}, | ||
"tables": { | ||
"customer": { | ||
"type": "", | ||
"column_vindexes": [ | ||
{ | ||
"column": "customer_id", | ||
"name": "hash", | ||
"columns": [] | ||
} | ||
], | ||
"columns": [], | ||
"pinned": "", | ||
"column_list_authoritative": false, | ||
"source": "" | ||
} | ||
}, | ||
"require_explicit_routing": false, | ||
"foreign_key_mode": 0, | ||
"multi_tenant_spec": null | ||
}, | ||
"corder": { | ||
"sharded": true, | ||
"vindexes": { | ||
"hash": { | ||
"type": "hash", | ||
"params": {}, | ||
"owner": "" | ||
} | ||
}, | ||
"tables": { | ||
"corder": { | ||
"type": "", | ||
"column_vindexes": [ | ||
{ | ||
"column": "customer_id", | ||
"name": "hash", | ||
"columns": [] | ||
} | ||
], | ||
"columns": [], | ||
"pinned": "", | ||
"column_list_authoritative": false, | ||
"source": "" | ||
} | ||
}, | ||
"require_explicit_routing": false, | ||
"foreign_key_mode": 0, | ||
"multi_tenant_spec": null | ||
} | ||
}, | ||
"routing_rules": { | ||
"rules": [] | ||
}, | ||
"shard_routing_rules": { | ||
"rules": [] | ||
}, | ||
"keyspace_routing_rules": null, | ||
"mirror_rules": { | ||
"rules": [] | ||
} | ||
} |
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
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