[MDEV-28077] "Wrong create options" with "big_tables" option enabled Created: 2022-03-16  Updated: 2022-04-07  Resolved: 2022-04-07

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: 10.2.44, 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3

Type: Bug Priority: Major
Reporter: Oleg Smirnov Assignee: Oleg Smirnov
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-24560 SIGSEGV in st_join_table::cleanup + s... Closed

 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



 Comments   
Comment by Sergei Petrunia [ 2022-03-25 ]

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

Comment by Oleg Smirnov [ 2022-04-02 ]

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

Comment by Oleg Smirnov [ 2022-04-07 ]

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

Generated at Thu Feb 08 09:57:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.