/[packages]/cauldron/mariadb/current/SOURCES/mariadb-5.5-fix_offset_of_variable.patch
ViewVC logotype

Contents of /cauldron/mariadb/current/SOURCES/mariadb-5.5-fix_offset_of_variable.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 185579 - (show annotations) (download)
Wed Dec 21 22:59:26 2011 UTC (8 years, 7 months ago) by alien
File size: 1016 byte(s)
forgot to add the patch (SILENT)
1 diff -Naur 5.5_orig/sql/sys_vars.h 5.5/sql/sys_vars.h
2 --- 5.5_orig/sql/sys_vars.h 2011-11-22 17:05:34 +0000
3 +++ 5.5/sql/sys_vars.h 2011-12-21 22:16:23 +0000
4 @@ -669,7 +669,7 @@ class Sys_var_dbug: public sys_var
5 };
6 #endif
7
8 -#define KEYCACHE_VAR(X) sys_var::GLOBAL,offsetof(KEY_CACHE, X), sizeof(((KEY_CA
9 +#define KEYCACHE_VAR(X) GLOBAL_VAR(dflt_key_cache_var.X)
10 #define keycache_var_ptr(KC, OFF) (((uchar*)(KC))+(OFF))
11 #define keycache_var(KC, OFF) (*(ulonglong*)keycache_var_ptr(KC, OFF))
12 typedef bool (*keycache_update_function)(THD *, KEY_CACHE *, ptrdiff_t, ulonglo
13 @@ -706,7 +706,8 @@ class Sys_var_keycache: public Sys_var_u
14 {
15 option.var_type|= GET_ASK_ADDR;
16 option.value= (uchar**)1; // crash me, please
17 - keycache_var(dflt_key_cache, off)= def_val;
18 + // fix an offset from global_system_variables to be an offset in KEY_CACHE
19 + offset= global_var_ptr() - (uchar*)dflt_key_cache;
20 SYSVAR_ASSERT(scope() == GLOBAL);
21 }
22 bool global_update(THD *thd, set_var *var)
23

  ViewVC Help
Powered by ViewVC 1.1.28