Skip to content

Commit b0dd048

Browse files
committed
MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table
Uninitialized LEX::part_info on ha_partition::vers_can_native().
1 parent 3ffa06b commit b0dd048

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

mysql-test/suite/versioning/r/partition.result

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ t1 CREATE TABLE `t1` (
541541
PARTITION BY SYSTEM_TIME INTERVAL 7 SECOND
542542
(PARTITION `ver_p1` HISTORY ENGINE = DEFAULT_ENGINE,
543543
PARTITION `ver_pn` CURRENT ENGINE = DEFAULT_ENGINE)
544+
#
545+
# MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table
546+
#
547+
create or replace table t1 (f int) with system versioning partition by hash(f);
548+
insert delayed into t1 values (1);
544549
# Test cleanup
545550
drop database test;
546551
create database test;

mysql-test/suite/versioning/t/partition.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,14 @@ partition by system_time interval column_get(column_create(7,7), 7 as int) secon
489489
--replace_result $default_engine DEFAULT_ENGINE
490490
show create table t1;
491491

492+
--echo #
493+
--echo # MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table
494+
--echo #
495+
create or replace table t1 (f int) with system versioning partition by hash(f);
496+
# delayed works differently in embedded server
497+
--error 0,ER_DELAYED_NOT_SUPPORTED
498+
insert delayed into t1 values (1);
499+
492500
--echo # Test cleanup
493501
drop database test;
494502
create database test;

sql/sql_lex.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3145,7 +3145,7 @@ void Query_tables_list::destroy_query_tables_list()
31453145
*/
31463146

31473147
LEX::LEX()
3148-
: explain(NULL), result(0), arena_for_set_stmt(0), mem_root_for_set_stmt(0),
3148+
: explain(NULL), result(0), part_info(NULL), arena_for_set_stmt(0), mem_root_for_set_stmt(0),
31493149
option_type(OPT_DEFAULT), context_analysis_only(0), sphead(0),
31503150
default_used(0), is_lex_started(0), limit_rows_examined_cnt(ULONGLONG_MAX)
31513151
{

0 commit comments

Comments
 (0)