summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-03-12 07:51:08 +0200
committerunknown <monty@mashka.mysql.fi>2003-03-12 07:51:08 +0200
commit0e812fc4b12f935184e78be4ee982799e99e6dc4 (patch)
treebe30d5c385f3fe41573b1f869ec2a196157b590f /sql/sql_parse.cc
parent5cd07da7652c203ec3c442ab908c26fbb0d5983e (diff)
downloadmariadb-git-0e812fc4b12f935184e78be4ee982799e99e6dc4.tar.gz
Fix for replication of INSERT | REPLACE | CREATE ... SELECT
sql/sql_select.cc: Fix for repllication of INSERT | REPLACE | CREATE ... SELECT
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 6dac0a82d26..8f3a3a9bce2 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1595,6 +1595,7 @@ mysql_execute_command(void)
for (table = tables->next ; table ; table=table->next)
table->lock_type= lex->lock_option;
}
+ select_lex->options|= SELECT_NO_UNLOCK;
thd->offset_limit=select_lex->offset_limit;
thd->select_limit=select_lex->select_limit+select_lex->offset_limit;
if (thd->select_limit < select_lex->select_limit)
@@ -1922,6 +1923,8 @@ mysql_execute_command(void)
if ((res=check_table_access(thd, SELECT_ACL, save_next)))
goto error;
}
+ /* Don't unlock tables until command is written to binary log */
+ select_lex->options|= SELECT_NO_UNLOCK;
select_result *result;
thd->offset_limit=select_lex->offset_limit;