Bug #25062 Inconsistent result between slave/master connections on output of datetime value
Submitted: 14 Dec 2006 10:29 Modified: 21 Jan 2007 9:16
Reporter: Paul McCullagh (Basic Quality Contributor) (OCA) Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.12 OS:MacOS (Mac OS X)
Assigned to: Assigned Account CPU Architecture:Any
Tags: datetime, master, slave

[14 Dec 2006 10:29] Paul McCullagh
Description:
The following sequence results in difference output depending on whether the master or the slave connection is used, but only under certain circumstances.

create table tx(id int auto_increment primary key, created datetime);
set timestamp=12345;
insert into tx set created=now();
select * from tx;

Output is either:
1	1970-01-01 04:25:45
or
1	1970-01-01 06:25:45

How to repeat:
I have been able to repeat the bug by executing 2 test scripts, one after the other. If only one test script is executed the bug does not appear.

Create a test script called rpl_x1.test, as follows:

--source include/have_binlog_format_mixed_or_statement.inc
source include/master-slave.inc;

create table xx(id int auto_increment primary key, created datetime);
set timestamp=12345;
insert into xx set created=now();
select * from xx;

# ----------------------------------

Create a second test script called rpl_x2.test, as follows:

--source include/have_binlog_format_mixed_or_statement.inc
source include/master-slave.inc;

create table t2(id int auto_increment primary key, created datetime);
set timestamp=12345;
insert into t2 set created=now();
select * from t2;
flush table t2;

connection slave;
select * from t2;

# ----------------------------------

Now execute the following:

$ ./mysql-test-run --do-test=rpl_x

This runs both tests (rpl_x1 and rpl_x2). Copy the .reject result to .result files.

Now execute the following:

$ ./mysql-test-run --do-test=rpl_x2

This tests fails.

So the result of rpl_x2 depends on whether it is run with rpl_x1 or not.

Suggested fix:
The bug is difficult to repeat and may depend on the timezone settings of the machine.
[21 Dec 2006 9:16] Sveta Smirnova
Thank you for the report.

That are the timezone settings on your machine?
[22 Jan 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".