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 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
|
SET GLOBAL innodb_file_per_table=on;
SHOW variables like '%innodb_checksum_algorithm%';
Variable_name Value
innodb_checksum_algorithm crc32
CREATE TABLE t1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) COMPRESSION="none", ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, 'Innochecksum InnoDB');
INSERT INTO t1 VALUES(2, 'Innochecksum CRC32');
# Shutdown the Server
# Test[1(a)]: for read from standard input for innochecksum tool without rewrite of checksum with log option.
InnoDB File Checksum Utility.
Filename = -
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Test[1(b)]: for read from standard input for innochecksum tool Test checking for page: 3 to page:5
InnoDB File Checksum Utility.
Filename = -
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Test[1] End
# Test [2] for read from standard input for innochecksum tool with rewrite of crc32 checksum.
# Backup the t1.ibd before any rewrite of checksum, so used for further testing.
# Print the information for log option.
InnoDB File Checksum Utility.
Filename = -
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Recheck the a.ibd created file having crc32 checksum with the --strict-check=crc32 for innochecksum tool.
InnoDB File Checksum Utility.
Filename = a.ibd
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; crc32 calculated = #; recorded checksum field# = # recorded checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; crc32 calculated = #; recorded checksum field# = # recorded checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; crc32 calculated = #; recorded checksum field# = # recorded checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; crc32 calculated = #; recorded checksum field# = # recorded checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; crc32 calculated = #; recorded checksum field# = # recorded checksum field# = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
#Replace the t.ibd with the newly created a.ibd having crc32 checksum.
# Start the server to validate the t1.ibd having crc32 checksum.
# restart
select * from t1;
c1 c2
1 Innochecksum InnoDB
2 Innochecksum CRC32
# Shutdown the server
# Test[2] End
# Test[3] for read from standard input for innochecksum tool with rewrite of "none" checksum.
# Retrieve the original t1.ibd before any rewrite of checksum, so used for further testing.
# Check for innochecksum tool to read from stdin and rewrite the checksum to "none"
# along with check for --verbose & --page-type-summary
# Print the content for --verbose and --page-type-summary
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- ----------------------------------------
verbose TRUE
count FALSE
start-page #
end-page #
page #
strict-check crc#
no-check FALSE
allow-mismatches #
write none
page-type-summary TRUE
page-type-dump (No default value)
log mtrchecksum.log
================PAGE TYPE SUMMARY==============
#PAGE_COUNT PAGE_TYPE
===============================================
# Index page
# SDI Index page
# Undo log page
# Inode page
# Insert buffer free list page
# Freshly allocated page
# Insert buffer bitmap
# System page
# Transaction system page
# File Space Header
# Extent descriptor page
# BLOB page
# Compressed BLOB page
# Subsequent Compressed BLOB page
# SDI BLOB page
# Compressed SDI BLOB page
# Other type of page
===============================================
Additional information:
Undo page type: # insert, # update, # other
Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
# Print the information for log option.
InnoDB File Checksum Utility.
Filename = -
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Recheck the a.ibd created file having crc32 checksum with the --strict-check=none for innochecksum tool.
InnoDB File Checksum Utility.
Filename = a.ibd
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; none checksum: calculated = #; recorded checksum_field# = # recorded checksum_field# = #
page::#; log sequence number:first = #; second = #
page::#; none checksum: calculated = #; recorded checksum_field# = # recorded checksum_field# = #
page::#; log sequence number:first = #; second = #
page::#; none checksum: calculated = #; recorded checksum_field# = # recorded checksum_field# = #
page::#; log sequence number:first = #; second = #
page::#; none checksum: calculated = #; recorded checksum_field# = # recorded checksum_field# = #
page::#; log sequence number:first = #; second = #
page::#; none checksum: calculated = #; recorded checksum_field# = # recorded checksum_field# = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Start the server to validate the t1.ibd having "none" checksum.
# restart
select * from t1;
c1 c2
1 Innochecksum InnoDB
2 Innochecksum CRC32
# Shutdown the server
# Test[3] End
# Test[4] for read from standard input for innochecksum tool with rewrite of "innodb" checksum.
# Command for innochecksum tool to read from stdin and rewrite the checksum to "innodb"
# Print the information for log option.
InnoDB File Checksum Utility.
Filename = -
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded = #
page::#; new style: calculated = #; crc32 = #; recorded = #
page::#; Updated checksum field# = #
page::#; Updated checksum field# = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Recheck the a.ibd created file having crc32 checksum with the --strict-check=innodb for innochecksum tool.
InnoDB File Checksum Utility.
Filename = a.ibd
Innochecksum: checking pages in range # to #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded checksum = #
page::#; new style: calculated = #; recorded checksum = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded checksum = #
page::#; new style: calculated = #; recorded checksum = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded checksum = #
page::#; new style: calculated = #; recorded checksum = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded checksum = #
page::#; new style: calculated = #; recorded checksum = #
page::#; log sequence number:first = #; second = #
page::#; old style: calculated = #; recorded checksum = #
page::#; new style: calculated = #; recorded checksum = #
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
page::#; log sequence number:first = #; second = #
Page::# is empty and uncorrupted
# Replace the t.ibd with the newly created a.ibd having "innodb" checksum.
# Start the server to validate the t1.ibd having "innodb" checksum.
# restart
select * from t1;
c1 c2
1 Innochecksum InnoDB
2 Innochecksum CRC32
# Test[4] End
# Test[5] for lock.
# Test Scenario: As mysqld is running, & then start the innochecksum which must fail.
Pattern "Error: Unable to lock file:: MYSQLD_DATADIR/test/t1.ibd" found
Pattern "fcntl: Resource temporarily unavailable" found
# Test[5] end
DROP TABLE t1;
|