summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-12-15 18:14:07 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2003-12-15 18:14:07 +0200
commit385b14cdbb3f63a1bd0b2cceeea1f75a17c2cb94 (patch)
treede6061b81522b7c48bc6eb4861134420f2b2394e /sql/sql_parse.cc
parent5ce2d124273a44bb33d7bc88a5e6091c65dcd06c (diff)
parent38df192ed993ac8758f379e0402a8a8466e637a2 (diff)
downloadmariadb-git-385b14cdbb3f63a1bd0b2cceeea1f75a17c2cb94.tar.gz
Merge
client/mysql.cc: SCCS merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 01d6500260f..d59a26f5ce8 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1971,12 +1971,11 @@ mysql_execute_command(void)
case SQLCOM_REPLACE_SELECT:
case SQLCOM_INSERT_SELECT:
{
-
- /*
- Check that we have modify privileges for the first table and
- select privileges for the rest
- */
{
+ /*
+ Check that we have modify privileges for the first table and
+ select privileges for the rest
+ */
ulong privilege= (lex->sql_command == SQLCOM_INSERT_SELECT ?
INSERT_ACL : INSERT_ACL | DELETE_ACL);
TABLE_LIST *save_next=tables->next;
@@ -1989,6 +1988,10 @@ mysql_execute_command(void)
if ((res=check_table_access(thd, SELECT_ACL, save_next)))
goto error;
}
+ /* Fix lock for first table */
+ if (tables->lock_type == TL_WRITE_DELAYED)
+ tables->lock_type == TL_WRITE;
+
/* Don't unlock tables until command is written to binary log */
select_lex->options|= SELECT_NO_UNLOCK;