-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
15 additions
and
15 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
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,7 +1,7 @@ | ||
drop database if exists `safe_mode_test`; | ||
create database `safe_mode_test`; | ||
use `safe_mode_test`; | ||
create table t2 (id bigint auto_increment, uid int, name varchar(80), primary key (`id`), unique key(`uid`)) DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT = 200; | ||
create table t3 (id bigint auto_increment, uid int, name varchar(80), primary key (`id`), unique key(`uid`)) DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT = 300; | ||
create table t2 (id bigint auto_increment, uid int, name varchar(80), primary key (`id`), unique key(`uid`)) AUTO_INCREMENT = 200; | ||
create table t3 (id bigint auto_increment, uid int, name varchar(80), primary key (`id`), unique key(`uid`)) AUTO_INCREMENT = 300; | ||
insert into t2 (uid, name) values (40000, 'Remedios Moscote'), (40001, 'Amaranta'); | ||
insert into t3 (uid, name) values (30001, 'Aureliano José'), (30002, 'Santa Sofía de la Piedad'), (30003, '17 Aurelianos'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
create database `sharding2`; | ||
use `sharding2`; | ||
CREATE TABLE `t4` (`id` bigint(20) AUTO_INCREMENT, `uid` int(11), `name` varchar(80), `info` varchar(100), `age` int(11), `info_json` json GENERATED ALWAYS AS (`info`) VIRTUAL, `id_gen` int(11) GENERATED ALWAYS AS ((`uid` + 1)) VIRTUAL, create_by DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `uid` (`uid`), UNIQUE KEY `id_gen` (`id_gen`), KEY `multi_col_idx` (`uid`,`id_gen`)) DEFAULT CHARSET=utf8mb4; | ||
CREATE TABLE `t4` (`id` bigint(20) AUTO_INCREMENT, `uid` int(11), `name` varchar(80), `info` varchar(100), `age` int(11), `info_json` json GENERATED ALWAYS AS (`info`) VIRTUAL, `id_gen` int(11) GENERATED ALWAYS AS ((`uid` + 1)) VIRTUAL, create_by DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `uid` (`uid`), UNIQUE KEY `id_gen` (`id_gen`), KEY `multi_col_idx` (`uid`,`id_gen`)); | ||
insert into `sharding2`.t4 (uid, name, info) values (70001, 'golang', '{"age": 6}'), (70002, 'rust con', '{"age": 1}'), (70003, 'javascript', '{"key": "value", "age": 20}'); | ||
insert into `sharding1`.t2 (uid, name, info) values (50002, 'tyuil', '{"ghjkl;": "as a standby"}'), (50003, 'xxxxx', '{"boolean": false, "k": "v"}'); | ||
insert into `sharding1`.t3 (uid, name, info) values (30004, 'hhhhhh', '{"key1": "value000"}'); |
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