Skip to content

Commit 0765caa

Browse files
committed
Merge remote-tracking branch 'origin/5.5' into 10.0
2 parents 96cb428 + 7a63ffa commit 0765caa

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

mysys/mf_iocache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
258258
else
259259
{
260260
/* Clear mutex so that safe_mutex will notice that it's not initialized */
261-
bzero((char*) &info->append_buffer_lock, sizeof(info));
261+
bzero((char*) &info->append_buffer_lock, sizeof(info->append_buffer_lock));
262262
}
263263
#endif
264264

sql/sql_cache.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,6 +2539,7 @@ void Query_cache::init()
25392539
*/
25402540
if (global_system_variables.query_cache_type == 0)
25412541
{
2542+
m_cache_status= DISABLE_REQUEST;
25422543
free_cache();
25432544
m_cache_status= DISABLED;
25442545
}

sql/sql_update.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ int mysql_update(THD *thd,
689689
if (reinit_io_cache(&tempfile,READ_CACHE,0L,0,0))
690690
error=1; /* purecov: inspected */
691691
select->file=tempfile; // Read row ptrs from this file
692+
// select->file was copied, update self-references.
693+
setup_io_cache(&select->file);
692694
if (error >= 0)
693695
goto err;
694696
}

0 commit comments

Comments
 (0)