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

"Wrong create options" with "big_tables" option enabled

Details

    Description

      After the fix in MDEV-24560, this bug appears:

      CREATE TABLE t(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a)) ENGINE=InnoDB;
      SET SESSION big_tables=ON;
      SELECT DISTINCT COUNT(DISTINCT a) FROM t;
      >>ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine Aria
      

      Attachments

        Issue Links

          Activity

            oleg.smirnov Oleg Smirnov created issue -
            oleg.smirnov Oleg Smirnov made changes -
            Field Original Value New Value
            Roel Roel Van de Paar made changes -
            Description After the fix in MDEV-24560, this bug appears:

            {noformat}
            CREATE TABLE t(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a)) ENGINE=InnoDB;
            SET SESSION sql_buffer_result=ON;
            SET SESSION big_tables=ON;
            SELECT DISTINCT COUNT(DISTINCT a) FROM t;
            >>ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine Aria
            {noformat}
            After the fix in MDEV-24560, this bug appears:

            {code:sql}
            CREATE TABLE t(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a)) ENGINE=InnoDB;
            SET SESSION sql_buffer_result=ON;
            SET SESSION big_tables=ON;
            SELECT DISTINCT COUNT(DISTINCT a) FROM t;
            >>ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine Aria
            {code}
            Roel Roel Van de Paar made changes -
            Component/s Optimizer [ 10200 ]
            oleg.smirnov Oleg Smirnov made changes -
            Affects Version/s 10.2 [ 14601 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            oleg.smirnov Oleg Smirnov made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Affects Version/s 10.7 [ 24805 ]
            Affects Version/s 10.8 [ 26121 ]
            Affects Version/s 10.9 [ 26905 ]
            oleg.smirnov Oleg Smirnov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            oleg.smirnov Oleg Smirnov made changes -
            Description After the fix in MDEV-24560, this bug appears:

            {code:sql}
            CREATE TABLE t(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a)) ENGINE=InnoDB;
            SET SESSION sql_buffer_result=ON;
            SET SESSION big_tables=ON;
            SELECT DISTINCT COUNT(DISTINCT a) FROM t;
            >>ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine Aria
            {code}
            After the fix in MDEV-24560, this bug appears:

            {code:sql}
            CREATE TABLE t(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a)) ENGINE=InnoDB;
            SET SESSION big_tables=ON;
            SELECT DISTINCT COUNT(DISTINCT a) FROM t;
            >>ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine Aria
            {code}
            oleg.smirnov Oleg Smirnov made changes -
            Summary "Wrong create options" with "big_tables" and "sql_buffer_result" options enabled "Wrong create options" with "big_tables" option enabled

            The fix is ok to push (after MDEV-24560 is fixed and pushed)

            psergei Sergei Petrunia added a comment - The fix is ok to push (after MDEV-24560 is fixed and pushed)
            oleg.smirnov Oleg Smirnov added a comment -

            The fix is pushed into bb-10.9-MDEV-24560.

            oleg.smirnov Oleg Smirnov added a comment - The fix is pushed into bb-10.9- MDEV-24560 .
            oleg.smirnov Oleg Smirnov made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            oleg.smirnov Oleg Smirnov added a comment -

            Pushed to 10.2:

            commit 53b580a91c12e9272623fc45496631be65313dd8
            Author: Oleg Smirnov <olernov@gmail.com>
            Date: Thu Mar 24 14:57:23 2022 +0700

            MDEV-28077 'Wrong create options' error with 'big_tables' enabled

            The cause of the bug is overflow of uint16 KEY_PART_INFO::length and/or
            uint16 KEY_PART_INFO::store_length. The solution is to increase the size
            of those variables to the 'uint' type (which is 32-bit long)

            commit 85192553ae2c3cb5fb26ace4cd85377525ac7845
            Author: Oleg Smirnov <olernov@gmail.com>
            Date: Fri Mar 11 21:18:34 2022 +0700

            MDEV-24560 SIGSEGV in st_join_table::cleanup

            If JOIN::create_postjoin_aggr_table encounters errors during execution
            then free_tmp_table() is then called twice for JOIN_TAB::aggr.
            The solution is to initialize JOIN_TAB::aggr only on successful completion
            of JOIN::create_postjoin_aggr_table

            oleg.smirnov Oleg Smirnov added a comment - Pushed to 10.2: commit 53b580a91c12e9272623fc45496631be65313dd8 Author: Oleg Smirnov <olernov@gmail.com> Date: Thu Mar 24 14:57:23 2022 +0700 MDEV-28077 'Wrong create options' error with 'big_tables' enabled The cause of the bug is overflow of uint16 KEY_PART_INFO::length and/or uint16 KEY_PART_INFO::store_length. The solution is to increase the size of those variables to the 'uint' type (which is 32-bit long) commit 85192553ae2c3cb5fb26ace4cd85377525ac7845 Author: Oleg Smirnov <olernov@gmail.com> Date: Fri Mar 11 21:18:34 2022 +0700 MDEV-24560 SIGSEGV in st_join_table::cleanup If JOIN::create_postjoin_aggr_table encounters errors during execution then free_tmp_table() is then called twice for JOIN_TAB::aggr. The solution is to initialize JOIN_TAB::aggr only on successful completion of JOIN::create_postjoin_aggr_table
            oleg.smirnov Oleg Smirnov made changes -
            Fix Version/s 10.2.44 [ 27514 ]
            Fix Version/s 10.3.35 [ 27512 ]
            Fix Version/s 10.4.25 [ 27510 ]
            Fix Version/s 10.5.16 [ 27508 ]
            Fix Version/s 10.6.8 [ 27506 ]
            Fix Version/s 10.7.4 [ 27504 ]
            Fix Version/s 10.8.3 [ 27502 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Duplicate [ 3 ]
            Status Stalled [ 10000 ] Closed [ 6 ]

            People

              oleg.smirnov Oleg Smirnov
              oleg.smirnov Oleg Smirnov
              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.