1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-32583 UUID() should be treated as stochastic for the purposes of forcing query materialization

RAND() and UUID() are treated differently with respect to subquery
materialization both should be marked as uncacheable, forcing materialization.
Altered Create_func_uuid(_short)::create_builder().
Added comment in header about UNCACHEABLE_RAND meaning also unmergeable.
This commit is contained in:
Rex
2024-03-19 08:50:19 +12:00
parent 5979dcf95b
commit 9e800eda86
5 changed files with 43 additions and 3 deletions

View File

@ -1361,3 +1361,18 @@ FROM information_schema.metadata_lock_info WHERE thread_id>0 ORDER BY TABLE_SCHE
--enable_ps2_protocol
--enable_view_protocol
--echo #
--echo # MDEV-32583 UUID() should be treated as stochastic for the purposes of
--echo # forcing query materialization
--echo #
--source include/have_sequence.inc
create table t1 as WITH cte AS (SELECT UUID() as r FROM seq_1_to_10)
SELECT r as r1, r FROM cte;
select count(*) from t1 where r1!=r;
drop table t1;
--echo #
--echo # End of 10.5 tests
--echo #