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

This commit is contained in:
Alexander Barkov 2022-12-01 15:04:59 +04:00
commit b91b4e0b97
5 changed files with 37 additions and 3 deletions

View file

@ -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;

View file

@ -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
#

View file

@ -6644,6 +6644,15 @@ deallocate prepare stmt;
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 #