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

MariaRocks: rocksdb.add_index_inplace fails

Details

    Description

      rocksdb.add_index_inplace                [ fail ]
              Test ended at 2016-11-21 17:30:48
       
      CURRENT_TEST: rocksdb.add_index_inplace
      mysqltest: At line 163: query 'ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE' failed: 1845: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
      

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia created issue -
            psergei Sergei Petrunia made changes -
            Field Original Value New Value

            The table being altered is partitioned:

            CREATE TABLE t1 (i INT, j INT, k INT, PRIMARY KEY (i), KEY(j)) ENGINE = ROCKSDB PARTITION BY KEY(i) PARTITIONS 4;
            ...
            ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;
            

            psergei Sergei Petrunia added a comment - The table being altered is partitioned: CREATE TABLE t1 (i INT, j INT, k INT, PRIMARY KEY (i), KEY(j)) ENGINE = ROCKSDB PARTITION BY KEY(i) PARTITIONS 4; ... ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;

            The difference starts in ha_rocksdb::check_if_supported_inplace_alter(). ha_alter_info->handler_flags value is different.

            fb/mysql-5.6 has value 1 which is

              // Add non-unique, non-primary index
              static const HA_ALTER_FLAGS ADD_INDEX                  = 1L << 0;
            

            MariaDB has $108 = 0x80000001 which is

              // Add non-unique, non-primary index
              static const HA_ALTER_FLAGS ADD_INDEX                  = 1L << 0;
             ...
              /**
                ALTER TABLE for a partitioned table. The engine needs to commit
                online alter of all partitions atomically (using group_commit_ctx)
              */
              static const HA_ALTER_FLAGS ALTER_PARTITIONED          = 1L << 31;
            

            fb/mysql-5.6 doesn't have ALTER_PARTITIONED defined (neither do mysql-5.6, nor mysql-5.7)

            psergei Sergei Petrunia added a comment - The difference starts in ha_rocksdb::check_if_supported_inplace_alter() . ha_alter_info->handler_flags value is different. fb/mysql-5.6 has value 1 which is // Add non-unique, non-primary index static const HA_ALTER_FLAGS ADD_INDEX = 1L << 0; MariaDB has $108 = 0x80000001 which is // Add non-unique, non-primary index static const HA_ALTER_FLAGS ADD_INDEX = 1L << 0; ... /** ALTER TABLE for a partitioned table. The engine needs to commit online alter of all partitions atomically (using group_commit_ctx) */ static const HA_ALTER_FLAGS ALTER_PARTITIONED = 1L << 31; fb/mysql-5.6 doesn't have ALTER_PARTITIONED defined (neither do mysql-5.6, nor mysql-5.7)
            psergei Sergei Petrunia added a comment - - edited Relevant commits: https://github.com/MariaDB/server/commit/97728e107a5262266a2f6ed61bae9639a1717831 https://github.com/MariaDB/server/commit/99027efd14f9f3a66dcc32d6313a4c4ed71bffe8 https://github.com/MariaDB/server/commit/9927b36e87652c6dc4ff2425e86570d678bac224
            elenst Elena Stepanova made changes -
            Affects Version/s 10.2 [ 14601 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.2 [ 14601 ]
            elenst Elena Stepanova made changes -
            Component/s Data Definition - Alter Table [ 10114 ]
            psergei Sergei Petrunia made changes -
            Assignee Sergei Petrunia [ psergey ]
            psergei Sergei Petrunia made changes -
            Component/s Storage Engine - RocksDB [ 13901 ]
            Component/s Data Definition - Alter Table [ 10114 ]

            Fixed in work tree

            psergei Sergei Petrunia added a comment - Fixed in work tree
            psergei Sergei Petrunia made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.2 [ 14601 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 78412 ] MariaDB v4 [ 151247 ]

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              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.