summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3d4252a2b17..50c346619ee 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3257,6 +3257,27 @@ create_error:
thd->options&= ~(ulong) (OPTION_TABLE_LOCK);
thd->in_lock_tables=0;
break;
+ case SQLCOM_LOCK_TABLES_TRANSACTIONAL:
+ {
+ uint counter = 0;
+
+ if (check_db_used(thd, all_tables))
+ goto error;
+ if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, all_tables, 0))
+ goto error;
+
+ thd->in_lock_tables=1;
+ thd->options|= OPTION_TABLE_LOCK;
+
+ if (open_tables(thd, all_tables, &counter) == 0 &&
+ transactional_lock_tables(thd, all_tables, counter) == 0)
+ send_ok(thd);
+ else
+ thd->options&= ~(ulong) (OPTION_TABLE_LOCK);
+
+ thd->in_lock_tables=0;
+ break;
+ }
case SQLCOM_CREATE_DB:
{
char *alias;