diff options
author | Leonard Zhou <leonard@mysql.com> | 2009-03-16 16:21:29 +0800 |
---|---|---|
committer | Leonard Zhou <leonard@mysql.com> | 2009-03-16 16:21:29 +0800 |
commit | b42c29cfe33b5c5aab33661357fa4eb309e86132 (patch) | |
tree | 020b1ffdee00ba773b1ba783843ebd06d92d80c4 /sql/log_event.cc | |
parent | 664bb23a30572e89da319c9d2f201a7de3828c1b (diff) | |
download | mariadb-git-b42c29cfe33b5c5aab33661357fa4eb309e86132.tar.gz |
BUG#22504 load data infile sql statement in replication architecture get error
The problem is issued because we set wrong start position and stop position of query string into binlog.
That two values are stored as part of head info of query string.
When we parse binlog, we first get position values then get the query string according position values.
But seems that two values are not calculated correctly after the parse of Yacc.
We don't want to touch so much of yacc because it may influence other codes.
So just add one space after 'INTO' key word when parsing.
This can easily resolve the problem.
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
Test result
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
Test case
sql/log_event.cc:
Add space after 'INTO'.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 0e400ac2705..5d959412d36 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -6618,7 +6618,7 @@ void Execute_load_query_log_event::print(FILE* file, my_b_printf(&cache, "\'"); if (dup_handling == LOAD_DUP_REPLACE) my_b_printf(&cache, " REPLACE"); - my_b_printf(&cache, " INTO"); + my_b_printf(&cache, " INTO "); my_b_write(&cache, (uchar*) query + fn_pos_end, q_len-fn_pos_end); my_b_printf(&cache, "\n%s\n", print_event_info->delimiter); } @@ -6699,7 +6699,7 @@ Execute_load_query_log_event::do_apply_event(Relay_log_info const *rli) /* Ordinary load data */ break; } - p= strmake(p, STRING_WITH_LEN(" INTO")); + p= strmake(p, STRING_WITH_LEN(" INTO ")); p= strmake(p, query+fn_pos_end, q_len-fn_pos_end); error= Query_log_event::do_apply_event(rli, buf, p-buf); |