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

Copying from INT/DOUBLE to ENUM is inconsistent

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
    • 10.2.0
    • OTHER
    • None

    Description

      Copying from DOUBLE to ENUM in INSERT..SELECT

      DROP TABLE IF EXISTS t1,t2;
      CREATE TABLE t1 (a ENUM('9e200','9e100'));
      CREATE TABLE t2 (a DOUBLE);
      INSERT INTO t2 VALUES ('9e100');
      INSERT INTO t1 SELECT * FROM t2;
      SELECT * FROM t1;

      returns

      +------+
      | a    |
      +------+
      |      |
      +------+

      Copying from DOUBLE to ENUM in ALTER

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DOUBLE);
      INSERT INTO t1 VALUES (9e100);
      ALTER TABLE t1 MODIFY a ENUM('9e200','9e100');
      SELECT *FROM t1;

      returns

      +-------+
      | a     |
      +-------+
      | 9e100 |
      +-------+

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.