1
--source include/have_log_bin.inc
4
--source include/have_log_bin.inc
3
7
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
6
10
drop database if exists db2;
15
CREATE TABLE t1(a int, key (a)) key_block_size=1024;
16
INSERT INTO t1 VALUES (1), (2);
17
--exec $DRIZZLE_DUMP --skip-create --skip-comments -X test t1
34
CREATE TABLE t1 (`a"b"` char(2));
35
INSERT INTO t1 VALUES ("1\""), ("\"2");
36
--exec $DRIZZLE_DUMP --compact --skip-create -X test t1
44
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
45
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
46
--exec $DRIZZLE_DUMP --skip-comments --skip-extended-insert test t1
53
CREATE TABLE t1 (a int) ENGINE=MYISAM;
54
INSERT INTO t1 VALUES (1), (2);
55
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql40 test t1
56
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql323 test t1
20
60
--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
24
64
--exec $DRIZZLE_DUMP --compact test
68
#--echo # Bug #2705 'mysqldump --tab extra output'
71
#create table t1(a int);
72
#insert into t1 values (1),(2),(3);
73
#--exec $DRIZZLE_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
74
#--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
75
#--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
76
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
77
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
78
#--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
79
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
80
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
28
84
--echo # Bug #6101: create database problem
31
87
--exec $DRIZZLE_DUMP --skip-comments --databases test
34
# @TODO Implement collation checking for UTF8 + collations
36
create database mysqldump_test_db collate utf8_esperanto_ci;
89
create database mysqldump_test_db character set latin2 collate latin2_bin;
37
90
--exec $DRIZZLE_DUMP --skip-comments --databases mysqldump_test_db
38
91
drop database mysqldump_test_db;
44
97
--echo # --default-character-set=xxx. However, we should dump in UTF8
45
98
--echo # if it is explicitely set.
100
CREATE TABLE t1 (a CHAR(10));
101
INSERT INTO t1 VALUES (_latin1 '����');
102
--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
105
--echo # Bug#8063: make test mysqldump [ fail ]
106
--echo # We cannot tes this command because its output depends
107
--echo # on --default-character-set incompiled into "mysqldump" program.
108
--echo # If the future we can move this command into a separate test with
109
--echo # checking that "mysqldump" is compiled with "latin1"
112
#--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
113
--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
114
--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
115
--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
49
119
--echo # WL #2319: Exclude Tables from dump
64
134
CREATE TABLE t1 (`b` blob);
65
135
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
66
--exec $DRIZZLE_DUMP --skip-extended-insert test --skip-comments t1
136
--exec $DRIZZLE_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
437
507
INSERT INTO t2 VALUES (1), (2);
438
508
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db
439
509
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
510
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
511
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
440
512
DROP TABLE t1, t2;
441
513
DROP DATABASE mysqldump_test_db;
454
526
--disable_query_log
455
527
select '------ Testing with illegal table names ------' as test_sequence ;
456
528
--enable_query_log
458
530
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
461
533
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\t1" 2>&1
464
536
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1
467
539
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1
470
542
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "t\1" 2>&1
473
545
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "t\\1" 2>&1
476
548
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "t/1" 2>&1
479
551
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
482
554
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1
485
557
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1
488
560
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
491
563
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1
493
565
--disable_query_log
580
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
583
create table t1 (a int(10));
584
create table t2 (pk int primary key auto_increment,
585
a int(10), b varchar(30), c datetime, d blob, e text);
586
insert into t1 values (NULL), (10), (20);
587
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
588
--exec $DRIZZLE_DUMP --skip-comments --xml --no-create-info test
595
create table t1 (a text character set utf8, b text character set latin1);
596
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
598
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
599
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
600
--exec $DRIZZLE_IMPORT test $MYSQLTEST_VARDIR/tmp/t1.txt
606
--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
609
--exec $DRIZZLE_MY_PRINT_DEFAULTS --config-file=$DRIZZLE_TEST_DIR/std_data/bug15328.cnf mysqldump
508
612
--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
511
615
create table `t1` (
512
616
t1_name varchar(255) default null,
513
t1_id int not null auto_increment,
617
t1_id int(10) not null auto_increment,
515
619
primary key (t1_id)
516
) auto_increment = 1000;
620
) auto_increment = 1000 default charset=latin1;
518
622
insert into t1 (t1_name) values('bla');
519
623
insert into t1 (t1_name) values('bla');
541
645
create table t1(a int);
542
646
create table t2(a int);
543
647
create table t3(a int);
545
649
--exec $DRIZZLE_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
546
650
drop table t1, t2, t3;
653
--echo # Bug #21288: mysqldump segmentation fault when using --where
656
create table t1 (a int);
658
--exec $DRIZZLE_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
549
662
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
553
#DROP TABLE IF EXISTS `t1`;
558
# PRIMARY KEY (`a b`, `c"d`, `e``f`)
560
#insert into t1 values (0815, 4711, 2006);
562
#--exec $DRIZZLE_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
563
#--exec $DRIZZLE_DUMP --skip-comments --order-by-primary test t1
666
DROP TABLE IF EXISTS `t1`;
671
PRIMARY KEY (`a b`, `c"d`, `e``f`)
672
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
673
insert into t1 values (0815, 4711, 2006);
675
--exec $DRIZZLE_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
676
--exec $DRIZZLE_DUMP --skip-comments --order-by-primary test t1
567
680
--echo End of 4.1 tests
574
687
--echo # --skip-dump-date:
575
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// /^-- DRI.*///
688
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*//
576
689
--exec $DRIZZLE_DUMP --skip-dump-date test
578
691
--echo # --dump-date:
579
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
580
--exec $DRIZZLE_DUMP test
692
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
693
--exec $DRIZZLE_DUMP --dump-date test
582
695
--echo # --dump-date (default):
583
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
696
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
584
697
--exec $DRIZZLE_DUMP test
652
765
create database `test-database`;
653
766
use `test-database`;
654
767
create table test (a int);
655
--exec $DRIZZLE_DUMP --compact --opt test-database
768
--exec $DRIZZLE_DUMP --compact --opt --quote-names test-database
656
769
drop database `test-database`;
660
# Bug #30126: semicolon before closing */ in /*!... CREATE DATABASE ;*/
663
CREATE DATABASE mysqldump_30126;
665
CREATE TABLE t1 (c1 int);
666
--exec $DRIZZLE_DUMP --add-drop-database mysqldump_30126 > $MYSQLTEST_VARDIR/tmp/bug30126.sql
667
--exec $DRIZZLE mysqldump_30126 < $MYSQLTEST_VARDIR/tmp/bug30126.sql
668
DROP DATABASE mysqldump_30126;
671
772
###########################################################################
674
775
--echo # End of 5.1 tests