Skip to content

Commit 5ff01ad

Browse files
committed
MDEV-33370 Assertion `!is_set() || (m_status == DA_OK_BULK &&
is_bulk_op())' failed after ALTER TABLE of versioned table Missed error code resulted in my_ok() at higher frame which failed on assertion for m_status in state of error.
1 parent 6409e43 commit 5ff01ad

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3512,6 +3512,18 @@ f()
35123512
drop table t;
35133513
drop function f;
35143514
#
3515+
# MDEV-33370 Assertion `!is_set() || (m_status == DA_OK_BULK &&
3516+
# is_bulk_op())' failed after ALTER TABLE of versioned table
3517+
#
3518+
create table t1 (i int) with system versioning
3519+
partition by system_time interval 1 month (
3520+
partition ver_p1 history,
3521+
partition ver_p2 history,
3522+
partition ver_pn current);
3523+
alter table `t1` partition by system_time interval 7 year ;
3524+
ERROR 22003: TIMESTAMP value is out of range in 'INTERVAL'
3525+
drop table t1;
3526+
#
35153527
# End of 10.11 tests
35163528
#
35173529
set global innodb_stats_persistent= @save_persistent;

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,6 +2766,20 @@ select f();
27662766
drop table t;
27672767
drop function f;
27682768

2769+
--echo #
2770+
--echo # MDEV-33370 Assertion `!is_set() || (m_status == DA_OK_BULK &&
2771+
--echo # is_bulk_op())' failed after ALTER TABLE of versioned table
2772+
--echo #
2773+
create table t1 (i int) with system versioning
2774+
partition by system_time interval 1 month (
2775+
partition ver_p1 history,
2776+
partition ver_p2 history,
2777+
partition ver_pn current);
2778+
2779+
--error ER_DATA_OUT_OF_RANGE
2780+
alter table `t1` partition by system_time interval 7 year ;
2781+
drop table t1;
2782+
27692783
--echo #
27702784
--echo # End of 10.11 tests
27712785
--echo #

sql/ha_partition.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,10 @@ int ha_partition::copy_partitions(ulonglong * const copied,
21932193
else if (m_part_info->part_type == VERSIONING_PARTITION)
21942194
{
21952195
if (m_part_info->check_constants(ha_thd(), m_part_info))
2196+
{
2197+
result= HA_ERR_PARTITION_LIST;
21962198
goto init_error;
2199+
}
21972200
}
21982201

21992202
while (reorg_part < m_reorged_parts)

0 commit comments

Comments
 (0)