Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17209

App-period: unexpected warning on delete

Details

    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.

      Attachments

        Issue Links

          Activity

            midenok Aleksey Midenkov added a comment - - edited

            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' |
            +---------+------+------------------------------------------------+
            

            midenok Aleksey Midenkov added a comment - - edited 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' | +---------+------+------------------------------------------------+

            People

              midenok Aleksey Midenkov
              nikitamalyavin Nikita Malyavin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.