summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorunknown <kostja@vajra.(none)>2007-05-16 09:52:01 +0400
committerunknown <kostja@vajra.(none)>2007-05-16 09:52:01 +0400
commit7e628372e9b21e0355b9b8145e12a0ca31e98260 (patch)
treec990b139823c3fe164a9109ccc0b8e3cdc26e02f /sql/sp_head.cc
parentb763ff9a6b0d946a691559db6d69bd821783b8a9 (diff)
parent3395c53efcf07126fdf05ccd4ffdafb8ce319751 (diff)
downloadmariadb-git-7e628372e9b21e0355b9b8145e12a0ca31e98260.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into vajra.(none):/opt/local/work/mysql-5.0-21483 sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.h: Auto merged
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 31388e0e19c..835d8bf038f 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3490,6 +3490,14 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check)
tname[tlen]= '\0';
/*
+ Upgrade the lock type because this table list will be used
+ only in pre-locked mode, in which DELAYED inserts are always
+ converted to normal inserts.
+ */
+ if (table->lock_type == TL_WRITE_DELAYED)
+ table->lock_type= TL_WRITE;
+
+ /*
We ignore alias when we check if table was already marked as temporary
(and therefore should not be prelocked). Otherwise we will erroneously
treat table with same name but with different alias as non-temporary.