diff options
author | unknown <guilhem@mysql.com> | 2003-08-02 16:11:39 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2003-08-02 16:11:39 +0200 |
commit | b1c56d68e9c56abd335515dcc6cad3026f39a2ad (patch) | |
tree | 62cc0a23cf9a903960f4a27bf6693125d1df5dc5 /sql/sql_acl.cc | |
parent | 964569510899d778917849c4a9984cc3f2ab3b16 (diff) | |
parent | 5a696ebd164f3e9dcf9edad1a5702d54961d6049 (diff) | |
download | mariadb-git-b1c56d68e9c56abd335515dcc6cad3026f39a2ad.tar.gz |
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
sql/sql_acl.cc:
Auto merged
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 1f311e651dd..fd7ea5aac51 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2113,8 +2113,17 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, GRANT and REVOKE are applied the slave in/exclusion rules as they are some kind of updates to the mysql.% tables. */ - if (thd->slave_thread && table_rules_on && !tables_ok(0, tables)) - DBUG_RETURN(0); + if (thd->slave_thread && table_rules_on) + { + /* + The tables must be marked "updating" so that tables_ok() takes them into + account in tests. + */ + tables[0].updating=tables[1].updating=tables[2].updating=1; + if (!tables_ok(0, tables)) + DBUG_RETURN(0); + tables[0].updating=tables[1].updating=tables[2].updating=0; + } #endif if (open_and_lock_tables(thd,tables)) @@ -2285,8 +2294,17 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list, GRANT and REVOKE are applied the slave in/exclusion rules as they are some kind of updates to the mysql.% tables. */ - if (thd->slave_thread && table_rules_on && !tables_ok(0, tables)) - DBUG_RETURN(0); + if (thd->slave_thread && table_rules_on) + { + /* + The tables must be marked "updating" so that tables_ok() takes them into + account in tests. + */ + tables[0].updating=tables[1].updating=1; + if (!tables_ok(0, tables)) + DBUG_RETURN(0); + tables[0].updating=tables[1].updating=0; + } #endif if (open_and_lock_tables(thd,tables)) |