Merge with global tree

BitKeeper/etc/logging_ok:
  auto-union
client/mysqltest.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/include/dict0dict.h:
  Auto merged
libmysql/errmsg.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/derived.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
scripts/mysql_install_db.sh:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.h:
  Auto merged
This commit is contained in:
unknown 2004-12-31 00:50:30 +02:00
commit 12a215b083
427 changed files with 12029 additions and 25710 deletions

View file

@ -26,7 +26,6 @@
*/
#include "mysql_priv.h"
#include "sql_acl.h"
#include "hash_filo.h"
#ifdef HAVE_REPLICATION
#include "sql_repl.h" //for tables_ok()
@ -3357,15 +3356,17 @@ err:
bool check_grant_column(THD *thd, GRANT_INFO *grant,
char*db_name, char *table_name,
char *db_name, char *table_name,
const char *name, uint length, uint show_tables)
{
GRANT_TABLE *grant_table;
GRANT_COLUMN *grant_column;
ulong want_access= grant->want_privilege & ~grant->privilege;
DBUG_ENTER("check_grant_column");
DBUG_PRINT("enter", ("table: %s want_access: %u", table_name, want_access));
if (!want_access)
return 0; // Already checked
DBUG_RETURN(0); // Already checked
rw_rdlock(&LOCK_grant);
@ -3376,7 +3377,7 @@ bool check_grant_column(THD *thd, GRANT_INFO *grant,
grant->grant_table=
table_hash_search(thd->host, thd->ip, db_name,
thd->priv_user,
table_name, 0); /* purecov: inspected */
table_name, 0); /* purecov: inspected */
grant->version= grant_version; /* purecov: inspected */
}
if (!(grant_table= grant->grant_table))
@ -3386,13 +3387,13 @@ bool check_grant_column(THD *thd, GRANT_INFO *grant,
if (grant_column && !(~grant_column->rights & want_access))
{
rw_unlock(&LOCK_grant);
return 0;
DBUG_RETURN(0);
}
#ifdef NOT_USED
if (show_tables && (grant_column || grant->privilege & COL_ACLS))
{
rw_unlock(&LOCK_grant); /* purecov: deadcode */
return 0; /* purecov: deadcode */
DBUG_RETURN(0); /* purecov: deadcode */
}
#endif
@ -3409,7 +3410,7 @@ err:
name,
table_name);
}
return 1;
DBUG_RETURN(1);
}