~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/drizzledump.test

Merged in trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--source include/have_log_bin.inc
2
 
 
3
 
# Binlog is required
4
 
--source include/have_log_bin.inc
5
1
 
6
2
--disable_warnings
7
3
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
37
33
DROP TABLE t1;
38
34
 
39
35
--echo #
40
 
--echo # Bug #1994
41
 
--echo # Bug #4261
42
 
--echo #
43
 
 
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
47
 
DROP TABLE t1;
48
 
 
49
 
--echo #
50
36
--echo # Bug #2634
51
37
--echo #
52
38
 
53
 
CREATE TABLE t1 (a int) ENGINE=MYISAM;
 
39
CREATE TABLE t1 (a int);
54
40
INSERT INTO t1 VALUES (1), (2);
55
41
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql40 test t1
56
42
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql323 test t1
64
50
--exec $DRIZZLE_DUMP --compact test
65
51
drop table ```a`;
66
52
 
67
 
#--echo #
68
 
#--echo # Bug #2705 'mysqldump --tab extra output'
69
 
#--echo #
70
 
#
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
81
 
#drop table t1;
82
 
#
 
53
--echo #
 
54
--echo # Bug #2705 'mysqldump --tab extra output'
 
55
--echo #
 
56
 
 
57
create table t1(a int);
 
58
insert into t1 values (1),(2),(3);
 
59
--exec $DRIZZLE_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
 
60
--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
61
--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
62
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
63
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
64
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
65
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
66
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
67
drop table t1;
 
68
 
83
69
--echo #
84
70
--echo # Bug #6101: create database problem
85
71
--echo #
86
72
 
87
73
--exec $DRIZZLE_DUMP --skip-comments --databases test
88
74
 
89
 
create database mysqldump_test_db character set latin2 collate latin2_bin;
 
75
#
 
76
# @TODO Implement collation checking for UTF8 + collations
 
77
#
 
78
create database mysqldump_test_db collate utf8_esperanto_ci;
90
79
--exec $DRIZZLE_DUMP --skip-comments --databases mysqldump_test_db
91
80
drop database mysqldump_test_db;
92
81
 
97
86
--echo # --default-character-set=xxx. However, we should dump in UTF8
98
87
--echo # if it is explicitely set.
99
88
 
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
103
 
 
104
 
--echo #
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"
110
 
--echo #
111
 
 
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
116
 
DROP TABLE t1;
117
89
 
118
90
--echo #
119
91
--echo # WL #2319: Exclude Tables from dump
580
552
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
581
553
--echo #
582
554
 
583
 
create table t1 (a int(10));
 
555
create table t1 (a int);
584
556
create table t2 (pk int primary key auto_increment,
585
 
a int(10), b varchar(30), c datetime, d blob, e text);
 
557
a int, b varchar(30), c datetime, d blob, e text);
586
558
insert into t1 values (NULL), (10), (20);
587
559
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
588
560
--exec $DRIZZLE_DUMP  --skip-comments --xml --no-create-info test
589
561
drop table t1, t2;
590
562
 
591
563
--echo #
592
 
--echo # BUG #12123
593
 
--echo #
594
 
 
595
 
create table t1 (a text character set utf8, b text character set latin1);
596
 
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
597
 
select * from t1;
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
601
 
select * from t1;
602
 
 
603
 
drop table t1;
604
 
 
605
 
--echo #
606
564
--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
607
565
--echo #
608
566
 
614
572
 
615
573
create table `t1` (
616
574
    t1_name varchar(255) default null,
617
 
    t1_id int(10) not null auto_increment,
 
575
    t1_id int not null auto_increment,
618
576
    key (t1_name),
619
577
    primary key (t1_id)
620
 
) auto_increment = 1000 default charset=latin1;
 
578
) auto_increment = 1000;
621
579
 
622
580
insert into t1 (t1_name) values('bla');
623
581
insert into t1 (t1_name) values('bla');
669
627
  `c"d` INT,
670
628
  `e``f` INT,
671
629
  PRIMARY KEY (`a b`, `c"d`, `e``f`)
672
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
630
);
673
631
insert into t1 values (0815, 4711, 2006);
674
632
 
675
633
--exec $DRIZZLE_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
685
643
--echo #
686
644
 
687
645
--echo # --skip-dump-date:
688
 
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*//
 
646
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// /^-- DRI.*///
689
647
--exec $DRIZZLE_DUMP --skip-dump-date test
690
648
 
691
649
--echo # --dump-date:
692
 
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
693
 
--exec $DRIZZLE_DUMP --dump-date test
 
650
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
 
651
--exec $DRIZZLE_DUMP --dump-date test 
694
652
 
695
653
--echo # --dump-date (default):
696
 
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
 
654
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
697
655
--exec $DRIZZLE_DUMP test
698
656
 
699
657
--echo #