1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge 10.5 into 10.6

This commit is contained in:
Marko Mäkelä
2024-10-03 09:31:39 +03:00
482 changed files with 4427 additions and 623 deletions

View File

@ -2044,7 +2044,9 @@ drop view abc;
flush status;
create table t1(f1 char(1));
create view v1 as select * from t1;
--disable_cursor_protocol
select * from (select f1 as f2, f1 as f3 from v1) v where v.f2='a';
--enable_cursor_protocol
--disable_ps_protocol
show status like "Created_tmp%";
--enable_ps_protocol
@ -2055,9 +2057,11 @@ set @tmp=@@optimizer_switch;
set @@optimizer_switch='derived_merge=OFF';
create table t1(f1 char(1));
create view v1 as select * from t1;
--disable_cursor_protocol
--disable_ps2_protocol
select * from (select f1 as f2, f1 as f3 from v1) v where v.f2='a';
--enable_ps2_protocol
--enable_cursor_protocol
--disable_ps_protocol
show status like "Created_tmp%";
--enable_ps_protocol
@ -3114,6 +3118,7 @@ DROP VIEW IF EXISTS v1;
let $query = SELECT * FROM (SELECT 1) AS t into @w;
--disable_cursor_protocol
--enable_prepare_warnings
eval $query;
--error ER_PARSE_ERROR
@ -3121,6 +3126,7 @@ eval CREATE VIEW v1 AS $query;
--echo # Previously the following would fail.
eval $query;
--disable_prepare_warnings
--enable_cursor_protocol
#
# Bug#24532 The return data type of IS TRUE is different from similar operations
@ -4160,6 +4166,7 @@ INSERT INTO t2 VALUES
(9,90), (16, 160), (11,110), (1,10), (18,180), (2,20),
(14,140), (15, 150), (12,120), (3,30), (17,170), (19,190);
--disable_cursor_protocol
EXPLAIN EXTENDED
SELECT t1.a,t2.c FROM t1,t2 WHERE t2.pk = t1.a AND t2.pk > 8;
FLUSH STATUS;
@ -4173,6 +4180,7 @@ FLUSH STATUS;
SELECT t1.a,v.c FROM t1,v WHERE v.pk = t1.a AND v.pk > 8;
SHOW STATUS LIKE 'Handler_read_%';
DROP VIEW v;
--enable_cursor_protocol
DROP TABLE t1, t2;
--enable_ps2_protocol
@ -6732,6 +6740,38 @@ DROP TABLE t;
--echo # End of 10.4 tests
--echo #
--echo # MDEV-29537: Creation of view with UNION and SELECT ... FOR UPDATE
--echo # in definition is failed with error
--echo #
CREATE TABLE t1 (i INT);
CREATE VIEW v1 AS SELECT 1 FROM t1
UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
FOR UPDATE;
SELECT * FROM v1;
SHOW CREATE VIEW v1;
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (i INT);
CREATE VIEW v1 AS SELECT 1 FROM t1
UNION
(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
FOR UPDATE);
SELECT * FROM v1;
SHOW CREATE VIEW v1;
DROP VIEW v1;
DROP TABLE t1;
--echo # End of 10.5 tests
--echo #
--echo # MDEV-13115: SELECT .. SKIP LOCKED - ensure SHOW CREATE VIEW is correct
--echo #