summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-01-15 14:09:45 +0200
committermonty@mysql.com <>2005-01-15 14:09:45 +0200
commit0a1076a25f897e4c383cdc5be6b713e65077496b (patch)
treee8856cd37d5a43bd18c06a8834fbfff83c0f4998 /sql/sql_prepare.cc
parent97b28521e6f2735ee6488682b15071f604f66cfd (diff)
parentf34bc883ab4beda7ffd295a89ba62a30f8ccc0e5 (diff)
downloadmariadb-git-0a1076a25f897e4c383cdc5be6b713e65077496b.tar.gz
Merge with 4.1
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 9e4f6c1334c..a71b8148f8e 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -900,8 +900,12 @@ static bool mysql_test_insert(Prepared_statement *stmt,
/*
open temporary memory pool for temporary data allocated by derived
tables & preparation procedure
+ Note that this is done without locks (should not be needed as we will not
+ access any data here)
+ If we would use locks, then we have to ensure we are not using
+ TL_WRITE_DELAYED as having two such locks can cause table corruption.
*/
- if (open_and_lock_tables(thd, table_list))
+ if (open_normal_and_derived_tables(thd, table_list))
{
DBUG_RETURN(TRUE);
}