diff options
author | dlenev@mysql.com <> | 2006-02-16 16:19:24 +0300 |
---|---|---|
committer | dlenev@mysql.com <> | 2006-02-16 16:19:24 +0300 |
commit | 4a41a00d4b89176143ba33d73af18d91df3950a8 (patch) | |
tree | c72397457373b7612a240def6032659f180d64df /sql/sql_prepare.cc | |
parent | bba8155516f3346444784f73bf9ad69012b0bfd2 (diff) | |
download | mariadb-git-4a41a00d4b89176143ba33d73af18d91df3950a8.tar.gz |
Fix for bug #16593 "Deadlock or crash in stress test for case where
trigger starts trigger".
In short, the deadlock/crash happened when execution of statement, which used
stored functions or activated triggers, coincided with alteration of the
tables used by these functions or triggers (in highly concurrent environment).
Bug was caused by the incorrect handling of tables from prelocked set in
open_tables() functions in situations when refresh happened. This fix replaces
old smart but not very robust way of handling tables after refresh (which was
closing only old tables), with new one which simply closes all tables opened so
far and restarts open_tables().
Also fixed handling of temporary tables in close_tables_for_reopen().
No test case present since bug manifests itself only in concurrent environment.
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 68f033f78fe..b0c4cef6e87 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1135,7 +1135,7 @@ static int mysql_test_update(Prepared_statement *stmt, break; if (!need_reopen) goto error; - close_tables_for_reopen(thd, table_list); + close_tables_for_reopen(thd, &table_list); } /* |