Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
11.4, 10.4(EOL)
-
None
Description
I run this MTR test:
CREATE USER foo;
|
CREATE USER FOO;
|
GRANT SELECT ON test.* TO foo;
|
GRANT SELECT ON test.* TO FOO;
|
|
CREATE DEFINER=foo SQL SECURITY INVOKER VIEW v1 AS SELECT 1 AS c1;
|
|
--connect (FOO, localhost, FOO, , test)
|
--connection FOO
|
|
SELECT CURRENT_USER;
|
--vertical_results
|
--query_vertical SELECT * FROM INFORMATION_SCHEMA.VIEWS
|
--horizontal_results
|
|
--disconnect FOO
|
--connection default
|
|
DROP VIEW v1;
|
DROP USER foo;
|
DROP USER FOO;
|
It produces the following outout:
...
|
SELECT CURRENT_USER;
|
CURRENT_USER
|
FOO@%
|
SELECT * FROM INFORMATION_SCHEMA.VIEWS;
|
TABLE_CATALOG def
|
TABLE_SCHEMA test
|
TABLE_NAME v1
|
VIEW_DEFINITION select 1 AS `c1`
|
CHECK_OPTION NONE
|
IS_UPDATABLE NO
|
DEFINER foo@%
|
SECURITY_TYPE INVOKER
|
CHARACTER_SET_CLIENT latin1
|
COLLATION_CONNECTION latin1_swedish_ci
|
...
|
Notice, the colum VIEW_DEFINITION is not empty, which is wrong:
- The view belongs to user 'foo' (with all lower case letters)
- The user querying I_S.VIEW is 'FOO' (with all upper case letters) - it's a different user!
Attachments
Issue Links
- relates to
-
MDEV-31340 Remove MY_COLLATION_HANDLER::strcasecmp()
- Closed