diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-01-03 13:44:16 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-01-03 13:44:16 +0100 |
commit | 7753a290645ca4af8b11f2fff1f47c3a64d45732 (patch) | |
tree | e421eaafa2bd26bfe8ba21fb76a13b017348d2cd /mysql-test/main | |
parent | 02e30069573b09f5d26b6c357cd8aee3e876385a (diff) | |
parent | b35290e19bda02257e4cf6c6acc6133b4e3f2372 (diff) | |
download | mariadb-git-7753a290645ca4af8b11f2fff1f47c3a64d45732.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/events_bugs.result | 4 | ||||
-rw-r--r-- | mysql-test/main/events_bugs.test | 4 | ||||
-rw-r--r-- | mysql-test/main/func_misc.result | 13 | ||||
-rw-r--r-- | mysql-test/main/func_misc.test | 15 | ||||
-rw-r--r-- | mysql-test/main/group_by.result | 16 | ||||
-rw-r--r-- | mysql-test/main/group_by.test | 14 |
6 files changed, 62 insertions, 4 deletions
diff --git a/mysql-test/main/events_bugs.result b/mysql-test/main/events_bugs.result index cb8850112a5..4870c464fff 100644 --- a/mysql-test/main/events_bugs.result +++ b/mysql-test/main/events_bugs.result @@ -692,7 +692,7 @@ SET GLOBAL READ_ONLY = 1; connect u1_con,localhost,mysqltest_u1,,events_test; -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement ALTER EVENT e1 COMMENT 'comment'; @@ -703,7 +703,7 @@ ERROR HY000: The MariaDB server is running with the --read-only option so it can connect root_con,localhost,root,,events_test; -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; Warnings: Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. diff --git a/mysql-test/main/events_bugs.test b/mysql-test/main/events_bugs.test index a0f3c5991ef..ab45446667e 100644 --- a/mysql-test/main/events_bugs.test +++ b/mysql-test/main/events_bugs.test @@ -1029,7 +1029,7 @@ SET GLOBAL READ_ONLY = 1; --echo --error ER_OPTION_PREVENTS_STATEMENT -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; --echo @@ -1049,7 +1049,7 @@ DROP EVENT e1; --echo -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; --echo diff --git a/mysql-test/main/func_misc.result b/mysql-test/main/func_misc.result index be6c1a5309f..9ff0ebdb9ea 100644 --- a/mysql-test/main/func_misc.result +++ b/mysql-test/main/func_misc.result @@ -1491,6 +1491,19 @@ x x DEALLOCATE PREPARE stmt; # +# MDEV-19680: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || +# (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' +# or alike failed upon SELECT with mix of functions from simple view +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT ISNULL( BENCHMARK(1, MIN(a))) FROM v1; +ISNULL( BENCHMARK(1, MIN(a))) +0 +DROP VIEW v1; +DROP TABLE t1; +# # Start of 10.2 tests # # diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test index 9fd2be8c38e..c984b73c648 100644 --- a/mysql-test/main/func_misc.test +++ b/mysql-test/main/func_misc.test @@ -1139,6 +1139,21 @@ PREPARE stmt FROM "SELECT 'x' ORDER BY NAME_CONST( 'f', 'foo' )"; EXECUTE stmt; DEALLOCATE PREPARE stmt; +--echo # +--echo # MDEV-19680: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || +--echo # (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' +--echo # or alike failed upon SELECT with mix of functions from simple view +--echo # + +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE VIEW v1 AS SELECT * FROM t1; + +SELECT ISNULL( BENCHMARK(1, MIN(a))) FROM v1; + +DROP VIEW v1; +DROP TABLE t1; + --echo # --echo # Start of 10.2 tests diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result index 38ae5bc0b00..672c50c3c46 100644 --- a/mysql-test/main/group_by.result +++ b/mysql-test/main/group_by.result @@ -2828,6 +2828,22 @@ SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 ); 0 drop table t1; # +# MDEV-20922: Adding an order by changes the query results +# +CREATE TABLE t1(a int, b int); +INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200); +create view v1 as select a, b+1 as x from t1; +SELECT x, COUNT(DISTINCT a) AS y FROM v1 GROUP BY x ORDER BY y; +x y +101 2 +201 2 +SELECT b+1 AS x, COUNT(DISTINCT a) AS y FROM t1 GROUP BY x ORDER BY y; +x y +101 2 +201 2 +drop view v1; +drop table t1; +# # MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup # create table t1 (a int,b int) ; diff --git a/mysql-test/main/group_by.test b/mysql-test/main/group_by.test index 72f2c3b29d4..30db01e61f7 100644 --- a/mysql-test/main/group_by.test +++ b/mysql-test/main/group_by.test @@ -1946,6 +1946,20 @@ SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 ); drop table t1; --echo # +--echo # MDEV-20922: Adding an order by changes the query results +--echo # + +CREATE TABLE t1(a int, b int); +INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200); + +create view v1 as select a, b+1 as x from t1; + +SELECT x, COUNT(DISTINCT a) AS y FROM v1 GROUP BY x ORDER BY y; +SELECT b+1 AS x, COUNT(DISTINCT a) AS y FROM t1 GROUP BY x ORDER BY y; + +drop view v1; +drop table t1; +--echo # --echo # MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup --echo # create table t1 (a int,b int) ; |