Bug #16529 Different time value results within normal and ps-protocol modes
Submitted: 16 Jan 2006 9:52 Modified: 20 Feb 2006 9:27
Reporter: Alexander Ivanov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1, 5.0, 5.1 OS:
Assigned to:

[16 Jan 2006 9:52] Alexander Ivanov
Description:
The bug was discovered when preparing and running test cases for bug#12440.
The same query returns different time value results in normal and --ps-protocol
modes. For example,
  SELECT CAST(235959.123456 AS TIME);
returns 23:59:59.123456 in normal mode, and
returns 23:59:59 in --ps-protocol mode.
Note also that in --ps-protocol mode
  SELECT '23:59:59.123456'; returns 23:59:59.123456
while 
  SELECT CAST(235959.123456); returns 23:59:59
See also bug#15805: "Test case 'type_time' fails in --ps-protocol mode".

How to repeat:
(1) Uncomment test cases for bug #12440 in mysql-test/t/type_time.test
(2) Perfom:
     ../mysql-test> mysql-test-run --skip-ndbcluster type_time
     ../mysql-test> mv r/type_time.reject r/type_time.result
     ../mysql-test> mysql-test-run --skip-ndbcluster --ps-protocol type_time
(3) Compare type_time.reject with type_time.result
[17 Jan 2006 13:39] Hartmut Holzgraefe
maybe also related to bug #16546 ?
[20 Jan 2006 9:27] Valerii Kravchuk
By the way, it looks OK in 5.0.19-BK using mysql client:

mysql> SELECT CAST(235959.123456 AS TIME);
+-----------------------------+
| CAST(235959.123456 AS TIME) |
+-----------------------------+
| 23:59:59.123456             |
+-----------------------------+
1 row in set (0.03 sec)

mysql> prepare stmt1 from 'SELECT CAST(? AS TIME)';
Query OK, 0 rows affected (0.00 sec)
Statement prepared

mysql> set @t=235959.123456;
Query OK, 0 rows affected (0.00 sec)

mysql> select @t;
+---------------+
| @t            |
+---------------+
| 235959.123456 |
+---------------+
1 row in set (0.00 sec)

mysql> execute stmt1 using @t;
+-----------------+
| CAST(? AS TIME) |
+-----------------+
| 23:59:59.123456 |
+-----------------+
1 row in set (0.00 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.0.19    |
+-----------+
1 row in set (0.00 sec)

So, maybe it's something with our test suit. Or I misunderstood the problem?
[21 Feb 2006 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".