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;
6
DROP TABLE IF EXISTS t1;
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
Comparing tables test.t1 and test.t1_orig
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
Comparing tables test.t1 and test.t1_orig
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
Comparing tables test.t1 and test.t1_orig
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
Comparing tables test.t2 and test.t2_orig
87
DROP TABLE test.t2, test.t2_orig;
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
Comparing tables test.t1 and test.t1_orig
105
DROP TABLE test.t1, test.t1_orig;
108
# Reset concurrent_insert to its original value
109
SET @@global.concurrent_insert = @old_concurrent_insert;
110
# remove mysqldumpfile