Commit 0f9c02d4 authored by Konstantin Osipov's avatar Konstantin Osipov

WL#3726 "DDL locking", post-review fixes.

----------------------------------------------------------
revno: 2630.2.23
committer: Konstantin Osipov <konstantin@mysql.com>
branch nick: mysql-6.0-runtime
timestamp: Fri 2008-06-27 21:15:11 +0400
message:
  Add an assert that we never call COMMIT or ROLLBACK while having
  a table lock.
parent d64cf758
...@@ -3989,12 +3989,16 @@ end_with_restore_list: ...@@ -3989,12 +3989,16 @@ end_with_restore_list:
my_ok(thd); my_ok(thd);
break; break;
case SQLCOM_COMMIT: case SQLCOM_COMMIT:
DBUG_ASSERT(thd->lock == NULL ||
thd->locked_tables_mode == LTM_LOCK_TABLES);
if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE : if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE :
lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT)) lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
goto error; goto error;
my_ok(thd); my_ok(thd);
break; break;
case SQLCOM_ROLLBACK: case SQLCOM_ROLLBACK:
DBUG_ASSERT(thd->lock == NULL ||
thd->locked_tables_mode == LTM_LOCK_TABLES);
if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE : if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE :
lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK)) lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK))
goto error; goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment