summaryrefslogtreecommitdiff
path: root/mysql-test/r/view.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-07 12:23:58 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-07 12:23:58 +0300
commita82ed92a6a721f45f23e210c132d5b33d3dccd21 (patch)
treebb4c240cdc3dea2c4772a9fb2112054082ad0640 /mysql-test/r/view.result
parent9f580bbc0e674bcb4b99a39767311539464b39d6 (diff)
parentd26fb96a9f225e53941fad5feb21abddbbf99a95 (diff)
downloadmariadb-git-a82ed92a6a721f45f23e210c132d5b33d3dccd21.tar.gz
Merge 10.2 into bb-10.2-ext
Diffstat (limited to 'mysql-test/r/view.result')
-rw-r--r--mysql-test/r/view.result35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index d0d57e1b1e9..8767b737ca7 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -6603,6 +6603,41 @@ use test;
drop database test_db;
drop user foo@localhost;
#
+# MDEV-13523: Group By in a View, called within a Stored Routine
+# causes Error Code 1356 when a non-root user runs the routine for
+# a second time
+#
+CREATE DATABASE bugTest;
+USE bugTest;
+CREATE TABLE `procViewTable` (`id` int(10), `someText` varchar(50) NOT NULL);
+insert into `procViewTable` values (1,'Test'), (2,'Test 2');
+CREATE USER 'procView'@'%';
+GRANT ALL PRIVILEGES ON `bugTest`.* TO 'procView'@'%';
+CREATE DEFINER=`procView`@`%` VIEW `procViewSimple` AS (
+select * from (
+select `id` from `bugTest`.`procViewTable`
+ ) `innerQuery`
+ group by `innerQuery`.`id`
+);
+connect con1,localhost,procView,,;
+use bugTest;
+prepare stmt from "SELECT * FROM procViewSimple";
+execute stmt;
+id
+1
+2
+execute stmt;
+id
+1
+2
+disconnect con1;
+connection default;
+drop user procView;
+drop view procViewSimple;
+drop table procViewTable;
+use test;
+drop database bugTest;
+#
# End of 10.2 tests
#
#