~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/drizzledump.test

  • Committer: lbieber
  • Date: 2010-09-07 22:29:56 UTC
  • mfrom: (1747.1.3 build)
  • Revision ID: lbieber@orisndriz03-20100907222956-d60u695b7hx3zs0d
Merge Andrew - bug 597778 - Timestamp cannot reliably store leap seconds, so don't try. Leave that to datetime only
Merge Andrew - bug 621862 - Add / clean-up error messages for unireg_abort
Merge Andrew - bug 629563 - Drop the broken --mysql options and Change the --protocol option to accept 'mysql' or 'drizzle' ('mysql' currently default)

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 #
20
29
--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
21
30
--echo #
22
31
 
25
34
drop table ```a`;
26
35
 
27
36
--echo #
 
37
--echo # Bug #2705 'mysqldump --tab extra output'
 
38
--echo #
 
39
 
 
40
create table t1(a int);
 
41
insert into t1 values (1),(2),(3);
 
42
--exec $DRIZZLE_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
 
43
--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
44
--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
45
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
46
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
47
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
48
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
 
49
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
 
50
drop table t1;
 
51
 
 
52
--echo #
28
53
--echo # Bug #6101: create database problem
29
54
--echo #
30
55
 
63
88
 
64
89
CREATE TABLE t1 (`b` blob);
65
90
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
66
 
--exec $DRIZZLE_DUMP --skip-extended-insert test --skip-comments t1
 
91
--exec $DRIZZLE_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
67
92
DROP TABLE t1;
68
93
 
69
94
--echo #
74
99
INSERT INTO t1 VALUES (1),(2),(3);
75
100
INSERT INTO t1 VALUES (4),(5),(6);
76
101
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore test t1
 
102
--exec $DRIZZLE_DUMP --skip-comments --insert-ignore --delayed-insert test t1
77
103
DROP TABLE t1;
78
104
 
79
105
--echo #
412
438
 F_6faa8040da20ef399b63a72d0e4ab575 int,
413
439
 F_fe73f687e5bc5280214e0486b273a5f9 int);
414
440
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
415
 
--exec $DRIZZLE_DUMP --skip-comments test
 
441
--exec $DRIZZLE_DUMP --skip-comments -c test
416
442
drop table t1;
417
443
 
418
444
--echo #
436
462
INSERT INTO t2 VALUES (1), (2);
437
463
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db
438
464
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
 
465
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
 
466
--exec $DRIZZLE_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
439
467
DROP TABLE t1, t2;
440
468
DROP DATABASE mysqldump_test_db;
441
469
 
453
481
--disable_query_log
454
482
select '------ Testing with illegal table names ------' as test_sequence ;
455
483
--enable_query_log
456
 
--error 2
 
484
--error 6
457
485
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
458
486
 
459
 
--error 2
 
487
--error 6
460
488
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\t1" 2>&1
461
489
 
462
 
--error 2
 
490
--error 6
463
491
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\t1" 2>&1
464
492
 
465
 
--error 2
 
493
--error 6
466
494
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\\\t1" 2>&1
467
495
 
468
 
--error 2
 
496
--error 6
469
497
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t\1" 2>&1
470
498
 
471
 
--error 2
 
499
--error 6
472
500
--exec $DRIZZLE_DUMP --compact --skip-comments  mysqldump_test_db  "t\\1" 2>&1
473
501
 
474
 
--error 2
 
502
--error 6
475
503
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t/1" 2>&1
476
504
 
477
 
--error 2
 
505
--error 6
478
506
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
479
507
 
480
 
--error 2
 
508
--error 6
481
509
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1
482
510
 
483
 
--error 2
 
511
--error 6
484
512
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1
485
513
 
486
 
--error 2
 
514
--error 6
487
515
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
488
516
 
489
 
--error 2
 
517
--error 6
490
518
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1
491
519
 
492
520
--disable_query_log
504
532
 
505
533
 
506
534
--echo #
 
535
--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
 
536
--echo #
 
537
 
 
538
create table t1 (a int);
 
539
create table t2 (pk int primary key auto_increment,
 
540
a int, b varchar(30), c datetime, d blob, e text);
 
541
insert into t1 values (NULL), (10), (20);
 
542
insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thirty");
 
543
--exec $DRIZZLE_DUMP  --skip-comments --xml --no-create-info test
 
544
drop table t1, t2;
 
545
 
 
546
--echo #
 
547
--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
 
548
--echo #
 
549
 
 
550
--exec $DRIZZLE_MY_PRINT_DEFAULTS --config-file=$DRIZZLE_TEST_DIR/std_data/bug15328.cnf mysqldump
 
551
 
 
552
--echo #
507
553
--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
508
554
--echo #
509
555
 
522
568
 
523
569
show create table `t1`;
524
570
 
525
 
--exec $DRIZZLE_DUMP --skip-comments test t1 > $DRIZZLETEST_VARDIR/tmp/bug19025.sql
 
571
--exec $DRIZZLE_DUMP --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
526
572
DROP TABLE `t1`;
527
573
 
528
 
--exec $DRIZZLE test < $DRIZZLETEST_VARDIR/tmp/bug19025.sql
 
574
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug19025.sql
529
575
 
530
576
select * from t1;
531
577
 
540
586
create table t1(a int);
541
587
create table t2(a int);
542
588
create table t3(a int);
 
589
--error 6
543
590
--exec $DRIZZLE_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
544
591
drop table t1, t2, t3;
545
592
 
546
593
--echo #
 
594
--echo # Bug #21288: mysqldump segmentation fault when using --where
 
595
--echo #
 
596
 
 
597
create table t1 (a int);
 
598
--error 2
 
599
--exec $DRIZZLE_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
 
600
drop table t1;
 
601
 
 
602
--echo #
547
603
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
548
604
--echo #
549
605
 
574
630
--exec $DRIZZLE_DUMP --skip-dump-date test
575
631
 
576
632
--echo # --dump-date:
577
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
578
 
--exec $DRIZZLE_DUMP test 
 
633
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
 
634
--exec $DRIZZLE_DUMP --dump-date test 
579
635
 
580
636
--echo # --dump-date (default):
581
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
 
637
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
582
638
--exec $DRIZZLE_DUMP test
583
639
 
584
640
--echo #
613
669
insert t2 values ("a more perfect", "union");
614
670
select * from t1;
615
671
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
 
672
--exec $DRIZZLE_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
 
673
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
 
674
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t2.sql
619
675
# 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
 
676
--exec $DRIZZLE_IMPORT --use-threads=1 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
621
677
# 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
 
678
--exec $DRIZZLE_IMPORT --silent --use-threads=5 test $MYSQLTEST_VARDIR/tmp/t1.txt $MYSQLTEST_VARDIR/tmp/t2.txt
623
679
select * from t1;
624
680
select * from t2;
625
681
# Now we test with multiple threads, but less threads than files.
626
682
create table words(a varchar(255));
627
683
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
 
684
--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
685
select * from t1;
630
686
select * from t2;
631
687
select * from words;
635
691
drop table words;
636
692
--replace_regex /.*mysqlimport(\.exe)*/mysql-import/
637
693
--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
 
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 2>&1
639
695
 
640
696
drop table t1;
641
697
drop table t2;
650
706
create database `test-database`;
651
707
use `test-database`;
652
708
create table test (a int);
653
 
--exec $DRIZZLE_DUMP --compact test-database
 
709
--exec $DRIZZLE_DUMP --compact --opt --quote-names test-database
654
710
drop database `test-database`;
655
711
use test;
656
712
 
661
717
CREATE DATABASE mysqldump_30126;
662
718
USE mysqldump_30126;
663
719
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
 
720
--exec $DRIZZLE_DUMP --add-drop-database mysqldump_30126 > $MYSQLTEST_VARDIR/tmp/bug30126.sql
 
721
--exec $DRIZZLE mysqldump_30126 < $MYSQLTEST_VARDIR/tmp/bug30126.sql
666
722
DROP DATABASE mysqldump_30126;
667
723
 
668
724