mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-22178 Assertion `info->alias.str' failed in partition_info::check_partition_info instead of ER_VERS_WRONG_PARTS
Assign create_info->alias for ALTER TABLE since it is NULL and later accessed for printing error message.
This commit is contained in:
@@ -683,4 +683,11 @@ create table t1 (a int) with system versioning partition by system_time
|
||||
alter table t1 add partition (partition p2);
|
||||
ERROR HY000: Wrong partitioning type, expected type: `SYSTEM_TIME`
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-22178 Assertion `info->alias.str' failed in partition_info::check_partition_info instead of ER_VERS_WRONG_PARTS
|
||||
#
|
||||
create or replace table t1 (a int) with system versioning;
|
||||
alter table t1 partition by system_time (partition pn current);
|
||||
ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
|
||||
drop table t1;
|
||||
# End of 10.3 tests
|
||||
|
@@ -652,6 +652,15 @@ alter table t1 add partition (partition p2);
|
||||
# Cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22178 Assertion `info->alias.str' failed in partition_info::check_partition_info instead of ER_VERS_WRONG_PARTS
|
||||
--echo #
|
||||
create or replace table t1 (a int) with system versioning;
|
||||
--error ER_VERS_WRONG_PARTS
|
||||
alter table t1 partition by system_time (partition pn current);
|
||||
# Cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
||||
--source suite/versioning/common_finish.inc
|
||||
|
@@ -9850,6 +9850,7 @@ do_continue:;
|
||||
|
||||
tmp_disable_binlog(thd);
|
||||
create_info->options|=HA_CREATE_TMP_ALTER;
|
||||
create_info->alias= alter_ctx.table_name;
|
||||
error= create_table_impl(thd,
|
||||
&alter_ctx.db, &alter_ctx.table_name,
|
||||
&alter_ctx.new_db, &alter_ctx.tmp_name,
|
||||
|
Reference in New Issue
Block a user