Bug #30200 mysqlbinlog.test: connection_id() not restored under ps-protocol
Submitted: 2 Aug 2007 8:33 Modified: 3 Aug 2007 2:18
Reporter: Timothy Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version: OS:Any
Assigned to: Ramil Kalimullin CPU Architecture:Any
Tags: pbfail

[2 Aug 2007 8:33] Timothy Smith
Description:
https://intranet.mysql.com/~tsmith/bugs/showpush.pl?dir=mysql-5.1-new-maint&order=713

It appears to happen always, and only, with the ps_stm test configuration.

main.mysqlbinlog               [ fail ]

Errors are (from /dev/shm/var-ps_stm-111/log/mysqltest-time) :
mysqltest: Result content mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** /data0/pushbuild/pb/mysql-5.1-new-maint/713/mysql-5.1.21-beta-pb713/mysql-test/r/mysqlbinlog.result	Wed Aug  1 17:36:17 2007
--- /data0/pushbuild/pb/mysql-5.1-new-maint/713/mysql-5.1.21-beta-pb713/mysql-test/r/mysqlbinlog.reject	Wed Aug  1 18:03:37 2007
***************
*** 324,330 ****
  insert into t1 values(connection_id());
  flush logs;
  drop table t1;
! 1
  drop table t1;
  End of 5.0 tests
  flush logs;
--- 324,330 ----
  insert into t1 values(connection_id());
  flush logs;
  drop table t1;
! 0
  drop table t1;
  End of 5.0 tests
  flush logs;
-------------------------------------------------------

How to repeat:
See pushbuild failures.  Run mysqlbinlog test with ps-protocol and statment-based logging.
[2 Aug 2007 9:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/32000

ChangeSet@1.2499, 2007-08-02 14:03:04+05:00, ramil@mysql.com +2 -0
  Fix for bug #30200: mysqlbinlog.test: connection_id() not restored under ps-protocol
  
  Problem: thd->thread_specific_used flag is not set executing a statement
  containig connection_id() function using PS protocol, that leads to 
  improper binlog event creation.
  
  Fix: set the flag in the Item_func_connection_id::fix_fields().
[2 Aug 2007 9:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/32003

ChangeSet@1.2499, 2007-08-02 14:51:03+05:00, ramil@mysql.com +3 -0
  Fix for bug #30200: mysqlbinlog.test: connection_id() not restored under ps-protocol
  
  Problem: thd->thread_specific_used flag is not set executing a statement
  containig connection_id() function using PS protocol, that leads to 
  improper binlog event creation.
  
  Fix: set the flag in the Item_func_connection_id::fix_fields().
[2 Aug 2007 19:12] Bugs System
Pushed into 5.1.21-beta
[2 Aug 2007 19:15] Bugs System
Pushed into 5.0.48
[3 Aug 2007 2:18] Paul DuBois
Noted in 5.0.48, 5.1.21 changelogs.

Prepared statements containing CONNECTION_ID() could be written
improperly to the binary log.