Bug #35103 mysql_client_test::test_bug29948 causes sporadic failures
Submitted: 6 Mar 2008 12:10 Modified: 3 Apr 2008 15:12
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.0+ OS:Any
Assigned to: Davi Arnaut CPU Architecture:Any

[6 Mar 2008 12:10] Davi Arnaut
Description:
The problem is that the function mysql_stmt_store_result doesn't read the response packet if the connection automatically reconnects, causing the pending response packet to be possibly read as a response for some other command.
The response packet is not read because the statement is detached from the MYSQL handle upon reconnect.

How to repeat:
Put an artificial delay in the response for the COM_STMT_FETCH command in such a way that the server might have already received another command.
[6 Mar 2008 12:17] 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/43515

ChangeSet@1.2595, 2008-03-06 09:16:53-03:00, davi@mysql.com +1 -0
  Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
  
  Disable test case for bug 29948, which is causing sporadically
  failures in other tests inside mysql_client_test.
[13 Mar 2008 9:14] 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/43903

ChangeSet@1.2597, 2008-03-13 12:14:14+03:00, kaa@kaamos.(none) +1 -0
  Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
    
  Disable test case for bug 29948, which is causing sporadically
  failures in other tests inside mysql_client_test.
[13 Mar 2008 19:28] Bugs System
Pushed into 6.0.5-alpha
[13 Mar 2008 19:35] Bugs System
Pushed into 5.1.24-rc
[13 Mar 2008 19:43] Bugs System
Pushed into 5.0.60
[14 Mar 2008 20:41] 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/44052

ChangeSet@1.2597, 2008-03-14 17:40:12-03:00, davi@mysql.com +4 -0
  Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
  
  The problem is that the COM_STMT_RESET command was sending a response 
  packet if the prepared statement wasn't found in the server. The commands
  COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE should not send any packets,
  even error packets should not be sent since they are not expected by the
  client API. 
  
  The solution is to clear generated during the execution of the aforementioned
  commands and to skip resend of prepared statement commands. Another fix is
  that if the connection breaks during the send of prepared statement command,
  the command is not sent again since the prepared statement is no longer in the
  server.
[14 Mar 2008 20:42] Davi Arnaut
Queued in 5.0-runtime
[15 Mar 2008 5:08] Davi Arnaut
The changeset comment has been fixed in the 5.0-runtime tree to:

Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
  
The problem was that the COM_STMT_SEND_LONG_DATA was sending a response
packet if the prepared statement wasn't found in the server (due to
reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE
should not send any packets, even error packets should not be sent since
they are not expected by the client API.
  
The solution is to clear generated during the execution of the aforementioned
commands and to skip resend of prepared statement commands. Another fix is
that if the connection breaks during the send of prepared statement command,
the command is not sent again since the prepared statement is no longer in the
server.
[26 Mar 2008 14:13] Bugs System
Pushed into 5.1.24-rc
[26 Mar 2008 14:13] Bugs System
Pushed into 5.0.60
[27 Mar 2008 17:53] Bugs System
Pushed into 6.0.5-alpha
[3 Apr 2008 15:12] Jon Stephens
Test failure only, no user visible changes to document. Closed.