~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-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

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 #
479
437
INSERT INTO t2 VALUES (1), (2);
480
438
--exec $DRIZZLE_DUMP --skip-comments --no-data mysqldump_test_db
481
439
--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
440
DROP TABLE t1, t2;
485
441
DROP DATABASE mysqldump_test_db;
486
442
 
498
454
--disable_query_log
499
455
select '------ Testing with illegal table names ------' as test_sequence ;
500
456
--enable_query_log
501
 
--error 6
 
457
--error 2
502
458
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
503
459
 
504
 
--error 6
 
460
--error 2
505
461
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\t1" 2>&1
506
462
 
507
 
--error 6
 
463
--error 2
508
464
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\t1" 2>&1
509
465
 
510
 
--error 6
 
466
--error 2
511
467
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "\\\\t1" 2>&1
512
468
 
513
 
--error 6
 
469
--error 2
514
470
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t\1" 2>&1
515
471
 
516
 
--error 6
 
472
--error 2
517
473
--exec $DRIZZLE_DUMP --compact --skip-comments  mysqldump_test_db  "t\\1" 2>&1
518
474
 
519
 
--error 6
 
475
--error 2
520
476
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db  "t/1" 2>&1
521
477
 
522
 
--error 6
 
478
--error 2
523
479
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
524
480
 
525
 
--error 6
 
481
--error 2
526
482
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T%1" 2>&1
527
483
 
528
 
--error 6
 
484
--error 2
529
485
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T'1" 2>&1
530
486
 
531
 
--error 6
 
487
--error 2
532
488
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_1" 2>&1
533
489
 
534
 
--error 6
 
490
--error 2
535
491
--exec $DRIZZLE_DUMP --compact --skip-comments mysqldump_test_db "T_" 2>&1
536
492
 
537
493
--disable_query_log
549
505
 
550
506
 
551
507
--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
508
--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
571
509
--echo #
572
510
 
603
541
create table t1(a int);
604
542
create table t2(a int);
605
543
create table t3(a int);
606
 
--error 6
 
544
--error 2
607
545
--exec $DRIZZLE_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
608
546
drop table t1, t2, t3;
609
547
 
610
548
--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
549
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
621
550
--echo #
622
551
 
647
576
--exec $DRIZZLE_DUMP --skip-dump-date test
648
577
 
649
578
--echo # --dump-date:
650
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
651
 
--exec $DRIZZLE_DUMP --dump-date test 
 
579
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
 
580
--exec $DRIZZLE_DUMP test 
652
581
 
653
582
--echo # --dump-date (default):
654
 
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ /^-- DRI.*///
 
583
--replace_regex /^[^-][^-].*$// /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9a-zA-Z :-]+/ on DATE/ /^-- DRI.*///
655
584
--exec $DRIZZLE_DUMP test
656
585
 
657
586
--echo #
723
652
create database `test-database`;
724
653
use `test-database`;
725
654
create table test (a int);
726
 
--exec $DRIZZLE_DUMP --compact --opt --quote-names test-database
 
655
--exec $DRIZZLE_DUMP --compact --opt test-database
727
656
drop database `test-database`;
728
657
use test;
729
658
 
 
659
#
 
660
# Bug #30126: semicolon before closing */ in /*!... CREATE DATABASE ;*/
 
661
#
 
662
 
 
663
CREATE DATABASE mysqldump_30126;
 
664
USE mysqldump_30126;
 
665
CREATE TABLE t1 (c1 int);
 
666
--exec $DRIZZLE_DUMP --add-drop-database mysqldump_30126 > $MYSQLTEST_VARDIR/tmp/bug30126.sql
 
667
--exec $DRIZZLE mysqldump_30126 < $MYSQLTEST_VARDIR/tmp/bug30126.sql
 
668
DROP DATABASE mysqldump_30126;
 
669
 
 
670
 
730
671
###########################################################################
731
672
 
732
673
--echo #
733
674
--echo # End of 5.1 tests
734
675
--echo #
 
676