Commit 03de234b authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-13982 Server crashes in in ha_partition::engine_name

use the correct handlerton when looking for TRANSACTIONAL=1 support
parent 27093805
...@@ -16,6 +16,15 @@ select * from t1; ...@@ -16,6 +16,15 @@ select * from t1;
pk dt pk dt
1 2017-09-28 15:12:00 1 2017-09-28 15:12:00
drop table t1; drop table t1;
create table t1 (a int) engine=Aria transactional=1 partition by hash(a) partitions 2;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=Aria DEFAULT CHARSET=latin1 TRANSACTIONAL=1
/*!50100 PARTITION BY HASH (a)
PARTITIONS 2 */
drop table t1;
# #
# MDEV-13788 Server crash when issuing bad SQL partition syntax # MDEV-13788 Server crash when issuing bad SQL partition syntax
# #
......
...@@ -17,5 +17,12 @@ alter table t1 drop partition p20181231; ...@@ -17,5 +17,12 @@ alter table t1 drop partition p20181231;
select * from t1; select * from t1;
drop table t1; drop table t1;
#
# MDEV-13982 Server crashes in in ha_partition::engine_name
#
create table t1 (a int) engine=Aria transactional=1 partition by hash(a) partitions 2;
show create table t1;
drop table t1;
--let $engine=Aria --let $engine=Aria
--source inc/part_alter_values.inc --source inc/part_alter_values.inc
...@@ -4397,7 +4397,7 @@ bool mysql_create_table_no_lock(THD *thd, ...@@ -4397,7 +4397,7 @@ bool mysql_create_table_no_lock(THD *thd,
/* Give warnings for not supported table options */ /* Give warnings for not supported table options */
#if defined(WITH_ARIA_STORAGE_ENGINE) #if defined(WITH_ARIA_STORAGE_ENGINE)
extern handlerton *maria_hton; extern handlerton *maria_hton;
if (file->ht != maria_hton) if (file->partition_ht() != maria_hton)
#endif #endif
if (create_info->transactional) if (create_info->transactional)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment