summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-12-08 12:33:33 -0800
committerunknown <jimw@mysql.com>2005-12-08 12:33:33 -0800
commitab597139a7e96d8e3194739299b9dbde5a6cf961 (patch)
tree17c25f1452a24b4c5142a7cd6aa2a37e7558efcf /sql/sql_update.cc
parent5aeb69296a4e134f0215da3e6bcce4956b7d76ad (diff)
downloadmariadb-git-ab597139a7e96d8e3194739299b9dbde5a6cf961.tar.gz
Fix calls to free_underlaid_joins() in INSERT, DELETE, and UPDATE
handling so that indexes are closed before trying to commit the transaction. (Bug #15536) mysql-test/r/bdb.result: Add new results mysql-test/t/bdb.test: Add new test sql/sql_delete.cc: Move call to free_underlaid_joins() to before ha_autocommit_or_rollback(). sql/sql_insert.cc: Move call to free_underlaid_joins() to before ha_autocommit_or_rollback(). sql/sql_update.cc: Move call to free_underlaid_joins() to before ha_autocommit_or_rollback().
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 05e13c64aa7..7b1d5988bde 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -377,6 +377,7 @@ int mysql_update(THD *thd,
if (!log_delayed)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
}
+ free_underlaid_joins(thd, &thd->lex->select_lex);
if (transactional_table)
{
if (ha_autocommit_or_rollback(thd, error >= 0))
@@ -389,7 +390,6 @@ int mysql_update(THD *thd,
thd->lock=0;
}
- free_underlaid_joins(thd, &thd->lex->select_lex);
if (error >= 0)
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); /* purecov: inspected */
else