summaryrefslogtreecommitdiff
path: root/sql/keycaches.cc
diff options
context:
space:
mode:
authorDaniel Black <danielgb@au.ibm.com>2018-02-25 15:25:54 +1100
committerGitHub <noreply@github.com>2018-02-25 15:25:54 +1100
commit0805a9565f09a36104a420d9e229e44b1eea8879 (patch)
tree5c5dbf942479c2b7349f1b4505768ddf5a2f8b8d /sql/keycaches.cc
parent3188131b15c26509e4df3c4b15972d07a20be8bd (diff)
parent8936b175106a3fdfc560e9d33aa58a6372084c5f (diff)
downloadmariadb-git-0805a9565f09a36104a420d9e229e44b1eea8879.tar.gz
Merge branch '10.3' into 10.2-MDEV-10814-dont-dump-query-cache
Diffstat (limited to 'sql/keycaches.cc')
-rw-r--r--sql/keycaches.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/sql/keycaches.cc b/sql/keycaches.cc
index 6de775d3f2d..9db51ee1801 100644
--- a/sql/keycaches.cc
+++ b/sql/keycaches.cc
@@ -30,17 +30,17 @@ class NAMED_ILINK :public ilink
{
public:
const char *name;
- uint name_length;
+ size_t name_length;
uchar* data;
NAMED_ILINK(I_List<NAMED_ILINK> *links, const char *name_arg,
- uint name_length_arg, uchar* data_arg)
+ size_t name_length_arg, uchar* data_arg)
:name_length(name_length_arg), data(data_arg)
{
name= my_strndup(name_arg, name_length, MYF(MY_WME));
links->push_back(this);
}
- inline bool cmp(const char *name_cmp, uint length)
+ inline bool cmp(const char *name_cmp, size_t length)
{
return length == name_length && !memcmp(name, name_cmp, length);
}
@@ -50,7 +50,7 @@ public:
}
};
-uchar* find_named(I_List<NAMED_ILINK> *list, const char *name, uint length,
+uchar* find_named(I_List<NAMED_ILINK> *list, const char *name, size_t length,
NAMED_ILINK **found)
{
I_List_iterator<NAMED_ILINK> it(*list);
@@ -68,7 +68,7 @@ uchar* find_named(I_List<NAMED_ILINK> *list, const char *name, uint length,
}
-bool NAMED_ILIST::delete_element(const char *name, uint length, void (*free_element)(const char *name, uchar*))
+bool NAMED_ILIST::delete_element(const char *name, size_t length, void (*free_element)(const char *name, uchar*))
{
I_List_iterator<NAMED_ILINK> it(*this);
NAMED_ILINK *element;
@@ -100,7 +100,7 @@ void NAMED_ILIST::delete_elements(void (*free_element)(const char *name, uchar*)
/* Key cache functions */
-LEX_CSTRING default_key_cache_base= {C_STRING_WITH_LEN("default")};
+LEX_CSTRING default_key_cache_base= {STRING_WITH_LEN("default")};
KEY_CACHE zero_key_cache; ///< @@nonexistent_cache.param->value_ptr() points here
@@ -112,11 +112,11 @@ KEY_CACHE *get_key_cache(const LEX_CSTRING *cache_name)
cache_name->str, cache_name->length, 0));
}
-KEY_CACHE *create_key_cache(const char *name, uint length)
+KEY_CACHE *create_key_cache(const char *name, size_t length)
{
KEY_CACHE *key_cache;
DBUG_ENTER("create_key_cache");
- DBUG_PRINT("enter",("name: %.*s", length, name));
+ DBUG_PRINT("enter",("name: %.*s", (int)length, name));
if ((key_cache= (KEY_CACHE*) my_malloc(sizeof(KEY_CACHE),
MYF(MY_ZEROFILL | MY_WME))))
@@ -144,7 +144,7 @@ KEY_CACHE *create_key_cache(const char *name, uint length)
}
-KEY_CACHE *get_or_create_key_cache(const char *name, uint length)
+KEY_CACHE *get_or_create_key_cache(const char *name, size_t length)
{
LEX_CSTRING key_cache_name;
KEY_CACHE *key_cache;
@@ -180,9 +180,9 @@ bool process_key_caches(process_key_cache_t func, void *param)
/* Rpl_filter functions */
-LEX_STRING default_rpl_filter_base= {C_STRING_WITH_LEN("")};
+LEX_CSTRING default_rpl_filter_base= {STRING_WITH_LEN("")};
-Rpl_filter *get_rpl_filter(LEX_STRING *filter_name)
+Rpl_filter *get_rpl_filter(LEX_CSTRING *filter_name)
{
if (!filter_name->length)
filter_name= &default_rpl_filter_base;
@@ -190,11 +190,11 @@ Rpl_filter *get_rpl_filter(LEX_STRING *filter_name)
filter_name->str, filter_name->length, 0));
}
-Rpl_filter *create_rpl_filter(const char *name, uint length)
+Rpl_filter *create_rpl_filter(const char *name, size_t length)
{
Rpl_filter *filter;
DBUG_ENTER("create_rpl_filter");
- DBUG_PRINT("enter",("name: %.*s", length, name));
+ DBUG_PRINT("enter",("name: %.*s", (int)length, name));
filter= new Rpl_filter;
if (filter)
@@ -209,9 +209,9 @@ Rpl_filter *create_rpl_filter(const char *name, uint length)
}
-Rpl_filter *get_or_create_rpl_filter(const char *name, uint length)
+Rpl_filter *get_or_create_rpl_filter(const char *name, size_t length)
{
- LEX_STRING rpl_filter_name;
+ LEX_CSTRING rpl_filter_name;
Rpl_filter *filter;
rpl_filter_name.str= (char *) name;