Description:
Hi dear experts.
I would like to share scenario:
1. Run sysbench against encrypted sbtest1 table
2. Run alter rotate master key in a loop
3. discard tablespace of table
4. drop table
5. kill -9 mysql*
6. Try to start
Result:
2016-07-27T08:15:51.744405Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 113029875
2016-07-27T08:15:51.744953Z 0 [ERROR] [FATAL] InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE for redo log record 30 (page 30:0) at 112922320.
2016-07-27 12:15:51 0x7f4d6c2dd740 InnoDB: Assertion failure in thread 139970504152896 in file ut0ut.cc line 920
/home/sh/5.7.13/bin/mysqld[0x10a6eb5]
/home/sh/5.7.13/bin/mysqld(_ZN2ib5fatalD1Ev+0xb3)[0x10aba03]
/home/sh/5.7.13/bin/mysqld[0xf9d61f]
/home/sh/5.7.13/bin/mysqld[0xfa13a6]
/home/sh/5.7.13/bin/mysqld[0xfa3544]
/home/sh/5.7.13/bin/mysqld(_Z35recv_recovery_from_checkpoint_startm+0x185f)[0xfa4dff]
/home/sh/5.7.13/bin/mysqld(_Z34innobase_start_or_create_for_mysqlv+0x2e1b)[0x10611cb]
/home/sh/5.7.13/bin/mysqld[0xf401ba]
/home/sh/5.7.13/bin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x51)[0x7e6721]
/home/sh/5.7.13/bin/mysqld[0xd12a26]
/home/sh/5.7.13/bin/mysqld(_Z11plugin_initPiPPci+0x964)[0xd17e54]
/home/sh/5.7.13/bin/mysqld[0x792b9a]
/home/sh/5.7.13/bin/mysqld(_Z11mysqld_mainiPPc+0x506)[0x795a26]
How to repeat:
Detailed steps:
CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=latin1 MAX_ROWS=1000000 ENCRYPTION='Y'
1. Running:
[sh@pxc_5_7 TB_XB_test_scripts]$ cat alter_rotate_keyring1.py
import mysql.connector
cnx = mysql.connector.connect(user='root', password='msandbox',
host='127.0.0.1',
database='dbtest',
port=5713)
cursor = cnx.cursor()
alter_stmt = "ALTER INSTANCE ROTATE INNODB MASTER KEY"
while(True):
print "Master key rotated"
cursor.execute(alter_stmt)
cursor.close()
cnx.close()
2. Running:
sysbench --db-driver=mysql --mysql-table-engine=InnoDB --mysql-db=dbtest --mysql-table=sbtest1 --mysql-user=msandbox --mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5713.sock --num-threads=100 --test=/usr/share/doc/sysbench/tests/db/oltp.lua --max-requests=0 run
3. alter table sbtest1 discard tablespace;
drop table sbtest1;
4. pkill -9 -f mysql
5. start mysql
6. Failed to start.
Suggested fix:
No idea.