[Maria-developers] Please review: Rev 2959: MWL#152: Show database name in error messages in file:///home/psergey/dev2/5.1/]
Hello, Could somebody please review the below? It's a very simple patch. I also need comments about which version this should go into. I've made the patch againist 5.1 just in case, but my opinion is that this should go into 5.2 (under rationale that 5.1 is stable and one can live without this patch). ----- Forwarded message from Sergey Petrunya <psergey@askmonty.org> ----- From: Sergey Petrunya <psergey@askmonty.org> To: commits@mariadb.org X-Mailer: mail (GNU Mailutils 1.2) Date: Sat, 23 Oct 2010 19:38:04 +0300 (EEST) Subject: [Commits] Rev 2959: MWL#152: Show database name in error messages in file:///home/psergey/dev2/5.1/ At file:///home/psergey/dev2/5.1/ ------------------------------------------------------------ revno: 2959 revision-id: psergey@askmonty.org-20101023163755-j8ghe2s4udpoc97g parent: sergii@pisem.net-20101020105843-7ybuqyc9n5328tie committer: Sergey Petrunya <psergey@askmonty.org> branch nick: 5.1 timestamp: Sat 2010-10-23 20:37:55 +0400 message: MWL#152: Show database name in error messages - Add database name to ER_TABLEACCESS_DENIED_ERROR and ER_COLUMNACCESS_DENIED_ERROR message strings. - Amend the code to provide db name - Update test results === modified file 'mysql-test/r/grant.result' --- a/mysql-test/r/grant.result 2010-09-03 16:20:30 +0000 +++ b/mysql-test/r/grant.result 2010-10-23 16:37:55 +0000 @@ -405,15 +405,15 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_3'@'localhost' NULL USAGE NO update mysqltest_1.t1, mysqltest_1.t2 set q=10 where b=1; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'q' in table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'q' in table 'mysqltest_1'.'t1' update mysqltest_1.t2, mysqltest_2.t2 set d=20 where d=1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'd' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'd' in table 'mysqltest_2'.'t2' update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest_1'.'t1' update mysqltest_2.t1, mysqltest_1.t2 set c=20 where b=1; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest_2'.'t1' update mysqltest_2.t1, mysqltest_2.t2 set d=10 where s=2; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 's' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 's' in table 'mysqltest_2'.'t1' update mysqltest_1.t1, mysqltest_2.t2 set a=10,d=10; update mysqltest_1.t1, mysqltest_2.t1 set a=20 where c=20; select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2; @@ -433,14 +433,14 @@ use mysqltest_1; update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600; update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest_1'.'t1' use mysqltest_2; update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest_1'.'t1' update mysqltest_2.t1, mysqltest_1.t2 set c=100,b=200; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't2' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest_1'.'t2' update mysqltest_1.t1, mysqltest_2.t2 set a=100,d=200; -ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest_1'.'t1' select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2; a q b r 10 2 1 2 @@ -489,7 +489,7 @@ create table mysqltest.t1 (a int,b int,c int); grant all on mysqltest.t1 to mysqltest_1@localhost; alter table t1 rename t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'t2' revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; @@ -667,7 +667,7 @@ grant alter on db27515.t1 to user27515@localhost; grant insert, create on db27515.t2 to user27515@localhost; rename table t1 to t2; -ERROR 42000: DROP command denied to user 'user27515'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'user27515'@'localhost' for table 'db27515'.'t1' revoke all privileges, grant option from user27515@localhost; drop user user27515@localhost; drop database db27515; @@ -900,13 +900,13 @@ GRANT SELECT ON mysqltest2.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1'; GRANT SHOW VIEW,SELECT ON mysqltest2.v_yy TO 'mysqltest_1'@'localhost' IDENTIFIED BY 'mysqltest_1'; SHOW CREATE VIEW mysqltest2.v_nn; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'v_nn' SHOW CREATE TABLE mysqltest2.v_nn; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_nn' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'v_nn' SHOW CREATE VIEW mysqltest2.v_yn; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_yn' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'v_yn' SHOW CREATE TABLE mysqltest2.v_yn; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v_yn' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'v_yn' SHOW CREATE TABLE mysqltest2.v_ny; View Create View character_set_client collation_connection v_ny CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_ny` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn` latin1 latin1_swedish_ci @@ -914,13 +914,13 @@ View Create View character_set_client collation_connection v_ny CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest2`.`v_ny` AS select `mysqltest2`.`t_nn`.`c1` AS `c1` from `mysqltest2`.`t_nn` latin1 latin1_swedish_ci SHOW CREATE TABLE mysqltest3.t_nn; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't_nn' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest3'.'t_nn' SHOW CREATE VIEW mysqltest3.t_nn; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't_nn' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest3'.'t_nn' SHOW CREATE VIEW mysqltest3.v_nn; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v_nn' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest3'.'v_nn' SHOW CREATE TABLE mysqltest3.v_nn; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v_nn' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest3'.'v_nn' SHOW CREATE TABLE mysqltest2.t_nn; Table Create Table t_nn CREATE TABLE `t_nn` ( @@ -980,23 +980,23 @@ GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t1' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t1' GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost; RENAME TABLE t1 TO t2; -ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t1' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t1' GRANT ALTER ON mysqltest1.t1 TO mysqltest_1@localhost; SHOW GRANTS; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t2' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t2' GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost; SHOW GRANTS; Grants for mysqltest_1@localhost @@ -1021,9 +1021,9 @@ GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost' RENAME TABLE t1 TO t2; -ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t1' ALTER TABLE t1 RENAME TO t2; -ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest1'.'t1' DROP USER mysqltest_1@localhost; DROP DATABASE mysqltest1; USE test; @@ -1060,7 +1060,7 @@ GRANT DELETE ON t1 TO bug23556@localhost; USE bug23556; TRUNCATE t1; -ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table 'bug23556'.'t1' USE bug23556; REVOKE DELETE ON t1 FROM bug23556@localhost; GRANT DROP ON t1 TO bug23556@localhost; @@ -1131,16 +1131,16 @@ ---> connection: bug27337_con1 CREATE TABLE t1(c INT); -ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'t1' CALL mysqltest1.p1(); 1 1 CREATE TABLE t1(c INT); -ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'t1' ---> connection: bug27337_con2 CREATE TABLE t1(c INT); -ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: CREATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest2'.'t1' SHOW TABLES; Tables_in_mysqltest2 @@ -1187,9 +1187,9 @@ ---> connection: bug27337_con2 SHOW COLUMNS FROM mysqltest2.t2; -ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'mysqltest2'.'t2' EXECUTE stmt2; -ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'mysqltest2'.'t2' ---> connection: default DROP DATABASE mysqltest1; @@ -1267,7 +1267,7 @@ grant create on mysqltest.* to mysqltest@localhost; create table t1 (i INT); insert into t1 values (1); -ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1' +ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 'mysqltest'.'t1' create table t2 (i INT); create table t4 (i INT); grant select, insert on mysqltest.t2 to mysqltest@localhost; @@ -1277,20 +1277,20 @@ flush privileges; insert into t2 values (1); create table if not exists t1 select * from t2; -ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1' +ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 'mysqltest'.'t1' create table if not exists t3 select * from t2; -ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't3' +ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 'mysqltest'.'t3' create table if not exists t4 select * from t2; Warnings: Note 1050 Table 't4' already exists create table if not exists t5 select * from t2; create table t6 select * from t2; create table t7 select * from t2; -ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't7' +ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 'mysqltest'.'t7' create table t4 select * from t2; ERROR 42S01: Table 't4' already exists create table t1 select * from t2; -ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1' +ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 'mysqltest'.'t1' drop table t1,t2,t4,t5,t6; revoke create on mysqltest.* from mysqltest@localhost; revoke select, insert on mysqltest.t2 from mysqltest@localhost; @@ -1422,7 +1422,7 @@ SELECT * FROM `../db2/tb2`; ERROR 42S02: Table 'db1.../db2/tb2' doesn't exist SELECT * FROM `../db2`.tb2; -ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table 'tb2' +ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table '../db2'.'tb2' SELECT * FROM `#mysql50#/../db2/tb2`; ERROR 42000: Incorrect table name '#mysql50#/../db2/tb2' DROP USER 'testbug'@localhost; === modified file 'mysql-test/r/grant2.result' --- a/mysql-test/r/grant2.result 2009-10-30 05:06:10 +0000 +++ b/mysql-test/r/grant2.result 2010-10-23 16:37:55 +0000 @@ -83,9 +83,9 @@ GRANT SELECT, INSERT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' insert into t1 values (1, 'I can''t change it!'); update t1 set data='I can change it!' where id = 1; -ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'t1' insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!'; -ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'t1' select * from t1; id data 1 I can't change it! @@ -96,9 +96,9 @@ create table t1 (a int, b int); grant select (a) on t1 to mysqltest_1@localhost with grant option; grant select (a,b) on t1 to mysqltest_2@localhost; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 'mysqltest'.'t1' grant select on t1 to mysqltest_3@localhost; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'t1' drop table t1; delete from mysql.user where user like 'mysqltest\_%'; delete from mysql.db where user like 'mysqltest\_%'; @@ -269,7 +269,7 @@ create user mysqltest_2@localhost; grant create user on *.* to mysqltest_2@localhost; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'mysql'.'user' create user mysqltest_A@'%'; rename user mysqltest_A@'%' to mysqltest_B@'%'; drop user mysqltest_B@'%'; @@ -281,7 +281,7 @@ GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost' select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'mysql'.'user' insert into mysql.user set host='%', user='mysqltest_B'; Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value @@ -391,9 +391,9 @@ use mysqltest_2; create table t1 (i int); show create table mysqltest_2.t1; -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'mysqltest_2'.'t1' create table t1 like mysqltest_2.t1; -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'mysqltest_2'.'t1' grant select on mysqltest_2.t1 to mysqltest_u1@localhost; show create table mysqltest_2.t1; Table Create Table @@ -433,11 +433,11 @@ GRANT SELECT (b) ON t2 TO mysqltest1@localhost; USE db1; SELECT c FROM t2; -ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 'db1'.'t2' SELECT * FROM t2; -ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for table 'db1'.'t2' SELECT * FROM t1 JOIN t2 USING (b); -ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 'db1'.'t2' USE test; DROP TABLE db1.t1, db1.t2; DROP USER mysqltest1@localhost; === modified file 'mysql-test/r/grant3.result' --- a/mysql-test/r/grant3.result 2009-10-20 06:17:57 +0000 +++ b/mysql-test/r/grant3.result 2010-10-23 16:37:55 +0000 @@ -189,7 +189,7 @@ # non privileged column. We shouldn't be able to # access this column. SELECT b FROM temp.t1; -ERROR 42000: SELECT command denied to user 'user2'@'localhost' for column 'b' in table 't1' +ERROR 42000: SELECT command denied to user 'user2'@'localhost' for column 'b' in table 'temp'.'t1' DROP USER 'user2'@'%'; DROP DATABASE temp; End of 5.0 tests === modified file 'mysql-test/r/grant_cache_no_prot.result' --- a/mysql-test/r/grant_cache_no_prot.result 2009-05-20 13:27:44 +0000 +++ b/mysql-test/r/grant_cache_no_prot.result 2010-10-23 16:37:55 +0000 @@ -140,7 +140,7 @@ 1 1 1 test.t1 2 2 2 test.t1 select * from t2; -ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'mysqltest'.'t2' show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 @@ -155,17 +155,17 @@ user3 user3 select * from t1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest'.'t1' select a from t1; a 1 2 select c from t1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 'mysqltest'.'t1' select * from t2; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest'.'t2' select mysqltest.t1.c from test.t1,mysqltest.t1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 'mysqltest'.'t1' show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 === modified file 'mysql-test/r/information_schema_db.result' --- a/mysql-test/r/information_schema_db.result 2009-12-03 11:19:05 +0000 +++ b/mysql-test/r/information_schema_db.result 2010-10-23 16:37:55 +0000 @@ -144,17 +144,17 @@ use testdb_1; revoke show view on v6 from testdb_2@localhost; show fields from testdb_1.v5; -ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5' +ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v5' show create view testdb_1.v5; -ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v5' +ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v5' show fields from testdb_1.v6; -ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6' +ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v6' show create view testdb_1.v6; -ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v6' +ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v6' show fields from testdb_1.v7; -ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7' +ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v7' show create view testdb_1.v7; -ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'v7' +ERROR 42000: SELECT command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v7' show create view v4; View Create View character_set_client collation_connection v4 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS select `v3`.`f1` AS `f1`,`v3`.`f2` AS `f2` from `testdb_1`.`v3` latin1 latin1_swedish_ci @@ -172,7 +172,7 @@ View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1` latin1 latin1_swedish_ci show create view testdb_1.v1; -ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1' +ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'testdb_1'.'v1' select table_name from information_schema.columns a where a.table_name = 'v2'; table_name @@ -209,6 +209,6 @@ table_schema table_name view_definition testdb_1 v1 show create view testdb_1.v1; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'testdb_1'.'v1' drop user mysqltest_1@localhost; drop database testdb_1; === modified file 'mysql-test/r/insert_notembedded.result' --- a/mysql-test/r/insert_notembedded.result 2007-09-06 16:22:34 +0000 +++ b/mysql-test/r/insert_notembedded.result 2010-10-23 16:37:55 +0000 @@ -32,7 +32,7 @@ ON table_source.id = stations.icao LEFT JOIN table_target AS old USING (mexs_id); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target' +ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'meow'.'table_target' REPLACE INTO view_target2 SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source @@ -40,7 +40,7 @@ ON table_source.id = stations.icao LEFT JOIN view_target2 AS old USING (mexs_id); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'view_target2' +ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'meow'.'view_target2' REPLACE INTO view_target3 SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source @@ -60,7 +60,7 @@ LEFT JOIN table_target AS old USING (mexs_id); REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00'); -ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target2' +ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'meow'.'table_target2' REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00'); SELECT stations.mexs_id AS mexs_id, datetime AS messzeit FROM table_source === modified file 'mysql-test/r/lowercase_fs_off.result' --- a/mysql-test/r/lowercase_fs_off.result 2009-10-27 08:09:19 +0000 +++ b/mysql-test/r/lowercase_fs_off.result 2010-10-23 16:37:55 +0000 @@ -16,7 +16,7 @@ CREATE TABLE t1(f1 INT); GRANT SELECT ON T1 to user_1@localhost; select * from t1; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'd1'.'t1' select * from T1; f1 GRANT SELECT ON t1 to user_1@localhost; === modified file 'mysql-test/r/mysqlbinlog.result' --- a/mysql-test/r/mysqlbinlog.result 2010-03-28 11:57:33 +0000 +++ b/mysql-test/r/mysqlbinlog.result 2010-10-23 16:37:55 +0000 @@ -432,7 +432,7 @@ mysqlbinlog var/log/master-bin.000017 > var/tmp/bug31611.sql mysql mysqltest1 -uuntrusted < var/tmp/bug31611.sql INSERT INTO t1 VALUES (1,USER()); -ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table 't1' +ERROR 42000: INSERT command denied to user 'untrusted'@'localhost' for table 'mysqltest1'.'t1' SELECT * FROM t1; a b 1 root@localhost === modified file 'mysql-test/r/openssl_1.result' --- a/mysql-test/r/openssl_1.result 2010-06-13 22:13:32 +0000 +++ b/mysql-test/r/openssl_1.result 2010-10-23 16:37:55 +0000 @@ -16,31 +16,31 @@ f1 5 delete from t1; -ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1' -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA -select * from t1; -f1 -5 -delete from t1; -ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 't1' -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA -select * from t1; -f1 -5 -delete from t1; -ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1' -SHOW STATUS LIKE 'Ssl_cipher'; -Variable_name Value -Ssl_cipher DHE-RSA-AES256-SHA -select * from t1; -f1 -5 -delete from t1; -ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1' +ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 'test'.'t1' +SHOW STATUS LIKE 'Ssl_cipher'; +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +select * from t1; +f1 +5 +delete from t1; +ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 'test'.'t1' +SHOW STATUS LIKE 'Ssl_cipher'; +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +select * from t1; +f1 +5 +delete from t1; +ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 'test'.'t1' +SHOW STATUS LIKE 'Ssl_cipher'; +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA +select * from t1; +f1 +5 +delete from t1; +ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 'test'.'t1' drop user ssl_user1@localhost, ssl_user2@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost; drop table t1; === modified file 'mysql-test/r/partition_grant.result' --- a/mysql-test/r/partition_grant.result 2007-04-04 09:01:47 +0000 +++ b/mysql-test/r/partition_grant.result 2010-10-23 16:37:55 +0000 @@ -12,12 +12,12 @@ GRANT SELECT, ALTER ON `mysqltest_1`.* TO 'mysqltest_1'@'localhost' alter table t1 add b int; alter table t1 drop partition p2; -ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest_1'.'t1' grant drop on mysqltest_1.* to mysqltest_1@localhost; alter table t1 drop partition p2; revoke alter on mysqltest_1.* from mysqltest_1@localhost; alter table t1 drop partition p3; -ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest_1'.'t1' revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost; drop table t1; create table t1 (s1 int); === modified file 'mysql-test/r/plugin_not_embedded.result' --- a/mysql-test/r/plugin_not_embedded.result 2010-03-13 21:32:42 +0000 +++ b/mysql-test/r/plugin_not_embedded.result 2010-10-23 16:37:55 +0000 @@ -4,7 +4,7 @@ GRANT INSERT ON mysql.plugin TO bug51770@localhost; INSTALL PLUGIN example SONAME 'ha_example.so'; UNINSTALL PLUGIN example; -ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table 'plugin' +ERROR 42000: DELETE command denied to user 'bug51770'@'localhost' for table 'mysql'.'plugin' GRANT DELETE ON mysql.plugin TO bug51770@localhost; UNINSTALL PLUGIN example; DROP USER bug51770@localhost; === modified file 'mysql-test/r/ps_grant.result' --- a/mysql-test/r/ps_grant.result 2009-10-27 10:09:36 +0000 +++ b/mysql-test/r/ps_grant.result 2010-10-23 16:37:55 +0000 @@ -26,7 +26,7 @@ my_col 1 select a as my_col from t1; -ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 'mysqltest'.'t1' grant select on mysqltest.t1 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; @@ -66,7 +66,7 @@ GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' execute s_t1 ; -ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 'mysqltest'.'t1' revoke all privileges, grant option from second_user@localhost ; show grants for second_user@localhost ; Grants for second_user@localhost === modified file 'mysql-test/r/show_check.result' --- a/mysql-test/r/show_check.result 2010-09-03 16:20:30 +0000 +++ b/mysql-test/r/show_check.result 2010-10-23 16:37:55 +0000 @@ -524,19 +524,19 @@ Database Create Database mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */ drop table t1; -ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'t1' drop database mysqltest; ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysqltest' select * from mysqltest.t1; -ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'mysqltest'.'t1' show create database mysqltest; ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' drop table mysqltest.t1; -ERROR 42000: DROP command denied to user 'mysqltest_2'@'localhost' for table 't1' +ERROR 42000: DROP command denied to user 'mysqltest_2'@'localhost' for table 'mysqltest'.'t1' drop database mysqltest; ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysqltest' select * from mysqltest.t1; -ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'mysqltest'.'t1' show create database mysqltest; Database Create Database mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */ === modified file 'mysql-test/r/sp-security.result' --- a/mysql-test/r/sp-security.result 2010-02-26 13:16:46 +0000 +++ b/mysql-test/r/sp-security.result 2010-10-23 16:37:55 +0000 @@ -40,7 +40,7 @@ db1_secret.db() test select * from db1_secret.t1; -ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 'db1_secret'.'t1' create procedure db1_secret.dummy() begin end; ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret' drop procedure db1_secret.dummy; @@ -54,7 +54,7 @@ db1_secret.db() test select * from db1_secret.t1; -ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user ''@'localhost' for table 'db1_secret'.'t1' create procedure db1_secret.dummy() begin end; ERROR 42000: Access denied for user ''@'%' to database 'db1_secret' drop procedure db1_secret.dummy; @@ -89,13 +89,13 @@ db() test call db1_secret.stamp(5); -ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 't1' +ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 'db1_secret'.'t1' select db1_secret.db(); -ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'user1'@'localhost' for table 'db1_secret'.'t1' call db1_secret.stamp(6); -ERROR 42000: INSERT command denied to user ''@'localhost' for table 't1' +ERROR 42000: INSERT command denied to user ''@'localhost' for table 'db1_secret'.'t1' select db1_secret.db(); -ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user ''@'localhost' for table 'db1_secret'.'t1' drop database if exists db2; create database db2; use db2; @@ -110,7 +110,7 @@ use db2; create procedure p () insert into t2 values (1); call p(); -ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 't2' +ERROR 42000: INSERT command denied to user 'user1'@'localhost' for table 'db2'.'t2' use db2; call p(); ERROR 42000: execute command denied to user 'user2'@'localhost' for routine 'db2.p' @@ -326,9 +326,9 @@ call db_bug14533.bug14533_2(); id desc db_bug14533.t1; -ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 'db_bug14533'.'t1' select * from db_bug14533.t1; -ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'user_bug14533'@'localhost' for table 'db_bug14533'.'t1' drop user user_bug14533@localhost; drop database db_bug14533; @@ -483,24 +483,24 @@ END| CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT f_evil(); SELECT COUNT(*) FROM t1; -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'test'.'t1' SELECT f_evil(); -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'test'.'t1' SELECT @a, @b; @a @b mysqltest_u1@localhost NULL SELECT f_suid(f_evil()); -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'test'.'t1' SELECT @a, @b; @a @b mysqltest_u1@localhost NULL CALL p_suid(f_evil()); -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'test'.'t1' SELECT @a, @b; @a @b mysqltest_u1@localhost NULL SELECT * FROM v1; -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for table 'test'.'v1' SELECT @a, @b; @a @b mysqltest_u1@localhost NULL === modified file 'mysql-test/r/status.result' --- a/mysql-test/r/status.result 2009-06-10 08:58:36 +0000 +++ b/mysql-test/r/status.result 2010-10-23 16:37:55 +0000 @@ -201,13 +201,13 @@ create function func37908() returns int sql security invoker return (select * from db37908.t1 limit 1)| select * from db37908.t1; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'db37908'.'t1' show status where variable_name ='uptime' and 2 in (select * from db37908.t1); -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'db37908'.'t1' show procedure status where name ='proc37908' and 1 in (select f1 from db37908.t1); -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'db37908'.'t1' show function status where name ='func37908' and 1 in (select func37908()); -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'db37908'.'t1' drop database db37908; drop procedure proc37908; drop function func37908; === modified file 'mysql-test/r/timezone_grant.result' --- a/mysql-test/r/timezone_grant.result 2006-04-25 14:20:49 +0000 +++ b/mysql-test/r/timezone_grant.result 2010-10-23 16:37:55 +0000 @@ -22,9 +22,9 @@ update t1, t2 set t1.b = convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC') where t1.a = t2.c and t2.d = (select max(d) from t2); select * from mysql.time_zone_name; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysql'.'time_zone_name' select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysql'.'time_zone_name' delete from mysql.db where user like 'mysqltest\_%'; flush privileges; grant all privileges on test.t1 to mysqltest_1@localhost; @@ -46,9 +46,9 @@ update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC') where t1.a = t2.c and t2.d = (select max(d) from t2); select * from mysql.time_zone_name; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysql'.'time_zone_name' select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysql'.'time_zone_name' drop table t1, t2; create table t1 (a int, b datetime); create table t2 (a int, b varchar(40)); @@ -70,9 +70,9 @@ 1 2001-01-01 03:00:00 2 2002-01-01 03:00:00 select * from v1, mysql.time_zone; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'mysql'.'time_zone' drop view v1; create view v1 as select a, convert_tz(b, 'UTC', 'Europe/Moscow') as lb from t1, mysql.time_zone; -ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 'time_zone' +ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 'mysql'.'time_zone' drop table t1; drop user mysqltest_1@localhost; === modified file 'mysql-test/r/trigger_notembedded.result' --- a/mysql-test/r/trigger_notembedded.result 2010-01-12 08:19:48 +0000 +++ b/mysql-test/r/trigger_notembedded.result 2010-10-23 16:37:55 +0000 @@ -24,7 +24,7 @@ CREATE TRIGGER trg1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES(CURRENT_USER()); -ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 't1' +ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 'mysqltest_db1'.'t1' ---> connection: default GRANT TRIGGER ON mysqltest_db1.t1 TO mysqltest_dfn@localhost; @@ -39,11 +39,11 @@ ---> connection: wl2818_definer_con DROP TRIGGER trg1; -ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 't1' +ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 'mysqltest_db1'.'t1' ---> connection: wl2818_definer_con INSERT INTO t1 VALUES(0); -ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 't1' +ERROR 42000: TRIGGER command denied to user 'mysqltest_dfn'@'localhost' for table 'mysqltest_db1'.'t1' ---> connection: default GRANT TRIGGER ON mysqltest_db1.t1 TO mysqltest_dfn@localhost; @@ -99,7 +99,7 @@ ---> connection: wl2818_invoker_con use mysqltest_db1; INSERT INTO t1 VALUES(3); -ERROR 42000: INSERT command denied to user 'mysqltest_dfn'@'localhost' for table 't2' +ERROR 42000: INSERT command denied to user 'mysqltest_dfn'@'localhost' for table 'mysqltest_db1'.'t2' SELECT * FROM t1; num_value 1 @@ -296,7 +296,7 @@ GRANT UPDATE(col) ON mysqltest_db1.t3 TO mysqltest_u1@localhost; GRANT UPDATE(col) ON mysqltest_db1.t4 TO mysqltest_u1@localhost; INSERT INTO t1 VALUES('line1'); -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 'mysqltest_db1'.'t1' SELECT * FROM t1; col line1 @@ -308,7 +308,7 @@ col t2_trg_before_insert INSERT INTO t3 VALUES('t3_line1'); -ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 't3' +ERROR 42000: SELECT command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 'mysqltest_db1'.'t3' SELECT * FROM t3; col t3_line1 @@ -339,7 +339,7 @@ @mysqltest_var line3 INSERT INTO t2 VALUES('line4'); -ERROR 42000: UPDATE command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 't2' +ERROR 42000: UPDATE command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 'mysqltest_db1'.'t2' SELECT * FROM t2; col t2_trg_before_insert @@ -352,7 +352,7 @@ @mysqltest_var t3_line2 INSERT INTO t4 VALUES('t4_line2'); -ERROR 42000: UPDATE command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 't4' +ERROR 42000: UPDATE command denied to user 'mysqltest_u1'@'localhost' for column 'col' in table 'mysqltest_db1'.'t4' SELECT * FROM t4; col t4_trg_before_insert @@ -383,9 +383,9 @@ CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW CALL p2(NEW.i1); INSERT INTO t1 VALUES (7); -ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t1' INSERT INTO t2 VALUES (11); -ERROR 42000: SELECT,UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2' +ERROR 42000: SELECT,UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t2' DROP TRIGGER t2_bi; DROP TRIGGER t1_bi; GRANT SELECT ON mysqltest_db1.* TO mysqltest_dfn@localhost; @@ -394,9 +394,9 @@ CREATE TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW CALL p2(NEW.i1); INSERT INTO t1 VALUES (13); -ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1' +ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t1' INSERT INTO t2 VALUES (17); -ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2' +ERROR 42000: UPDATE command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t2' REVOKE SELECT ON mysqltest_db1.* FROM mysqltest_dfn@localhost; DROP TRIGGER t2_bi; DROP TRIGGER t1_bi; @@ -407,7 +407,7 @@ CALL p2(NEW.i1); INSERT INTO t1 VALUES (19); INSERT INTO t2 VALUES (23); -ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t2' REVOKE UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost; DROP TRIGGER t2_bi; DROP TRIGGER t1_bi; @@ -431,11 +431,11 @@ DROP PROCEDURE p1; CREATE PROCEDURE p1(IN i INT) DETERMINISTIC NO SQL SET @v1 = i + 43; INSERT INTO t1 VALUES (47); -ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t1' DROP PROCEDURE p1; CREATE PROCEDURE p1(INOUT i INT) DETERMINISTIC NO SQL SET i = i + 51; INSERT INTO t1 VALUES (53); -ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_dfn'@'localhost' for column 'i1' in table 'mysqltest_db1'.'t1' DROP PROCEDURE p1; REVOKE UPDATE ON mysqltest_db1.* FROM mysqltest_dfn@localhost; DROP TRIGGER t1_bi; === modified file 'mysql-test/r/view_grant.result' --- a/mysql-test/r/view_grant.result 2010-02-12 02:54:14 +0000 +++ b/mysql-test/r/view_grant.result 2010-10-23 16:37:55 +0000 @@ -19,13 +19,13 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation create view v1 as select * from mysqltest.t1; alter view v1 as select * from mysqltest.t1; -ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'test'.'v1' create or replace view v1 as select * from mysqltest.t1; -ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'test'.'v1' create view mysqltest.v2 as select * from mysqltest.t1; -ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' create view v2 as select * from mysqltest.t2; -ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'t2' show create view v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqltest_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `mysqltest`.`t1`.`a` AS `a`,`mysqltest`.`t1`.`b` AS `b` from `mysqltest`.`t1` latin1 latin1_swedish_ci @@ -44,7 +44,7 @@ select c from mysqltest.v1; c select d from mysqltest.v1; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'v1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'mysqltest'.'v1' revoke all privileges on mysqltest.v1 from mysqltest_1@localhost; delete from mysql.user where user='mysqltest_1'; drop database mysqltest; @@ -55,7 +55,7 @@ select c from mysqltest.v1; c select d from mysqltest.v1; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'v1' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'd' in table 'mysqltest'.'v1' revoke all privileges on mysqltest.v1 from mysqltest_1@localhost; delete from mysql.user where user='mysqltest_1'; drop database mysqltest; @@ -89,39 +89,39 @@ explain select c from mysqltest.v1; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v1; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v1' explain select c from mysqltest.v2; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v2; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' explain select c from mysqltest.v3; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v3; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v3' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v3' explain select c from mysqltest.v4; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v4; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v4' grant select on mysqltest.t1 to mysqltest_1@localhost; explain select c from mysqltest.v1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found show create view mysqltest.v1; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v1' explain select c from mysqltest.v2; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table show create view mysqltest.v2; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' explain select c from mysqltest.v3; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v3; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v3' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v3' explain select c from mysqltest.v4; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v4; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v4' grant show view on mysqltest.* to mysqltest_1@localhost; explain select c from mysqltest.v1; id select_type table type possible_keys key key_len ref rows Extra @@ -197,13 +197,13 @@ 62 5 71 10 update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c; -ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'mysqltest'.'v2' update v2 set c=a+c; -ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'mysqltest'.'v2' update t2,v3 set v3.a=v3.a+v3.c where t2.x=v3.c; -ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'v3' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v3' update v3 set a=a+c; -ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'v3' +ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v3' use test; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; drop database mysqltest; @@ -229,9 +229,9 @@ a b 5 10 delete v2 from t2,v2 where t2.x=v2.c; -ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' delete from v2 where c < 4; -ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' use test; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; drop database mysqltest; @@ -259,9 +259,9 @@ 5 6 3 4 insert into v2 values (5,6); -ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' insert into v2 select x,y from t2; -ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'v2' +ERROR 42000: INSERT command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v2' use test; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; drop database mysqltest; @@ -274,9 +274,9 @@ create view v1 as select * from mysqltest.t1; create view v2 as select b from mysqltest.t2; create view mysqltest.v1 as select * from mysqltest.t1; -ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v1' create view v3 as select a from mysqltest.t2; -ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 't2' +ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 'mysqltest'.'t2' create table mysqltest.v3 (b int); grant create view on mysqltest.v3 to mysqltest_1@localhost; drop table mysqltest.v3; @@ -285,10 +285,10 @@ drop view mysqltest.v3; create view mysqltest.v3 as select b from mysqltest.t2; create view v4 as select b+1 from mysqltest.t2; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 'mysqltest'.'t2' grant create view,update,select on test.* to mysqltest_1@localhost; create view v4 as select b+1 from mysqltest.t2; -ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for column 'b' in table 'mysqltest'.'t2' grant update,select(b) on mysqltest.t2 to mysqltest_1@localhost; create view v4 as select b+1 from mysqltest.t2; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; @@ -507,7 +507,7 @@ use mysqltest; LOCK TABLES v1 READ; SHOW CREATE TABLE v1; -ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' +ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'mysqltest'.'v1' UNLOCK TABLES; use test; use test; @@ -560,31 +560,31 @@ SELECT 1 FROM mysqltest1.v_t1; ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them SELECT * FROM mysqltest1.t1; -ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'t1' SELECT * FROM mysqltest1.v_ts; x 1 2 SELECT * FROM mysqltest1.v_ts, mysqltest1.t1 WHERE mysqltest1.t1.x = mysqltest1.v_ts.x; -ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'t1' SELECT * FROM mysqltest1.v_ti; -ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 'v_ti' +ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'v_ti' INSERT INTO mysqltest1.v_ts VALUES (100); -ERROR 42000: INSERT command denied to user 'readonly'@'localhost' for table 'v_ts' +ERROR 42000: INSERT command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'v_ts' INSERT INTO mysqltest1.v_ti VALUES (100); UPDATE mysqltest1.v_ts SET x= 200 WHERE x = 100; -ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts' +ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'v_ts' UPDATE mysqltest1.v_ts SET x= 200; -ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts' +ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'v_ts' UPDATE mysqltest1.v_tu SET x= 200 WHERE x = 100; UPDATE mysqltest1.v_tus SET x= 200 WHERE x = 100; UPDATE mysqltest1.v_tu SET x= 200; DELETE FROM mysqltest1.v_ts WHERE x= 200; -ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'v_ts' +ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'v_ts' DELETE FROM mysqltest1.v_ts; -ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'v_ts' +ERROR 42000: DELETE command denied to user 'readonly'@'localhost' for table 'mysqltest1'.'v_ts' DELETE FROM mysqltest1.v_td WHERE x= 200; -ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for column 'x' in table 'v_td' +ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for column 'x' in table 'mysqltest1'.'v_td' DELETE FROM mysqltest1.v_tds WHERE x= 200; DELETE FROM mysqltest1.v_td; DROP VIEW mysqltest1.v_tds; @@ -719,7 +719,7 @@ DROP USER def_17254@localhost; for a user SELECT * FROM v1; -ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'db17254'.'v1' for a superuser SELECT * FROM v1; ERROR HY000: The user specified as a definer ('def_17254'@'localhost') does not exist @@ -756,11 +756,11 @@ REVOKE SELECT ON t2 FROM mysqltest_u2@localhost; UPDATE t2 SET s = 'private' WHERE s = 'public'; SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2; -ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 'mysqltest_db1'.'t2' EXECUTE stmt1; -ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 'mysqltest_db1'.'t2' EXECUTE stmt2; -ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 'mysqltest_db1'.'t2' REVOKE ALL ON mysqltest_db1.* FROM mysqltest_u1@localhost; REVOKE ALL ON mysqltest_db2.* FROM mysqltest_u2@localhost; DROP DATABASE mysqltest_db1; @@ -875,22 +875,22 @@ UPDATE v3 SET c3 = 332 WHERE c3 = 32; DELETE FROM v4 WHERE c4 = 43; CREATE VIEW v12 AS SELECT c1, c2 FROM mysqltest1.t1, mysqltest1.t2; -ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c2' in table 'v12' +ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c2' in table 'mysqltest2'.'v12' CREATE VIEW v13 AS SELECT c1, c3 FROM mysqltest1.t1, mysqltest1.t3; CREATE VIEW v14 AS SELECT c1, c4 FROM mysqltest1.t1, mysqltest1.t4; CREATE VIEW v21 AS SELECT c2, c1 FROM mysqltest1.t2, mysqltest1.t1; -ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c1' in table 'v21' +ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c1' in table 'mysqltest2'.'v21' CREATE VIEW v23 AS SELECT c2, c3 FROM mysqltest1.t2, mysqltest1.t3; -ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c3' in table 'v23' +ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c3' in table 'mysqltest2'.'v23' CREATE VIEW v24 AS SELECT c2, c4 FROM mysqltest1.t2, mysqltest1.t4; -ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c4' in table 'v24' +ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c4' in table 'mysqltest2'.'v24' CREATE VIEW v31 AS SELECT c3, c1 FROM mysqltest1.t3, mysqltest1.t1; CREATE VIEW v32 AS SELECT c3, c2 FROM mysqltest1.t3, mysqltest1.t2; -ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c2' in table 'v32' +ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c2' in table 'mysqltest2'.'v32' CREATE VIEW v34 AS SELECT c3, c4 FROM mysqltest1.t3, mysqltest1.t4; CREATE VIEW v41 AS SELECT c4, c1 FROM mysqltest1.t4, mysqltest1.t1; CREATE VIEW v42 AS SELECT c4, c2 FROM mysqltest1.t4, mysqltest1.t2; -ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c2' in table 'v42' +ERROR 42000: create view command denied to user 'mysqltest_u1'@'localhost' for column 'c2' in table 'mysqltest2'.'v42' CREATE VIEW v43 AS SELECT c4, c3 FROM mysqltest1.t4, mysqltest1.t3; ---> connection: default @@ -931,15 +931,15 @@ SELECT f1 FROM t1; f1 SELECT f2 FROM t1; -ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 't1' +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 'db1'.'t1' SELECT * FROM t1; -ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1' +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'db1'.'t1' SELECT f1 FROM v1; f1 SELECT f2 FROM v1; -ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 'v1' +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 'db1'.'v1' SELECT * FROM v1; -ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'db1'.'v1' USE test; REVOKE SELECT (f1) ON db1.t1 FROM foo; REVOKE SELECT (f1) ON db1.v1 FROM foo; @@ -995,9 +995,9 @@ This would lead to failed assertion. CREATE VIEW v1 AS SELECT a, b FROM t1, t2; SELECT * FROM v1; -ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v1' SELECT b FROM v1; -ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v1' DROP TABLE t1, t2; DROP VIEW v1; DROP DATABASE mysqltest1; @@ -1013,9 +1013,9 @@ GRANT SELECT( a ) ON v1 TO mysqluser1@localhost; GRANT UPDATE( b ) ON t2 TO mysqluser1@localhost; SELECT * FROM mysqltest1.v1; -ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v1' CREATE VIEW v1 AS SELECT * FROM mysqltest1.t2; -ERROR 42000: ANY command denied to user 'mysqluser1'@'localhost' for table 't2' +ERROR 42000: ANY command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'t2' DROP TABLE t1, t2; DROP VIEW v1; DROP DATABASE mysqltest1; @@ -1032,9 +1032,9 @@ PREPARE stmt_v2 FROM "SELECT * FROM mysqltest1.v2"; REVOKE SELECT ON mysqltest1.* FROM mysqluser1@localhost; EXECUTE stmt_v1; -ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v1' EXECUTE stmt_v2; -ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v2' +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v2' PREPARE stmt FROM "SELECT a FROM v3"; EXECUTE stmt; a @@ -1183,11 +1183,11 @@ REVOKE SHOW VIEW ON v_f1 FROM mysqluser1@localhost; REVOKE SHOW VIEW ON v_v1 FROM mysqluser1@localhost; SHOW CREATE VIEW mysqltest1.v_t1; -ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'v_t1' +ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v_t1' SHOW CREATE VIEW mysqltest1.v_f1; -ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'v_f1' +ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v_f1' SHOW CREATE VIEW mysqltest1.v_v1; -ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'v_v1' +ERROR 42000: SHOW VIEW command denied to user 'mysqluser1'@'localhost' for table 'mysqltest1'.'v_v1' SHOW CREATE VIEW v_mysqluser1_t1; View Create View character_set_client collation_connection v_mysqluser1_t1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqluser1`@`localhost` SQL SECURITY DEFINER VIEW `v_mysqluser1_t1` AS select `mysqltest1`.`t1`.`a` AS `a` from `mysqltest1`.`t1` latin1 latin1_swedish_ci === modified file 'mysql-test/suite/rpl/r/rpl_sp.result' --- a/mysql-test/suite/rpl/r/rpl_sp.result 2010-05-24 13:54:08 +0000 +++ b/mysql-test/suite/rpl/r/rpl_sp.result 2010-10-23 16:37:55 +0000 @@ -281,7 +281,7 @@ 20 100 create trigger trg before insert on t1 for each row set new.a= 10; -ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 't1' +ERROR 42000: TRIGGER command denied to user 'zedjzlcsjhd'@'localhost' for table 'mysqltest1'.'t1' delete from t1; create trigger trg before insert on t1 for each row set new.a= 10; insert into t1 values (1); === modified file 'sql/item.cc' --- a/sql/item.cc 2010-09-03 16:20:30 +0000 +++ b/sql/item.cc 2010-10-23 16:37:55 +0000 @@ -4428,7 +4428,7 @@ { my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), "ANY", thd->security_ctx->priv_user, - thd->security_ctx->host_or_ip, field_name, tab); + thd->security_ctx->host_or_ip, field_name, db, tab); goto error; } } === modified file 'sql/share/errmsg.txt' --- a/sql/share/errmsg.txt 2010-04-28 12:52:24 +0000 +++ b/sql/share/errmsg.txt 2010-10-23 16:37:55 +0000 @@ -3288,45 +3288,45 @@ swe "Det finns inget privilegium definierat f�r anv�ndare '%-.48s' p� '%-.64s'" ukr "����������� �� ��������� ��� ����������� '%-.48s' � ����� '%-.64s'" ER_TABLEACCESS_DENIED_ERROR 42000 - cze "%-.16s p-B��kaz nep��stupn� pro u�ivatele: '%-.48s'@'%-.64s' pro tabulku '%-.192s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for tabellen '%-.192s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor tabel '%-.192s'" - eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'" - jps "�R�}���h %-.16s �� ���[�U�[ '%-.48s'@'%-.64s' ,�e�[�u�� '%-.192s' �ɑ��ċ�����Ă��܂���", - est "%-.16s k�sk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tabelis '%-.192s'" - fre "La commande '%-.16s' est interdite � l'utilisateur: '%-.48s'@'@%-.64s' sur la table '%-.192s'" - ger "%-.16s Befehl nicht erlaubt f�r Benutzer '%-.48s'@'%-.64s' auf Tabelle '%-.192s'" - hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla tabella '%-.192s'" - jpn "���ޥ�� %-.16s �� �桼���� '%-.48s'@'%-.64s' ,�ơ��֥� '%-.192s' ���Ф��Ƶ��Ĥ���Ƥ��ޤ���" - kor "'%-.16s' ������ ���� ����ڿ��� �źεǾ����ϴ�. : '%-.48s'@'%-.64s' for ���̺� '%-.192s'" - por "Comando '%-.16s' negado para o usu�rio '%-.48s'@'%-.64s' na tabela '%-.192s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru tabela '%-.192s'" - rus "������� %-.16s ��������� ������������ '%-.48s'@'%-.64s' ��� ������� '%-.192s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za tabelu '%-.192s'" - spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para tabla '%-.192s'" - swe "%-.16s ej till�tet f�r '%-.48s'@'%-.64s' f�r tabell '%-.192s'" - ukr "%-.16s ������� ���������� �����������: '%-.48s'@'%-.64s' � �����æ '%-.192s'" + cze "%-.16s p-B��kaz nep��stupn� pro u�ivatele: '%-.48s'@'%-.64s' pro tabulku '%-.192s'.'%-.192s'" + dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for tabellen '%-.192s'.'%-.192s'" + nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor tabel '%-.192s'.'%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'.'%-.192s'" + jps "�R�}���h %-.16s �� ���[�U�[ '%-.48s'@'%-.64s' ,�e�[�u�� '%-.192s'.'%-.192s' �ɑ��ċ�����Ă��܂���", + est "%-.16s k�sk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tabelis '%-.192s'.'%-.192s'" + fre "La commande '%-.16s' est interdite � l'utilisateur: '%-.48s'@'@%-.64s' sur la table '%-.192s'.'%-.192s'" + ger "%-.16s Befehl nicht erlaubt f�r Benutzer '%-.48s'@'%-.64s' auf Tabelle '%-.192s'.'%-.192s'" + hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s'.'%-.192s' tablaban" + ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla tabella '%-.192s'.'%-.192s'" + jpn "���ޥ�� %-.16s �� �桼���� '%-.48s'@'%-.64s' ,�ơ��֥� '%-.192s'.'%-.192s' ���Ф��Ƶ��Ĥ���Ƥ��ޤ���" + kor "'%-.16s' ������ ���� ����ڿ��� �źεǾ����ϴ�. : '%-.48s'@'%-.64s' for ���̺� '%-.192s'.'%-.192s'" + por "Comando '%-.16s' negado para o usu�rio '%-.48s'@'%-.64s' na tabela '%-.192s'.'%-.192s'" + rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru tabela '%-.192s'.'%-.192s'" + rus "������� %-.16s ��������� ������������ '%-.48s'@'%-.64s' ��� ������� '%-.192s'.'%-.192s'" + serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za tabelu '%-.192s'.'%-.192s'" + spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para tabla '%-.192s'.'%-.192s'" + swe "%-.16s ej till�tet f�r '%-.48s'@'%-.64s' f�r tabell '%-.192s'.'%-.192s'" + ukr "%-.16s ������� ���������� �����������: '%-.48s'@'%-.64s' � �����æ '%-.192s'.'%-.192s'" ER_COLUMNACCESS_DENIED_ERROR 42000 - cze "%-.16s p-B��kaz nep��stupn� pro u�ivatele: '%-.48s'@'%-.64s' pro sloupec '%-.192s' v tabulce '%-.192s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for kolonne '%-.192s' in tabellen '%-.192s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor kolom '%-.192s' in tabel '%-.192s'" - eng "%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'" - jps "�R�}���h %-.16s �� ���[�U�[ '%-.48s'@'%-.64s'\n �J���� '%-.192s' �e�[�u�� '%-.192s' �ɑ��ċ�����Ă��܂���", - est "%-.16s k�sk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tulbale '%-.192s' tabelis '%-.192s'" - fre "La commande '%-.16s' est interdite � l'utilisateur: '%-.48s'@'@%-.64s' sur la colonne '%-.192s' de la table '%-.192s'" - ger "%-.16s Befehl nicht erlaubt f�r Benutzer '%-.48s'@'%-.64s' und Feld '%-.192s' in Tabelle '%-.192s'" - hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' mezo eseten a '%-.192s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla colonna '%-.192s' della tabella '%-.192s'" - jpn "���ޥ�� %-.16s �� �桼���� '%-.48s'@'%-.64s'\n ����� '%-.192s' �ơ��֥� '%-.192s' ���Ф��Ƶ��Ĥ���Ƥ��ޤ���" - kor "'%-.16s' ������ ���� ����ڿ��� �źεǾ����ϴ�. : '%-.48s'@'%-.64s' for Į�� '%-.192s' in ���̺� '%-.192s'" - por "Comando '%-.16s' negado para o usu�rio '%-.48s'@'%-.64s' na coluna '%-.192s', na tabela '%-.192s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru coloana '%-.192s' in tabela '%-.192s'" - rus "������� %-.16s ��������� ������������ '%-.48s'@'%-.64s' ��� ������� '%-.192s' � ������� '%-.192s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za kolonu '%-.192s' iz tabele '%-.192s'" - spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para columna '%-.192s' en la tabla '%-.192s'" - swe "%-.16s ej till�tet f�r '%-.48s'@'%-.64s' f�r kolumn '%-.192s' i tabell '%-.192s'" - ukr "%-.16s ������� ���������� �����������: '%-.48s'@'%-.64s' ��� ������� '%-.192s' � �����æ '%-.192s'" + cze "%-.16s p-B��kaz nep��stupn� pro u�ivatele: '%-.48s'@'%-.64s' pro sloupec '%-.192s' v tabulce '%-.192s'.'%-.192s'" + dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for kolonne '%-.192s' in tabellen '%-.192s'.'%-.192s'" + nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor kolom '%-.192s' in tabel '%-.192s'.'%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'.'%-.192s'" + jps "�R�}���h %-.16s �� ���[�U�[ '%-.48s'@'%-.64s'\n �J���� '%-.192s' �e�[�u�� '%-.192s'.'%-.192s' �ɑ��ċ�����Ă��܂���", + est "%-.16s k�sk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tulbale '%-.192s' tabelis '%-.192s'.'%-.192s'" + fre "La commande '%-.16s' est interdite � l'utilisateur: '%-.48s'@'@%-.64s' sur la colonne '%-.192s' de la table '%-.192s'.'%-.192s'" + ger "%-.16s Befehl nicht erlaubt f�r Benutzer '%-.48s'@'%-.64s' und Feld '%-.192s' in Tabelle '%-.192s'.'%-.192s'" + hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' mezo eseten a '%-.192s'.'%-.192s' tablaban" + ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla colonna '%-.192s' della tabella '%-.192s'.'%-.192s'" + jpn "���ޥ�� %-.16s �� �桼���� '%-.48s'@'%-.64s'\n ����� '%-.192s' �ơ��֥� '%-.192s'.'%-.192s' ���Ф��Ƶ��Ĥ���Ƥ��ޤ���" + kor "'%-.16s' ������ ���� ����ڿ��� �źεǾ����ϴ�. : '%-.48s'@'%-.64s' for Į�� '%-.192s' in ���̺� '%-.192s'.'%-.192s'" + por "Comando '%-.16s' negado para o usu�rio '%-.48s'@'%-.64s' na coluna '%-.192s', na tabela '%-.192s'.'%-.192s'" + rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru coloana '%-.192s' in tabela '%-.192s'.'%-.192s'" + rus "������� %-.16s ��������� ������������ '%-.48s'@'%-.64s' ��� ������� '%-.192s' � ������� '%-.192s'.'%-.192s'" + serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za kolonu '%-.192s' iz tabele '%-.192s'.'%-.192s'" + spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para columna '%-.192s' en la tabla '%-.192s'.'%-.192s'" + swe "%-.16s ej till�tet f�r '%-.48s'@'%-.64s' f�r kolumn '%-.192s' i tabell '%-.192s'.'%-.192s'" + ukr "%-.16s ������� ���������� �����������: '%-.48s'@'%-.64s' ��� ������� '%-.192s' � �����æ '%-.192s'.'%-.192s'" ER_ILLEGAL_GRANT_FOR_TABLE 42000 cze "Neplatn-B� p��kaz GRANT/REVOKE. Pros�m, p�e�t�te si v manu�lu, jak� privilegia je mo�n� pou��t." dan "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres." === modified file 'sql/sp_head.cc' --- a/sql/sp_head.cc 2010-09-03 16:20:30 +0000 +++ b/sql/sp_head.cc 2010-10-23 16:37:55 +0000 @@ -1545,7 +1545,7 @@ my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), priv_desc, thd->security_ctx->priv_user, thd->security_ctx->host_or_ip, - table_name->str); + db_name->str, table_name->str); m_security_ctx.restore_security_context(thd, save_ctx); DBUG_RETURN(TRUE); === modified file 'sql/sql_acl.cc' --- a/sql/sql_acl.cc 2010-09-03 16:20:30 +0000 +++ b/sql/sql_acl.cc 2010-10-23 16:37:55 +0000 @@ -3059,7 +3059,7 @@ table_list->grant.want_privilege); my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), command, thd->security_ctx->priv_user, - thd->security_ctx->host_or_ip, table_list->alias); + thd->security_ctx->host_or_ip, table_list->db, table_list->alias); DBUG_RETURN(-1); } } @@ -4044,6 +4044,7 @@ command, sctx->priv_user, sctx->host_or_ip, + table ? table->get_db_name() : "unknown", table ? table->get_table_name() : "unknown"); } DBUG_RETURN(1); @@ -4112,6 +4113,7 @@ sctx->priv_user, sctx->host_or_ip, name, + db_name, table_name); DBUG_RETURN(1); } @@ -4275,13 +4277,14 @@ if (using_column_privileges) my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), command, sctx->priv_user, - sctx->host_or_ip, table_name); + sctx->host_or_ip, db_name, table_name); else my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), command, sctx->priv_user, sctx->host_or_ip, fields->name(), + db_name, table_name); return 1; } === modified file 'sql/sql_base.cc' --- a/sql/sql_base.cc 2010-09-03 16:20:30 +0000 +++ b/sql/sql_base.cc 2010-10-23 16:37:55 +0000 @@ -7992,7 +7992,7 @@ my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), "ANY", thd->security_ctx->priv_user, thd->security_ctx->host_or_ip, - field_table_name); + field_iterator.get_db_name(), field_table_name); DBUG_RETURN(TRUE); } } === modified file 'sql/sql_show.cc' --- a/sql/sql_show.cc 2010-10-19 13:58:35 +0000 +++ b/sql/sql_show.cc 2010-10-23 16:37:55 +0000 @@ -651,7 +651,9 @@ my_snprintf(m_view_access_denied_message, MYSQL_ERRMSG_SIZE, ER(ER_TABLEACCESS_DENIED_ERROR), "SHOW VIEW", m_sctx->priv_user, - m_sctx->host_or_ip, m_top_view->get_table_name()); + m_sctx->host_or_ip, + m_top_view->get_db_name(), + m_top_view->get_table_name()); } return m_view_access_denied_message_ptr; } === modified file 'sql/sql_view.cc' --- a/sql/sql_view.cc 2010-09-03 16:20:30 +0000 +++ b/sql/sql_view.cc 2010-10-23 16:37:55 +0000 @@ -317,7 +317,7 @@ { my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), "ANY", thd->security_ctx->priv_user, - thd->security_ctx->priv_host, tbl->table_name); + thd->security_ctx->priv_host, tbl->db, tbl->table_name); goto err; } /* @@ -637,7 +637,7 @@ my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), "create view", thd->security_ctx->priv_user, thd->security_ctx->priv_host, report_item->name, - view->table_name); + view->db, view->table_name); res= TRUE; goto err; } _______________________________________________ commits mailing list commits@mariadb.org https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits ----- End forwarded message ----- -- BR Sergey -- Sergey Petrunia, Software Developer Monty Program AB, http://askmonty.org Blog: http://s.petrunia.net/blog
Hi, Sergey! On Oct 23, Sergey Petrunya wrote:
Hello,
Could somebody please review the below? It's a very simple patch.
I also need comments about which version this should go into. I've made the patch againist 5.1 just in case, but my opinion is that this should go into 5.2 (under rationale that 5.1 is stable and one can live without this patch).
as discussed on the phone - it should go in 5.3 Now, the patch. Disclaimer - I didn't grep for error messages to verify that you patched all places where ER_TABLEACCESS_DENIED_ERROR or ER_COLUMNACCESS_DENIED_ERROR are used. I am sure you have done it yourself already :) There is only one problem. - eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'.'%-.192s'" you've added a new %s argument to an existing error message. Generally it's something we are never supposed to do. It makes error message files backward incompatible - old mysqld running on new .sys files will most certainly crash. In our - MariaDB - case it also means that running vanilla MySQL on our .sys files will crash too. I'd prefer you to keep old error message untouched, even if inconvenient. Two possible solutions. Add new error message with the table and db name. Or use an utility formatting function, like my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), "ANY", thd->security_ctx->priv_user, - thd->security_ctx->host_or_ip, field_name, tab); + thd->security_ctx->host_or_ip, field_name, format_name(db, tab, buf)); where format_name() will do something like sprintf(buf, "%s'.'%s", db, tab); return buf; This second solution is, I think, preferred, as it simplifies future merges of errmst.txt - in particular, it won't cause problems with shifted error numbers.
MWL#152: Show database name in error messages - Add database name to ER_TABLEACCESS_DENIED_ERROR and ER_COLUMNACCESS_DENIED_ERROR message strings. - Amend the code to provide db name - Update test results
Regards, Sergei
participants (2)
-
Sergei Golubchik
-
Sergey Petrunya