mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
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.
This commit is contained in:
parent
d64cf75806
commit
0f9c02d49a
1 changed files with 4 additions and 0 deletions
|
@ -3989,12 +3989,16 @@ end_with_restore_list:
|
|||
my_ok(thd);
|
||||
break;
|
||||
case SQLCOM_COMMIT:
|
||||
DBUG_ASSERT(thd->lock == NULL ||
|
||||
thd->locked_tables_mode == LTM_LOCK_TABLES);
|
||||
if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE :
|
||||
lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT))
|
||||
goto error;
|
||||
my_ok(thd);
|
||||
break;
|
||||
case SQLCOM_ROLLBACK:
|
||||
DBUG_ASSERT(thd->lock == NULL ||
|
||||
thd->locked_tables_mode == LTM_LOCK_TABLES);
|
||||
if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE :
|
||||
lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK))
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue