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

Copying from INT/DOUBLE to ENUM is inconsistent

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5, 10.0, 10.1, 10.2
    • Fix Version/s: 10.2.0
    • Component/s: OTHER
    • Labels:
      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

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: