[MDEV-17209] App-period: unexpected warning on delete Created: 2018-09-17  Updated: 2018-09-18

Status: Open
Project: MariaDB Server
Component/s: Versioned Tables
Affects Version/s: None
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Nikita Malyavin Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-16973 Application-time periods: DELETE Closed

 Description   
  1. Reporduce

    create or replace table t (id int, s date, e date, period for apptime(s,e));
    delete from t for portion of apptime from 777222333 to '2018-01-01';
    show warnings;
    

  1. Result

    +---------+------+------------------------------------------------+
    | Level   | Code | Message                                        |
    +---------+------+------------------------------------------------+
    | Warning | 1292 | Truncated incorrect DOUBLE value: '2018-01-01' |
    +---------+------+------------------------------------------------+
    

  1. Expected
    It should print warning about first argument, not the second as it works ok. In fact it should fail with error, because when it treats wrong type as a zero date it leads to unexpected result.


 Comments   
Comment by Aleksey Midenkov [ 2018-09-17 ]

Also reproducible in System Versioning:

create or replace table t (x int) with system versioning;
select * from t for system_time from 111111111111 to '2018-09-13';
show warnings;

Result:

+---------+------+------------------------------------------------+
| Level   | Code | Message                                        |
+---------+------+------------------------------------------------+
| Warning | 1292 | Truncated incorrect DOUBLE value: '2018-09-13' |
+---------+------+------------------------------------------------+

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