diff options
author | unknown <monty@tik.mysql.fi> | 2001-03-23 20:38:42 +0200 |
---|---|---|
committer | unknown <monty@tik.mysql.fi> | 2001-03-23 20:38:42 +0200 |
commit | fd433598fefd92904ff65843bd1ff3070604b857 (patch) | |
tree | 9691c3978bd401c61959324ed6f6d3ac30a7840d /sql/sql_parse.cc | |
parent | b4098ead8324790a52a70b4b35a3e83bc4c7ed54 (diff) | |
download | mariadb-git-fd433598fefd92904ff65843bd1ff3070604b857.tar.gz |
Test case for bug when updating on key
Fixed bug in CONCAT_WS()
Print the default ISOLATION level.
Change lock type for CREATE ... SELECT and INSERT/REPLACE ... SELECT
Docs/manual.texi:
Changelog
mysql-test/r/func_str.result:
Added tests for CONCAT_WS()
mysql-test/r/update.result:
Test case for bug when updating on key
mysql-test/t/func_str.test:
Added tests for CONCAT_WS()
mysql-test/t/update.test:
Test case for bug when updating on key
sql/gen_lex_hash.cc:
Better hash values
sql/handler.cc:
Added missig NullS
sql/item_strfunc.cc:
Fixed bug in CONCAT_WS()
sql/mysql_priv.h:
Print the default ISOLATION level.
sql/mysqld.cc:
Print the default ISOLATION level.
sql/sql_insert.cc:
Remove unnecessary call to setup_tables()
sql/sql_parse.cc:
Change lock type for CREATE ... SELECT and INSERT/REPLACE ... SELECT
sql/sql_yacc.yy:
Change lock type for CREATE ... SELECT and INSERT/REPLACE ... SELECT
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 5a1af55849d..5ed17d76dff 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1266,8 +1266,11 @@ mysql_execute_command(void) } if (tables->next) { + TABLE_LIST *table; if (check_table_access(thd, SELECT_ACL, tables->next)) goto error; // Error message is given + for (table = tables->next ; table ; table=table->next) + table->lock_type= lex->lock_option; } thd->offset_limit=lex->offset_limit; thd->select_limit=lex->select_limit+lex->offset_limit; @@ -1539,17 +1542,19 @@ mysql_execute_command(void) { // Check that we have modify privileges for the first table and // select privileges for the rest - uint privilege= (lex->sql_command == SQLCOM_INSERT_SELECT ? - INSERT_ACL : INSERT_ACL | UPDATE_ACL | DELETE_ACL); - TABLE_LIST *save_next=tables->next; - tables->next=0; - if (check_access(thd, privilege, - tables->db,&tables->grant.privilege) || - (grant_option && check_grant(thd, privilege, tables))) - goto error; - tables->next=save_next; - if ((res=check_table_access(thd, SELECT_ACL, save_next))) - goto error; + { + uint privilege= (lex->sql_command == SQLCOM_INSERT_SELECT ? + INSERT_ACL : INSERT_ACL | UPDATE_ACL | DELETE_ACL); + TABLE_LIST *save_next=tables->next; + tables->next=0; + if (check_access(thd, privilege, + tables->db,&tables->grant.privilege) || + (grant_option && check_grant(thd, privilege, tables))) + goto error; + tables->next=save_next; + if ((res=check_table_access(thd, SELECT_ACL, save_next))) + goto error; + } select_result *result; thd->offset_limit=lex->offset_limit; @@ -1563,6 +1568,11 @@ mysql_execute_command(void) DBUG_VOID_RETURN; } tables->lock_type=TL_WRITE; // update first table + { + TABLE_LIST *table; + for (table = tables->next ; table ; table=table->next) + table->lock_type= lex->lock_option; + } if (!(res=open_and_lock_tables(thd,tables))) { if ((result=new select_insert(tables->table,&lex->field_list, |