diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-12-15 18:14:07 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-12-15 18:14:07 +0200 |
commit | 385b14cdbb3f63a1bd0b2cceeea1f75a17c2cb94 (patch) | |
tree | de6061b81522b7c48bc6eb4861134420f2b2394e /sql/sql_parse.cc | |
parent | 5ce2d124273a44bb33d7bc88a5e6091c65dcd06c (diff) | |
parent | 38df192ed993ac8758f379e0402a8a8466e637a2 (diff) | |
download | mariadb-git-385b14cdbb3f63a1bd0b2cceeea1f75a17c2cb94.tar.gz |
Merge
client/mysql.cc:
SCCS merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 13 |
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; |