~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/suite/broken/t/mysqldump.test

  • Committer: Brian Aker
  • Date: 2009-01-07 09:27:07 UTC
  • Revision ID: brian@tangent.org-20090107092707-bn67qpdllfcyh3j9
Removing dead field translator code.

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
1
5
 
2
6
--disable_warnings
3
7
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
6
10
drop database if exists db2;
7
11
--enable_warnings
8
12
 
 
13
# XML output
 
14
 
 
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
 
18
DROP TABLE t1;
 
19
 
9
20
--echo #
10
21
--echo # Bug #2005
11
22
--echo #
17
28
DROP TABLE t1;
18
29
 
19
30
--echo #
 
31
--echo # Bug #1707
 
32
--echo #
 
33
 
 
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
 
37
DROP TABLE t1;
 
38
 
 
39
--echo #
 
40
--echo # Bug #1994
 
41
--echo # Bug #4261
 
42
--echo #
 
43
 
 
44
#
 
45
# @TODO Implement collation checking for UTF8 + collations
 
46
#
 
47
#CREATE TABLE t1 (a  VARCHAR(255)) DEFAULT CHARSET koi8r;
 
48
#INSERT INTO t1  VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
 
49
#--exec $DRIZZLE_DUMP --skip-comments --skip-extended-insert test t1
 
50
#DROP TABLE t1;
 
51
 
 
52
--echo #
 
53
--echo # Bug #2634
 
54
--echo #
 
55
 
 
56
CREATE TABLE t1 (a int) ENGINE=MYISAM;
 
57
INSERT INTO t1 VALUES (1), (2);
 
58
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql40 test t1
 
59
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql323 test t1
 
60
DROP TABLE t1;
 
61
 
 
62
--echo #
20
63
--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
21
64
--echo #
22
65
 
24
67
--exec $DRIZZLE_DUMP --compact test
25
68
drop table ```a`;
26
69
 
 
70
#--echo #
 
71
#--echo # Bug #2705 'mysqldump --tab extra output'
 
72
#--echo #
 
73
#
 
74
#create table t1(a int);
 
75
#insert into t1 values (1),(2),(3);
 
76
#--exec $DRIZZLE_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
 
77
#--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
78
#--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
79
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
80
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
81
#--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
82
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
83
#--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
84
#drop table t1;
 
85
#
27
86
--echo #
28
87
--echo # Bug #6101: create database problem
29
88
--echo #
33
92
#
34
93
# @TODO Implement collation checking for UTF8 + collations
35
94
#
36
 
create database mysqldump_test_db collate utf8_esperanto_ci;
37
 
--exec $DRIZZLE_DUMP --skip-comments --databases mysqldump_test_db
38
 
drop database mysqldump_test_db;
 
95
#create database mysqldump_test_db character set latin2 collate latin2_bin;
 
96
#--exec $DRIZZLE_DUMP --skip-comments --databases mysqldump_test_db
 
97
#drop database mysqldump_test_db;
39
98
 
40
99
--echo #
41
100
--echo # Bug #7020
44
103
--echo # --default-character-set=xxx. However, we should dump in UTF8
45
104
--echo # if it is explicitely set.
46
105
 
 
106
#
 
107
# @TODO Implement collation checking for UTF8 + collations
 
108
#
 
109
#CREATE TABLE t1 (a  CHAR(10));
 
110
#INSERT INTO t1  VALUES (_latin1 '����');
 
111
#--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
 
112
 
 
113
--echo #
 
114
--echo # Bug#8063: make test mysqldump [ fail ]
 
115
--echo # We cannot tes this command because its output depends
 
116
--echo # on --default-character-set incompiled into "mysqldump" program.
 
117
--echo # If the future we can move this command into a separate test with
 
118
--echo # checking that "mysqldump" is compiled with "latin1"
 
119
--echo #
 
120
 
 
121
#
 
122
# @TODO Implement collation checking for UTF8 + collations
 
123
#
 
124
#--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
 
125
#--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
 
126
#--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
 
127
#--exec $DRIZZLE_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
 
128
#DROP TABLE t1;
47
129
 
48
130
--echo #
49
131
--echo # WL #2319: Exclude Tables from dump
63
145
 
64
146
CREATE TABLE t1 (`b` blob);
65
147
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
66
 
--exec $DRIZZLE_DUMP --skip-extended-insert test --skip-comments t1
 
148
--exec $DRIZZLE_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
67
149
DROP TABLE t1;
68
150
 
69
151
--echo #
74
156
INSERT INTO t1 VALUES (1),(2),(3);
75
157
INSERT INTO t1 VALUES (4),(5),(6);
76
158
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore test t1
 
159
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore --delayed-insert test t1
77
160
DROP TABLE t1;
78
161
 
79
162
--echo #
412
495
 F_6faa8040da20ef399b63a72d0e4ab575 int,
413
496
 F_fe73f687e5bc5280214e0486b273a5f9 int);
414
497
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
415
 
--exec $DRIZZLE_DUMP --skip-comments test
 
498
--exec $DRIZZLE_DUMP --skip-comments -c test
416
499
drop table t1;
417
500
 
418
501
--echo #
436
519
INSERT INTO t2 VALUES (1), (2);
437
520
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db
438
521
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
 
522
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
 
523
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
439
524
DROP TABLE t1, t2;
440
525
DROP DATABASE mysqldump_test_db;
441
526
 
453
538
--disable_query_log
454
539
select '------ Testing with illegal table names ------' as test_sequence ;
455
540
--enable_query_log
456
 
--error 2
 
541
--error 6
457
542
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
458
543
 
459
 
--error 2
 
544
--error 6
460
545
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\t1" 2>&1
461
546
 
462
 
--error 2
 
547
--error 6
463
548
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\t1" 2>&1
464
549
 
465
 
--error 2
 
550
--error 6
466
551
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\\\t1" 2>&1
467
552
 
468
 
--error 2
 
553
--error 6
469
554
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t\1" 2>&1
470
555
 
471
 
--error 2
 
556
--error 6
472
557
--exec $DRIZZLE_DUMP --compact --skip-comments  mysqldump_test_db  "t\\1" 2>&1
473
558
 
474
 
--error 2
 
559
--error 6
475
560
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t/1" 2>&1
476
561
 
477
 
--error 2
 
562
--error 6
478
563
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
479
564
 
480
 
--error 2
 
565
--error 6
481
566
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1
482
567
 
483
 
--error 2
 
568
--error 6
484
569
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1
485
570
 
486
 
--error 2
 
571
--error 6
487
572
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
488
573
 
489
 
--error 2
 
574
--error 6
490
575
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1
491
576
 
492
577
--disable_query_log
504
589
 
505
590
 
506
591
--echo #
 
592
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
 
593
--echo #
 
594
 
 
595
create table t1 (a int);
 
596
create table t2 (pk int primary key auto_increment,
 
597
a int, b varchar(30), c datetime, d blob, e text);
 
598
insert into t1 values (NULL), (10), (20);
 
599
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
 
600
--exec $DRIZZLE_DUMP  --skip-comments --xml --no-create-info test
 
601
drop table t1, t2;
 
602
 
 
603
--echo #
 
604
--echo # BUG #12123
 
605
--echo #
 
606
 
 
607
#
 
608
# @TODO Implement collation checking for UTF8 + collations
 
609
#
 
610
#create table t1 (a text character set utf8, b text character set latin1);
 
611
#insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
 
612
#select * from t1;
 
613
#--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
614
#--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
 
615
#--exec $DRIZZLE_IMPORT test $MYSQLTEST_VARDIR/tmp/t1.txt
 
616
#select * from t1;
 
617
 
 
618
#drop table t1;
 
619
 
 
620
--echo #
 
621
--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
 
622
--echo #
 
623
 
 
624
--exec $DRIZZLE_MY_PRINT_DEFAULTS --config-file=$DRIZZLE_TEST_DIR/std_data/bug15328.cnf mysqldump
 
625
 
 
626
--echo #
507
627
--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
508
628
--echo #
509
629
 
522
642
 
523
643
show create table `t1`;
524
644
 
525
 
--exec $DRIZZLE_DUMP --skip-comments test t1 > $DRIZZLETEST_VARDIR/tmp/bug19025.sql
 
645
--exec $DRIZZLE_DUMP --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
526
646
DROP TABLE `t1`;
527
647
 
528
 
--exec $DRIZZLE test < $DRIZZLETEST_VARDIR/tmp/bug19025.sql
 
648
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug19025.sql
529
649
 
530
650
select * from t1;
531
651
 
540
660
create table t1(a int);
541
661
create table t2(a int);
542
662
create table t3(a int);
 
663
--error 6
543
664
--exec $DRIZZLE_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
544
665
drop table t1, t2, t3;
545
666
 
546
667
--echo #
 
668
--echo # Bug #21288: mysqldump segmentation fault when using --where
 
669
--echo #
 
670
 
 
671
create table t1 (a int);
 
672
--error 2
 
673
--exec $DRIZZLE_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
 
674
drop table t1;
 
675
 
 
676
--echo #
547
677
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
548
678
--echo #
549
679
 
550
 
#--disable_warnings
551
 
#DROP TABLE IF EXISTS `t1`;
552
 
#CREATE TABLE `t1` (
553
 
#  `a b` INT,
554
 
#  `c"d` INT,
555
 
#  `e``f` INT,
556
 
#  PRIMARY KEY (`a b`, `c"d`, `e``f`)
557
 
#);
558
 
#insert into t1 values (0815, 4711, 2006);
559
 
#
560
 
#--exec $DRIZZLE_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
561
 
#--exec $DRIZZLE_DUMP --skip-comments --order-by-primary test t1
562
 
#DROP TABLE `t1`;
563
 
#--enable_warnings
 
680
--disable_warnings
 
681
DROP TABLE IF EXISTS `t1`;
 
682
CREATE TABLE `t1` (
 
683
  `a b` INT,
 
684
  `c"d` INT,
 
685
  `e``f` INT,
 
686
  PRIMARY KEY (`a b`, `c"d`, `e``f`)
 
687
) ENGINE=MyISAM;
 
688
insert into t1 values (0815, 4711, 2006);
 
689
 
 
690
--exec $DRIZZLE_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
 
691
--exec $DRIZZLE_DUMP --skip-comments --order-by-primary test t1
 
692
DROP TABLE `t1`;
 
693
--enable_warnings
564
694
 
565
695
--echo End of 4.1 tests
566
696
 
570
700
--echo #
571
701
 
572
702
--echo # --skip-dump-date:
573
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// /^-- DRI.*///
 
703
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*//
574
704
--exec $DRIZZLE_DUMP --skip-dump-date test
575
705
 
576
706
--echo # --dump-date:
577
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
578
 
--exec $DRIZZLE_DUMP test 
 
707
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
 
708
--exec $DRIZZLE_DUMP --dump-date test
579
709
 
580
710
--echo # --dump-date (default):
581
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
 
711
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
582
712
--exec $DRIZZLE_DUMP test
583
713
 
584
714
--echo #
613
743
insert t2 values ("a more perfect", "union");
614
744
select * from t1;
615
745
select * from t2;
616
 
--exec $DRIZZLE_DUMP --tab=$DRIZZLETEST_VARDIR/tmp/ test
617
 
--exec $DRIZZLE test < $DRIZZLETEST_VARDIR/tmp/t1.sql
618
 
--exec $DRIZZLE test < $DRIZZLETEST_VARDIR/tmp/t2.sql
 
746
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
747
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
 
748
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t2.sql
619
749
# The first load tests the pausing code
620
 
--exec $DRIZZLE_IMPORT --use-threads=1 test $DRIZZLETEST_VARDIR/tmp/t1.txt $DRIZZLETEST_VARDIR/tmp/t2.txt
 
750
--exec $DRIZZLE_IMPORT --use-threads=1 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
621
751
# Now we test with multiple threads!
622
 
--exec $DRIZZLE_IMPORT --silent --use-threads=5 test $DRIZZLETEST_VARDIR/tmp/t1.txt $DRIZZLETEST_VARDIR/tmp/t2.txt
 
752
--exec $DRIZZLE_IMPORT --silent --use-threads=5 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
623
753
select * from t1;
624
754
select * from t2;
625
755
# Now we test with multiple threads, but less threads than files.
626
756
create table words(a varchar(255));
627
757
create table words2(b varchar(255));
628
 
--exec $DRIZZLE_IMPORT --silent --use-threads=2 test $DRIZZLETEST_VARDIR/tmp/t1.txt $DRIZZLETEST_VARDIR/tmp/t2.txt $DRIZZLETEST_VARDIR/std_data_ln/words.dat $DRIZZLETEST_VARDIR/std_data_ln/words2.dat
 
758
--exec $DRIZZLE_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data_ln/words.dat $MYSQLTEST_VARDIR/std_data_ln/words2.dat
629
759
select * from t1;
630
760
select * from t2;
631
761
select * from words;
635
765
drop table words;
636
766
--replace_regex /.*mysqlimport(\.exe)*/mysql-import/
637
767
--error 1
638
 
--exec $DRIZZLE_IMPORT --silent --use-threads=2 test $DRIZZLETEST_VARDIR/tmp/t1.txt $DRIZZLETEST_VARDIR/tmp/t2.txt $DRIZZLETEST_VARDIR/std_data_ln/words.dat $DRIZZLETEST_VARDIR/std_data_ln/words2.dat 2>&1
 
768
--exec $DRIZZLE_IMPORT --silent --use-threads=2 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt $MYSQLTEST_VARDIR/std_data_ln/words.dat $MYSQLTEST_VARDIR/std_data_ln/words2.dat 2>&1
639
769
 
640
770
drop table t1;
641
771
drop table t2;
650
780
create database `test-database`;
651
781
use `test-database`;
652
782
create table test (a int);
653
 
--exec $DRIZZLE_DUMP --compact test-database
 
783
--exec $DRIZZLE_DUMP --compact --opt --quote-names test-database
654
784
drop database `test-database`;
655
785
use test;
656
786
 
657
 
#
658
 
# Bug #30126: semicolon before closing */ in /*!... CREATE DATABASE ;*/
659
 
#
660
 
 
661
 
CREATE DATABASE mysqldump_30126;
662
 
USE mysqldump_30126;
663
 
CREATE TABLE t1 (c1 int);
664
 
--exec $DRIZZLE_DUMP --add-drop-database mysqldump_30126 > $DRIZZLETEST_VARDIR/tmp/bug30126.sql
665
 
--exec $DRIZZLE mysqldump_30126 < $DRIZZLETEST_VARDIR/tmp/bug30126.sql
666
 
DROP DATABASE mysqldump_30126;
667
 
 
668
 
 
669
787
###########################################################################
670
788
 
671
789
--echo #
672
790
--echo # End of 5.1 tests
673
791
--echo #
674