1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1

into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/grant.result:
  Manual merge
mysql-test/t/grant.test:
  Manual merge
This commit is contained in:
unknown
2007-12-07 03:56:03 -07:00
73 changed files with 1221 additions and 258 deletions

View File

@ -7025,8 +7025,15 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
bool error= TRUE; // Error message is given
DBUG_ENTER("create_table_precheck");
/*
Require CREATE [TEMPORARY] privilege on new table; for
CREATE TABLE ... SELECT, also require INSERT.
*/
want_priv= ((lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) ?
CREATE_TMP_ACL : CREATE_ACL);
CREATE_TMP_ACL : CREATE_ACL) |
(select_lex->item_list.elements ? INSERT_ACL : 0);
if (check_access(thd, want_priv, create_table->db,
&create_table->grant.privilege, 0, 0,
test(create_table->schema_table)) ||