summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-14 19:12:23 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-14 19:12:23 +0100
commit03de234baf423eaefe3d0b768dccb719b1298ff6 (patch)
tree9d1d2ef228dbad081fad269f1367a3f64eb26554
parent2709380587bbcbc7abda77f11ee0abd207c65027 (diff)
downloadmariadb-git-03de234baf423eaefe3d0b768dccb719b1298ff6.tar.gz
MDEV-13982 Server crashes in in ha_partition::engine_name
use the correct handlerton when looking for TRANSACTIONAL=1 support
-rw-r--r--mysql-test/suite/parts/r/partition_alter_maria.result9
-rw-r--r--mysql-test/suite/parts/t/partition_alter_maria.test7
-rw-r--r--sql/sql_table.cc2
3 files changed, 17 insertions, 1 deletions
diff --git a/mysql-test/suite/parts/r/partition_alter_maria.result b/mysql-test/suite/parts/r/partition_alter_maria.result
index 460d20b9255..d79bc0a41fe 100644
--- a/mysql-test/suite/parts/r/partition_alter_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter_maria.result
@@ -16,6 +16,15 @@ select * from t1;
pk dt
1 2017-09-28 15:12:00
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
#
diff --git a/mysql-test/suite/parts/t/partition_alter_maria.test b/mysql-test/suite/parts/t/partition_alter_maria.test
index e21f0dfab82..e0b9256391d 100644
--- a/mysql-test/suite/parts/t/partition_alter_maria.test
+++ b/mysql-test/suite/parts/t/partition_alter_maria.test
@@ -17,5 +17,12 @@ alter table t1 drop partition p20181231;
select * from 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
--source inc/part_alter_values.inc
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 19093d9b2ca..f56781faf39 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4397,7 +4397,7 @@ bool mysql_create_table_no_lock(THD *thd,
/* Give warnings for not supported table options */
#if defined(WITH_ARIA_STORAGE_ENGINE)
extern handlerton *maria_hton;
- if (file->ht != maria_hton)
+ if (file->partition_ht() != maria_hton)
#endif
if (create_info->transactional)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,