From 21f2382b283e9676f58d61ac744dd744e153239a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Feb 2003 00:04:13 +0200 Subject: [PATCH 1/6] change 'slave-master-info.opt' to .slave-mi to avoid problems with long filenames on some OS mysql-test/t/rpl_rotate_logs.slave-mi: Rename: mysql-test/t/rpl_rotate_logs-slave-master-info.opt -> mysql-test/t/rpl_rotate_logs.slave-mi mysql-test/t/rpl000015.slave-mi: Rename: mysql-test/t/rpl000015-slave-master-info.opt -> mysql-test/t/rpl000015.slave-mi --- mysql-test/mysql-test-run.sh | 2 +- .../t/{rpl000015-slave-master-info.opt => rpl000015.slave-mi} | 0 ...tate_logs-slave-master-info.opt => rpl_rotate_logs.slave-mi} | 0 scripts/make_binary_distribution.sh | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename mysql-test/t/{rpl000015-slave-master-info.opt => rpl000015.slave-mi} (100%) rename mysql-test/t/{rpl_rotate_logs-slave-master-info.opt => rpl_rotate_logs.slave-mi} (100%) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index fcddf52c66b..8b1c8ff1b44 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -706,7 +706,7 @@ run_testcase () slave_opt_file=$TESTDIR/$tname-slave.opt master_init_script=$TESTDIR/$tname-master.sh slave_init_script=$TESTDIR/$tname-slave.sh - slave_master_info_file=$TESTDIR/$tname-slave-master-info.opt + slave_master_info_file=$TESTDIR/$tname.slave-mi SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0` if [ -n "$SKIP_TEST" ] ; then SKIP_THIS_TEST=`$EXPR \( $tname : "$SKIP_TEST" \) != 0` diff --git a/mysql-test/t/rpl000015-slave-master-info.opt b/mysql-test/t/rpl000015.slave-mi similarity index 100% rename from mysql-test/t/rpl000015-slave-master-info.opt rename to mysql-test/t/rpl000015.slave-mi diff --git a/mysql-test/t/rpl_rotate_logs-slave-master-info.opt b/mysql-test/t/rpl_rotate_logs.slave-mi similarity index 100% rename from mysql-test/t/rpl_rotate_logs-slave-master-info.opt rename to mysql-test/t/rpl_rotate_logs.slave-mi diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 2e25cc9bdc4..801f9fb2e05 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -113,7 +113,7 @@ $CP mysql-test/mysql-test-run mysql-test/install_test_db $BASE/mysql-test/ $CP mysql-test/README $BASE/mysql-test/README $CP mysql-test/include/*.inc $BASE/mysql-test/include $CP mysql-test/std_data/*.dat mysql-test/std_data/*.001 $BASE/mysql-test/std_data -$CP mysql-test/t/*.test mysql-test/t/*.opt mysql-test/t/*.sh $BASE/mysql-test/t +$CP mysql-test/t/*.test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t $CP mysql-test/r/*.result mysql-test/r/*.require $BASE/mysql-test/r $CP scripts/* $BASE/bin From 85d6d3d8ec6c49b1770ad6ca9cb5fc5b82e21aa3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Feb 2003 09:52:19 +0200 Subject: [PATCH 2/6] Comment column in SHOW TABLE STATUS now reports that it can contain NULL values (which is the case for a crashed .frm file). --- sql/sql_show.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 729e1557cdc..15693035a82 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -293,6 +293,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild) field_list.push_back(item=new Item_empty_string("Create_options",255)); item->maybe_null=1; field_list.push_back(item=new Item_empty_string("Comment",80)); + item->maybe_null=1; if (send_fields(thd,field_list,1)) DBUG_RETURN(1); From 23a850e5a641f8b124e700916911e22d2cdd06de Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Feb 2003 10:16:50 +0200 Subject: [PATCH 3/6] Fix for SHOW TABLE STATUS with empty .frm file --- sql/sql_show.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 15693035a82..585c30110b3 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -312,7 +312,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild) casedn_str(file_name); if (!(table = open_ltable(thd, &table_list, TL_READ))) { - for (uint i=0 ; i < field_list.elements ; i++) + for (uint i=2 ; i < field_list.elements ; i++) net_store_null(packet); net_store_data(packet,thd->net.last_error); thd->net.last_error[0]=0; From 41e10e728ea3ad663020e9f0afb21a1fa6532385 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Feb 2003 12:32:37 +0200 Subject: [PATCH 4/6] Added copying of *.slave-mi mysql-test files --- mysql-test/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index a91baa1538e..d897bdecb59 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -27,7 +27,7 @@ CLEANFILES = $(test_SCRIPTS) dist-hook: mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \ $(distdir)/std_data - $(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(distdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t $(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include $(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r $(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.001 $(distdir)/std_data @@ -41,6 +41,8 @@ install-data-local: $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir) $(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t + $(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t $(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r $(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include From 40fbd0fc790ab29dad2f11c1116cf1fc9d20e54c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Feb 2003 19:50:05 +0200 Subject: [PATCH 5/6] LOAD DATA INFILE is not replicated by slave if replicate_*_table is set --- sql/slave.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/slave.cc b/sql/slave.cc index 0bbf9bf227d..a1972dc5a5d 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1091,6 +1091,7 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len) tables.db = thd->db; tables.alias= tables.real_name= (char*)lev->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)) { From 391bc11a2121919a29a2579639bc476b6c25fa6a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Feb 2003 19:52:14 +0200 Subject: [PATCH 6/6] Always include errno.h include/global.h: Portability fix (Using errno before including errno.h can give big problems on Linux) --- include/global.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/global.h b/include/global.h index 988797b330c..1737c60db30 100644 --- a/include/global.h +++ b/include/global.h @@ -223,6 +223,7 @@ double my_ulonglong2double(unsigned long long A); #define CONFIG_SMP #include #endif +#include /* Recommended by debian */ /* Go around some bugs in different OS and compilers */ #if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)