Skip to content

Commit 53e57a8

Browse files
committed
MDEV-30056 Impossible to export column grants
1 parent f915681 commit 53e57a8

21 files changed

+91
-92
lines changed

mysql-test/main/fix_priv_tables.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
1717
SHOW GRANTS FOR 'select_only_c1'@'localhost';
1818
Grants for select_only_c1@localhost
1919
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
20-
GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
20+
GRANT SELECT (`c1`) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
2121

2222
"after fix privs"
2323
SHOW GRANTS FOR 'show_view_tbl'@'localhost';
@@ -28,7 +28,7 @@ GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost`
2828
SHOW GRANTS FOR 'select_only_c1'@'localhost';
2929
Grants for select_only_c1@localhost
3030
GRANT USAGE ON *.* TO `select_only_c1`@`localhost`
31-
GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
31+
GRANT SELECT (`c1`) ON `testdb`.`v1` TO `select_only_c1`@`localhost`
3232

3333
DROP USER 'show_view_tbl'@'localhost';
3434
DROP USER 'select_only_c1'@'localhost';

mysql-test/main/grant.result

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,20 @@ GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@local
247247
show grants for mysqltest_1@localhost;
248248
Grants for mysqltest_1@localhost
249249
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
250-
GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost`
250+
GRANT SELECT, SELECT (`a`), INSERT, INSERT (`a`), UPDATE, UPDATE (`a`), REFERENCES (`a`) ON `test`.`t1` TO `mysqltest_1`@`localhost`
251251
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
252252
table_priv column_priv
253253
Select,Insert,Update Select,Insert,Update,References
254254
REVOKE select (a), update on t1 from mysqltest_1@localhost;
255255
show grants for mysqltest_1@localhost;
256256
Grants for mysqltest_1@localhost
257257
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
258-
GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost`
258+
GRANT SELECT, INSERT, INSERT (`a`), REFERENCES (`a`) ON `test`.`t1` TO `mysqltest_1`@`localhost`
259259
REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost;
260260
show grants for mysqltest_1@localhost;
261261
Grants for mysqltest_1@localhost
262262
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
263-
GRANT REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost`
263+
GRANT REFERENCES (`a`) ON `test`.`t1` TO `mysqltest_1`@`localhost`
264264
GRANT select,references on t1 to mysqltest_1@localhost;
265265
select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1";
266266
table_priv column_priv
@@ -340,13 +340,13 @@ show grants for drop_user@localhost;
340340
Grants for drop_user@localhost
341341
GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION
342342
GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION
343-
GRANT SELECT (a) ON `test`.`t1` TO `drop_user`@`localhost`
343+
GRANT SELECT (`a`) ON `test`.`t1` TO `drop_user`@`localhost`
344344
set sql_mode=ansi_quotes;
345345
show grants for drop_user@localhost;
346346
Grants for drop_user@localhost
347347
GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION
348348
GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION
349-
GRANT SELECT (a) ON "test"."t1" TO "drop_user"@"localhost"
349+
GRANT SELECT ("a") ON "test"."t1" TO "drop_user"@"localhost"
350350
set sql_mode=default;
351351
set sql_quote_show_create=0;
352352
show grants for drop_user@localhost;
@@ -365,13 +365,13 @@ show grants for drop_user@localhost;
365365
Grants for drop_user@localhost
366366
GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION
367367
GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION
368-
GRANT SELECT (a) ON "test"."t1" TO "drop_user"@"localhost"
368+
GRANT SELECT ("a") ON "test"."t1" TO "drop_user"@"localhost"
369369
set sql_mode="";
370370
show grants for drop_user@localhost;
371371
Grants for drop_user@localhost
372372
GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION
373373
GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION
374-
GRANT SELECT (a) ON `test`.`t1` TO `drop_user`@`localhost`
374+
GRANT SELECT (`a`) ON `test`.`t1` TO `drop_user`@`localhost`
375375
revoke all privileges, grant option from drop_user@localhost;
376376
show grants for drop_user@localhost;
377377
Grants for drop_user@localhost
@@ -419,7 +419,7 @@ GRANT SELECT (
419419
SHOW GRANTS FOR ����@localhost;
420420
Grants for ����@localhost
421421
GRANT USAGE ON *.* TO `����`@`localhost`
422-
GRANT SELECT (���) ON `��`.`���` TO `����`@`localhost`
422+
GRANT SELECT (`���`) ON `��`.`���` TO `����`@`localhost`
423423
REVOKE SELECT (���) ON ��.��� FROM ����@localhost;
424424
DROP USER ����@localhost;
425425
DROP DATABASE ��;
@@ -496,7 +496,7 @@ grant insert(b), insert(c), insert(d), insert(a) on t1 to grant_user@localhost;
496496
show grants for grant_user@localhost;
497497
Grants for grant_user@localhost
498498
GRANT USAGE ON *.* TO `grant_user`@`localhost`
499-
GRANT INSERT (a, d, c, b) ON `test`.`t1` TO `grant_user`@`localhost`
499+
GRANT INSERT (`a`, `d`, `c`, `b`) ON `test`.`t1` TO `grant_user`@`localhost`
500500
select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv order by Column_name;
501501
Host Db User Table_name Column_name Column_priv
502502
localhost test grant_user t1 a Insert
@@ -911,20 +911,20 @@ grant update (a) on t1 to mysqltest_8;
911911
show grants for mysqltest_8@'';
912912
Grants for mysqltest_8@%
913913
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
914-
GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
914+
GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
915915
show grants for mysqltest_8;
916916
Grants for mysqltest_8@%
917917
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
918-
GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
918+
GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
919919
flush privileges;
920920
show grants for mysqltest_8@'';
921921
Grants for mysqltest_8@%
922922
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
923-
GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
923+
GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
924924
show grants for mysqltest_8;
925925
Grants for mysqltest_8@%
926926
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
927-
GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
927+
GRANT UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
928928
select * from information_schema.column_privileges;
929929
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
930930
'mysqltest_8'@'%' def test t1 a UPDATE NO
@@ -1003,12 +1003,12 @@ show grants for mysqltest_8@'';
10031003
Grants for mysqltest_8@%
10041004
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
10051005
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
1006-
GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
1006+
GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
10071007
show grants for mysqltest_8;
10081008
Grants for mysqltest_8@%
10091009
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
10101010
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
1011-
GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
1011+
GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
10121012
select * from information_schema.user_privileges
10131013
where grantee like "'mysqltest_8'%";
10141014
GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
@@ -1024,12 +1024,12 @@ show grants for mysqltest_8@'';
10241024
Grants for mysqltest_8@%
10251025
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
10261026
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
1027-
GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
1027+
GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
10281028
show grants for mysqltest_8;
10291029
Grants for mysqltest_8@%
10301030
GRANT USAGE ON *.* TO `mysqltest_8`@`%`
10311031
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%`
1032-
GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%`
1032+
GRANT UPDATE, UPDATE (`a`) ON `test`.`t1` TO `mysqltest_8`@`%`
10331033
drop user mysqltest_8@'';
10341034
show grants for mysqltest_8@'';
10351035
ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%'

mysql-test/main/grant2.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ show grants for 'mysqltest_2';
203203
Grants for mysqltest_2@%
204204
GRANT SELECT ON *.* TO "mysqltest_2"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
205205
GRANT INSERT ON "test".* TO "mysqltest_2"@"%"
206-
GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_2"@"%"
206+
GRANT UPDATE ("c2") ON "test"."t2" TO "mysqltest_2"@"%"
207207
GRANT UPDATE ON "test"."t1" TO "mysqltest_2"@"%"
208208
drop user 'mysqltest_1';
209209
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';
241241
Grants for mysqltest_1@%
242242
GRANT SELECT ON *.* TO "mysqltest_1"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1'
243243
GRANT INSERT ON "test".* TO "mysqltest_1"@"%"
244-
GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_1"@"%"
244+
GRANT UPDATE ("c2") ON "test"."t2" TO "mysqltest_1"@"%"
245245
GRANT UPDATE ON "test"."t1" TO "mysqltest_1"@"%"
246246
drop user 'mysqltest_1', 'mysqltest_3';
247247
drop user 'mysqltest_1';

mysql-test/main/grant3.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%';
172172
SHOW GRANTS FOR 'user2'@'%';
173173
Grants for user2@%
174174
GRANT USAGE ON *.* TO `user2`@`%`
175-
GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO `user2`@`%`
175+
GRANT SELECT (`a`), INSERT (`b`) ON `temp`.`t1` TO `user2`@`%`
176176
# Connect as the renamed user
177177
connect conn1, localhost, user2,,;
178178
connection conn1;
179179
SHOW GRANTS;
180180
Grants for user2@%
181181
GRANT USAGE ON *.* TO `user2`@`%`
182-
GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO `user2`@`%`
182+
GRANT SELECT (`a`), INSERT (`b`) ON `temp`.`t1` TO `user2`@`%`
183183
SELECT a FROM temp.t1;
184184
a
185185
1

mysql-test/main/grant5.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,12 @@ GRANT INSERT (col1) ON db.test_getcolpriv TO foo;
304304
SHOW GRANTS FOR foo;
305305
Grants for foo@%
306306
GRANT USAGE ON *.* TO `foo`@`%`
307-
GRANT SELECT (col2, col1), INSERT (col1) ON `db`.`test_getcolpriv` TO `foo`@`%`
307+
GRANT SELECT (`col2`, `col1`), INSERT (`col1`) ON `db`.`test_getcolpriv` TO `foo`@`%`
308308
REVOKE SELECT (col1,col2) ON db.test_getcolpriv FROM foo;
309309
SHOW GRANTS FOR foo;
310310
Grants for foo@%
311311
GRANT USAGE ON *.* TO `foo`@`%`
312-
GRANT INSERT (col1) ON `db`.`test_getcolpriv` TO `foo`@`%`
312+
GRANT INSERT (`col1`) ON `db`.`test_getcolpriv` TO `foo`@`%`
313313
REVOKE INSERT (col1) ON db.test_getcolpriv FROM foo;
314314
SHOW GRANTS FOR foo;
315315
Grants for foo@%

mysql-test/main/information_schema.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE
10431043
show grants;
10441044
Grants for user1@localhost
10451045
GRANT USAGE ON *.* TO `user1`@`localhost`
1046-
GRANT SELECT (f1) ON `mysqltest`.`t1` TO `user1`@`localhost`
1046+
GRANT SELECT (`f1`) ON `mysqltest`.`t1` TO `user1`@`localhost`
10471047
connection con2;
10481048
select * from information_schema.column_privileges order by grantee;
10491049
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE

mysql-test/suite/funcs_1/r/innodb_trig_03.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ connection no_privs_424d;
391391
show grants;
392392
Grants for test_noprivs@localhost
393393
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
394-
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
394+
GRANT SELECT (`f1`), INSERT (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
395395
use priv_db;
396396
create trigger trg4d_1 before INSERT on t1 for each row
397397
set new.f1 = 'trig 3.5.3.7-1d';
@@ -413,7 +413,7 @@ connection yes_privs_424d;
413413
show grants;
414414
Grants for test_yesprivs@localhost
415415
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
416-
GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
416+
GRANT UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
417417
use priv_db;
418418
create trigger trg4d_2 before INSERT on t1 for each row
419419
set new.f1 = 'trig 3.5.3.7-2d';
@@ -618,22 +618,22 @@ grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost;
618618
show grants for test_noprivs@localhost;
619619
Grants for test_noprivs@localhost
620620
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
621-
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
621+
GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
622622
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
623623
grant TRIGGER on *.* to test_yesprivs@localhost;
624624
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
625625
show grants for test_noprivs@localhost;
626626
Grants for test_noprivs@localhost
627627
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
628-
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
628+
GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
629629
connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
630630
connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
631631
connection default;
632632
connection no_privs_425d;
633633
show grants;
634634
Grants for test_noprivs@localhost
635635
GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
636-
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
636+
GRANT INSERT (`f1`), UPDATE (`f1`) ON `priv_db`.`t1` TO `test_noprivs`@`localhost`
637637
use priv_db;
638638
create trigger trg5d_1 before INSERT on t1 for each row
639639
set @test_var= new.f1;
@@ -649,7 +649,7 @@ connection yes_privs_425d;
649649
show grants;
650650
Grants for test_yesprivs@localhost
651651
GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
652-
GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
652+
GRANT SELECT (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
653653
use priv_db;
654654
create trigger trg5d_2 before INSERT on t1 for each row
655655
set @test_var= new.f1;

mysql-test/suite/funcs_1/r/innodb_trig_03e.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,8 +1541,8 @@ show grants for test_yesprivs@localhost;
15411541
Grants for test_yesprivs@localhost
15421542
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
15431543
GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
1544-
GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
1545-
GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
1544+
GRANT SELECT (`f1`), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
1545+
GRANT SELECT (`f1`), INSERT, UPDATE (`f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
15461546
connection yes_privs;
15471547
select current_user;
15481548
current_user
@@ -1692,8 +1692,8 @@ to test_yesprivs@localhost;
16921692
show grants for test_yesprivs@localhost;
16931693
Grants for test_yesprivs@localhost
16941694
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
1695-
GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
1696-
GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
1695+
GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
1696+
GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
16971697
connection yes_privs;
16981698
select current_user;
16991699
current_user
@@ -1735,8 +1735,8 @@ to test_yesprivs@localhost;
17351735
show grants for test_yesprivs@localhost;
17361736
Grants for test_yesprivs@localhost
17371737
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
1738-
GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
1739-
GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
1738+
GRANT SELECT (`f1`), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost`
1739+
GRANT SELECT, SELECT (`f1`), INSERT, UPDATE (`f3`, `f2`, `f1`) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost`
17401740
connection no_privs;
17411741
select current_user;
17421742
current_user

mysql-test/suite/funcs_1/r/is_check_constraints.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ GRANT SELECT (a) ON t1 TO foo;
134134
SHOW GRANTS FOR foo;
135135
Grants for foo@%
136136
GRANT USAGE ON *.* TO `foo`@`%`
137-
GRANT SELECT (a) ON `db`.`t1` TO `foo`@`%`
137+
GRANT SELECT (`a`) ON `db`.`t1` TO `foo`@`%`
138138
SELECT * FROM information_schema.check_constraints;
139139
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
140140
def db t1 CONSTRAINT_1 `b` > 0

mysql-test/suite/funcs_1/r/is_column_privileges.result

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
219219
Grants for testuser1@localhost
220220
GRANT USAGE ON *.* TO `testuser1`@`localhost`
221221
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
222-
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
222+
GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
223223
connection testuser1;
224224
SELECT * FROM information_schema.column_privileges
225225
WHERE table_name = 'my_table'
@@ -231,7 +231,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
231231
Grants for testuser1@localhost
232232
GRANT USAGE ON *.* TO `testuser1`@`localhost`
233233
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
234-
GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
234+
GRANT SELECT (`f3`, `f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
235235
connection default;
236236
ALTER TABLE db_datadict.my_table DROP COLUMN f3;
237237
GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost';
@@ -246,7 +246,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
246246
Grants for testuser1@localhost
247247
GRANT USAGE ON *.* TO `testuser1`@`localhost`
248248
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
249-
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
249+
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
250250
connection testuser1;
251251
SELECT * FROM information_schema.column_privileges
252252
WHERE table_name = 'my_table'
@@ -259,7 +259,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
259259
Grants for testuser1@localhost
260260
GRANT USAGE ON *.* TO `testuser1`@`localhost`
261261
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
262-
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
262+
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
263263
SELECT f1, f3 FROM db_datadict.my_table;
264264
ERROR 42S22: Unknown column 'f3' in 'field list'
265265
connection default;
@@ -275,7 +275,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
275275
Grants for testuser1@localhost
276276
GRANT USAGE ON *.* TO `testuser1`@`localhost`
277277
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
278-
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
278+
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
279279
connection testuser1;
280280
SELECT * FROM information_schema.column_privileges
281281
WHERE table_name = 'my_table'
@@ -288,7 +288,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
288288
Grants for testuser1@localhost
289289
GRANT USAGE ON *.* TO `testuser1`@`localhost`
290290
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
291-
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
291+
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
292292
connection default;
293293
DROP TABLE db_datadict.my_table;
294294
SELECT * FROM information_schema.column_privileges
@@ -302,7 +302,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
302302
Grants for testuser1@localhost
303303
GRANT USAGE ON *.* TO `testuser1`@`localhost`
304304
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
305-
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
305+
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
306306
connection testuser1;
307307
SELECT * FROM information_schema.column_privileges
308308
WHERE table_name = 'my_table'
@@ -315,7 +315,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost';
315315
Grants for testuser1@localhost
316316
GRANT USAGE ON *.* TO `testuser1`@`localhost`
317317
GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost`
318-
GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
318+
GRANT SELECT (`f3`, `f1`), UPDATE (`f1`) ON `db_datadict`.`my_table` TO `testuser1`@`localhost`
319319
connection default;
320320
REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost';
321321
SELECT * FROM information_schema.column_privileges

0 commit comments

Comments
 (0)