From 934f5cc4662ded62609ce64be15c54d327cc554e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Dec 2002 15:46:39 +0200 Subject: Ensure that BEGIN / COMMIT is handled properly if slave dies Added syntax support for CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1; Docs/internals.texi: Update binary protocol description innobase/include/db0err.h: Merge from 3.23 mysql-test/r/insert.result: Updated test result from 3.23 sql/log.cc: Fixed bug in replication and log rotation sql/log_event.cc: Ensure that BEGIN / COMMIT is handled properly if slave dies sql/slave.cc: Fixed bug in replication and log rotation sql/slave.h: Ensure that BEGIN / COMMIT is handled properly if slave dies sql/sql_analyse.cc: Moved usage of res before res is destroyed (by bzero(&s...)) sql/sql_yacc.yy: Added syntax support for CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1; To be able to read MySQL 4.1 dump files. --- sql/slave.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sql/slave.cc') diff --git a/sql/slave.cc b/sql/slave.cc index eb53e488856..a4e0b029bbf 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2711,7 +2711,12 @@ static IO_CACHE *reopen_relay_log(RELAY_LOG_INFO *rli, const char **errmsg) if ((rli->cur_log_fd=open_binlog(cur_log,rli->relay_log_name, errmsg)) <0) DBUG_RETURN(0); - my_b_seek(cur_log,rli->relay_log_pos); + /* + We want to start exactly where we was before: + relay_log_pos Current log pos + pending Number of bytes already processed from the event + */ + my_b_seek(cur_log,rli->relay_log_pos + rli->pending); DBUG_RETURN(cur_log); } -- cgit v1.2.1 From 791e9fb37ea10f3e91e56e15c869906d90313c06 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Dec 2002 14:58:27 +0200 Subject: Changed thd variables max_join_size and select_limit to type ha_rows. This fixed some optimization problems when using -DBIG_TABLES Portabilty fixes for OpenUnix and HPUX Added C and C++ version numbers to mysqlbug Docs/mysqld_error.txt: Added new error message acinclude.m4: Fix for configure problem on OpenUnix configure.in: Fix for OpenUnix Added C and C++ versions to mysqlbug mysql-test/r/variables.result: Update of max_join_size handling mysql-test/t/variables.test: Update of max_join_size handling mysys/Makefile.am: Removed duplicate row mysys/my_alloc.c: Safety fixes (not fatal) scripts/Makefile.am: Added C and C++ compiler versions to mysqlbug scripts/mysqlbug.sh: Added C and C++ compiler versions to mysqlbug sql/item_func.cc: Fixed that user variables that changes are not threated as constants. sql/item_func.h: Fixed that user variables that changes are not threated as constants. sql/mysqld.cc: Changed thd variables max_join_size and select_limit to type ha_rows sql/repl_failsafe.cc: Removed not needed cast sql/set_var.cc: Changed thd variables max_join_size and select_limit to type ha_rows sql/set_var.h: Changed thd variables max_join_size and select_limit to type ha_rows sql/slave.cc: Removed not needed cast sql/sql_class.h: Changed thd variables max_join_size and select_limit to type ha_rows sql/sql_parse.cc: Removed not needed cast Fixed security problem with mysql_drop_db() sql/sql_show.cc: Changed thd variables max_join_size and select_limit to type ha_rows sql/structs.h: Changed thd variables max_join_size and select_limit to type ha_rows --- sql/slave.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/slave.cc') diff --git a/sql/slave.cc b/sql/slave.cc index a4e0b029bbf..d254221e726 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1548,7 +1548,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) VOID(pthread_sigmask(SIG_UNBLOCK,&set,&thd->block_signals)); #endif - if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if (thd->variables.max_join_size == HA_POS_ERROR) thd->options |= OPTION_BIG_SELECTS; if (thd_type == SLAVE_THD_SQL) -- cgit v1.2.1 From b3b66f640841e459e18a3d4300766b56f0cf3bc8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Jan 2003 16:53:10 +0200 Subject: Portability fixes Fixed test suite for HPUX 10.20 and MacOSX Build-tools/Do-compile: Added timeout to mysqladmin shutdown commands Kill old running mysqld started by earlier runs Removed run time warning from LD_LIBRARY_PATH client/mysqladmin.c: Return 1 if pid file isn't deleted on shutdown. Fix error message if pid file is not deleted client/mysqltest.c: Always allow --debug flag (Makes it easier to run mysql-test-run) mysql-test/mysql-test-run.sh: A lot of safety fixes. This fixes some problems with test suite for HPUX 10.20 and MacOSX sql-bench/bench-init.pl.sh: Allow tests to change time limit. sql-bench/crash-me.sh: Indentation cleanups Added DROP for a created table sql-bench/test-alter-table.sh: Added default time limit Changed test to be estimated to get down run time. Fixed that add_multi_col is detected sql-bench/test-insert.sh: Comment cleanup sql/mysql_priv.h: Removed not needed prototype. sql/mysqld.cc: Removed DBUG warnings Removed default argument for clean_up() and made it static. More comments. Ignore SIGHUP during shutdown sql/net_pkg.cc: More comments sql/slave.cc: Added DBUG_PRINT messages --- sql/slave.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/slave.cc') diff --git a/sql/slave.cc b/sql/slave.cc index d254221e726..455b574b355 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -376,6 +376,7 @@ int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock) } if ((thread_mask & (SLAVE_IO|SLAVE_FORCE_ALL)) && mi->slave_running) { + DBUG_PRINT("info",("Terminating IO thread")); mi->abort_slave=1; if ((error=terminate_slave_thread(mi->io_thd,io_lock, io_cond_lock, @@ -386,6 +387,7 @@ int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock) } if ((thread_mask & (SLAVE_SQL|SLAVE_FORCE_ALL)) && mi->rli.slave_running) { + DBUG_PRINT("info",("Terminating SQL thread")); DBUG_ASSERT(mi->rli.sql_thd != 0) ; mi->rli.abort_slave=1; if ((error=terminate_slave_thread(mi->rli.sql_thd,sql_lock, -- cgit v1.2.1 From 1543bad3e7db362981ba89987878f60e7d70cca9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Jan 2003 11:24:39 +0200 Subject: Fix for bug in LOAD DATA INFILE and replication Fix for SHOW VARIABLES in embedded server Docs/internals.texi: Added documentation for join_buffer_size configure.in: Changed version number sql/log_event.cc: Fix for bug in LOAD DATA INFILE sql/log_event.h: Fix for bug in LOAD DATA INFILE sql/slave.cc: Fix for bug in LOAD DATA INFILE sql/sql_show.cc: Fix for SHOW VARIABLES in embedded server --- sql/slave.cc | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sql/slave.cc') diff --git a/sql/slave.cc b/sql/slave.cc index 455b574b355..b8689a28a54 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2343,12 +2343,6 @@ static int process_io_rotate(MASTER_INFO *mi, Rotate_log_event *rev) memcpy(mi->master_log_name, rev->new_log_ident, rev->ident_len+1); mi->master_log_pos= rev->pos; - - pthread_mutex_lock(&mi->rli.data_lock); - memcpy(mi->rli.master_log_name, rev->new_log_ident, rev->ident_len+1); - mi->rli.master_log_pos= rev->pos; - pthread_mutex_unlock(&mi->rli.data_lock); - DBUG_PRINT("info", ("master_log_pos: '%s' %d", mi->master_log_name, (ulong) mi->master_log_pos)); #ifndef DBUG_OFF -- cgit v1.2.1