Commit aa7f2578 authored by Aleksey Midenkov's avatar Aleksey Midenkov

MDEV-21471 ER_CRASHED_ON_USAGE upon UPDATE FOR PORTION on Aria table

Turn read cache off for periodic update.

Like 498a96a4 says:

Aria with row_format=fixed uses IO_CACHE of type READ_CACHE for
sequential read in update loop. When history row is inserted inside
this loop the cache misses it and fails with error.

This applicable to any additional row inserts on UPDATE. In this case
it was initiated by UPDATE FOR PORTION.

Related to MDEV-20441.
parent 198af54b
......@@ -274,3 +274,10 @@ drop function f;
drop function g;
drop function h;
drop procedure log;
#
# MDEV-21471 ER_CRASHED_ON_USAGE upon UPDATE FOR PORTION on Aria table
#
create table t1 (s date, e date, period for app(s,e), f varchar(8)) engine=aria row_format=fixed;
insert into t1 values ('2024-05-13','2026-03-25','foo');
update t1 for portion of app from '2024-04-02' to '2026-03-15' set f = 'bar';
drop table t1;
......@@ -163,3 +163,13 @@ drop function f;
drop function g;
drop function h;
drop procedure log;
--echo #
--echo # MDEV-21471 ER_CRASHED_ON_USAGE upon UPDATE FOR PORTION on Aria table
--echo #
create table t1 (s date, e date, period for app(s,e), f varchar(8)) engine=aria row_format=fixed;
insert into t1 values ('2024-05-13','2026-03-25','foo');
update t1 for portion of app from '2024-04-02' to '2026-03-15' set f = 'bar';
# cleanup
drop table t1;
......@@ -465,6 +465,7 @@ int mysql_update(THD *thd,
my_error(ER_NOT_CONSTANT_EXPRESSION, MYF(0), "FOR PORTION OF");
DBUG_RETURN(true);
}
table->no_cache= true;
}
old_covering_keys= table->covering_keys; // Keys used in WHERE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment