Commit 3f3473cf authored by guilhem@mysql.com's avatar guilhem@mysql.com

Fix for a segfault in my previous cset (about WL#2712 and WL#2977).

parent eb468833
...@@ -948,8 +948,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs, ...@@ -948,8 +948,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
if (get_it_from_net) if (get_it_from_net)
cache.read_function = _my_b_net_read; cache.read_function = _my_b_net_read;
if (((LOAD_FILE_INFO*)cache.arg)->thd->current_stmt_binlog_row_based && if (mysql_bin_log.is_open())
mysql_bin_log.is_open())
cache.pre_read = cache.pre_close = cache.pre_read = cache.pre_close =
(IO_CACHE_CALLBACK) log_loaded_block; (IO_CACHE_CALLBACK) log_loaded_block;
#endif #endif
......
...@@ -1576,6 +1576,8 @@ int log_loaded_block(IO_CACHE* file) ...@@ -1576,6 +1576,8 @@ int log_loaded_block(IO_CACHE* file)
if (!(block_len = (char*) file->read_end - (char*) buffer)) if (!(block_len = (char*) file->read_end - (char*) buffer))
return 0; return 0;
lf_info = (LOAD_FILE_INFO*) file->arg; lf_info = (LOAD_FILE_INFO*) file->arg;
if (lf_info->thd->current_stmt_binlog_row_based)
return 0;
if (lf_info->last_pos_in_file != HA_POS_ERROR && if (lf_info->last_pos_in_file != HA_POS_ERROR &&
lf_info->last_pos_in_file >= file->pos_in_file) lf_info->last_pos_in_file >= file->pos_in_file)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment