Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
53e57a86
Commit
53e57a86
authored
Nov 25, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-30056 Impossible to export column grants
parent
f915681d
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
91 additions
and
92 deletions
+91
-92
mysql-test/main/fix_priv_tables.result
mysql-test/main/fix_priv_tables.result
+2
-2
mysql-test/main/grant.result
mysql-test/main/grant.result
+17
-17
mysql-test/main/grant2.result
mysql-test/main/grant2.result
+2
-2
mysql-test/main/grant3.result
mysql-test/main/grant3.result
+2
-2
mysql-test/main/grant5.result
mysql-test/main/grant5.result
+2
-2
mysql-test/main/information_schema.result
mysql-test/main/information_schema.result
+1
-1
mysql-test/suite/funcs_1/r/innodb_trig_03.result
mysql-test/suite/funcs_1/r/innodb_trig_03.result
+6
-6
mysql-test/suite/funcs_1/r/innodb_trig_03e.result
mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+6
-6
mysql-test/suite/funcs_1/r/is_check_constraints.result
mysql-test/suite/funcs_1/r/is_check_constraints.result
+1
-1
mysql-test/suite/funcs_1/r/is_column_privileges.result
mysql-test/suite/funcs_1/r/is_column_privileges.result
+8
-8
mysql-test/suite/funcs_1/r/is_statistics.result
mysql-test/suite/funcs_1/r/is_statistics.result
+4
-4
mysql-test/suite/funcs_1/r/is_table_constraints.result
mysql-test/suite/funcs_1/r/is_table_constraints.result
+2
-2
mysql-test/suite/funcs_1/r/memory_trig_03.result
mysql-test/suite/funcs_1/r/memory_trig_03.result
+6
-6
mysql-test/suite/funcs_1/r/memory_trig_03e.result
mysql-test/suite/funcs_1/r/memory_trig_03e.result
+6
-6
mysql-test/suite/funcs_1/r/myisam_trig_03.result
mysql-test/suite/funcs_1/r/myisam_trig_03.result
+6
-6
mysql-test/suite/funcs_1/r/myisam_trig_03e.result
mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+6
-6
mysql-test/suite/roles/recursive.result
mysql-test/suite/roles/recursive.result
+3
-3
mysql-test/suite/roles/recursive_dbug.result
mysql-test/suite/roles/recursive_dbug.result
+3
-3
mysql-test/suite/roles/set_role-table-column-priv.result
mysql-test/suite/roles/set_role-table-column-priv.result
+2
-2
mysql-test/suite/rpl/r/rpl_ignore_table.result
mysql-test/suite/rpl/r/rpl_ignore_table.result
+4
-4
sql/sql_acl.cc
sql/sql_acl.cc
+2
-3
No files found.
mysql-test/main/fix_priv_tables.result
View file @
53e57a86
...
...
@@ -17,7 +17,7 @@ GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
SHOW GRANTS FOR 'select_only_c1'@'localhost';
Grants for select_only_c1@localhost
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
GRANT SELECT (
c1
) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
GRANT SELECT (
`c1`
) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
"after fix privs"
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
...
...
@@ -28,7 +28,7 @@ GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost`
SHOW GRANTS FOR 'select_only_c1'@'localhost';
Grants for select_only_c1@localhost
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
GRANT SELECT (
c1
) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
GRANT SELECT (
`c1`
) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
DROP USER 'show_view_tbl'@'localhost';
DROP USER 'select_only_c1'@'localhost';
...
...
mysql-test/main/grant.result
View file @
53e57a86
...
...
@@ -247,7 +247,7 @@ GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@local
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT, SELECT (
a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a
) ON `test`.`t1` TO `mysqltest_1`@`localhost`
GRANT SELECT, SELECT (
`a`), INSERT, INSERT (`a`), UPDATE, UPDATE (`a`), REFERENCES (`a`
) ON `test`.`t1` TO `mysqltest_1`@`localhost`
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
table_priv column_priv
Select,Insert,Update Select,Insert,Update,References
...
...
@@ -255,12 +255,12 @@ REVOKE select (a), update on t1 from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT SELECT, INSERT, INSERT (
a), REFERENCES (a
) ON `test`.`t1` TO `mysqltest_1`@`localhost`
GRANT SELECT, INSERT, INSERT (
`a`), REFERENCES (`a`
) ON `test`.`t1` TO `mysqltest_1`@`localhost`
REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
GRANT REFERENCES (
a
) ON `test`.`t1` TO `mysqltest_1`@`localhost`
GRANT REFERENCES (
`a`
) ON `test`.`t1` TO `mysqltest_1`@`localhost`
GRANT select,references on t1 to mysqltest_1@localhost;
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
table_priv column_priv
...
...
@@ -340,13 +340,13 @@ show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION
GRANT SELECT (
a
) ON `test`.`t1` TO `drop_user`@`localhost`
GRANT SELECT (
`a`
) ON `test`.`t1` TO `drop_user`@`localhost`
set sql_mode=ansi_quotes;
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION
GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION
GRANT SELECT (
a
) ON "test"."t1" TO "drop_user"@"localhost"
GRANT SELECT (
"a"
) ON "test"."t1" TO "drop_user"@"localhost"
set sql_mode=default;
set sql_quote_show_create=0;
show grants for drop_user@localhost;
...
...
@@ -365,13 +365,13 @@ show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION
GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION
GRANT SELECT (
a
) ON "test"."t1" TO "drop_user"@"localhost"
GRANT SELECT (
"a"
) ON "test"."t1" TO "drop_user"@"localhost"
set sql_mode="";
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION
GRANT SELECT (
a
) ON `test`.`t1` TO `drop_user`@`localhost`
GRANT SELECT (
`a`
) ON `test`.`t1` TO `drop_user`@`localhost`
revoke all privileges, grant option from drop_user@localhost;
show grants for drop_user@localhost;
Grants for drop_user@localhost
...
...
@@ -419,7 +419,7 @@ GRANT SELECT (
SHOW GRANTS FOR @localhost;
Grants for @localhost
GRANT USAGE ON *.* TO ``@`localhost`
GRANT SELECT (
) O
N ``.`` TO ``@`localhost`
GRANT SELECT (
``) O
N ``.`` TO ``@`localhost`
REVOKE SELECT () ON . FROM @localhost;
DROP USER @localhost;
DROP DATABASE ;
...
...
@@ -496,7 +496,7 @@ grant insert(b), insert(c), insert(d), insert(a) on t1 to grant_user@localhost;
show grants for grant_user@localhost;
Grants for grant_user@localhost
GRANT USAGE ON *.* TO `grant_user`@`localhost`
GRANT INSERT (
a, d, c, b
) ON `test`.`t1` TO `grant_user`@`localhost`
GRANT INSERT (
`a`, `d`, `c`, `b`
) ON `test`.`t1` TO `grant_user`@`localhost`
select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv order by Column_name;
Host Db User Table_name Column_name Column_priv
localhost test grant_user t1 a Insert
...
...
@@ -911,20 +911,20 @@ grant update (a) on t1 to mysqltest_8;
show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
flush privileges;
show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
select * from information_schema.column_privileges;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
'mysqltest_8'@'%' def test t1 a UPDATE NO
...
...
@@ -1003,12 +1003,12 @@ show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
select * from information_schema.user_privileges
where grantee like "'mysqltest_8'%";
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
...
...
@@ -1024,12 +1024,12 @@ show grants for mysqltest_8@'';
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
show grants for mysqltest_8;
Grants for mysqltest_8@%
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
a
) ON `test`.`t1` TO `mysqltest_8`@`%`
GRANT UPDATE, UPDATE (
`a`
) ON `test`.`t1` TO `mysqltest_8`@`%`
drop user mysqltest_8@'';
show grants for mysqltest_8@'';
ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%'
...
...
mysql-test/main/grant2.result
View file @
53e57a86
...
...
@@ -203,7 +203,7 @@ show grants for 'mysqltest_2';
Grants for mysqltest_2@%
GRANT SELECT ON *.* TO "mysqltest_2"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
GRANT INSERT ON "test".* TO "mysqltest_2"@"%"
GRANT UPDATE (
c2
) ON "test"."t2" TO "mysqltest_2"@"%"
GRANT UPDATE (
"c2"
) ON "test"."t2" TO "mysqltest_2"@"%"
GRANT UPDATE ON "test"."t1" TO "mysqltest_2"@"%"
drop user 'mysqltest_1';
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
...
...
@@ -241,7 +241,7 @@ show grants for 'mysqltest_1';
Grants for mysqltest_1@%
GRANT SELECT ON *.* TO "mysqltest_1"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
GRANT INSERT ON "test".* TO "mysqltest_1"@"%"
GRANT UPDATE (
c2
) ON "test"."t2" TO "mysqltest_1"@"%"
GRANT UPDATE (
"c2"
) ON "test"."t2" TO "mysqltest_1"@"%"
GRANT UPDATE ON "test"."t1" TO "mysqltest_1"@"%"
drop user 'mysqltest_1', 'mysqltest_3';
drop user 'mysqltest_1';
...
...
mysql-test/main/grant3.result
View file @
53e57a86
...
...
@@ -172,14 +172,14 @@ GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%';
SHOW GRANTS FOR 'user2'@'%';
Grants for user2@%
GRANT USAGE ON *.* TO `user2`@`%`
GRANT SELECT (
a), INSERT (b
) ON `temp`.`t1` TO `user2`@`%`
GRANT SELECT (
`a`), INSERT (`b`
) ON `temp`.`t1` TO `user2`@`%`
# Connect as the renamed user
connect conn1, localhost, user2,,;
connection conn1;
SHOW GRANTS;
Grants for user2@%
GRANT USAGE ON *.* TO `user2`@`%`
GRANT SELECT (
a), INSERT (b
) ON `temp`.`t1` TO `user2`@`%`
GRANT SELECT (
`a`), INSERT (`b`
) ON `temp`.`t1` TO `user2`@`%`
SELECT a FROM temp.t1;
a
1
...
...
mysql-test/main/grant5.result
View file @
53e57a86
...
...
@@ -304,12 +304,12 @@ GRANT INSERT (col1) ON db.test_getcolpriv TO foo;
SHOW GRANTS FOR foo;
Grants for foo@%
GRANT USAGE ON *.* TO `foo`@`%`
GRANT SELECT (
col2, col1), INSERT (col1
) ON `db`.`test_getcolpriv` TO `foo`@`%`
GRANT SELECT (
`col2`, `col1`), INSERT (`col1`
) ON `db`.`test_getcolpriv` TO `foo`@`%`
REVOKE SELECT (col1,col2) ON db.test_getcolpriv FROM foo;
SHOW GRANTS FOR foo;
Grants for foo@%
GRANT USAGE ON *.* TO `foo`@`%`
GRANT INSERT (
col1
) ON `db`.`test_getcolpriv` TO `foo`@`%`
GRANT INSERT (
`col1`
) ON `db`.`test_getcolpriv` TO `foo`@`%`
REVOKE INSERT (col1) ON db.test_getcolpriv FROM foo;
SHOW GRANTS FOR foo;
Grants for foo@%
...
...
mysql-test/main/information_schema.result
View file @
53e57a86
...
...
@@ -1043,7 +1043,7 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
show grants;
Grants for user1@localhost
GRANT USAGE ON *.* TO `user1`@`localhost`
GRANT SELECT (
f1
) ON `mysqltest`.`t1` TO `user1`@`localhost`
GRANT SELECT (
`f1`
) ON `mysqltest`.`t1` TO `user1`@`localhost`
connection con2;
select * from information_schema.column_privileges order by grantee;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
...
...
mysql-test/suite/funcs_1/r/innodb_trig_03.result
View file @
53e57a86
...
...
@@ -391,7 +391,7 @@ connection no_privs_424d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1), INSERT (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT SELECT (
`f1`), INSERT (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg4d_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1d';
...
...
@@ -413,7 +413,7 @@ connection yes_privs_424d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE (
f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT UPDATE (
`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg4d_2 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-2d';
...
...
@@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection default;
...
...
@@ -633,7 +633,7 @@ connection no_privs_425d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg5d_1 before INSERT on t1 for each row
set @test_var= new.f1;
...
...
@@ -649,7 +649,7 @@ connection yes_privs_425d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg5d_2 before INSERT on t1 for each row
set @test_var= new.f1;
...
...
mysql-test/suite/funcs_1/r/innodb_trig_03e.result
View file @
53e57a86
...
...
@@ -1541,8 +1541,8 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
GRANT SELECT (
f1
), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT (
f1), INSERT, UPDATE (f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`), INSERT, UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
...
...
@@ -1692,8 +1692,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
f1), INSERT, UPDATE (f3, f2
), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
`f1`), INSERT, UPDATE (`f3`, `f2`
), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
...
...
@@ -1735,8 +1735,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
f1), INSERT, UPDATE (f3, f2, f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection no_privs;
select current_user;
current_user
...
...
mysql-test/suite/funcs_1/r/is_check_constraints.result
View file @
53e57a86
...
...
@@ -134,7 +134,7 @@ GRANT SELECT (a) ON t1 TO foo;
SHOW GRANTS FOR foo;
Grants for foo@%
GRANT USAGE ON *.* TO `foo`@`%`
GRANT SELECT (
a
) ON `db`.`t1` TO `foo`@`%`
GRANT SELECT (
`a`
) ON `db`.`t1` TO `foo`@`%`
SELECT * FROM information_schema.check_constraints;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
def db t1 CONSTRAINT_1 `b` > 0
...
...
mysql-test/suite/funcs_1/r/is_column_privileges.result
View file @
53e57a86
...
...
@@ -219,7 +219,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
...
...
@@ -231,7 +231,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection default;
ALTER TABLE db_datadict.my_table DROP COLUMN f3;
GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
...
...
@@ -246,7 +246,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1), UPDATE (f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`), UPDATE (`f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
...
...
@@ -259,7 +259,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1), UPDATE (f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`), UPDATE (`f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
SELECT f1, f3 FROM db_datadict.my_table;
ERROR 42S22: Unknown column 'f3' in 'field list'
connection default;
...
...
@@ -275,7 +275,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1), UPDATE (f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`), UPDATE (`f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
...
...
@@ -288,7 +288,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1), UPDATE (f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`), UPDATE (`f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection default;
DROP TABLE db_datadict.my_table;
SELECT * FROM information_schema.column_privileges
...
...
@@ -302,7 +302,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1), UPDATE (f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`), UPDATE (`f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.column_privileges
WHERE table_name = 'my_table'
...
...
@@ -315,7 +315,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
GRANT SELECT (
f3, f1), UPDATE (f1
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
GRANT SELECT (
`f3`, `f1`), UPDATE (`f1`
) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
connection default;
REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
SELECT * FROM information_schema.column_privileges
...
...
mysql-test/suite/funcs_1/r/is_statistics.result
View file @
53e57a86
...
...
@@ -241,7 +241,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
GRANT SELECT (
f5, f1
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
GRANT SELECT (
`f5`, `f1`
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
SHOW GRANTS FOR 'testuser2'@'localhost';
Grants for testuser2@localhost
GRANT USAGE ON *.* TO `testuser2`@`localhost`
...
...
@@ -260,7 +260,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION
GRANT SELECT (
f5, f1
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
GRANT SELECT (
`f5`, `f1`
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
SHOW GRANTS FOR 'testuser2'@'localhost';
ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql'
connection testuser2;
...
...
@@ -278,7 +278,7 @@ REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost';
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT (
f5, f1
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
GRANT SELECT (
`f5`, `f1`
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
connection testuser1;
SELECT * FROM information_schema.statistics
WHERE table_schema LIKE 'db_datadict%'
...
...
@@ -291,7 +291,7 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT (
f5, f1
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
GRANT SELECT (
`f5`, `f1`
) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost`
connection default;
disconnect testuser1;
disconnect testuser2;
...
...
mysql-test/suite/funcs_1/r/is_table_constraints.result
View file @
53e57a86
...
...
@@ -110,7 +110,7 @@ GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost';
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT (
f5
) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
GRANT SELECT (
`f5`
) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'db_datadict'
ORDER BY table_schema,table_name, constraint_name;
...
...
@@ -134,7 +134,7 @@ connect testuser1, localhost, testuser1, , db_datadict;
SHOW GRANTS FOR 'testuser1'@'localhost';
Grants for testuser1@localhost
GRANT USAGE ON *.* TO `testuser1`@`localhost`
GRANT SELECT (
f5
) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
GRANT SELECT (
`f5`
) ON `db_datadict`.`t1` TO `testuser1`@`localhost`
SELECT * FROM information_schema.table_constraints
WHERE table_schema = 'db_datadict'
ORDER BY table_schema,table_name, constraint_name;
...
...
mysql-test/suite/funcs_1/r/memory_trig_03.result
View file @
53e57a86
...
...
@@ -391,7 +391,7 @@ connection no_privs_424d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1), INSERT (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT SELECT (
`f1`), INSERT (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg4d_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1d';
...
...
@@ -413,7 +413,7 @@ connection yes_privs_424d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE (
f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT UPDATE (
`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg4d_2 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-2d';
...
...
@@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection default;
...
...
@@ -633,7 +633,7 @@ connection no_privs_425d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg5d_1 before INSERT on t1 for each row
set @test_var= new.f1;
...
...
@@ -649,7 +649,7 @@ connection yes_privs_425d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg5d_2 before INSERT on t1 for each row
set @test_var= new.f1;
...
...
mysql-test/suite/funcs_1/r/memory_trig_03e.result
View file @
53e57a86
...
...
@@ -1480,8 +1480,8 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
GRANT SELECT (
f1
), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT (
f1), INSERT, UPDATE (f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`), INSERT, UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
...
...
@@ -1631,8 +1631,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
f1), INSERT, UPDATE (f3, f2
), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
`f1`), INSERT, UPDATE (`f3`, `f2`
), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
...
...
@@ -1674,8 +1674,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
f1), INSERT, UPDATE (f3, f2, f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection no_privs;
select current_user;
current_user
...
...
mysql-test/suite/funcs_1/r/myisam_trig_03.result
View file @
53e57a86
...
...
@@ -391,7 +391,7 @@ connection no_privs_424d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1), INSERT (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT SELECT (
`f1`), INSERT (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg4d_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-1d';
...
...
@@ -413,7 +413,7 @@ connection yes_privs_424d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT UPDATE (
f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT UPDATE (
`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg4d_2 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.7-2d';
...
...
@@ -618,14 +618,14 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
show grants for test_noprivs@localhost;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
connection default;
...
...
@@ -633,7 +633,7 @@ connection no_privs_425d;
show grants;
Grants for test_noprivs@localhost
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT INSERT (
f1), UPDATE (f1
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
GRANT INSERT (
`f1`), UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
use priv_db;
create trigger trg5d_1 before INSERT on t1 for each row
set @test_var= new.f1;
...
...
@@ -649,7 +649,7 @@ connection yes_privs_425d;
show grants;
Grants for test_yesprivs@localhost
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
use priv_db;
create trigger trg5d_2 before INSERT on t1 for each row
set @test_var= new.f1;
...
...
mysql-test/suite/funcs_1/r/myisam_trig_03e.result
View file @
53e57a86
...
...
@@ -1480,8 +1480,8 @@ show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
GRANT SELECT (
f1
), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT (
f1), INSERT, UPDATE (f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`), INSERT, UPDATE (`f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
...
...
@@ -1631,8 +1631,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
f1), INSERT, UPDATE (f3, f2
), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
`f1`), INSERT, UPDATE (`f3`, `f2`
), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection yes_privs;
select current_user;
current_user
...
...
@@ -1674,8 +1674,8 @@ to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
GRANT SELECT (
f1
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
f1), INSERT, UPDATE (f3, f2, f1
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
GRANT SELECT (
`f1`
), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
GRANT SELECT, SELECT (
`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`
) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
connection no_privs;
select current_user;
current_user
...
...
mysql-test/suite/roles/recursive.result
View file @
53e57a86
...
...
@@ -202,7 +202,7 @@ count(concat(User))
22
show grants;
Grants for foo@localhost
GRANT SELECT (
User
) ON `mysql`.`roles_mapping` TO `role1`
GRANT SELECT (
`User`
) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
...
...
@@ -236,8 +236,8 @@ count(concat(User,Host))
22
show grants;
Grants for foo@localhost
GRANT SELECT (
Host
) ON `mysql`.`roles_mapping` TO `role3`
GRANT SELECT (
User
) ON `mysql`.`roles_mapping` TO `role1`
GRANT SELECT (
`Host`
) ON `mysql`.`roles_mapping` TO `role3`
GRANT SELECT (
`User`
) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
...
...
mysql-test/suite/roles/recursive_dbug.result
View file @
53e57a86
...
...
@@ -246,7 +246,7 @@ count(concat(User))
22
show grants;
Grants for foo@localhost
GRANT SELECT (
User
) ON `mysql`.`roles_mapping` TO `role1`
GRANT SELECT (
`User`
) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
...
...
@@ -285,8 +285,8 @@ count(concat(User,Host))
22
show grants;
Grants for foo@localhost
GRANT SELECT (
Host
) ON `mysql`.`roles_mapping` TO `role3`
GRANT SELECT (
User
) ON `mysql`.`roles_mapping` TO `role1`
GRANT SELECT (
`Host`
) ON `mysql`.`roles_mapping` TO `role3`
GRANT SELECT (
`User`
) ON `mysql`.`roles_mapping` TO `role1`
GRANT USAGE ON *.* TO `foo`@`localhost`
GRANT USAGE ON *.* TO `role10`
GRANT USAGE ON *.* TO `role1`
...
...
mysql-test/suite/roles/set_role-table-column-priv.result
View file @
53e57a86
...
...
@@ -30,7 +30,7 @@ current_user() current_role()
test_user@localhost test_role1
show grants;
Grants for test_user@localhost
GRANT SELECT (
Role
) ON `mysql`.`roles_mapping` TO `test_role2`
GRANT SELECT (
`Role`
) ON `mysql`.`roles_mapping` TO `test_role2`
GRANT USAGE ON *.* TO `test_role1`
GRANT USAGE ON *.* TO `test_role2`
GRANT USAGE ON *.* TO `test_user`@`localhost`
...
...
@@ -46,7 +46,7 @@ test_role2
test_role2
show grants;
Grants for test_user@localhost
GRANT SELECT (
Role
) ON `mysql`.`roles_mapping` TO `test_role2`
GRANT SELECT (
`Role`
) ON `mysql`.`roles_mapping` TO `test_role2`
GRANT USAGE ON *.* TO `test_role1`
GRANT USAGE ON *.* TO `test_role2`
GRANT USAGE ON *.* TO `test_user`@`localhost`
...
...
mysql-test/suite/rpl/r/rpl_ignore_table.result
View file @
53e57a86
...
...
@@ -55,7 +55,7 @@ show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT SELECT (
a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a
) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT SELECT (
`a`), INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`
) ON `test`.`t4` TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
...
...
@@ -80,7 +80,7 @@ show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT SELECT (
a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a
) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT SELECT (
`a`), INSERT, INSERT (`a`), UPDATE (`a`), REFERENCES (`a`
) ON `test`.`t4` TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
...
...
@@ -107,7 +107,7 @@ show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT INSERT, INSERT (
a), UPDATE (a), REFERENCES (a
) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT INSERT, INSERT (
`a`), UPDATE (`a`), REFERENCES (`a`
) ON `test`.`t4` TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
...
...
@@ -119,7 +119,7 @@ show grants for mysqltest3@localhost;
Grants for mysqltest3@localhost
GRANT USAGE ON *.* TO `mysqltest3`@`localhost`
GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost`
GRANT INSERT, INSERT (
a), UPDATE (a), REFERENCES (a
) ON `test`.`t4` TO `mysqltest3`@`localhost`
GRANT INSERT, INSERT (
`a`), UPDATE (`a`), REFERENCES (`a`
) ON `test`.`t4` TO `mysqltest3`@`localhost`
show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
...
...
sql/sql_acl.cc
View file @
53e57a86
...
...
@@ -9196,9 +9196,8 @@ static bool show_table_and_column_privileges(THD *thd, const char *username,
}
else
global
.
append
(
STRING_WITH_LEN
(
", "
));
global
.
append
(
grant_column
->
column
,
grant_column
->
key_length
,
system_charset_info
);
append_identifier
(
thd
,
&
global
,
grant_column
->
column
,
grant_column
->
key_length
);
}
}
if
(
found_col
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment