Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2(EOL)
-
None
-
10.2.10, 10.2.11
Description
This bug occurs when running 10.2 testsuite with Connector/C:
perl mysql-test-run func_time --ps-protocol
When a string value, e.g "0" rather than number, is passed to from_unixtime() function the number of decimals is wrong (31 instead of 0). Also length value is not correct.
How to repeat:
MariaDB [test]> select from_unixtime(0), from_unixtime("0");
|
Field 1: `from_unixtime(0)`
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: DATETIME
|
Collation: binary (63)
|
Length: 19
|
Max_length: 19
|
Decimals: 0
|
Flags: BINARY
|
|
Field 2: `from_unixtime("0")`
|
Catalog: `def`
|
Database: ``
|
Table: ``
|
Org_table: ``
|
Type: DATETIME
|
Collation: binary (63)
|
Length: 26 <----- ????
|
Max_length: 19
|
Decimals: 31 <---- ????
|
Flags: BINARY
|
|
|
+---------------------+---------------------+
|
| from_unixtime(0) | from_unixtime("0") |
|
+---------------------+---------------------+
|
| 1970-01-01 01:00:00 | 1970-01-01 01:00:00 |
|
+---------------------+---------------------+
|
1 row in set (0.00 sec)
|