~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/drizzledump.test

  • Committer: Monty Taylor
  • Date: 2010-06-19 16:36:52 UTC
  • mto: This revision was merged to the branch mainline in revision 1628.
  • Revision ID: mordred@inaugust.com-20100619163652-6fej38011wsop52k
Moved password parsing code into get_password.cc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
DROP TABLE t1;
18
18
 
19
19
--echo #
 
20
--echo # Bug #1707
 
21
--echo #
 
22
 
 
23
CREATE TABLE t1 (`a"b"` char(2));
 
24
INSERT INTO t1 VALUES ("1\""), ("\"2");
 
25
--exec $DRIZZLE_DUMP --compact --skip-create -X test t1
 
26
DROP TABLE t1;
 
27
 
 
28
--echo #
 
29
--echo # Bug #2634
 
30
--echo #
 
31
 
 
32
CREATE TABLE t1 (a int);
 
33
INSERT INTO t1 VALUES (1), (2);
 
34
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql40 test t1
 
35
--exec $DRIZZLE_DUMP --skip-comments --compatible=mysql323 test t1
 
36
DROP TABLE t1;
 
37
 
 
38
--echo #
20
39
--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
21
40
--echo #
22
41
 
25
44
drop table ```a`;
26
45
 
27
46
--echo #
 
47
--echo # Bug #2705 'mysqldump --tab extra output'
 
48
--echo #
 
49
 
 
50
create table t1(a int);
 
51
insert into t1 values (1),(2),(3);
 
52
--exec $DRIZZLE_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
 
53
--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
54
--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
55
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
56
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
57
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
58
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
59
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
60
drop table t1;
 
61
 
 
62
--echo #
28
63
--echo # Bug #6101: create database problem
29
64
--echo #
30
65
 
63
98
 
64
99
CREATE TABLE t1 (`b` blob);
65
100
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
66
 
--exec $DRIZZLE_DUMP --skip-extended-insert test --skip-comments t1
 
101
--exec $DRIZZLE_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
67
102
DROP TABLE t1;
68
103
 
69
104
--echo #
74
109
INSERT INTO t1 VALUES (1),(2),(3);
75
110
INSERT INTO t1 VALUES (4),(5),(6);
76
111
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore test t1
 
112
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore --delayed-insert test t1
77
113
DROP TABLE t1;
78
114
 
79
115
--echo #
412
448
 F_6faa8040da20ef399b63a72d0e4ab575 int,
413
449
 F_fe73f687e5bc5280214e0486b273a5f9 int);
414
450
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
415
 
--exec $DRIZZLE_DUMP --skip-comments test
 
451
--exec $DRIZZLE_DUMP --skip-comments -c test
416
452
drop table t1;
417
453
 
418
454
--echo #
436
472
INSERT INTO t2 VALUES (1), (2);
437
473
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db
438
474
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
 
475
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
 
476
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
439
477
DROP TABLE t1, t2;
440
478
DROP DATABASE mysqldump_test_db;
441
479
 
453
491
--disable_query_log
454
492
select '------ Testing with illegal table names ------' as test_sequence ;
455
493
--enable_query_log
456
 
--error 2
 
494
--error 6
457
495
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
458
496
 
459
 
--error 2
 
497
--error 6
460
498
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\t1" 2>&1
461
499
 
462
 
--error 2
 
500
--error 6
463
501
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\t1" 2>&1
464
502
 
465
 
--error 2
 
503
--error 6
466
504
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\\\t1" 2>&1
467
505
 
468
 
--error 2
 
506
--error 6
469
507
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t\1" 2>&1
470
508
 
471
 
--error 2
 
509
--error 6
472
510
--exec $DRIZZLE_DUMP --compact --skip-comments  mysqldump_test_db  "t\\1" 2>&1
473
511
 
474
 
--error 2
 
512
--error 6
475
513
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t/1" 2>&1
476
514
 
477
 
--error 2
 
515
--error 6
478
516
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
479
517
 
480
 
--error 2
 
518
--error 6
481
519
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1
482
520
 
483
 
--error 2
 
521
--error 6
484
522
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1
485
523
 
486
 
--error 2
 
524
--error 6
487
525
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
488
526
 
489
 
--error 2
 
527
--error 6
490
528
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1
491
529
 
492
530
--disable_query_log
504
542
 
505
543
 
506
544
--echo #
 
545
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
 
546
--echo #
 
547
 
 
548
create table t1 (a int);
 
549
create table t2 (pk int primary key auto_increment,
 
550
a int, b varchar(30), c datetime, d blob, e text);
 
551
insert into t1 values (NULL), (10), (20);
 
552
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
 
553
--exec $DRIZZLE_DUMP  --skip-comments --xml --no-create-info test
 
554
drop table t1, t2;
 
555
 
 
556
--echo #
 
557
--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
 
558
--echo #
 
559
 
 
560
--exec $DRIZZLE_MY_PRINT_DEFAULTS --config-file=$DRIZZLE_TEST_DIR/std_data/bug15328.cnf mysqldump
 
561
 
 
562
--echo #
507
563
--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
508
564
--echo #
509
565
 
522
578
 
523
579
show create table `t1`;
524
580
 
525
 
--exec $DRIZZLE_DUMP --skip-comments test t1 > $DRIZZLETEST_VARDIR/tmp/bug19025.sql
 
581
--exec $DRIZZLE_DUMP --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
526
582
DROP TABLE `t1`;
527
583
 
528
 
--exec $DRIZZLE test < $DRIZZLETEST_VARDIR/tmp/bug19025.sql
 
584
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug19025.sql
529
585
 
530
586
select * from t1;
531
587
 
540
596
create table t1(a int);
541
597
create table t2(a int);
542
598
create table t3(a int);
 
599
--error 6
543
600
--exec $DRIZZLE_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
544
601
drop table t1, t2, t3;
545
602
 
546
603
--echo #
 
604
--echo # Bug #21288: mysqldump segmentation fault when using --where
 
605
--echo #
 
606
 
 
607
create table t1 (a int);
 
608
--error 2
 
609
--exec $DRIZZLE_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
 
610
drop table t1;
 
611
 
 
612
--echo #
547
613
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
548
614
--echo #
549
615
 
574
640
--exec $DRIZZLE_DUMP --skip-dump-date test
575
641
 
576
642
--echo # --dump-date:
577
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
578
 
--exec $DRIZZLE_DUMP test 
 
643
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
 
644
--exec $DRIZZLE_DUMP --dump-date test 
579
645
 
580
646
--echo # --dump-date (default):
581
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
 
647
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
582
648
--exec $DRIZZLE_DUMP test
583
649
 
584
650
--echo #
613
679
insert t2 values ("a more perfect", "union");
614
680
select * from t1;
615
681
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
 
682
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
683
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
 
684
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t2.sql
619
685
# 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
 
686
--exec $DRIZZLE_IMPORT --use-threads=1 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
621
687
# 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
 
688
--exec $DRIZZLE_IMPORT --silent --use-threads=5 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
623
689
select * from t1;
624
690
select * from t2;
625
691
# Now we test with multiple threads, but less threads than files.
626
692
create table words(a varchar(255));
627
693
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
 
694
--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
695
select * from t1;
630
696
select * from t2;
631
697
select * from words;
635
701
drop table words;
636
702
--replace_regex /.*mysqlimport(\.exe)*/mysql-import/
637
703
--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
 
704
--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
705
 
640
706
drop table t1;
641
707
drop table t2;
650
716
create database `test-database`;
651
717
use `test-database`;
652
718
create table test (a int);
653
 
--exec $DRIZZLE_DUMP --compact test-database
 
719
--exec $DRIZZLE_DUMP --compact --opt --quote-names test-database
654
720
drop database `test-database`;
655
721
use test;
656
722
 
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
723
###########################################################################
670
724
 
671
725
--echo #
672
726
--echo # End of 5.1 tests
673
727
--echo #
674