summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-07-25 18:42:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-07-25 18:42:06 +0300
commite9c1701e11e2441435223cc7c00c467f58aaff19 (patch)
tree6be7d0e8fe87272e1abb2704fdb9859481d8acc2 /mysql-test/main
parent17794fb9aac9ca4fcb0b1e5904671a025a1b6b74 (diff)
parentf3eb82f048d342c11fc3869eca2e6faed9a4835d (diff)
downloadmariadb-git-e9c1701e11e2441435223cc7c00c467f58aaff19.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/grant.result19
-rw-r--r--mysql-test/main/grant.test29
-rw-r--r--mysql-test/main/mysqld--help.result2
-rw-r--r--mysql-test/main/mysqld--help.test2
-rw-r--r--mysql-test/main/repair_symlink-5543.result4
-rw-r--r--mysql-test/main/repair_symlink-5543.test8
-rw-r--r--mysql-test/main/sp.result14
-rw-r--r--mysql-test/main/sp.test20
-rw-r--r--mysql-test/main/type_datetime.result10
-rw-r--r--mysql-test/main/type_datetime.test10
10 files changed, 110 insertions, 8 deletions
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index fad874d7d64..d544c97e636 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -2752,6 +2752,25 @@ DROP USER dummy@localhost;
# End of 10.2 tests
#
#
+# Start of 10.3 tests
+#
+#
+# MDEV-19948 'show grants' return privileges individually
+#
+CREATE USER ten2;
+GRANT ALL ON *.* TO ten2;
+SHOW GRANTS FOR ten2;
+Grants for ten2@%
+GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%'
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR ten2;
+Grants for ten2@%
+GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%'
+DROP USER ten2;
+#
+# End of 10.3 tests
+#
+#
# MDEV-17932 : Assertion upon double RENAME USER
#
CREATE USER foo@localhost;
diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test
index 8ae64c9ad4d..47a274d75d1 100644
--- a/mysql-test/main/grant.test
+++ b/mysql-test/main/grant.test
@@ -2248,6 +2248,35 @@ DROP USER dummy@localhost;
--echo #
--echo #
+--echo # Start of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-19948 'show grants' return privileges individually
+--echo #
+
+# Let's cheat server that we are using `10.2` user table
+# which doesn't have `Delete_history_priv` column
+
+source include/switch_to_mysql_user.inc;
+CREATE USER ten2;
+GRANT ALL ON *.* TO ten2;
+
+# Without any patching, this should show a lot of privileges,
+# but without delete history. With patch it is showing `all privileges`
+SHOW GRANTS FOR ten2;
+FLUSH PRIVILEGES;
+
+# Now should show `all privileges` with/without patch
+SHOW GRANTS FOR ten2;
+DROP USER ten2;
+source include/switch_to_mysql_global_priv.inc;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
--echo # MDEV-17932 : Assertion upon double RENAME USER
--echo #
CREATE USER foo@localhost;
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index c5630770eff..ff2631a738e 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -1,4 +1,4 @@
-Windows bug: happens when a new line is exactly at the right offset.
+Windows bug: new line disappears when it is exactly at the right offset.
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index 9e67764d765..b4747e68471 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -42,7 +42,7 @@ perl;
$re2=join('|', @plugins);
$skip=0;
open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
- print "Windows bug: happens when a new line is exactly at the right offset.\n";
+ print "Windows bug: new line disappears when it is exactly at the right offset.\n";
while (<F>) {
next if 1../The following groups are read/;
# formatting, skip line consisting entirely of dashes and blanks
diff --git a/mysql-test/main/repair_symlink-5543.result b/mysql-test/main/repair_symlink-5543.result
index c77e7162a51..2024c9f5684 100644
--- a/mysql-test/main/repair_symlink-5543.result
+++ b/mysql-test/main/repair_symlink-5543.result
@@ -1,7 +1,7 @@
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1);
-# Some systems fail with errcode 40, when doing openat, while others
-# don't have openat and fail with errcode 20.
+# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
+# while others don't have openat and fail with errcode 20.
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error 20 for record at pos 0
diff --git a/mysql-test/main/repair_symlink-5543.test b/mysql-test/main/repair_symlink-5543.test
index 4c120334d05..ac7bb497f24 100644
--- a/mysql-test/main/repair_symlink-5543.test
+++ b/mysql-test/main/repair_symlink-5543.test
@@ -9,9 +9,9 @@
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
insert t1 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
---echo # Some systems fail with errcode 40, when doing openat, while others
---echo # don't have openat and fail with errcode 20.
---replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /40/20/ /".*"/"<errmsg>"/
+--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
+--echo # while others don't have openat and fail with errcode 20.
+--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t1;
drop table t1;
@@ -19,7 +19,7 @@ drop table t1;
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
insert t2 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
---replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /40/20/ /".*"/"<errmsg>"/
+--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t2;
drop table t2;
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index b812334470b..62da6359e40 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -8307,6 +8307,20 @@ UNION
SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
+#
+# MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
+# Assertion `field_handlers == 0 || field_pos < field_count'
+#
+CREATE TABLE t1 (ct time);
+INSERT INTO t1 VALUES ('16:11:28');
+CREATE FUNCTION f1 () RETURNS varchar(100)
+BEGIN
+DECLARE xxx varchar(100);
+ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
+RETURN xxx;
+END|
+ERROR 0A000: Not allowed to return a result set from a function
+drop table t1;
#End of 10.1 tests
#
# MDEV-11081: CURSOR for query with GROUP BY
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 7f413c4f665..3e4b3418a2d 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -9823,6 +9823,26 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
+--echo #
+--echo # MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
+--echo # Assertion `field_handlers == 0 || field_pos < field_count'
+--echo #
+
+CREATE TABLE t1 (ct time);
+INSERT INTO t1 VALUES ('16:11:28');
+
+DELIMITER |;
+--error ER_SP_NO_RETSET
+CREATE FUNCTION f1 () RETURNS varchar(100)
+BEGIN
+DECLARE xxx varchar(100);
+ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
+RETURN xxx;
+END|
+
+DELIMITER ;|
+drop table t1;
+
--echo #End of 10.1 tests
--echo #
diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result
index 64c523f26ce..0c33ddc3df1 100644
--- a/mysql-test/main/type_datetime.result
+++ b/mysql-test/main/type_datetime.result
@@ -1146,6 +1146,16 @@ a
00:01:00
DROP TABLE t1;
#
+# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
+#
+CREATE TABLE t1 (i INT, d DATETIME);
+INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
+SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
+ExtractValue('foo','bar') i MIN(d)
+ NULL 1981-09-24 01:04:47
+ 3 1976-12-14 13:21:07
+DROP TABLE t1;
+#
# End of 10.1 tests
#
#
diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test
index 7bd7883f469..cecdda593d0 100644
--- a/mysql-test/main/type_datetime.test
+++ b/mysql-test/main/type_datetime.test
@@ -700,6 +700,16 @@ SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
SELECT * FROM t1 WHERE 20160101 > CAST(a AS DATETIME);
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
+--echo #
+
+CREATE TABLE t1 (i INT, d DATETIME);
+INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
+SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
+DROP TABLE t1;
+
--echo #
--echo # End of 10.1 tests
--echo #