summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2006-04-09 17:48:47 +0400
committerunknown <aivanov@mysql.com>2006-04-09 17:48:47 +0400
commit9dbf8280993e106222354246ed477eb98f2aa980 (patch)
tree1201e01f8716da9111bfea5a9e1fdd366cc7212d /sql
parent040fc2d335bc8dc83b403562cde3c6e2e89c0e6a (diff)
parent372901addf38deb86a23cafd1ad9ac3e7fae3b0e (diff)
downloadmariadb-git-9dbf8280993e106222354246ed477eb98f2aa980.tar.gz
Merge mysql.com:/home/alexi/bugs/mysql-5.0-15758-work
into mysql.com:/home/alexi/bugs/mysql-5.1-15758 sql/sql_cache.cc: SCCS merged sql/sql_class.cc: SCCS merged sql/sql_cursor.cc: SCCS merged
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_cache.cc5
-rw-r--r--sql/sql_cursor.cc3
2 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 5b060aa13c6..6e8a559ee07 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -830,6 +830,11 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
flags.sql_mode,
flags.max_sort_length,
flags.group_concat_max_len));
+ /*
+ Make InnoDB to release the adaptive hash index latch before
+ acquiring the query cache mutex.
+ */
+ ha_release_temporary_latches(thd);
STRUCT_LOCK(&structure_guard_mutex);
if (query_cache_size == 0)
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc
index 33ad27b9d14..2784e71ccae 100644
--- a/sql/sql_cursor.cc
+++ b/sql/sql_cursor.cc
@@ -445,9 +445,8 @@ Sensitive_cursor::fetch(ulong num_rows)
if (error == NESTED_LOOP_CURSOR_LIMIT)
join->resume_nested_loop= TRUE;
-#ifdef USING_TRANSACTIONS
ha_release_temporary_latches(thd);
-#endif
+
/* Grab free_list here to correctly free it in close */
thd->restore_active_arena(this, &backup_arena);