diff options
author | unknown <evgen@sunlight.local> | 2006-08-15 21:45:24 +0400 |
---|---|---|
committer | unknown <evgen@sunlight.local> | 2006-08-15 21:45:24 +0400 |
commit | a23d1792bc48c55eb8bee2f3aa947b9599ade190 (patch) | |
tree | a81bf82a292cd0862ecfaedcf0c1317a9ccdb0a7 /sql/sql_load.cc | |
parent | 51bb3b2a7f906af25b5dd0ef91491aa415615a4b (diff) | |
download | mariadb-git-a23d1792bc48c55eb8bee2f3aa947b9599ade190.tar.gz |
Fixed bug#21261: Wrong access rights was required for an insert into a view
SELECT right instead of INSERT right was required for an insert into to a view.
This wrong behaviour appeared after the fix for bug #20989. Its intention was
to ask only SELECT right for all tables except the very first for a complex
INSERT query. But that patch has done it in a wrong way and lead to asking
a wrong access right for an insert into a view.
The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.
mysql-test/t/view.test:
Added a test case for bug#21261: Wrong access rights was required for an insert into a view
mysql-test/r/view.result:
Added a test case for bug#21261: Wrong access rights was required for an insert into a view
sql/sql_update.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_select.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_load.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_insert.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_delete.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
Modified to use updated setup_tables_and_check_access() function.
sql/sql_base.cc:
Fixed bug#21261: Wrong access rights was required for an insert into a view
The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.
sql/mysql_priv.h:
Fixed bug#21261: Wrong access rights was required for an insert into a view
The setup_tables_and_check_access() function now accepts two want_access
parameters.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 40e1e6b07aa..b1ba2e96651 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -157,6 +157,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, &thd->lex->select_lex.top_join_list, table_list, &unused_conds, &thd->lex->select_lex.leaf_tables, FALSE, + INSERT_ACL | UPDATE_ACL, INSERT_ACL | UPDATE_ACL)) DBUG_RETURN(-1); if (!table_list->table || // do not suport join view |