📄 mysqldump.test
字号:
F_7e7757b1e12abcb736ab9a754ffb617a int, F_5878a7ab84fb43402106c575658472fa int, F_006f52e9102a8d3be2fe5614f42ba989 int, F_3636638817772e42b59d74cff571fbb3 int, F_149e9677a5989fd342ae44213df68868 int, F_a4a042cf4fd6bfb47701cbc8a1653ada int, F_1ff8a7b5dc7a7d1f0ed65aaa29c04b1e int, F_f7e6c85504ce6e82442c770f7c8606f0 int, F_bf8229696f7a3bb4700cfddef19fa23f int, F_82161242827b703e6acf9c726942a1e4 int, F_38af86134b65d0f10fe33d30dd76442e int, F_96da2f590cd7246bbde0051047b0d6f7 int, F_8f85517967795eeef66c225f7883bdcb int, F_8f53295a73878494e9bc8dd6c3c7104f int, F_045117b0e0a11a242b9765e79cbf113f int, F_fc221309746013ac554571fbd180e1c8 int, F_4c5bde74a8f110656874902f07378009 int, F_cedebb6e872f539bef8c3f919874e9d7 int, F_6cdd60ea0045eb7a6ec44c54d29ed402 int, F_eecca5b6365d9607ee5a9d336962c534 int, F_9872ed9fc22fc182d371c3e9ed316094 int, F_31fefc0e570cb3860f2a6d4b38c6490d int, F_9dcb88e0137649590b755372b040afad int, F_a2557a7b2e94197ff767970b67041697 int, F_cfecdb276f634854f3ef915e2e980c31 int, F_0aa1883c6411f7873cb83dacb17b0afc int, F_58a2fc6ed39fd083f55d4182bf88826d int, F_bd686fd640be98efaae0091fa301e613 int, F_a597e50502f5ff68e3e25b9114205d4a int, F_0336dcbab05b9d5ad24f4333c7658a0e int, F_084b6fbb10729ed4da8c3d3f5a3ae7c9 int, F_85d8ce590ad8981ca2c8286f79f59954 int, F_0e65972dce68dad4d52d063967f0a705 int, F_84d9ee44e457ddef7f2c4f25dc8fa865 int, F_3644a684f98ea8fe223c713b77189a77 int, F_757b505cfd34c64c85ca5b5690ee5293 int, F_854d6fae5ee42911677c739ee1734486 int, F_e2c0be24560d78c5e599c2a9c9d0bbd2 int, F_274ad4786c3abca69fa097b85867d9a4 int, F_eae27d77ca20db309e056e3d2dcd7d69 int, F_7eabe3a1649ffa2b3ff8c02ebfd5659f int, F_69adc1e107f7f7d035d7baf04342e1ca int, F_091d584fced301b442654dd8c23b3fc9 int, F_b1d10e7bafa4421218a51b1e1f1b0ba2 int, F_6f3ef77ac0e3619e98159e9b6febf557 int, F_eb163727917cbba1eea208541a643e74 int, F_1534b76d325a8f591b52d302e7181331 int, F_979d472a84804b9f647bc185a877a8b5 int, F_ca46c1b9512a7a8315fa3c5a946e8265 int, F_3b8a614226a953a8cd9526fca6fe9ba5 int, F_45fbc6d3e05ebd93369ce542e8f2322d int, F_63dc7ed1010d3c3b8269faf0ba7491d4 int, F_e96ed478dab8595a7dbda4cbcbee168f int, F_c0e190d8267e36708f955d7ab048990d int, F_ec8ce6abb3e952a85b8551ba726a1227 int, F_060ad92489947d410d897474079c1477 int, F_bcbe3365e6ac95ea2c0343a2395834dd int, F_115f89503138416a242f40fb7d7f338e int, F_13fe9d84310e77f13a6d184dbf1232f3 int, F_d1c38a09acc34845c6be3a127a5aacaf int, F_9cfdf10e8fc047a44b08ed031e1f0ed1 int, F_705f2172834666788607efbfca35afb3 int, F_74db120f0a8e5646ef5a30154e9f6deb int, F_57aeee35c98205091e18d1140e9f38cf int, F_6da9003b743b65f4c0ccd295cc484e57 int, F_9b04d152845ec0a378394003c96da594 int, F_be83ab3ecd0db773eb2dc1b0a17836a1 int, F_e165421110ba03099a1c0393373c5b43 int, F_289dff07669d7a23de0ef88d2f7129e7 int, F_577ef1154f3240ad5b9b413aa7346a1e int, F_01161aaa0b6d1345dd8fe4e481144d84 int, F_539fd53b59e3bb12d203f45a912eeaf2 int, F_ac1dd209cbcc5e5d1c6e28598e8cbbe8 int, F_555d6702c950ecb729a966504af0a635 int, F_335f5352088d7d9bf74191e006d8e24c int, F_f340f1b1f65b6df5b5e3f94d95b11daf int, F_e4a6222cdb5b34375400904f03d8e6a5 int, F_cb70ab375662576bd1ac5aaf16b3fca4 int, F_9188905e74c28e489b44e954ec0b9bca int, F_0266e33d3f546cb5436a10798e657d97 int, F_38db3aed920cf82ab059bfccbd02be6a int, F_3cec07e9ba5f5bb252d13f5f431e4bbb int, F_621bf66ddb7c962aa0d22ac97d69b793 int, F_077e29b11be80ab57e1a2ecabb7da330 int, F_6c9882bbac1c7093bd25041881277658 int, F_19f3cd308f1455b3fa09a282e0d496f4 int, F_03c6b06952c750899bb03d998e631860 int, F_c24cd76e1ce41366a4bbe8a49b02a028 int, F_c52f1bd66cc19d05628bd8bf27af3ad6 int, F_fe131d7f5a6b38b23cc967316c13dae2 int, F_f718499c1c8cef6730f9fd03c8125cab int, F_d96409bf894217686ba124d7356686c9 int, F_502e4a16930e414107ee22b6198c578f int, F_cfa0860e83a4c3a763a7e62d825349f7 int, F_a4f23670e1833f3fdb077ca70bbd5d66 int, F_b1a59b315fc9a3002ce38bbe070ec3f5 int, F_36660e59856b4de58a219bcf4e27eba3 int, F_8c19f571e251e61cb8dd3612f26d5ecf int, F_d6baf65e0b240ce177cf70da146c8dc8 int, F_e56954b4f6347e897f954495eab16a88 int, F_f7664060cc52bc6f3d620bcedc94a4b6 int, F_eda80a3d5b344bc40f3bc04f65b7a357 int, F_8f121ce07d74717e0b1f21d122e04521 int, F_06138bc5af6023646ede0e1f7c1eac75 int, F_39059724f73a9969845dfe4146c5660e int, F_7f100b7b36092fb9b06dfb4fac360931 int, F_7a614fd06c325499f1680b9896beedeb int, F_4734ba6f3de83d861c3176a6273cac6d int, F_d947bf06a885db0d477d707121934ff8 int, F_63923f49e5241343aa7acb6a06a751e7 int, F_db8e1af0cb3aca1ae2d0018624204529 int, F_20f07591c6fcb220ffe637cda29bb3f6 int, F_07cdfd23373b17c6b337251c22b7ea57 int, F_d395771085aab05244a4fb8fd91bf4ee int, F_92c8c96e4c37100777c7190b76d28233 int, F_e3796ae838835da0b6f6ea37bcf8bcb7 int, F_6a9aeddfc689c1d0e3b9ccc3ab651bc5 int, F_0f49c89d1e7298bb9930789c8ed59d48 int, F_46ba9f2a6976570b0353203ec4474217 int, F_0e01938fc48a2cfb5f2217fbfb00722d int, F_16a5cdae362b8d27a1d8f8c7b78b4330 int, F_918317b57931b6b7a7d29490fe5ec9f9 int, F_48aedb8880cab8c45637abc7493ecddd int, F_839ab46820b524afda05122893c2fe8e int, F_f90f2aca5c640289d0a29417bcb63a37 int, F_9c838d2e45b2ad1094d42f4ef36764f6 int, F_1700002963a49da13542e0726b7bb758 int, F_53c3bce66e43be4f209556518c2fcb54 int, F_6883966fd8f918a4aa29be29d2c386fb int, F_49182f81e6a13cf5eaa496d51fea6406 int, F_d296c101daa88a51f6ca8cfc1ac79b50 int, F_9fd81843ad7f202f26c1a174c7357585 int, F_26e359e83860db1d11b6acca57d8ea88 int, F_ef0d3930a7b6c95bd2b32ed45989c61f int, F_94f6d7e04a4d452035300f18b984988c int, F_34ed066df378efacc9b924ec161e7639 int, F_577bcc914f9e55d5e4e4f82f9f00e7d4 int, F_11b9842e0a271ff252c1903e7132cd68 int, F_37bc2f75bf1bcfe8450a1a41c200364c int, F_496e05e1aea0a9c4655800e8a7b9ea28 int, F_b2eb7349035754953b57a32e2841bda5 int, F_8e98d81f8217304975ccb23337bb5761 int, F_a8c88a0055f636e4a163a5e3d16adab7 int, F_eddea82ad2755b24c4e168c5fc2ebd40 int, F_06eb61b839a0cefee4967c67ccb099dc int, F_9dfcd5e558dfa04aaf37f137a1d9d3e5 int, F_950a4152c2b4aa3ad78bdd6b366cc179 int, F_158f3069a435b314a80bdcb024f8e422 int, F_758874998f5bd0c393da094e1967a72b int, F_ad13a2a07ca4b7642959dc0c4c740ab6 int, F_3fe94a002317b5f9259f82690aeea4cd int, F_5b8add2a5d98b1a652ea7fd72d942dac int, F_432aca3a1e345e339f35a30c8f65edce int, F_8d3bba7425e7c98c50f52ca1b52d3735 int, F_320722549d1751cf3f247855f937b982 int, F_caf1a3dfb505ffed0d024130f58c5cfa int, F_5737c6ec2e0716f3d8a7a5c4e0de0d9a int, F_bc6dc48b743dc5d013b1abaebd2faed2 int, F_f2fc990265c712c49d51a18a32b39f0c int, F_89f0fd5c927d466d6ec9a21b9ac34ffa int, F_a666587afda6e89aec274a3657558a27 int, F_b83aac23b9528732c23cc7352950e880 int, F_cd00692c3bfe59267d5ecfac5310286c int, F_6faa8040da20ef399b63a72d0e4ab575 int, F_fe73f687e5bc5280214e0486b273a5f9 int);insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);--exec $MYSQL_DUMP --skip-comments -c testdrop table t1;## Test for --add-drop-database#CREATE TABLE t1 (a int);INSERT INTO t1 VALUES (1),(2),(3);--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases testDROP TABLE t1;## Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)#create database db1;use db1;CREATE TABLE t2 ( a varchar(30) default NULL, KEY a (a(5)));INSERT INTO t2 VALUES ('alfred');INSERT INTO t2 VALUES ('angie');INSERT INTO t2 VALUES ('bingo');INSERT INTO t2 VALUES ('waffle');INSERT INTO t2 VALUES ('lemon');create view v2 as select * from t2 where a like 'a%' with check option;--exec $MYSQL_DUMP --skip-comments db1drop table t2;drop view v2;drop database db1;## Bug 10713 mysqldump includes database in create view and referenced tables## create table and views in db2create database db2;use db2;create table t1 (a int);create table t2 (a int, b varchar(10), primary key(a));insert into t2 values (1, "on"), (2, "off"), (10, "pol"), (12, "meg");insert into t1 values (289), (298), (234), (456), (789);create view v1 as select * from t2;create view v2 as select * from t1;# dump tables and view from db2--exec $MYSQL_DUMP db2 > $MYSQLTEST_VARDIR/tmp/bug10713.sql# drop the db, tables and viewsdrop table t1, t2;drop view v1, v2;drop database db2;# create db1 and reload dumpcreate database db1;use db1;--exec $MYSQL db1 < $MYSQLTEST_VARDIR/tmp/bug10713.sql# check that all tables and views could be createdshow tables;select * from t2 order by a;drop table t1, t2;drop database db1;## Bug #9558 mysqldump --no-data db t1 t2 format still dumps data#CREATE DATABASE mysqldump_test_db;USE mysqldump_test_db;CREATE TABLE t1 ( a INT );CREATE TABLE t2 ( a INT );INSERT INTO t1 VALUES (1), (2);INSERT INTO t2 VALUES (1), (2);--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db t1 t2--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2DROP TABLE t1, t2;DROP DATABASE mysqldump_test_db;## Testing with tables and databases that don't exists# or contains illegal characters# (Bug #9358 mysqldump crashes if tablename starts with \)#create database mysqldump_test_db;use mysqldump_test_db;create table t1(a varchar(30) primary key, b int not null);create table t2(a varchar(30) primary key, b int not null);create table t3(a varchar(30) primary key, b int not null);--disable_query_logselect '------ Testing with illegal table names ------' as test_sequence ;--enable_query_log--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\t1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1 --error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\\1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t/1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1--error 6--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1--disable_query_logselect '------ Testing with illegal database names ------' as test_sequence ;--enable_query_log--error 2--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_d 2>&1--error 2--exec $MYSQL_DUMP --compact --skip-comments "mysqld\ump_test_db" 2>&1drop table t1, t2, t3;drop database mysqldump_test_db;use test;## Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly#create table t1 (a int(10));create table t2 (pk int primary key auto_increment,a int(10), b varchar(30), c datetime, d blob, e text);insert into t1 values (NULL), (10), (20);insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");--exec $MYSQL_DUMP --skip-comments --xml --no-create-info testdrop table t1, t2;## BUG #12123#create table t1 (a text character set utf8, b text character set latin1);insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);select * from t1;--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql--exec $MYSQL_IMPORT test $MYSQLTEST_VARDIR/tmp/t1.txtselect * from t1;drop table t1;# End of 4.1 tests## dump of view#create table t1(a int);create view v1 as select * from t1;--exec $MYSQL_DUMP --skip-comments testdrop view v1;drop table t1;## Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)#create database mysqldump_test_db;use mysqldump_test_db;CREATE TABLE t2 ( a varchar(30) default NULL, KEY a (a(5)));INSERT INTO t2 VALUES ('alfred');INSERT INTO t2 VALUES ('angie');INSERT INTO t2 VALUES ('bingo');INSERT INTO t2 VALUES ('waffle');INSERT INTO t2 VALUES ('lemon');create view v2 as select * from t2 where a like 'a%' with check option;--exec $MYSQL_DUMP --skip-comments mysqldump_test_dbdrop table t2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -