mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / mysqldump_restore.result
blob9eac8b253de66cbc03b813db5a0481f19bf526a2
1 # Set concurrent_insert = 0 to prevent random errors
2 # will reset to original value at the end of the test
3 SET @old_concurrent_insert = @@global.concurrent_insert;
4 SET @@global.concurrent_insert = 0;
5 # Pre-test cleanup
6 DROP TABLE IF EXISTS t1;
7 # Begin tests
9 # Bug#2005 Long decimal comparison bug.
11 CREATE TABLE t1 (a DECIMAL(64, 20));
12 INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
13 ("0987654321098765432109876543210987654321");
14 # Begin testing mysqldump output + restore
15 # Create 'original table name - <table>_orig
16 SET @orig_table_name = CONCAT('test.t1', '_orig');
17 # Rename original table
18 ALTER TABLE test.t1 RENAME to test.t1_orig;
19 # Recreate table from mysqldump output
20 # Compare original and recreated tables
21 # Recreated table: test.t1
22 # Original table: test.t1_orig
23 include/diff_tables.inc [test.t1, test.t1_orig]
24 # Cleanup
25 DROP TABLE test.t1, test.t1_orig;
27 # Bug#3361 mysqldump quotes DECIMAL values inconsistently
29 CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
30 INSERT INTO t1 VALUES (1.2345, 2.3456);
31 INSERT INTO t1 VALUES ('1.2345', 2.3456);
32 INSERT INTO t1 VALUES ("1.2345", 2.3456);
33 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES';
34 INSERT INTO t1 VALUES (1.2345, 2.3456);
35 INSERT INTO t1 VALUES ('1.2345', 2.3456);
36 INSERT INTO t1 VALUES ("1.2345", 2.3456);
37 ERROR 42S22: Unknown column '1.2345' in 'field list'
38 SET SQL_MODE=@OLD_SQL_MODE;
39 # Begin testing mysqldump output + restore
40 # Create 'original table name - <table>_orig
41 SET @orig_table_name = CONCAT('test.t1', '_orig');
42 # Rename original table
43 ALTER TABLE test.t1 RENAME to test.t1_orig;
44 # Recreate table from mysqldump output
45 # Compare original and recreated tables
46 # Recreated table: test.t1
47 # Original table: test.t1_orig
48 include/diff_tables.inc [test.t1, test.t1_orig]
49 # Cleanup
50 DROP TABLE test.t1, test.t1_orig;
52 # Bug#1994 mysqldump does not correctly dump UCS2 data
53 # Bug#4261 mysqldump 10.7 (mysql 4.1.2) --skip-extended-insert drops NULL from inserts
55 CREATE TABLE t1 (a  VARCHAR(255)) DEFAULT CHARSET koi8r;
56 INSERT INTO t1  VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
57 # Begin testing mysqldump output + restore
58 # Create 'original table name - <table>_orig
59 SET @orig_table_name = CONCAT('test.t1', '_orig');
60 # Rename original table
61 ALTER TABLE test.t1 RENAME to test.t1_orig;
62 # Recreate table from mysqldump output
63 # Compare original and recreated tables
64 # Recreated table: test.t1
65 # Original table: test.t1_orig
66 include/diff_tables.inc [test.t1, test.t1_orig]
67 # Cleanup
68 DROP TABLE test.t1, test.t1_orig;
70 # WL#2319 Exclude Tables from dump
72 CREATE TABLE t1 (a INT);
73 CREATE TABLE t2 (a INT);
74 INSERT INTO t1 VALUES (1),(2),(3);
75 INSERT INTO t2 VALUES (4),(5),(6);
76 # Begin testing mysqldump output + restore
77 # Create 'original table name - <table>_orig
78 SET @orig_table_name = CONCAT('test.t2', '_orig');
79 # Rename original table
80 ALTER TABLE test.t2 RENAME to test.t2_orig;
81 # Recreate table from mysqldump output
82 # Compare original and recreated tables
83 # Recreated table: test.t2
84 # Original table: test.t2_orig
85 include/diff_tables.inc [test.t2, test.t2_orig]
86 # Cleanup
87 DROP TABLE test.t2, test.t2_orig;
88 DROP TABLE t1;
90 # Bug#8830 mysqldump --skip-extended-insert causes --hex-blob to dump wrong values
92 CREATE TABLE t1 (`b` blob);
93 INSERT INTO `t1` VALUES (0x602010000280100005E71A);
94 # Begin testing mysqldump output + restore
95 # Create 'original table name - <table>_orig
96 SET @orig_table_name = CONCAT('test.t1', '_orig');
97 # Rename original table
98 ALTER TABLE test.t1 RENAME to test.t1_orig;
99 # Recreate table from mysqldump output
100 # Compare original and recreated tables
101 # Recreated table: test.t1
102 # Original table: test.t1_orig
103 include/diff_tables.inc [test.t1, test.t1_orig]
104 # Cleanup
105 DROP TABLE test.t1, test.t1_orig;
106 # End tests
107 # Cleanup
108 # Reset concurrent_insert to its original value
109 SET @@global.concurrent_insert = @old_concurrent_insert;
110 # remove mysqldumpfile