summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc1
-rw-r--r--sql/mf_iocache.cc9
2 files changed, 8 insertions, 2 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 645ac8076df..3c5a2eae38c 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1838,6 +1838,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli,
tables.db = thd->db;
tables.alias = tables.real_name = (char*)table_name;
tables.lock_type = TL_WRITE;
+ tables.updating= 1;
// the table will be opened in mysql_load
if (table_rules_on && !tables_ok(thd, &tables))
{
diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc
index 1bc65eebd23..3b70dae2563 100644
--- a/sql/mf_iocache.cc
+++ b/sql/mf_iocache.cc
@@ -70,13 +70,18 @@ int _my_b_net_read(register IO_CACHE *info, byte *Buffer,
/* to set up stuff for my_b_get (no _) */
info->read_end = (info->read_pos = (byte*) net->read_pos) + read_length;
Buffer[0] = info->read_pos[0]; /* length is always 1 */
- info->read_pos++;
/*
info->request_pos is used by log_loaded_block() to know the size
- of the current block
+ of the current block.
+ info->pos_in_file is used by log_loaded_block() too.
*/
+ info->pos_in_file+= read_length;
info->request_pos=info->read_pos;
+
+ info->read_pos++;
+
+info->request_pos=info->read_pos;
DBUG_RETURN(0);
}