diff options
author | unknown <guilhem@mysql.com> | 2004-12-03 23:07:08 +0100 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-12-03 23:07:08 +0100 |
commit | f83514a0077fc63fbc446b2d9df2925652b8ec50 (patch) | |
tree | 88cb964898e99a7ba5e53a27a18e85ecde53c685 /sql | |
parent | befcff9ba5ec37fdf8ccc1aac31ac3ab9dab8ac3 (diff) | |
download | mariadb-git-f83514a0077fc63fbc446b2d9df2925652b8ec50.tar.gz |
Fix for BUG#6671 "mysqlbinlog does not show thread_id for LOAD DATA INFILE"
(exactly, for the bug in 4.1 reported in this bug report). We just make
Load_log_event work like Query_log_event for temp tables.
sql/log_event.cc:
For LOAD DATA INFILE to be preceded by SET PSEUDO_THREAD_ID if needed, in the mysqlbinlog output,
we need to use the LOG_EVENT_THREAD_SPECIFIC_F flag in Load_log_event exactly like we already do
in Query_log_event.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log_event.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 2fdc89504d7..e76b1d8a759 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1406,7 +1406,9 @@ Load_log_event::Load_log_event(THD *thd_arg, sql_exchange *ex, List<Item> &fields_arg, enum enum_duplicates handle_dup, bool using_trans) - :Log_event(thd_arg, 0, using_trans), thread_id(thd_arg->thread_id), + :Log_event(thd_arg, !thd_arg->tmp_table_used ? + 0 : LOG_EVENT_THREAD_SPECIFIC_F, using_trans), + thread_id(thd_arg->thread_id), slave_proxy_id(thd_arg->variables.pseudo_thread_id), num_fields(0),fields(0), field_lens(0),field_block_len(0), @@ -1596,6 +1598,9 @@ void Load_log_event::print(FILE* file, bool short_form, char* last_db, commented ? "# " : "", db); + if (flags & LOG_EVENT_THREAD_SPECIFIC_F) + fprintf(file,"%sSET @@session.pseudo_thread_id=%lu;\n", + commented ? "# " : "", (ulong)thread_id); fprintf(file, "%sLOAD DATA ", commented ? "# " : ""); if (check_fname_outside_temp_buf()) |