mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-24529 Assertion failed in vers_select_conds_t::print
This commit adds processing of SYSTEM_TIME_BEFORE and SYSTEM_TIME_HISTORY to vers_select_conds_t::print().
This commit is contained in:
@ -187,3 +187,15 @@ x
|
|||||||
1
|
1
|
||||||
drop prepare stmt;
|
drop prepare stmt;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-28201 Server crashes upon SHOW ANALYZE/EXPLAIN FORMAT=JSON
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
|
||||||
|
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
|
||||||
|
SET optimizer_trace= 'enabled=on';
|
||||||
|
DELETE HISTORY FROM v1 BEFORE SYSTEM_TIME '2021-01-01';
|
||||||
|
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||||
|
DELETE HISTORY FROM v1;
|
||||||
|
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||||
|
DROP VIEW v1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -192,4 +192,17 @@ select * from t1;
|
|||||||
drop prepare stmt;
|
drop prepare stmt;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-28201 Server crashes upon SHOW ANALYZE/EXPLAIN FORMAT=JSON
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
|
||||||
|
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
|
||||||
|
SET optimizer_trace= 'enabled=on';
|
||||||
|
--error ER_NON_UPDATABLE_TABLE
|
||||||
|
DELETE HISTORY FROM v1 BEFORE SYSTEM_TIME '2021-01-01';
|
||||||
|
--error ER_NON_UPDATABLE_TABLE
|
||||||
|
DELETE HISTORY FROM v1;
|
||||||
|
DROP VIEW v1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--source suite/versioning/common_finish.inc
|
--source suite/versioning/common_finish.inc
|
||||||
|
@ -790,8 +790,10 @@ void vers_select_conds_t::print(String *str, enum_query_type query_type) const
|
|||||||
end.print(str, query_type, STRING_WITH_LEN(" AND "));
|
end.print(str, query_type, STRING_WITH_LEN(" AND "));
|
||||||
break;
|
break;
|
||||||
case SYSTEM_TIME_BEFORE:
|
case SYSTEM_TIME_BEFORE:
|
||||||
|
start.print(str, query_type, STRING_WITH_LEN(" FOR SYSTEM_TIME BEFORE "));
|
||||||
|
break;
|
||||||
case SYSTEM_TIME_HISTORY:
|
case SYSTEM_TIME_HISTORY:
|
||||||
DBUG_ASSERT(0);
|
// nothing to add
|
||||||
break;
|
break;
|
||||||
case SYSTEM_TIME_ALL:
|
case SYSTEM_TIME_ALL:
|
||||||
str->append(" FOR SYSTEM_TIME ALL");
|
str->append(" FOR SYSTEM_TIME ALL");
|
||||||
|
Reference in New Issue
Block a user