summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2016-12-21 20:11:14 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2016-12-28 20:35:19 +0100
commit23cc1be270c7304963643947d8e5ab88f4e312ee (patch)
treec2b8d39a472df5f2188f9404254a78ef9202e941 /mysql-test
parent283e9cf4cbb34e1325699707068ab72ec3accfff (diff)
downloadmariadb-git-23cc1be270c7304963643947d8e5ab88f4e312ee.tar.gz
MDEV-11584: GRANT inside an SP does not work well on 2nd execution
Allocate password hash in statment memory
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/sp.result10
-rw-r--r--mysql-test/t/sp.test14
2 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 820701f844c..4142fc0b796 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -8032,3 +8032,13 @@ return 1;
end |
ERROR 0A000: Not allowed to return a result set from a function
drop table t1,t2;
+#
+# MDEV-11584: GRANT inside an SP does not work well on 2nd execution
+#
+CREATE PROCEDURE sp1()
+GRANT ALL PRIVILEGES ON *.* TO 'foo'@'%' IDENTIFIED BY 'pass';
+CALL sp1();
+CALL sp1();
+drop user 'foo'@'%';
+drop procedure sp1;
+#End of 10.1 tests
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index bcddbd6f97e..3034f34d763 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -9504,3 +9504,17 @@ end |
--delimiter ;
drop table t1,t2;
+
+--echo #
+--echo # MDEV-11584: GRANT inside an SP does not work well on 2nd execution
+--echo #
+
+CREATE PROCEDURE sp1()
+ GRANT ALL PRIVILEGES ON *.* TO 'foo'@'%' IDENTIFIED BY 'pass';
+CALL sp1();
+CALL sp1();
+drop user 'foo'@'%';
+drop procedure sp1;
+
+
+--echo #End of 10.1 tests