mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-13715 Server crashes in ha_partition::engine_name
This happened when trying to PARTITION a SEQUENCE table Problem was that wrong function was used to get engine name Signed-off-by: Monty <monty@mariadb.org>
This commit is contained in:
7
mysql-test/suite/sql_sequence/partition.result
Normal file
7
mysql-test/suite/sql_sequence/partition.result
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# MDEV-13715 ha_partition::engine_name() segfault fix
|
||||||
|
#
|
||||||
|
create sequence s;
|
||||||
|
alter table s partition by hash(start_value) partitions 2;
|
||||||
|
ERROR HY000: Table storage engine 'partition' does not support the create option 'SEQUENCE'
|
||||||
|
drop sequence s;
|
11
mysql-test/suite/sql_sequence/partition.test
Normal file
11
mysql-test/suite/sql_sequence/partition.test
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
--source include/have_partition.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-13715 ha_partition::engine_name() segfault fix
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create sequence s;
|
||||||
|
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||||
|
alter table s partition by hash(start_value) partitions 2;
|
||||||
|
drop sequence s;
|
@@ -3311,7 +3311,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||||||
{
|
{
|
||||||
if (!(file->ha_table_flags() & HA_CAN_TABLES_WITHOUT_ROLLBACK))
|
if (!(file->ha_table_flags() & HA_CAN_TABLES_WITHOUT_ROLLBACK))
|
||||||
{
|
{
|
||||||
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), file->engine_name()->str,
|
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), file->table_type(),
|
||||||
"SEQUENCE");
|
"SEQUENCE");
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user