From: Date: May 8 2008 1:17pm Subject: bk commit into 5.1 tree (msvensson:1.2588) BUG#36123 List-Archive: http://lists.mysql.com/commits/46503 X-Bug: 36123 Message-Id: <20080508111738.AEE3E30E9AB@pilot> Below is the list of changes that have just been committed into a local 5.1 repository of msvensson. When msvensson does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2008-05-08 13:17:35+02:00, msvensson@pilot.(none) +1 -0 Bug#36123 Selecting from mysql.ndb_apply_status leads to failure - Throw table out of table def cache after open from table def cache failed because of lost connection to engine sql/table.cc@stripped, 2008-05-08 13:17:32+02:00, msvensson@pilot.(none) +21 -0 Check if failure occured because connection to storage engine was lost. In that case return error 7 to activate discover from table and subsequently throw the table out from table def cache diff -Nrup a/sql/table.cc b/sql/table.cc --- a/sql/table.cc 2008-04-15 08:59:31 +02:00 +++ b/sql/table.cc 2008-05-08 13:17:32 +02:00 @@ -1888,6 +1888,18 @@ partititon_err: */ error_reported= TRUE; } + + if (thd->main_da.sql_errno() == 1296 and + strstr(thd->main_da.message(), "157") != NULL) + { + /* + Connection to storage engine failed, return 7 + to force a discover and if that also fails, + throw the table out from table def cache + */ + error= 7; + } + goto err; } } @@ -1952,6 +1964,15 @@ partititon_err: error_reported= TRUE; if (ha_err == HA_ERR_TABLE_DEF_CHANGED) error= 7; + if (ha_err == HA_ERR_NO_CONNECTION) + { + /* + Connection to storage engine failed, return 7 + to force a discover and if that also fails, + throw the table out from table def cache + */ + error= 7; + } break; } goto err; /* purecov: inspected */