diff options
author | unknown <davi@moksha.local> | 2007-08-17 17:13:11 -0300 |
---|---|---|
committer | unknown <davi@moksha.local> | 2007-08-17 17:13:11 -0300 |
commit | 3b1ec12f59f28718ef0fbd92412ebec4b87b1fd2 (patch) | |
tree | cec8271ea8904632001915b76a4d200e470744a0 /sql | |
parent | 55e514ae8d6d5fbd356ea26fa793c8819d6d8c65 (diff) | |
parent | 7ee93c1639deef7e84cd162a0d7cff6c2cca2bc1 (diff) | |
download | mariadb-git-3b1ec12f59f28718ef0fbd92412ebec4b87b1fd2.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into moksha.local:/Users/davi/mysql/push/mysql-5.1-runtime
Diffstat (limited to 'sql')
-rw-r--r-- | sql/lock.cc | 1 | ||||
-rw-r--r-- | sql/sql_base.cc | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index f859f028504..d9e9dd31f81 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -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) continue; lock_type= table->reginfo.lock_type; + DBUG_ASSERT (lock_type != TL_WRITE_DEFAULT); if (lock_type >= TL_WRITE_ALLOW_WRITE) { *write_lock_used=table; 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: |