Details
Description
Here is the mtr test,
CREATE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); |
set optimizer_use_condition_selectivity=4; |
CREATE FUNCTION f1() RETURNS INT DETERMINISTIC |
BEGIN
|
SET @cnt := @cnt + 1; |
RETURN 1; |
END;| |
SET @cnt := 0; |
SELECT * FROM t1 WHERE a = f1(); |
a
|
1
|
SELECT @cnt; |
@cnt
|
2
|
SET @cnt := 0; |
set optimizer_use_condition_selectivity=1; |
SELECT * FROM t1 WHERE a = f1(); |
a
|
1
|
drop table t1; |
drop function f1; |
Attachments
Issue Links
- relates to
-
MDEV-15253 Default optimizer setting changes for MariaDB 10.4
- Closed