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
|
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 229851577
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=myisam checksum=1;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 229851577
checksum table t1 quick;
Table Checksum
test.t1 229851577
checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 229851577
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table t1;
create table t1 (a int null, v varchar(100)) engine=maria checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 229851577
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table t1;
create table t1 (a int null, v varchar(100)) engine=maria checksum=1;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 229851577
checksum table t1 quick;
Table Checksum
test.t1 229851577
checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table t1;
create table t1 (a int null, v varchar(100)) engine=myisam checksum=1 row_format=fixed;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 3885665021
checksum table t1 quick;
Table Checksum
test.t1 3885665021
checksum table t1 extended;
Table Checksum
test.t1 3885665021
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=compact;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
test.t1 229851577
checksum table t1 quick;
Table Checksum
test.t1 NULL
checksum table t1 extended;
Table Checksum
test.t1 229851577
drop table t1;
#
# MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
#
CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
# Important is that checksum is different from following
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 2514025256
UPDATE t1 SET c21='cat' WHERE c1=5;
# Important is that checksum is different from above
CHECKSUM TABLE t1 EXTENDED;
Table Checksum
test.t1 2326430205
drop table t1;
# End of 5.5 tests
|