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

ALTER TABLE t1 ENGINE=InnoDB keeps bad options when t1 ENGINE is CONNECT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.7
    • Fix Version/s: 10.0.13
    • Component/s: None
    • Labels:
      None
    • Environment:
      $ lsb_release -a
      No LSB modules are available.
      Distributor ID: Ubuntu
      Description: Ubuntu 12.04.3 LTS
      Release: 12.04
      Codename: precise

      Description

      Start with the following CONNECT table definition:

      CREATE TABLE `test_alter` (
        `ts` date NOT NULL `date_format`='YYYY-MM-DD' `flag`=1,
        `merchant` varchar(128) NOT NULL `flag`=2,
        `amount` decimal(10,2) NOT NULL `flag`=3,
        `category` varchar(65) NOT NULL `flag`=5
      ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=csv `file_name`='/var/lib/mysql/Export_v2.csv' `header`=0 `quoted`=1;

      Now convert to InnoDB: ALTER TABLE test_alter ENGINE=InnoDB;

      The resulting table definition looks like:

      CREATE TABLE `test_alter` (
        `ts` date NOT NULL `date_format`='YYYY-MM-DD' `flag`=1,
        `merchant` varchar(128) NOT NULL `flag`=2,
        `amount` decimal(10,2) NOT NULL `flag`=3,
        `category` varchar(65) NOT NULL `flag`=5
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 `table_type`=csv `file_name`='/var/lib/mysql/Export_v2.csv' `header`=0 `quoted`=1;

      Basic tests show that the new 'test_alter' table is a fully functional InnoDB table. However, the CREATE TABLE statement from the SHOW CREATE TABLE output is unusable and will fail.

      It should be possible to change the storage engine and the ALTER TABLE operation should 'clean up' the invalid options.

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            gerry Gerardo Narvaja (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration