Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
mydumper-test-case
MySQL [test]> create table t1 (a int not null primary key auto_increment, b char(255));
Query OK, 0 rows affected (0.51 sec)
MySQL [test]> create table t2 (a char(255) not null primary key, b char(255));
Query OK, 0 rows affected (0.51 sec)
MySQL [test]> INSERT INTO t1 values (1, 'aaa');
Query OK, 1 row affected (0.15 sec)
MySQL [test]> INSERT INTO t2 values ('aaa', 'aaa');
Query OK, 1 row affected (0.09 sec)
tocker@penguin:~/go/src/github.com/pingcap/mydumper$ ./mydumper
tocker@penguin:~/go/src/github.com/pingcap/mydumper$ cd export-20181010-141831/
tocker@penguin:~/go/src/github.com/pingcap/mydumper/export-20181010-141831$ more test.t1.sql
SET FOREIGN_KEY_CHECKS=0;
INSERT INTO `t1` VALUES
(1,"aaa");
tocker@penguin:~/go/src/github.com/pingcap/mydumper/export-20181010-141831$ more test.t2.sql
SET FOREIGN_KEY_CHECKS=0;
INSERT INTO `t2` (`a`,`b`,`_tidb_rowid`) VALUES
("aaa","aaa",1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.