mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge mysql.com:/home/stewart/Documents/MySQL/5.0/main
into mysql.com:/home/stewart/Documents/MySQL/5.1/main mysql-test/r/ndb_condition_pushdown.result: Auto merged mysql-test/r/type_newdecimal.result: Auto merged mysql-test/r/view_grant.result: Auto merged mysql-test/t/ndb_condition_pushdown.test: Auto merged mysql-test/t/type_newdecimal.test: Auto merged mysql-test/t/view_grant.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/sql_parse.cc: Auto merged mysql-test/valgrind.supp: Manual merge
This commit is contained in:
@@ -5201,7 +5201,14 @@ bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables)
|
||||
if (all_tables->security_ctx)
|
||||
thd->security_ctx= all_tables->security_ctx;
|
||||
|
||||
if (check_access(thd, privilege, all_tables->db,
|
||||
const char *db_name;
|
||||
if ((all_tables->view || all_tables->field_translation) &&
|
||||
!all_tables->schema_table)
|
||||
db_name= all_tables->view_db.str;
|
||||
else
|
||||
db_name= all_tables->db;
|
||||
|
||||
if (check_access(thd, privilege, db_name,
|
||||
&all_tables->grant.privilege, 0, 0,
|
||||
test(all_tables->schema_table)))
|
||||
goto deny;
|
||||
|
||||
Reference in New Issue
Block a user