summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-01-03 12:40:38 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-01-03 12:40:38 +0100
commitb35290e19bda02257e4cf6c6acc6133b4e3f2372 (patch)
treee0d986b1156ceb3c03209c3bef9989bc7040553f /mysql-test/t
parentef1e488be369b3d3c7eb26cfba1f44840221d502 (diff)
parent4d7f0735067260bfc600c85e1574b7c708180fc2 (diff)
downloadmariadb-git-b35290e19bda02257e4cf6c6acc6133b4e3f2372.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/events_bugs.test4
-rw-r--r--mysql-test/t/func_misc.test15
-rw-r--r--mysql-test/t/group_by.test14
3 files changed, 31 insertions, 2 deletions
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test
index a0f3c5991ef..ab45446667e 100644
--- a/mysql-test/t/events_bugs.test
+++ b/mysql-test/t/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/t/func_misc.test b/mysql-test/t/func_misc.test
index cdbbe708153..75ff47aa24c 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/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/t/group_by.test b/mysql-test/t/group_by.test
index 78a319f8f84..9e24238b301 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/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) ;