From ba5bc4e69a036240c03a71fb4efd5ca283ee637b Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Fri, 3 Dec 2004 23:07:08 +0100 Subject: [PATCH 1/6] 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 &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()) From 475d1a8934bf0a26a4e6160fdf71c6e28a3730f3 Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Fri, 10 Dec 2004 23:50:09 +0100 Subject: [PATCH 2/6] Fix results file for insert_select test with embedded server. (Bug #7167) --- mysql-test/r/insert_select.result.es | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mysql-test/r/insert_select.result.es b/mysql-test/r/insert_select.result.es index 3955c0534f2..9e11402733d 100644 --- a/mysql-test/r/insert_select.result.es +++ b/mysql-test/r/insert_select.result.es @@ -78,6 +78,13 @@ a 1 2 drop table t1, t2; +create table t1(a int); +insert into t1 values(1),(1); +reset master; +create table t2(unique(a)) select a from t1; +ERROR 23000: Duplicate entry '1' for key 1 +show binlog events; +drop table t1; create table t1 (a int not null); create table t2 (a int not null); insert into t1 values (1); From de968efaf3c4f99db3b94e102b7962187235f78c Mon Sep 17 00:00:00 2001 From: "guilhem@mysql.com" <> Date: Mon, 13 Dec 2004 15:10:54 +0100 Subject: [PATCH 3/6] correcting --expire_logs_days description in mysqld --help --- sql/mysqld.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index da834080bc0..f349f672ba8 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4758,7 +4758,8 @@ replicating a LOAD DATA INFILE command.", (gptr*) &delayed_queue_size, (gptr*) &delayed_queue_size, 0, GET_ULONG, REQUIRED_ARG, DELAYED_QUEUE_SIZE, 1, ~0L, 0, 1, 0}, {"expire_logs_days", OPT_EXPIRE_LOGS_DAYS, - "Binary logs will be rotated after expire-log-days days ", + "If non-zero, binary logs will be purged after expire_logs_days " + "days; possible purges happen at startup and at binary log rotation.", (gptr*) &expire_logs_days, (gptr*) &expire_logs_days, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 99, 0, 1, 0}, From a20c623e6bf45b59c9c700dc5028672a23236c4a Mon Sep 17 00:00:00 2001 From: "mwagner@here.mwagner.org" <> Date: Mon, 13 Dec 2004 13:48:37 -0600 Subject: [PATCH 4/6] Makefile.am: Add running of test suite with --ps-protocol to 'test' target --- Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 0770854f176..6d089cee698 100644 --- a/Makefile.am +++ b/Makefile.am @@ -100,5 +100,8 @@ tags: # Test installation test: - cd mysql-test ; ./mysql-test-run + cd mysql-test + ./mysql-test-run + ./mysql-test-run --ps-protocol + From bde49d08c77b1c04f0da6f8828f66d40a015911e Mon Sep 17 00:00:00 2001 From: "mwagner@here.mwagner.org" <> Date: Mon, 13 Dec 2004 14:03:19 -0600 Subject: [PATCH 5/6] Makefile.am: s/spaces/TAB/ --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6d089cee698..b00b3747294 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,7 +101,7 @@ tags: test: cd mysql-test - ./mysql-test-run - ./mysql-test-run --ps-protocol + ./mysql-test-run + ./mysql-test-run --ps-protocol From 2cd30dc6744c78f2d623177fd5f24523e1d8f701 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Mon, 13 Dec 2004 21:43:30 +0100 Subject: [PATCH 6/6] - a fix for the fix - now "make test" will run the test suite with and without the PS protocol --- Makefile.am | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index b00b3747294..c1ae9217e8b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -100,8 +100,4 @@ tags: # Test installation test: - cd mysql-test - ./mysql-test-run - ./mysql-test-run --ps-protocol - - + cd mysql-test; ./mysql-test-run && ./mysql-test-run --ps-protocol