summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <davi@moksha.local>2007-08-17 17:11:08 -0300
committerunknown <davi@moksha.local>2007-08-17 17:11:08 -0300
commit7ee93c1639deef7e84cd162a0d7cff6c2cca2bc1 (patch)
tree4fbb4fdedadb853b8f59ba4e8d6591607cb649fb /sql/sql_base.cc
parent8bdb043f087ffbad27ab6daaeba8954b41711b57 (diff)
downloadmariadb-git-7ee93c1639deef7e84cd162a0d7cff6c2cca2bc1.tar.gz
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.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index e15bc1c3137..3fdf397d412 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2255,7 +2255,6 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
HASH_SEARCH_STATE state;
DBUG_ENTER("open_table");
- DBUG_ASSERT (table_list->lock_type != TL_WRITE_DEFAULT);
/* find a unused table in the open table cache */
if (refresh)
*refresh=0;
@@ -3559,11 +3558,6 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
{
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
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)
- 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;
process_view_routines: