summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2022-12-01 15:04:59 +0400
committerAlexander Barkov <bar@mariadb.com>2022-12-02 08:14:00 +0400
commitb91b4e0b970381603b42e52d701a4f5a176ccfd6 (patch)
tree62d5dbd40668a54a4e0498c36cc6d56b7a0f216f /mysql-test/main
parentcc86360f4afb5b7b9fe64bbffef18538b2e3589b (diff)
downloadmariadb-git-b91b4e0b970381603b42e52d701a4f5a176ccfd6.tar.gz
MDEV-28696 View created as "select b''; " references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/varbinary.test3
-rw-r--r--mysql-test/main/view.result8
-rw-r--r--mysql-test/main/view.test9
3 files changed, 17 insertions, 3 deletions
diff --git a/mysql-test/main/varbinary.test b/mysql-test/main/varbinary.test
index b35819b0fb3..19e0e88932e 100644
--- a/mysql-test/main/varbinary.test
+++ b/mysql-test/main/varbinary.test
@@ -149,12 +149,9 @@ select N'', length(N'');
select '', length('');
--enable_view_protocol
-#enable after fix MDEV-28696
---disable_view_protocol
select b'', 0+b'';
select x'', 0+x'';
---enable_view_protocol
--error ER_BAD_FIELD_ERROR
select 0x;
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index fd84cff9fa1..7354e1dbb91 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -6905,5 +6905,13 @@ deallocate prepare stmt;
drop view v1;
drop table t1;
#
+# MDEV-28696 View created as "select b''; " references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+#
+CREATE VIEW v1 as select b'';
+SELECT * FROM v1;
+b''
+
+DROP VIEW v1;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 038c7107d07..987e96fc79d 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -6645,5 +6645,14 @@ drop view v1;
drop table t1;
--echo #
+--echo # MDEV-28696 View created as "select b''; " references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+--echo #
+
+CREATE VIEW v1 as select b'';
+SELECT * FROM v1;
+DROP VIEW v1;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #