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

CAST in view definition returns string instead of NULL on warning and gives incorrect round

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.11
    • 10.5, 10.6, 10.11
    • None

    Description

      Test:

      create view v1 as SELECT CAST('9999-12-31 23:59:59.123456' AS INTERVAL DAY_SECOND(6)) AS a, CAST('00:00:00.99' AS INTERVAL DAY_SECOND(6)) as b;
      select * from v1;
      drop view v1;
      

      Expected result:

      a	b
      NULL	00:00:00.990000
      Warnings:
      Warning	1292	Incorrect INTERVAL DAY TO SECOND value: '9999-12-31 23:59:59.123456'
      

      Actual result:

      a	b
      9999-12-31 23:59:59.1234	00:00:00.99
      Warnings:
      Warning	1292	Truncated incorrect CHAR(24) value: '9999-12-31 23:59:59.123456'
      

      Not sure that in view and in select warning must be the same

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            People

              sanja Oleksandr Byelkin
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.