Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2, 10.3
-
None
Description
I run the client test against a running server:
./mysql_client_test -uroot test_datetime_ranges
|
#####################################
|
1 of (1/1): test_datetime_ranges
|
#####################################
|
|
total parameters in stmt: `6` (expected: `6`)
|
total warnings: 6 (expected: 6)
|
|
+---------+------+-----------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+-----------------------------------------------------------+
|
| Warning | 1292 | Truncated incorrect datetime value: '0000-11-10 12:30:30' |
|
| Warning | 1292 | Truncated incorrect datetime value: '2004-13-10 12:30:30' |
|
| Warning | 1292 | Truncated incorrect datetime value: '2004-11-32 12:30:30' |
|
| Warning | 1292 | Truncated incorrect datetime value: '2004-11-10 24:30:30' |
|
| Warning | 1292 | Truncated incorrect datetime value: '2004-11-10 12:60:30' |
|
| Warning | 1292 | Truncated incorrect datetime value: '2004-11-10 12:30:60' |
|
+---------+------+-----------------------------------------------------------+
|
|
6 rows returned
|
Notice, the first warning said '0000-11-10 12:30:30'. This is misleading.
The bound value was actually '10000-11-10 12:30:30'. The relevant code in mysql_client_test.cc is:
static void test_datetime_ranges()
|
{
|
...
|
tm[0].year= 10000; tm[1].month= 13; tm[2].day= 32;
|
It should be fixed to produce a correct warning.