Proper fix for SHOW VARS on 64-bit systems

parent 2c7c1976
......@@ -3110,7 +3110,7 @@ struct show_var_st init_vars[]= {
#endif
{"interactive_timeout", (char*) &net_interactive_timeout, SHOW_LONG},
{"join_buffer_size", (char*) &join_buff_size, SHOW_LONG},
{"key_buffer_size", (char*) &keybuff_size, SHOW_LONG},
{"key_buffer_size", (char*) &keybuff_size, SHOW_LONG_AS_LONGLONG},
{"language", language, SHOW_CHAR},
{"large_files_support", (char*) &opt_large_files, SHOW_BOOL},
#ifdef HAVE_MLOCKALL
......
......@@ -1145,7 +1145,10 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables)
switch (variables[i].type){
case SHOW_LONG:
case SHOW_LONG_CONST:
net_store_data(&packet2,(int32) *(ulong*) variables[i].value);
net_store_data(&packet2,(uint32) *(ulong*) variables[i].value);
break;
case SHOW_LONG_AS_LONGLONG:
net_store_data(&packet2,(longlong) *(ulong*) variables[i].value);
break;
case SHOW_BOOL:
net_store_data(&packet2,(ulong) *(bool*) variables[i].value ?
......
......@@ -125,7 +125,7 @@ typedef struct {
enum SHOW_TYPE { SHOW_LONG,SHOW_CHAR,SHOW_INT,SHOW_CHAR_PTR,SHOW_BOOL,
SHOW_MY_BOOL,SHOW_OPENTABLES,SHOW_STARTTIME,SHOW_QUESTION,
SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE};
SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_LONG_AS_LONGLONG};
enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment