diff options
author | <Li-Bing.Song@sun.com> | 2009-12-15 13:14:14 +0800 |
---|---|---|
committer | <Li-Bing.Song@sun.com> | 2009-12-15 13:14:14 +0800 |
commit | aa388252872f721578266b32c8879ca338134bf5 (patch) | |
tree | 713f5ead12366929d2b0bd97937ceb93e7f40378 /sql/log_event.cc | |
parent | 110d78e2c5034663b61885d731015fec5bd0714b (diff) | |
download | mariadb-git-aa388252872f721578266b32c8879ca338134bf5.tar.gz |
Bug #34628 LOAD DATA CONCURRENT INFILE drops CONCURRENT in binary log
'LOAD DATA CONCURRENT [LOCAL] INFILE ...' statment only is binlogged as
'LOAD DATA [LOCAL] INFILE ...' in SBR and MBR. As a result, if replication is on,
queries on slaves will be blocked by the replication SQL thread.
This patch write code to write 'CONCURRENT' into the log event if 'CONCURRENT' option
is in the original statement in SBR and MBR.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 6686a4634f7..9552bfad27f 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4006,6 +4006,7 @@ uint Load_log_event::get_query_buffer_length() return 5 + db_len + 3 + // "use DB; " 18 + fname_len + 2 + // "LOAD DATA INFILE 'file''" + 11 + // "CONCURRENT " 7 + // LOCAL 9 + // " REPLACE or IGNORE " 13 + table_name_len*2 + // "INTO TABLE `table`" @@ -4033,6 +4034,9 @@ void Load_log_event::print_query(bool need_db, const char *cs, char *buf, pos= strmov(pos, "LOAD DATA "); + if (thd->lex->lock_option == TL_WRITE_CONCURRENT_INSERT) + pos= strmov(pos, "CONCURRENT "); + if (fn_start) *fn_start= pos; |