~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.h

  • Committer: Stewart Smith
  • Date: 2009-03-12 12:27:04 UTC
  • mto: (937.2.1 sparc)
  • mto: This revision was merged to the branch mainline in revision 932.
  • Revision ID: stewart@flamingspork.com-20090312122704-ts5lnnj5qm87g58j
fix alignment of variables (incl key cache). fixes SIGBUS on SPARC64

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
  bool check(Session *session, set_var *var);
162
162
  bool update(Session *session, set_var *var);
163
163
  void set_default(Session *session, enum_var_type type);
164
 
  SHOW_TYPE show_type() { return SHOW_LONG; }
 
164
  SHOW_TYPE show_type() { return SHOW_INT; }
165
165
  unsigned char *value_ptr(Session *, enum_var_type, const LEX_STRING *)
166
166
  { return (unsigned char*) value; }
167
167
};
413
413
  bool check(Session *session, set_var *var);
414
414
  bool update(Session *session, set_var *var);
415
415
  void set_default(Session *session, enum_var_type type);
416
 
  SHOW_TYPE show_type() { return SHOW_LONG; }
 
416
  SHOW_TYPE show_type() { return SHOW_INT; }
417
417
  unsigned char *value_ptr(Session *session, enum_var_type type,
418
418
                           const LEX_STRING *base);
419
419
};
748
748
};
749
749
 
750
750
 
751
 
class sys_var_key_cache_long :public sys_var_key_cache_param
 
751
class sys_var_key_cache_uint32_t :public sys_var_key_cache_param
752
752
{
753
753
public:
754
 
  sys_var_key_cache_long(sys_var_chain *chain, const char *name_arg, size_t offset_arg)
 
754
  sys_var_key_cache_uint32_t(sys_var_chain *chain, const char *name_arg, size_t offset_arg)
755
755
    :sys_var_key_cache_param(chain, name_arg, offset_arg)
756
756
  {}
757
757
  bool update(Session *session, set_var *var);
758
 
  SHOW_TYPE show_type() { return SHOW_LONG; }
 
758
  SHOW_TYPE show_type() { return SHOW_INT; }
759
759
};
760
760
 
761
761
/* Variable that you can only read from */