1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#29936 (Stored Procedure DML ignores low_priority_updates setting)

This is a follow up for the patch for Bug#26162 "Trigger DML ignores low_priority_updates setting", where the stored procedure ignores the session setting of low_priority_updates.


sql/lock.cc:
  Add late lock_type assertion.
sql/sql_base.cc:
  Possibly downgrade lock type to the the session setting of low_priority_updates and also remove early assertion.
This commit is contained in:
unknown
2007-08-17 17:11:08 -03:00
parent 8bdb043f08
commit 7ee93c1639
2 changed files with 3 additions and 7 deletions

View File

@ -857,6 +857,7 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count,
if ((table=table_ptr[i])->s->tmp_table == NON_TRANSACTIONAL_TMP_TABLE) if ((table=table_ptr[i])->s->tmp_table == NON_TRANSACTIONAL_TMP_TABLE)
continue; continue;
lock_type= table->reginfo.lock_type; lock_type= table->reginfo.lock_type;
DBUG_ASSERT (lock_type != TL_WRITE_DEFAULT);
if (lock_type >= TL_WRITE_ALLOW_WRITE) if (lock_type >= TL_WRITE_ALLOW_WRITE)
{ {
*write_lock_used=table; *write_lock_used=table;

View File

@ -2255,7 +2255,6 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
HASH_SEARCH_STATE state; HASH_SEARCH_STATE state;
DBUG_ENTER("open_table"); DBUG_ENTER("open_table");
DBUG_ASSERT (table_list->lock_type != TL_WRITE_DEFAULT);
/* find a unused table in the open table cache */ /* find a unused table in the open table cache */
if (refresh) if (refresh)
*refresh=0; *refresh=0;
@ -3559,11 +3558,6 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
{ {
safe_to_ignore_table= FALSE; safe_to_ignore_table= FALSE;
if (tables->lock_type == TL_WRITE_DEFAULT)
{
tables->lock_type= thd->update_lock_default;
DBUG_ASSERT (tables->lock_type >= TL_WRITE_ALLOW_WRITE);
}
/* /*
Ignore placeholders for derived tables. After derived tables Ignore placeholders for derived tables. After derived tables
processing, link to created temporary table will be put here. processing, link to created temporary table will be put here.
@ -3708,7 +3702,8 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
} }
if (tables->lock_type != TL_UNLOCK && ! thd->locked_tables) if (tables->lock_type != TL_UNLOCK && ! thd->locked_tables)
tables->table->reginfo.lock_type=tables->lock_type; tables->table->reginfo.lock_type= tables->lock_type == TL_WRITE_DEFAULT ?
thd->update_lock_default : tables->lock_type;
tables->table->grant= tables->grant; tables->table->grant= tables->grant;
process_view_routines: process_view_routines: