From ba8fa76fa20f400d8adfe2aa14231a682df9ba79 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Fri, 26 Sep 2003 15:33:13 +0500 Subject: SCRUM: WL#604 Privileges in embedded library code added to check privileges in embedded library NO_EMBEDDED_ACCESS_CHECKS macros inserted in code so we can exclude access-checking parts. Actually we now can exclude these parts from standalone server as well. Do we need it? Access checks are disabled in embedded server by default. One should edit libmysqld/Makefile manually to get this working. We definitely need the separate configure for embedded server --- sql/sql_cache.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_cache.cc') diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index f7742c6b7a7..9e3d00c27b1 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1002,6 +1002,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) Query_cache_table *table = block_table->parent; table_list.db = table->db(); table_list.alias= table_list.real_name= table->table(); +#ifndef NO_EMBEDDED_ACCESS_CHECKS if (check_table_access(thd,SELECT_ACL,&table_list,1)) { DBUG_PRINT("qcache", @@ -1021,6 +1022,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) thd->lex.safe_to_cache_query= 0; // Don't try to cache this goto err_unlock; // Parse query } +#endif /*!NO_EMBEDDED_ACCESS_CHECKS*/ if (check_tables && !handler::caching_allowed(thd, table->db(), table->key_length(), table->type())) -- cgit v1.2.1