Commit d6ca0213 authored by unknown's avatar unknown

merge


BitKeeper/etc/logging_ok:
  auto-union
parents e9d68767 46e73b40
heikki@donna.mysql.fi
monty@donna.mysql.fi
sasha@mysql.sashanet.com
......@@ -42845,9 +42845,19 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.37
@itemize @bullet
@item
Fixed bug when using indexes on @code{CHAR(255) NULL} columns.
Slave thread will now be started even if @code{master-host} is not set, as
long as @code{server-id} is set and valid @code{master.info} is present
@item
Fixed two bugs in @code{REGEXP()} on 64-bit machines.
Partial updates ( terminated with kill) are now logged with a special error
code to the binary log. Slave will refuse to execute them if the error code
indicates the update was terminated abnormally, and will have to be recovered
with @code{SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START} after a manual sanity
check/correction of data integrity
@item
Fixed bug that erroneously logged a drop of internal temporary table
on thread termination to the binary log - bug affected replication
@item
Fixed a bug in @code{REGEXP()} on 64-bit machines.
@item
@code{UPDATE} and @code{DELETE} with @code{WHERE unique_key_part IS NULL}
didn't update/delete all rows.
......@@ -6,7 +6,7 @@ sum(length(word))
(@id := id) - id
0
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
127.0.0.1 root 9306 1 master-bin.001 1729584 No 1053 Slave: query ' update t1 set n = n + 1' partially completed on the master and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START; 0
127.0.0.1 root 9306 1 master-bin.001 1729137 No 1053 Slave: query ' update t1 set n = n + 1' partially completed on the master and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START; 0
count(*)
30000
n
......
......@@ -20,7 +20,13 @@ drop table t1;
save_master_pos;
connection slave;
sync_with_master;
#test handling of aborted connection in the middle of update
connection master;
reset master;
connection slave;
reset slave;
connection master;
drop table if exists t1,t2;
create table t1(n int);
......@@ -44,6 +50,8 @@ connection master;
reap;
connection slave;
sync_with_master ;
#give the slave a chance to exit
sleep 0.5;
show slave status;
set sql_slave_skip_counter=1;
slave start;
......
rm $MYSQL_TEST_DIR/var/slave-data/master.info
rm $MYSQL_TEST_DIR/var/slave-data/master.info
......@@ -17,6 +17,7 @@
#include "mysql_priv.h"
#include <mysql.h>
#include <m_ctype.h>
#include <my_dir.h>
#include "sql_acl.h"
#include "slave.h"
#ifdef HAVE_BERKELEY_DB
......@@ -1712,6 +1713,18 @@ int main(int argc, char **argv)
using_update_log=1;
}
//make sure slave thread gets started
// if server_id is set, valid master.info is present, and master_host has
// not been specified
if(server_id && !master_host)
{
char fname[FN_REFLEN+128];
MY_STAT stat_area;
fn_format(fname, master_info_file, mysql_data_home, "", 4+16+32);
if(my_stat(fname, &stat_area, MYF(0)) && !init_master_info(&glob_mi))
master_host = glob_mi.host;
}
if (opt_bin_log && !server_id)
{
server_id= !master_host ? 1 : 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment