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

Wrong data type for TIMESTAMP('2001-01-01','10:10:10')

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.3, 5.5.32, 5.3.12
    • 10.0.5, 5.5.33, 5.3.13
    • None
    • None

    Description

      This script

      drop table if exists t1;
      create table t1 as  select timestamp('2001-01-01','10:10:10') as a;
      show columns from t1;

      creates a VARCHAR(26) column:

      +-------+-------------+------+-----+---------+-------+
      | Field | Type        | Null | Key | Default | Extra |
      +-------+-------------+------+-----+---------+-------+
      | a     | varchar(26) | YES  |     | NULL    |       |
      +-------+-------------+------+-----+---------+-------+

      The expected result is a DATETIME column.

      Note: MySQL-5.6 correctly creates a DATETIME column in this scenario.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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