Skip to content

Commit 03de234

Browse files
committed
MDEV-13982 Server crashes in in ha_partition::engine_name
use the correct handlerton when looking for TRANSACTIONAL=1 support
1 parent 2709380 commit 03de234

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

mysql-test/suite/parts/r/partition_alter_maria.result

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ select * from t1;
1616
pk dt
1717
1 2017-09-28 15:12:00
1818
drop table t1;
19+
create table t1 (a int) engine=Aria transactional=1 partition by hash(a) partitions 2;
20+
show create table t1;
21+
Table Create Table
22+
t1 CREATE TABLE `t1` (
23+
`a` int(11) DEFAULT NULL
24+
) ENGINE=Aria DEFAULT CHARSET=latin1 TRANSACTIONAL=1
25+
/*!50100 PARTITION BY HASH (a)
26+
PARTITIONS 2 */
27+
drop table t1;
1928
#
2029
# MDEV-13788 Server crash when issuing bad SQL partition syntax
2130
#

mysql-test/suite/parts/t/partition_alter_maria.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,12 @@ alter table t1 drop partition p20181231;
1717
select * from t1;
1818
drop table t1;
1919

20+
#
21+
# MDEV-13982 Server crashes in in ha_partition::engine_name
22+
#
23+
create table t1 (a int) engine=Aria transactional=1 partition by hash(a) partitions 2;
24+
show create table t1;
25+
drop table t1;
26+
2027
--let $engine=Aria
2128
--source inc/part_alter_values.inc

sql/sql_table.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4397,7 +4397,7 @@ bool mysql_create_table_no_lock(THD *thd,
43974397
/* Give warnings for not supported table options */
43984398
#if defined(WITH_ARIA_STORAGE_ENGINE)
43994399
extern handlerton *maria_hton;
4400-
if (file->ht != maria_hton)
4400+
if (file->partition_ht() != maria_hton)
44014401
#endif
44024402
if (create_info->transactional)
44034403
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,

0 commit comments

Comments
 (0)