1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# Pre-test cleanup
DROP TABLE IF EXISTS t1;
# Begin tests
#
# Bug#2005 Long decimal comparison bug.
#
CREATE TABLE t1 (a DECIMAL(64, 20));
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
("0987654321098765432109876543210987654321");
# Begin testing drizzledump output + restore
# Create 'original table name - <table>_orig
SET @orig_table_name = CONCAT('test.t1', '_orig');
# Rename original table
ALTER TABLE test.t1 RENAME to test.t1_orig;
# Recreate table from drizzledump output
# Compare original and recreated tables
# Recreated table: test.t1
# Original table: test.t1_orig
Comparing tables test.t1 and test.t1_orig
# Cleanup
DROP TABLE test.t1, test.t1_orig;
#
# Bug#3361 mysqldump quotes DECIMAL values inconsistently
#
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
INSERT INTO t1 VALUES (1.2345, 2.3456);
INSERT INTO t1 VALUES ('1.2345', 2.3456);
INSERT INTO t1 VALUES ("1.2345", 2.3456);
INSERT INTO t1 VALUES (1.2345, 2.3456);
INSERT INTO t1 VALUES ('1.2345', 2.3456);
INSERT INTO t1 VALUES ("1.2345", 2.3456);
# Begin testing drizzledump output + restore
# Create 'original table name - <table>_orig
SET @orig_table_name = CONCAT('test.t1', '_orig');
# Rename original table
ALTER TABLE test.t1 RENAME to test.t1_orig;
# Recreate table from drizzledump output
# Compare original and recreated tables
# Recreated table: test.t1
# Original table: test.t1_orig
Comparing tables test.t1 and test.t1_orig
# Cleanup
DROP TABLE test.t1, test.t1_orig;
#
# WL#2319 Exclude Tables from dump
#
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t2 VALUES (4),(5),(6);
# Begin testing drizzledump output + restore
# Create 'original table name - <table>_orig
SET @orig_table_name = CONCAT('test.t2', '_orig');
# Rename original table
ALTER TABLE test.t2 RENAME to test.t2_orig;
# Recreate table from drizzledump output
# Compare original and recreated tables
# Recreated table: test.t2
# Original table: test.t2_orig
Comparing tables test.t2 and test.t2_orig
# Cleanup
DROP TABLE test.t2, test.t2_orig;
DROP TABLE t1;
#
# Bug#8830 mysqldump --skip-extended-insert causes --hex-blob to dump wrong values
#
CREATE TABLE t1 (`b` blob);
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
# Begin testing drizzledump output + restore
# Create 'original table name - <table>_orig
SET @orig_table_name = CONCAT('test.t1', '_orig');
# Rename original table
ALTER TABLE test.t1 RENAME to test.t1_orig;
# Recreate table from drizzledump output
# Compare original and recreated tables
# Recreated table: test.t1
# Original table: test.t1_orig
Comparing tables test.t1 and test.t1_orig
# Cleanup
DROP TABLE test.t1, test.t1_orig;
#
# Bug#550091 in Drizzle: "drizzledump dumps data_dictionary"
#
CREATE TABLE t1 (a char(100), b int);
INSERT INTO t1 values ('a',100);
INSERT INTO t1 values ('b',200);
CREATE SCHEMA drizzledump_test;
USE drizzledump_test;
CREATE TABLE t1 (a int, b char(100));
INSERT INTO t1 VALUES (1, 'abbazabba');
DROP original schemas
DROP DATABASE test;
DROP DATABASE drizzledump_test;
Ensure we don't have those tables (verify we restored something)
SELECT * FROM test.t1;
ERROR 42S02: Table 'test.t1' doesn't exist
SELECT * FROM drizzledump_test.t1;
ERROR 42S02: Table 'drizzledump_test.t1' doesn't exist
Restoring from dumpfile
USE test;
SELECT * FROM t1;
a b
a 100
b 200
SELECT * FROM drizzledump_test.t1;
a b
1 abbazabba
Cleanup
DROP DATABASE drizzledump_test;
DROP TABLE t1;
# End tests
# Cleanup
# remove drizzledumpfile
|