| Bug #46193 | crash when accessing tables after enabling innodb_force_recovery option | ||
|---|---|---|---|
| Submitted: | 15 Jul 9:28 | Modified: | 6 Aug 2:00 |
| Reporter: | Martin K | ||
| Status: | In review | ||
| Category: | Server: InnoDB | Severity: | S1 (Critical) |
| Version: | >=5.1.31, 5.1.37, 5.4.4 | OS: | Any (win xp, fc8) |
| Assigned to: | Sunny Bains | Target Version: | 5.1+ |
| Tags: | regression, innodb_force_recovery | ||
| Triage: | Triaged: D1 (Critical) / R1 (None/Negligible) / E1 (None/Negligible) | ||
[15 Jul 9:28]
Martin K
[15 Jul 10:42]
Sveta Smirnova
Thank you for the report. Please provide output of SHOW CREATE TABLE testfw and SHOW TABLE STATUS LIKE 'testfw'. Also please check in you run mysql_upgrade last time when you upgraded.
[15 Jul 14:27]
Martin K
Hi,
this is output of SHOW CREATE TABLE testfw:
+--------+----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------------------------+
| Table | Create Table
|
+--------+----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------------------------+
| testfw | CREATE TABLE `testfw` (
`idtestfw` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(100) COLLATE cp1250_czech_cs DEFAULT NULL,
`note` text COLLATE cp1250_czech_cs,
`checked` varchar(1) COLLATE cp1250_czech_cs DEFAULT NULL,
`traffic` int(10) unsigned DEFAULT NULL,
`password` varchar(100) COLLATE cp1250_czech_cs DEFAULT NULL,
`image` varchar(100) COLLATE cp1250_czech_cs DEFAULT NULL,
`moto` varchar(20) COLLATE cp1250_czech_cs DEFAULT NULL,
`idcustomer` int(10) unsigned DEFAULT NULL,
`dateinsert` date DEFAULT NULL,
`idrecord` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`idtestfw`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=cp1250 COLLATE=cp1250_czech_cs
|
+--------+----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------------------------------------------+
1 row in set (0.11 sec)
and this is output of SHOW TABLE STATUS LIKE 'testfw':
+--------+--------+---------+------------+------+----------------+-------------+
-----------------+--------------+-----------+----------------+------------------
---+-------------+------------+-----------------+----------+----------------+---
------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length |
Max_data_length | Index_length | Data_free | Auto_increment | Create_time
| Update_time | Check_time | Collation | Checksum | Create_options | Co
mment |
+--------+--------+---------+------------+------+----------------+-------------+
-----------------+--------------+-----------+----------------+------------------
---+-------------+------------+-----------------+----------+----------------+---
------+
| testfw | InnoDB | 10 | Compact | 2 | 8192 | 16384 |
0 | 0 | 4194304 | 3 | 2009-07-13 10:53:
32 | NULL | NULL | cp1250_czech_cs | NULL | |
|
+--------+--------+---------+------------+------+----------------+-------------+
-----------------+--------------+-----------+----------------+------------------
---+-------------+------------+-----------------+----------+----------------+---
------+
1 row in set (0.00 sec)
When I try run mysql_upgrade.exe, then I obtain this same error as I described in this
bug report "an unhandled...".
Output from command line window:
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql_upgrade.exe
Looking for 'mysql.exe' as: C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.ex
e
Looking for 'mysqlcheck.exe' as: C:\Program Files\MySQL\MySQL Server 5.1\bin\mys
qlcheck.exe
Running 'mysqlcheck'...
Running 'mysqlcheck'...
C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqlcheck.exe: Got error: 2013: Los
t connection to MySQL server during query when executing 'CHECK TABLE ... FOR U
PGRADE'
martin.mk_login OK
FATAL ERROR: Upgrade failed
Martin
[15 Jul 23:20]
Miguel Solorzano
Could you please provide your my.ini file and that table it was created with which server version?. Thanks in advance.
[16 Jul 7:59]
Martin K
Hi, there is link http://source.php5.cz/My_and_table.zip. I'm not sure, if you thought that table. Thanks Martin
[16 Jul 22:01]
Shane Bester
testcase: ---------- start server normally, create a table: create table t1(id int auto_increment primary key)engine=innodb; shutdown server, start it with --innodb-force-recovery=4 select * from t1; crashes. stack from 5.1.37: mysqld.exe!ha_innobase::innobase_get_index()[ha_innodb.cc:4506] mysqld.exe!ha_innobase::innobase_initialize_autoinc()[ha_innodb.cc:2404] mysqld.exe!ha_innobase::open()[ha_innodb.cc:2632] mysqld.exe!handler::ha_open()[handler.cc:2055] mysqld.exe!open_table_from_share()[table.cc:1882] mysqld.exe!open_unireg_entry()[sql_base.cc:3910] mysqld.exe!open_table()[sql_base.cc:2907] mysqld.exe!open_tables()[sql_base.cc:4571] mysqld.exe!open_and_lock_tables_derived()[sql_base.cc:4977] mysqld.exe!open_and_lock_tables()[mysql_priv.h:1555] mysqld.exe!execute_sqlcom_select()[sql_parse.cc:4978] mysqld.exe!mysql_execute_command()[sql_parse.cc:2208] mysqld.exe!mysql_parse()[sql_parse.cc:5933] mysqld.exe!dispatch_command()[sql_parse.cc:1213] mysqld.exe!do_command()[sql_parse.cc:854] mysqld.exe!handle_one_connection()[sql_connect.cc:1127] mysqld.exe!pthread_start()[my_winthread.c:85] mysqld.exe!_callthreadstart()[thread.c:293] mysqld.exe!_threadstart()[thread.c:277] kernel32.dll!FlsSetValue()
[16 Jul 22:14]
Shane Bester
this bug is introduced in 5.1.31. how this hasn't been noticed yet is suprising.
[24 Jul 14:59]
Shane Bester
Thanks Sunny, your patch indeed stops the crashes at least on my 5.1.37 test system.
