1
########################################################################
2
# Bug #665210: tar4ibd does not support innodb row_format=compressed
3
# Bug #810269: tar4ibd does not check for doublewrite buffer pages
4
########################################################################
10
if [ -z "$INNODB_VERSION" ]; then
11
echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON
12
exit $SKIPPED_EXIT_CODE
15
run_mysqld "--innodb_strict_mode --innodb_file_per_table \
16
--innodb_file_format=Barracuda"
18
load_dbase_schema incremental_sample
20
vlog "Compressing the table"
22
run_cmd $MYSQL $MYSQL_ARGS -e \
23
"ALTER TABLE test ENGINE=InnoDB ROW_FORMAT=compressed \
24
KEY_BLOCK_SIZE=4" incremental_sample
26
vlog "Adding initial rows to table"
30
while [ "$numrow" -gt "$count" ]; do
31
sql="INSERT INTO test VALUES ($count, $numrow)"
33
for ((i=0; $i<99; i++)); do
34
sql="$sql,($count, $numrow)"
37
${MYSQL} ${MYSQL_ARGS} -e "$sql" incremental_sample
40
rows=`${MYSQL} ${MYSQL_ARGS} -Ns -e "SELECT COUNT(*) FROM test" \
42
if [ "$rows" != "10000" ]; then
43
vlog "Failed to add initial rows"
47
vlog "Initial rows added"
49
checksum_a=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table test;" \
50
incremental_sample | awk '{print $2}'`
52
vlog "Starting streaming backup"
54
mkdir -p $topdir/backup
56
innobackupex --stream=tar $topdir/backup > $topdir/backup/out.tar
66
innobackupex --apply-log $topdir/backup
68
vlog "Restoring MySQL datadir"
69
mkdir -p $mysql_datadir
70
innobackupex --copy-back $topdir/backup
74
checksum_b=`${MYSQL} ${MYSQL_ARGS} -Ns -e "checksum table test;" \
75
incremental_sample | awk '{print $2}'`
77
if [ "$checksum_a" != "$checksum_b" ]; then
78
vlog "Checksums do not match"
82
vlog "Checksums are OK"