summaryrefslogtreecommitdiff
path: root/mysql-test/t/row-checksum.test
blob: 920a2384aa8481824cd473b6aa2608627796d6ff (plain)
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
#
# Test checksum
#

-- source include/have_innodb.inc
-- source include/have_maria.inc

--disable_warnings
drop table if exists t1;
--enable_warnings

create table t1 (a int null, v varchar(100)) engine=myisam checksum=0;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
checksum table t1 quick;
checksum table t1 extended;
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;
checksum table t1 quick;
checksum table t1 extended;
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;
checksum table t1 quick;
checksum table t1 extended;
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;
checksum table t1 quick;
checksum table t1 extended;
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;
checksum table t1 quick;
checksum table t1 extended;
drop table t1;


#
# These checksums will be different prefixes fixed sizes rows with one extra
# flag byte
#
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;
checksum table t1 quick;
checksum table t1 extended;
drop table if exists t1;

create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed;
insert into t1 values(null, null), (1, "hello");
checksum table t1;
checksum table t1 quick;
checksum table t1 extended;
drop table t1;