summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2008-07-10 14:50:07 -0400
committerChad MILLER <chad@mysql.com>2008-07-10 14:50:07 -0400
commitc94a46240a912bd71d6ec961132ae3e6f4746bd5 (patch)
tree667c2782c7fcee247010d3413aaf80a81fc6dd92 /sql/sql_base.cc
parent06756c19c5a27a5240dc1dd7c243c32db04ccf00 (diff)
parentdc00a524640646d8fadc8a906ed91343fdd43fc6 (diff)
downloadmariadb-git-c94a46240a912bd71d6ec961132ae3e6f4746bd5.tar.gz
Merge chunk from trunk.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 2fbb2135cc6..89c16b7e54c 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -2852,8 +2852,12 @@ 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 == TL_WRITE_DEFAULT ?
- thd->update_lock_default : tables->lock_type;
+ {
+ if (tables->lock_type == TL_WRITE_DEFAULT)
+ tables->table->reginfo.lock_type= thd->update_lock_default;
+ else if (tables->table->s->tmp_table == NO_TMP_TABLE)
+ tables->table->reginfo.lock_type= tables->lock_type;
+ }
tables->table->grant= tables->grant;
process_view_routines: