1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '10.4' into 10.5

This commit is contained in:
Sergei Golubchik
2023-12-01 13:43:58 +01:00
511 changed files with 26233 additions and 3853 deletions

View File

@ -1170,8 +1170,10 @@ create table t1 (a int, b decimal(13, 3));
insert into t1 values (1, 0.123);
let $outfile_abs= $MYSQLTEST_VARDIR/tmp/subselect.out.file.1;
let $outfile_rel= ../../tmp/subselect.out.file.1;
--disable_warnings
--error 0,1
--remove_file $outfile_abs
--enable_warnings
eval select a, (select max(b) from t1) into outfile "$outfile_rel" from t1;
delete from t1;
eval load data infile "$outfile_rel" into table t1;
@ -5990,24 +5992,28 @@ drop table t1;
--echo #
--echo # MDEV-7565: Server crash with Signal 6 (part 2)
--echo #
create table t1 (id int not null primary key);
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
Group By TestCase.Revenue, TestCase.TemplateID;
drop table t1;
--echo #
--echo # MDEV-7445:Server crash with Signal 6
--echo #
create table t1 (id int not null primary key);
--delimiter |
CREATE PROCEDURE procedure2()
BEGIN
Select
(Select Sum(`TestCase`.Revenue) From mysql.slow_log E
Where TestCase.TemplateID not in (Select 1 from mysql.slow_log where 2=2)
(Select Sum(`TestCase`.Revenue) From t1 E
Where TestCase.TemplateID not in (Select 1 from t1 where 2=2)
) As `ControlRev`
From
(Select 3 as Revenue, 4 as TemplateID) As `TestCase`
@ -6019,6 +6025,7 @@ call procedure2();
call procedure2();
drop procedure procedure2;
drop table t1;
--echo #
@ -6340,6 +6347,50 @@ SELECT ROW(1,2) = 1 IN (SELECT 1 UNION SELECT 2);
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT ROW(1,2) = (1 = ANY (SELECT 1 UNION SELECT 2));
--echo #
--echo # MDEV-29070 SIGSEGV in my_decimal::operator= and Assertion `0' failed
--echo # in Item_type_holder::val_decimal on SELECT
--echo #
CREATE TABLE t1(a INT UNIQUE);
INSERT INTO t1(a) VALUES (1);
SELECT a FROM t1 WHERE (SELECT a, a UNION SELECT 1, a FROM t1) IN (SELECT 1, 1);
SELECT a FROM t1 WHERE (SELECT a, a UNION SELECT 1, a FROM t1) IN (SELECT a, a);
UPDATE t1 SET a = 0
WHERE (SELECT a, a WHERE a < 0 INTERSECT
SELECT +1 / +1, a FROM t1 WHERE a > -0+1) IN (SELECT a, a);
SELECT a FROM t1 WHERE (SELECT a, a WHERE a < 0 INTERSECT
SELECT + 1 / + 1, a FROM t1
WHERE a > -0 + 1) IN (SELECT a, a);
CREATE TABLE x (x INT);
INSERT INTO x (x) VALUES (1);
UPDATE x SET x = 1 WHERE x = 1;
INSERT INTO x (x) VALUES (1), (1);
let $q= WITH RECURSIVE x (x) AS (
SELECT 1 INTERSECT
SELECT -(SELECT 1.000000 AS x
UNION
SELECT 1.000000 ORDER BY NOT x < 'x',
-(SELECT 1 + x/1.000000 IN (1, 1) FROM x
WHERE x ORDER BY 1 - x) DESC LIMIT 1 OFFSET 1
) + 1 FROM x
)
SELECT DISTINCT x, 1, NULL, 1.000000
FROM x
WHERE (SELECT (SELECT x WHERE x IN (SELECT x FROM x))) >
(SELECT (SELECT x ORDER BY x = x OR (x = 1 AND x = 1) DESC))
ORDER BY x ASC, x DESC, x;
--error ER_TRUNCATED_WRONG_VALUE
eval $q;
DROP TABLE t1, x;
--echo #
--echo # End of 10.4 tests
--echo #