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

Inconsistent handling of 2-digit year in const and column

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1.10
    • 10.6
    • Temporal Types
    • None

    Description

      Output:
      ===

      mysql> drop table if exists sb;
      Query OK, 0 rows affected (0.01 sec)
       
      mysql>  create table sb(e year(4), i int);
      Query OK, 0 rows affected (0.01 sec)
       
      mysql>  insert into sb values (1932, 19);
      Query OK, 1 row affected (0.01 sec)
       
      mysql>  select e < i, e < 19 from sb;
      +-------+--------+
      | e < i | e < 19 |
      +-------+--------+
      |     0 |      1 |
      +-------+--------+
      1 row in set (0.00 sec)
       
      mysql> select version();
      +---------------------+
      | version()           |
      +---------------------+
      | 10.1.10-MariaDB-log |
      +---------------------+
      1 row in set (0.00 sec)
      

      Problem:
      ===
      Since 19 is expected to be treated as 2019, 'e<i' should return true(1).

      Recreate:
      ===

      drop table if exists sb;
       create table sb(e year(4), i int);
       insert into sb values (1932, 19);
       select e < i, e < 19 from sb;
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            dylan Dylan Su
            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.