diff options
author | unknown <gkodinov/kgeorge@macbook.gmz> | 2007-06-03 10:03:37 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@macbook.gmz> | 2007-06-03 10:03:37 +0300 |
commit | 57b1ab50715994d8fb82d0c8fddbe409a2ec4721 (patch) | |
tree | 0c6f6da8571b0d615b63fd03907c6b49683c5c2f /sql/sql_base.cc | |
parent | 55b14a67905eeb282e699cb158684eeae6c9326d (diff) | |
parent | 9d3446387fa61cc3558573c2e250b9c27524cce9 (diff) | |
download | mariadb-git-57b1ab50715994d8fb82d0c8fddbe409a2ec4721.tar.gz |
Merge bk-internal:/home/bk/mysql-5.0-opt
into macbook.gmz:/Users/kgeorge/mysql/work/B26162-5.0-opt
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index a7abe0e1167..ed006714143 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1505,6 +1505,7 @@ 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; @@ -2674,6 +2675,12 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags) for (tables= *start; tables ;tables= tables->next_global) { safe_to_ignore_table= FALSE; // 'FALSE', as per coding style + + 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. |