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

Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 10.3.11, 10.3.12
    • N/A
    • None
    • Win10 Pro x64

    Description

      When you do not explicitly specify that TRANSACTIONAL=0 in your CREATE query, everything works fine:

      CREATE TABLE table_a (col_1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(col_1)) ENGINE=MEMORY;
      Query OK, 0 rows affected (0.018 sec)

      ALTER TABLE table_a ADD COLUMN col_2 VARCHAR(255) AFTER col_1;
      Query OK, 0 rows affected (0.022 sec)

      If you do specify TRANSACTIONAL=0, CREATE TABLE throws a warning, and ALTER TABLE fails:

      CREATE TABLE table_b (col_1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(col_1)) ENGINE=MEMORY TRANSACTIONAL=0;
      Query OK, 0 rows affected, 1 warning (0.020 sec)

      SHOW WARNINGS;

      Warning 1478 Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=1'

      ALTER TABLE table_b ADD COLUMN col_2 VARCHAR(255) AFTER col_1;
      ERROR 1478 (HY000): Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=1'

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              illyria Thomas Graungaard
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.