1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
unknown
2001-03-23 20:38:42 +02:00
parent b4098ead83
commit fd433598fe
14 changed files with 179 additions and 40 deletions

View File

@ -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,