Bug #15805 Test case 'type_time' fails in --ps-protocol mode
Submitted: 16 Dec 2005 8:28 Modified: 14 Feb 2006 3:11
Reporter: Kristian Nielsen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Linux (Linux/x86)
Assigned to: Alexander Ivanov CPU Architecture:Any

[16 Dec 2005 8:28] Kristian Nielsen
Description:
The test case 'type_time' fails in --ps-protocol mode (not in normal mode):

type_time                      [ fail ]

Unexpected termination, probably when starting mysqld
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/type_time.result  2005-12-15 20:57:10.000000000 +0300
--- r/type_time.reject  2005-12-15 22:58:34.000000000 +0300
***************
*** 87,107 ****
  drop table t1;
  SELECT CAST(235959.123456 AS TIME);
  CAST(235959.123456 AS TIME)
! 23:59:59.123456
  SELECT CAST(0.235959123456e+6 AS TIME);
  CAST(0.235959123456e+6 AS TIME)
! 23:59:59.123456
  SELECT CAST(235959123456e-6 AS TIME);
  CAST(235959123456e-6 AS TIME)
! 23:59:59.123456
  SELECT CAST(235959.1234567 AS TIME);
  CAST(235959.1234567 AS TIME)
! 23:59:59.123456
  Warnings:
  Warning       1292    Truncated incorrect time value: '235959.1234567'
  SELECT CAST(0.2359591234567e6 AS TIME);
  CAST(0.2359591234567e6 AS TIME)
! 23:59:59.123456
  Warnings:
  Warning       1292    Truncated incorrect time value: '235959.1234567'
  SELECT CAST(0.2359591234567e+30 AS TIME);
--- 87,107 ----
  drop table t1;
  SELECT CAST(235959.123456 AS TIME);
  CAST(235959.123456 AS TIME)
! 23:59:59
  SELECT CAST(0.235959123456e+6 AS TIME);
  CAST(0.235959123456e+6 AS TIME)
! 23:59:59
  SELECT CAST(235959123456e-6 AS TIME);
  CAST(235959123456e-6 AS TIME)
! 23:59:59
  SELECT CAST(235959.1234567 AS TIME);
  CAST(235959.1234567 AS TIME)
! 23:59:59
  Warnings:
  Warning       1292    Truncated incorrect time value: '235959.1234567'
  SELECT CAST(0.2359591234567e6 AS TIME);
  CAST(0.2359591234567e6 AS TIME)
! 23:59:59
  Warnings:
  Warning       1292    Truncated incorrect time value: '235959.1234567'
  SELECT CAST(0.2359591234567e+30 AS TIME);

How to repeat:
./mysql-test-run.pl --ps-protocol type_time

Suggested fix:
I will disable the test case for now. Please re-enable the test case when the bug is fixed.
[16 Dec 2005 8:43] 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/196
[22 Dec 2005 10:28] Joerg Bruehe
Same effect in a 4.1.17 custom build, based on ChangeSet
  1.2463.1.1 05/12/20 12:47:44 paul@snake-hub.snake.net +1 -0
  mysql.cc:
    Typo in help message.
[2 Jan 2006 20:17] Konstantin Osipov
I was able to reproduce it in 4.1 tree as well. Perhaps the new push that broke the tree can be easily traced.
[4 Jan 2006 15:19] Gunnar von Boehn
repoduced with 4.1-bk on debian Linux/PPC  (gcc 3.3.5)

Gunnar
[16 Jan 2006 15:53] Alexander Ivanov
Fixed in 4.1, 5.0, and 5.1.
New related bug #16529: "Different time value results within normal
and ps-protocol modes" is opened.
[2 Feb 2006 1:04] Mike Hillyer
Specific version numbers are needed for changelog entries, changing from Documenting status.
[9 Feb 2006 17:04] Alexander Ivanov
Fixed in 4.1.17, 5.0.19, 5.1.7-beta
[14 Feb 2006 3:11] Paul Dubois
Noted in 4.1.17, 5.0.19, 5.1.7 changelogs.

          <literal>CAST(... AS TIME)</literal> operations returned
          different results when using versus not
          using prepared-statement protocol. (Bug #15805)