summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorhf@deer.(none) <>2003-09-26 15:33:13 +0500
committerhf@deer.(none) <>2003-09-26 15:33:13 +0500
commitba8fa76fa20f400d8adfe2aa14231a682df9ba79 (patch)
treef4b60e9394c6d88f0bd04731d87ae6203e987e3b /sql/sql_cache.cc
parent7dd4cb58d64e55a72283e33deeadf8fa2ed38e56 (diff)
downloadmariadb-git-ba8fa76fa20f400d8adfe2aa14231a682df9ba79.tar.gz
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
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc2
1 files changed, 2 insertions, 0 deletions
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()))