summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorgshchepa@bk-internal.mysql.com <>2007-08-23 21:28:33 +0200
committergshchepa@bk-internal.mysql.com <>2007-08-23 21:28:33 +0200
commitc70dbeab8b5668d2d2abc6adec7117b4fada943d (patch)
treeabc8901289061f42cf2d35c4b5174604c1ff64c8 /sql/sql_base.cc
parent16e0a4de5650edb7ba38414387b5923e387c6b93 (diff)
parent88107378cd6c2e59df7bf470c197986e461636c9 (diff)
downloadmariadb-git-c70dbeab8b5668d2d2abc6adec7117b4fada943d.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/users/gshchepa/mysql-5.0-opt
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 c1fe7699769..289924ff418 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1529,7 +1529,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;
@@ -2700,11 +2699,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.
@@ -2849,7 +2843,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: