~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/t/drizzledump.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-11-12 12:26:01 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101112122601-myppfj3tfmlkccuq
Tags: upstream-2010.11.03
ImportĀ upstreamĀ versionĀ 2010.11.03

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
drop database if exists db2;
7
7
--enable_warnings
8
8
 
9
 
# XML output
10
 
 
11
 
CREATE TABLE t1(a int, key (a)) key_block_size=1024;
12
 
INSERT INTO t1 VALUES (1), (2);
13
 
--exec $DRIZZLE_DUMP --skip-create --skip-comments -X test t1
14
 
DROP TABLE t1;
15
 
 
16
9
--echo #
17
10
--echo # Bug #2005
18
11
--echo #
24
17
DROP TABLE t1;
25
18
 
26
19
--echo #
27
 
--echo # Bug #1707
28
 
--echo #
29
 
 
30
 
CREATE TABLE t1 (`a"b"` char(2));
31
 
INSERT INTO t1 VALUES ("1\""), ("\"2");
32
 
--exec $DRIZZLE_DUMP --compact --skip-create -X test t1
33
 
DROP TABLE t1;
34
 
 
35
 
--echo #
36
 
--echo # Bug #2634
37
 
--echo #
38
 
 
39
 
CREATE TABLE t1 (a int);
40
 
INSERT INTO t1 VALUES (1), (2);
41
 
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql40 test t1
42
 
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql323 test t1
43
 
DROP TABLE t1;
44
 
 
45
 
--echo #
46
20
--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
47
21
--echo #
48
22
 
51
25
drop table ```a`;
52
26
 
53
27
--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
 
 
69
 
--echo #
70
28
--echo # Bug #6101: create database problem
71
29
--echo #
72
30
 
105
63
 
106
64
CREATE TABLE t1 (`b` blob);
107
65
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
108
 
--exec $DRIZZLE_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
 
66
--exec $DRIZZLE_DUMP --skip-extended-insert test --skip-comments t1
109
67
DROP TABLE t1;
110
68
 
111
69
--echo #
116
74
INSERT INTO t1 VALUES (1),(2),(3);
117
75
INSERT INTO t1 VALUES (4),(5),(6);
118
76
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore test t1
119
 
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore --delayed-insert test t1
120
77
DROP TABLE t1;
121
78
 
122
79
--echo #
455
412
 F_6faa8040da20ef399b63a72d0e4ab575 int,
456
413
 F_fe73f687e5bc5280214e0486b273a5f9 int);
457
414
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
458
 
--exec $DRIZZLE_DUMP --skip-comments -c test
 
415
--exec $DRIZZLE_DUMP --skip-comments test
459
416
drop table t1;
460
417
 
461
418
--echo #
479
436
INSERT INTO t2 VALUES (1), (2);
480
437
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db
481
438
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
482
 
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
483
 
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
484
439
DROP TABLE t1, t2;
485
440
DROP DATABASE mysqldump_test_db;
486
441
 
498
453
--disable_query_log
499
454
select '------ Testing with illegal table names ------' as test_sequence ;
500
455
--enable_query_log
501
 
--error 6
 
456
--error 2
502
457
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
503
458
 
504
 
--error 6
 
459
--error 2
505
460
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\t1" 2>&1
506
461
 
507
 
--error 6
 
462
--error 2
508
463
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\t1" 2>&1
509
464
 
510
 
--error 6
 
465
--error 2
511
466
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\\\t1" 2>&1
512
467
 
513
 
--error 6
 
468
--error 2
514
469
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t\1" 2>&1
515
470
 
516
 
--error 6
 
471
--error 2
517
472
--exec $DRIZZLE_DUMP --compact --skip-comments  mysqldump_test_db  "t\\1" 2>&1
518
473
 
519
 
--error 6
 
474
--error 2
520
475
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t/1" 2>&1
521
476
 
522
 
--error 6
 
477
--error 2
523
478
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
524
479
 
525
 
--error 6
 
480
--error 2
526
481
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1
527
482
 
528
 
--error 6
 
483
--error 2
529
484
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1
530
485
 
531
 
--error 6
 
486
--error 2
532
487
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
533
488
 
534
 
--error 6
 
489
--error 2
535
490
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1
536
491
 
537
492
--disable_query_log
549
504
 
550
505
 
551
506
--echo #
552
 
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
553
 
--echo #
554
 
 
555
 
create table t1 (a int);
556
 
create table t2 (pk int primary key auto_increment,
557
 
a int, b varchar(30), c datetime, d blob, e text);
558
 
insert into t1 values (NULL), (10), (20);
559
 
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
560
 
--exec $DRIZZLE_DUMP  --skip-comments --xml --no-create-info test
561
 
drop table t1, t2;
562
 
 
563
 
--echo #
564
 
--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
565
 
--echo #
566
 
 
567
 
--exec $DRIZZLE_MY_PRINT_DEFAULTS --config-file=$DRIZZLE_TEST_DIR/std_data/bug15328.cnf mysqldump
568
 
 
569
 
--echo #
570
507
--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
571
508
--echo #
572
509
 
585
522
 
586
523
show create table `t1`;
587
524
 
588
 
--exec $DRIZZLE_DUMP --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
 
525
--exec $DRIZZLE_DUMP --skip-comments test t1 > $DRIZZLETEST_VARDIR/tmp/bug19025.sql
589
526
DROP TABLE `t1`;
590
527
 
591
 
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug19025.sql
 
528
--exec $DRIZZLE test < $DRIZZLETEST_VARDIR/tmp/bug19025.sql
592
529
 
593
530
select * from t1;
594
531
 
603
540
create table t1(a int);
604
541
create table t2(a int);
605
542
create table t3(a int);
606
 
--error 6
607
543
--exec $DRIZZLE_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
608
544
drop table t1, t2, t3;
609
545
 
610
546
--echo #
611
 
--echo # Bug #21288: mysqldump segmentation fault when using --where
612
 
--echo #
613
 
 
614
 
create table t1 (a int);
615
 
--error 2
616
 
--exec $DRIZZLE_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
617
 
drop table t1;
618
 
 
619
 
--echo #
620
547
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
621
548
--echo #
622
549
 
647
574
--exec $DRIZZLE_DUMP --skip-dump-date test
648
575
 
649
576
--echo # --dump-date:
650
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
651
 
--exec $DRIZZLE_DUMP --dump-date test 
 
577
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
 
578
--exec $DRIZZLE_DUMP test 
652
579
 
653
580
--echo # --dump-date (default):
654
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
 
581
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
655
582
--exec $DRIZZLE_DUMP test
656
583
 
657
584
--echo #
686
613
insert t2 values ("a more perfect", "union");
687
614
select * from t1;
688
615
select * from t2;
689
 
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
690
 
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
691
 
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t2.sql
 
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
692
619
# The first load tests the pausing code
693
 
--exec $DRIZZLE_IMPORT --use-threads=1 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
 
620
--exec $DRIZZLE_IMPORT --use-threads=1 test $DRIZZLETEST_VARDIR/tmp/t1.txt $DRIZZLETEST_VARDIR/tmp/t2.txt
694
621
# Now we test with multiple threads!
695
 
--exec $DRIZZLE_IMPORT --silent --use-threads=5 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
 
622
--exec $DRIZZLE_IMPORT --silent --use-threads=5 test $DRIZZLETEST_VARDIR/tmp/t1.txt $DRIZZLETEST_VARDIR/tmp/t2.txt
696
623
select * from t1;
697
624
select * from t2;
698
625
# Now we test with multiple threads, but less threads than files.
699
626
create table words(a varchar(255));
700
627
create table words2(b varchar(255));
701
 
--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
 
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
702
629
select * from t1;
703
630
select * from t2;
704
631
select * from words;
708
635
drop table words;
709
636
--replace_regex /.*mysqlimport(\.exe)*/mysql-import/
710
637
--error 1
711
 
--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
 
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
712
639
 
713
640
drop table t1;
714
641
drop table t2;
723
650
create database `test-database`;
724
651
use `test-database`;
725
652
create table test (a int);
726
 
--exec $DRIZZLE_DUMP --compact --opt --quote-names test-database
 
653
--exec $DRIZZLE_DUMP --compact test-database
727
654
drop database `test-database`;
728
655
use test;
729
656
 
 
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
 
730
669
###########################################################################
731
670
 
732
671
--echo #
733
672
--echo # End of 5.1 tests
734
673
--echo #
 
674