Commit 0869f3b8 authored by anozdrin@mysql.com's avatar anozdrin@mysql.com

Fix merge (5.0 -> 5.1) of the patch for BUG#15166/15196.

parent 4d8a51ca
...@@ -195,18 +195,16 @@ CREATE TABLE t3(col CHAR(20)); ...@@ -195,18 +195,16 @@ CREATE TABLE t3(col CHAR(20));
CREATE TABLE t4(col CHAR(20)); CREATE TABLE t4(col CHAR(20));
CREATE USER mysqltest_u1@localhost; CREATE USER mysqltest_u1@localhost;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
GRANT SUPER ON *.* TO mysqltest_u1@localhost; GRANT TRIGGER ON mysqltest_db1.* TO mysqltest_u1@localhost;
GRANT SELECT ON mysqltest_db1.t1 TO mysqltest_u1@localhost;
SET @mysqltest_var = NULL; SET @mysqltest_var = NULL;
---> connection: default ---> connection: default
use mysqltest_db1; use mysqltest_db1;
REVOKE SELECT ON mysqltest_db1.t1 FROM mysqltest_u1@localhost;
GRANT DELETE ON mysqltest_db1.* TO mysqltest_u1@localhost; GRANT DELETE ON mysqltest_db1.* TO mysqltest_u1@localhost;
SHOW GRANTS FOR mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost;
Grants for mysqltest_u1@localhost Grants for mysqltest_u1@localhost
GRANT SUPER ON *.* TO 'mysqltest_u1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost'
GRANT DELETE ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' GRANT DELETE, TRIGGER ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost'
---> connection: bug15166_u1_con ---> connection: bug15166_u1_con
use mysqltest_db1; use mysqltest_db1;
......
...@@ -5324,8 +5324,8 @@ bool Item_trigger_field::fix_fields(THD *thd, Item **items) ...@@ -5324,8 +5324,8 @@ bool Item_trigger_field::fix_fields(THD *thd, Item **items)
table_grants->want_privilege= table_grants->want_privilege=
access_type == AT_READ ? SELECT_ACL : UPDATE_ACL; access_type == AT_READ ? SELECT_ACL : UPDATE_ACL;
if (check_grant_column(thd, table_grants, triggers->table->s->db, if (check_grant_column(thd, table_grants, triggers->table->s->db.str,
triggers->table->s->table_name, field_name, triggers->table->s->table_name.str, field_name,
strlen(field_name), thd->security_ctx)) strlen(field_name), thd->security_ctx))
return TRUE; return TRUE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment