Skip to content

Commit 9d1ce6a

Browse files
author
Tor Didriksen
committed
merge 5.5 => 5.6
2 parents 9f45ec3 + 966e1a4 commit 9d1ce6a

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

cmake/dtrace.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -157,7 +157,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
157157
FOREACH(lib ${libs})
158158
GET_TARGET_PROPERTY(libtype ${lib} TYPE)
159159
IF(libtype MATCHES STATIC_LIBRARY)
160-
SET(static_libs ${static_lics} ${lib})
160+
SET(static_libs ${static_libs} ${lib})
161161
ENDIF()
162162
ENDFOREACH()
163163

sql/sys_vars.h

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -128,7 +128,11 @@ class Sys_var_integer: public sys_var
128128
option.u_max_value= (uchar**)max_var_ptr();
129129
if (max_var_ptr())
130130
*max_var_ptr()= max_val;
131-
global_var(T)= def_val;
131+
132+
// Do not set global_var for Sys_var_keycache objects
133+
if (offset >= 0)
134+
global_var(T)= def_val;
135+
132136
DBUG_ASSERT(size == sizeof(T));
133137
DBUG_ASSERT(min_val < max_val);
134138
DBUG_ASSERT(min_val <= def_val);
@@ -726,12 +730,15 @@ class Sys_var_keycache: public Sys_var_ulonglong
726730
on_check_function on_check_func,
727731
keycache_update_function on_update_func,
728732
const char *substitute=0)
729-
: Sys_var_ulonglong(name_arg, comment, flag_args, off, size,
730-
getopt, min_val, max_val, def_val,
731-
block_size, lock, binlog_status_arg, on_check_func, 0,
732-
substitute),
733+
: Sys_var_ulonglong(name_arg, comment, flag_args,
734+
-1, /* offset, see base class CTOR */
735+
size,
736+
getopt, min_val, max_val, def_val,
737+
block_size, lock, binlog_status_arg, on_check_func, 0,
738+
substitute),
733739
keycache_update(on_update_func)
734740
{
741+
offset= off; /* Remember offset in KEY_CACHE */
735742
option.var_type|= GET_ASK_ADDR;
736743
option.value= (uchar**)1; // crash me, please
737744
keycache_var(dflt_key_cache, off)= def_val;

0 commit comments

Comments
 (0)