3701
|
|
|
Shannon Weyrick |
12 years ago
|
|
|
3700
|
|
|
Shannon Weyrick |
12 years ago
|
|
|
3699
|
|
|
Tatjana Azundris Nue... |
12 years ago
|
|
|
3698
|
|
|
Tatjana Azundris Nue... |
12 years ago
|
|
|
3697
|
|
|
Tatjana Azundris Nue... |
12 years ago
|
|
|
3696
|
|
|
Vasil Dimov |
12 years ago
|
|
|
3695
|
|
|
Nirbhay Choubey |
12 years ago
|
|
|
3694
|
|
|
Nirbhay Choubey |
12 years ago
|
|
|
3693
|
|
|
Marko Mäkelä |
12 years ago
|
|
|
3692
|
|
|
Annamalai Gurusami |
12 years ago
|
|
|
3691
|
|
|
Marko Mäkelä |
12 years ago
|
|
|
3690
|
|
|
Marko Mäkelä |
12 years ago
|
|
|
3689
|
|
|
Vasil Dimov |
12 years ago
|
|
|
3688
|
|
|
Rohit Kalhans |
12 years ago
|
|
|
3687
|
|
BUG#11764724 - 57586: UNKNOWN TABLE WHEN TRYING TO DROP A TABLE AND NO AVAILABLE UNDO SLOTS LEFT
Description: If you attempt to drop an existing InnoDB table, but you do not have any available undo slots open, then you will receive an "unknown table" error.
mysql> DROP TABLE test.innodb_table_monitor; ERROR 1051 (42S02): Unknown table 'innodb_table_monitor'
How To Repeat: <first> make sure max_connections > 1024 </first>
use test; create table t (id int) engine=innodb; create table innodb_table_monitor (id int) engine=innodb;
Run following script:
<? $db_arr=array(); for ($i = 1; $i <= 1024; $i++) { $db=$db_arr[$i]=mysql_connect("localhost:3307","root","pass",1); mysql_select_db("test",$db); mysql_query("BEGIN",$db) or die(mysql_error()); mysql_query("INSERT INTO t VALUES ($i)",$db) or die(mysql_error()); } $db=$db_arr[$i]=mysql_connect("localhost:3307","root","pass",1); mysql_select_db("test",$db); mysql_query("DROP TABLE test.innodb_table_monitor",$db) or die(mysql_error());
sleep(60); ?>
After the above script, it will throw the following error:
Unknown table 'innodb_table_monitor'
Analysis: Here, max number of concurrent transactions/connections are started and then the next transaction to drop a table is initiated. Since, system has already max number of transactions running, next transaction to "drop table" was not started and innodb returned error "DB_TOO_MANY_CONCURRENT_TRXS". But this error was not handled properly in sql layer because of which "drop table" operation was throwing wrong error message.
Fix: As a fix, I have added check in sql (in function "mysql_rm_table_part2") to handle error code "HA_ERR_TOO_MANY_CONCURRENT_TRXS" and throw proper error message.
Ouput of drop command after fix (with max number of concurrent transaction running)
mysql> drop table test; ERROR 177 (HY000): Too many active concurrent transactions
To reproduce this issue, max_connections should be set to value greater than 1024 and 1024 connections/transactions need to be started. Since, this process consumes lot of time and resource, I havent added test case in mysql_test. But I will update but list with request of QA assistance to verify fix.
|
Praveenkumar Hulakun... |
12 years ago
|
|
|
3686
|
|
|
Nirbhay Choubey |
12 years ago
|
|
|
3685
|
|
|
Nirbhay Choubey |
12 years ago
|
|
|
3684
|
|
|
Ramil Kalimullin |
12 years ago
|
|
|
3683
|
|
|
Ramil Kalimullin |
12 years ago
|
|
|
3682
|
|
|
Inaam Rana |
12 years ago
|
|
|