[CONC-189] bugs in conversion time to string in prepared statements Created: 2016-06-02  Updated: 2016-06-03  Resolved: 2016-06-03

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Georg Richter
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Windows, Debug, 32 bit, compiled with VS2015


Issue Links:
Blocks
blocks MDEV-9293 change clients to use Connector/C Closed

 Description   

Here is the output of func_time test

perl mysql-test-run.pl func_time --ps-protocol

There are 2 problems in this output:

1. Junk after a string
-02:30:01.100000 838:59:59.999999
+02:30:01.100000 838:59:59.999999ýýýý

2.Extraneous trailing zeros in fraction part, which are not present in mysqlclient

-2005-05-04 1970-01-01 02:33:25 19700101023325.000000
-2000-02-23 1970-01-01 02:33:20 19700101023320.000000
+2005-05-04 1970-01-01 02:33:25.000000 19700101023325.000000
+2000-02-23 1970-01-01 02:33:20.000000 19700101023320.000000

The output of the test follows.

CURRENT_TEST: main.func_time
— D:/work/server/mysql-test/r/func_time.result 2016-06-02 13:06:36.110880600 +0000
+++ D:\work\server\mysql-test\r\func_time.reject 2016-06-02 16:20:20.027071200 +0000
@@ -33,7 +33,7 @@
-02:30:01.1 -23001.10000 -23001.1 -23001
select sec_to_time(90011e-1), sec_to_time(1234567890123e30);
sec_to_time(90011e-1) sec_to_time(1234567890123e30)
-02:30:01.100000 838:59:59.999999
+02:30:01.100000 838:59:59.999999ýýýý
Warnings:
Warning 1292 Truncated incorrect time value: '1.234567890123e42'
select sec_to_time(1234567890123), sec_to_time('99999999999999999999999999999');
@@ -2106,8 +2106,8 @@
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
a f1 f2
-2005-05-04 1970-01-01 02:33:25 19700101023325.000000
-2000-02-23 1970-01-01 02:33:20 19700101023320.000000
+2005-05-04 1970-01-01 02:33:25.000000 19700101023325.000000
+2000-02-23 1970-01-01 02:33:20.000000 19700101023320.000000



 Comments   
Comment by Georg Richter [ 2016-06-03 ]

Duplicate of MDEV-10173

Comment by Vladislav Vaintroub [ 2016-06-03 ]

it might be related to MDEV-10173, but it is not a duplicate. As mysqlclient has no problems dealing with it, tests pass

Generated at Thu Feb 08 03:03:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.