| 1 |
SET GLOBAL innodb_compression_level=0; |
| 2 |
SELECT @@innodb_compression_level; |
| 3 |
@@innodb_compression_level |
| 4 |
0 |
| 5 |
CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; |
| 6 |
INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200)); |
| 7 |
INSERT INTO t1 SELECT * from t1; |
| 8 |
INSERT INTO t1 SELECT * from t1; |
| 9 |
INSERT INTO t1 SELECT * from t1; |
| 10 |
INSERT INTO t1 SELECT * from t1; |
| 11 |
INSERT INTO t1 SELECT * from t1; |
| 12 |
INSERT INTO t1 SELECT * from t1; |
| 13 |
INSERT INTO t1 SELECT * from t1; |
| 14 |
INSERT INTO t1 SELECT * from t1; |
| 15 |
INSERT INTO t1 SELECT * from t1; |
| 16 |
INSERT INTO t1 SELECT * from t1; |
| 17 |
# stop the server |
| 18 |
[1]:# check the both short and long options for "help" |
| 19 |
[2]:# Run the innochecksum when file isn't provided. |
| 20 |
# It will print the innochecksum usage similar to --help option. |
| 21 |
innochecksum Ver #.#.# |
| 22 |
Copyright (c) YEAR, YEAR , Oracle and/or its affiliates. |
| 23 |
|
| 24 |
Oracle is a registered trademark of Oracle Corporation and/or its |
| 25 |
affiliates. Other names may be trademarks of their respective |
| 26 |
owners. |
| 27 |
|
| 28 |
InnoDB offline file checksum utility. |
| 29 |
Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] <filename or [-]> |
| 30 |
-?, --help Displays this help and exits. |
| 31 |
-I, --info Synonym for --help. |
| 32 |
-V, --version Displays version information and exits. |
| 33 |
-v, --verbose Verbose (prints progress every 5 seconds). |
| 34 |
-c, --count Print the count of pages in the file and exits. |
| 35 |
-s, --start-page=# Start on this page number (0 based). |
| 36 |
-e, --end-page=# End at this page number (0 based). |
| 37 |
-p, --page=# Check only this page (0 based). |
| 38 |
-C, --strict-check=name |
| 39 |
Specify the strict checksum algorithm by the user. |
| 40 |
-n, --no-check Ignore the checksum verification. |
| 41 |
-a, --allow-mismatches=# |
| 42 |
Maximum checksum mismatch allowed. |
| 43 |
-w, --write=name Rewrite the checksum algorithm by the user. |
| 44 |
-S, --page-type-summary |
| 45 |
Display a count of each page type in a tablespace. |
| 46 |
-D, --page-type-dump=name |
| 47 |
Dump the page type info for each page in a tablespace. |
| 48 |
-l, --log=name log output. |
| 49 |
|
| 50 |
Variables (--variable-name=value) |
| 51 |
and boolean options {FALSE|TRUE} Value (after reading options) |
| 52 |
--------------------------------- ---------------------------------------- |
| 53 |
verbose FALSE |
| 54 |
count FALSE |
| 55 |
start-page 0 |
| 56 |
end-page 0 |
| 57 |
page 0 |
| 58 |
strict-check crc32 |
| 59 |
no-check FALSE |
| 60 |
allow-mismatches 0 |
| 61 |
write crc32 |
| 62 |
page-type-summary FALSE |
| 63 |
page-type-dump (No default value) |
| 64 |
log (No default value) |
| 65 |
[3]:# check the both short and long options for "count" and exit |
| 66 |
Number of pages:# |
| 67 |
Number of pages:# |
| 68 |
[4]:# Print the version of innochecksum and exit |
| 69 |
innochecksum Ver #.#.# |
| 70 |
# Restart the DB server |
| 71 |
# restart |
| 72 |
DROP TABLE t1; |
| 73 |
[5]:# Check the innochecksum for compressed table t1 with different key_block_size |
| 74 |
# Test for KEY_BLOCK_SIZE=1 |
| 75 |
===> Testing size=1 |
| 76 |
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; |
| 77 |
insert into t1 values(1,"I"); |
| 78 |
insert into t1 values(2,"AM"); |
| 79 |
insert into t1 values(3,"COMPRESSED"); |
| 80 |
# restart |
| 81 |
select * from t1; |
| 82 |
id msg |
| 83 |
1 I |
| 84 |
2 AM |
| 85 |
3 COMPRESSED |
| 86 |
drop table t1; |
| 87 |
# Test for KEY_BLOCK_SIZE=2 |
| 88 |
===> Testing size=2 |
| 89 |
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; |
| 90 |
insert into t1 values(1,"I"); |
| 91 |
insert into t1 values(2,"AM"); |
| 92 |
insert into t1 values(3,"COMPRESSED"); |
| 93 |
# restart |
| 94 |
select * from t1; |
| 95 |
id msg |
| 96 |
1 I |
| 97 |
2 AM |
| 98 |
3 COMPRESSED |
| 99 |
drop table t1; |
| 100 |
# Test for for KEY_BLOCK_SIZE=4 |
| 101 |
===> Testing size=4 |
| 102 |
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; |
| 103 |
insert into t1 values(1,"I"); |
| 104 |
insert into t1 values(2,"AM"); |
| 105 |
insert into t1 values(3,"COMPRESSED"); |
| 106 |
# restart |
| 107 |
select * from t1; |
| 108 |
id msg |
| 109 |
1 I |
| 110 |
2 AM |
| 111 |
3 COMPRESSED |
| 112 |
drop table t1; |
| 113 |
set innodb_strict_mode=off; |
| 114 |
# Test for for KEY_BLOCK_SIZE=8 |
| 115 |
===> Testing size=8 |
| 116 |
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; |
| 117 |
insert into t1 values(1,"I"); |
| 118 |
insert into t1 values(2,"AM"); |
| 119 |
insert into t1 values(3,"COMPRESSED"); |
| 120 |
# restart |
| 121 |
select * from t1; |
| 122 |
id msg |
| 123 |
1 I |
| 124 |
2 AM |
| 125 |
3 COMPRESSED |
| 126 |
drop table t1; |
| 127 |
set innodb_strict_mode=off; |
| 128 |
# Test for KEY_BLOCK_SIZE=16 |
| 129 |
===> Testing size=16 |
| 130 |
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; |
| 131 |
insert into t1 values(1,"I"); |
| 132 |
insert into t1 values(2,"AM"); |
| 133 |
insert into t1 values(3,"COMPRESSED"); |
| 134 |
# restart |
| 135 |
select * from t1; |
| 136 |
id msg |
| 137 |
1 I |
| 138 |
2 AM |
| 139 |
3 COMPRESSED |
| 140 |
drop table t1; |
| 141 |
# Test[5] completed |