-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-fk-to-info-schema
- Loading branch information
Showing
25 changed files
with
8,058 additions
and
7,835 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
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
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
3 changes: 3 additions & 0 deletions
3
dumpling/tests/sequences/data/sequences.s-schema-sequence-expect.sql
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,3 @@ | ||
/*!40101 SET NAMES binary*/; | ||
CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB; | ||
SELECT SETVAL(`s`,1001); |
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,30 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright 2020 PingCAP, Inc. Licensed under Apache-2.0. | ||
|
||
set -eu | ||
|
||
export DUMPLING_TEST_PORT=4000 | ||
|
||
run_sql "drop database if exists sequences;" | ||
run_sql "create database sequences DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;" | ||
export DUMPLING_TEST_DATABASE="sequences" | ||
|
||
run_sql "create sequence s start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB;" | ||
run_sql "select nextval(s);" | ||
|
||
# test --no-sequences | ||
run_dumpling --no-sequences | ||
file_not_exist "$DUMPLING_OUTPUT_DIR/sequences.s-schema-sequence.sql" | ||
|
||
rm -rf $DUMPLING_OUTPUT_DIR | ||
run_dumpling --no-sequences=false | ||
diff "$DUMPLING_BASE_NAME/data/sequences.s-schema-sequence-expect.sql" "$DUMPLING_OUTPUT_DIR/sequences.s-schema-sequence.sql" | ||
file_not_exist "$DUMPLING_OUTPUT_DIR/sequences.s.000000000.sql" | ||
|
||
# test --no-schemas | ||
rm -rf $DUMPLING_OUTPUT_DIR | ||
run_dumpling --no-schemas | ||
file_not_exist "$DUMPLING_OUTPUT_DIR/sequences-schema-create.sql" | ||
file_not_exist "$DUMPLING_OUTPUT_DIR/sequences.s-schema-sequence.sql" | ||
file_not_exist "$DUMPLING_OUTPUT_DIR/sequences.s.000000000.sql" |
Oops, something went wrong.