~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.h

  • Committer: Brian Aker
  • Date: 2008-08-07 16:29:49 UTC
  • mfrom: (264.1.20 codestyle)
  • Revision ID: brian@tangent.org-20080807162949-7o8eyjgdn8ms3n1a
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
  bool update(THD *thd, set_var *var);
711
711
  uchar *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
712
712
  virtual void set_default(THD *thd, enum_var_type type)= 0;
713
 
  virtual CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type)= 0;
 
713
  virtual const CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type)= 0;
714
714
};
715
715
 
716
716
class sys_var_character_set_sv :public sys_var_character_set
717
717
{
718
 
  CHARSET_INFO *SV::*offset;
719
 
  CHARSET_INFO **global_default;
 
718
  const CHARSET_INFO *SV::*offset;
 
719
  const CHARSET_INFO **global_default;
720
720
public:
721
721
  sys_var_character_set_sv(sys_var_chain *chain, const char *name_arg,
722
 
                           CHARSET_INFO *SV::*offset_arg,
723
 
                           CHARSET_INFO **global_default_arg,
 
722
                           const CHARSET_INFO *SV::*offset_arg,
 
723
                           const CHARSET_INFO **global_default_arg,
724
724
                           bool is_nullable= 0,
725
725
                           Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG)
726
726
    : sys_var_character_set(name_arg, is_nullable, binlog_status_arg),
727
727
    offset(offset_arg), global_default(global_default_arg)
728
728
  { chain_sys_var(chain); }
729
729
  void set_default(THD *thd, enum_var_type type);
730
 
  CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type);
 
730
  const CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type);
731
731
};
732
732
 
733
733
 
735
735
{
736
736
public:
737
737
  sys_var_character_set_client(sys_var_chain *chain, const char *name_arg,
738
 
                               CHARSET_INFO *SV::*offset_arg,
739
 
                               CHARSET_INFO **global_default_arg,
 
738
                               const CHARSET_INFO *SV::*offset_arg,
 
739
                               const CHARSET_INFO **global_default_arg,
740
740
                               Binlog_status_enum binlog_status_arg)
741
741
    : sys_var_character_set_sv(chain, name_arg, offset_arg, global_default_arg,
742
742
                               0, binlog_status_arg)
754
754
    : sys_var_character_set(name_arg, 0, binlog_status_arg)
755
755
  { chain_sys_var(chain); }
756
756
  void set_default(THD *thd, enum_var_type type);
757
 
  CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type);
 
757
  const CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type);
758
758
};
759
759
 
760
760
class sys_var_collation_sv :public sys_var_collation
761
761
{
762
 
  CHARSET_INFO *SV::*offset;
763
 
  CHARSET_INFO **global_default;
 
762
  const CHARSET_INFO *SV::*offset;
 
763
  const CHARSET_INFO **global_default;
764
764
public:
765
765
  sys_var_collation_sv(sys_var_chain *chain, const char *name_arg,
766
 
                       CHARSET_INFO *SV::*offset_arg,
767
 
                       CHARSET_INFO **global_default_arg,
 
766
                       const CHARSET_INFO *SV::*offset_arg,
 
767
                       const CHARSET_INFO **global_default_arg,
768
768
                       Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG)
769
769
    :sys_var_collation(name_arg, binlog_status_arg),
770
770
    offset(offset_arg), global_default(global_default_arg)
1151
1151
  enum_var_type type;
1152
1152
  union
1153
1153
  {
1154
 
    CHARSET_INFO *charset;
 
1154
    const CHARSET_INFO *charset;
1155
1155
    ulong ulong_value;
1156
1156
    uint64_t uint64_t_value;
1157
1157
    plugin_ref plugin;
1203
1203
 
1204
1204
class set_var_collation_client: public set_var_base
1205
1205
{
1206
 
  CHARSET_INFO *character_set_client;
1207
 
  CHARSET_INFO *character_set_results;
1208
 
  CHARSET_INFO *collation_connection;
 
1206
  const CHARSET_INFO *character_set_client;
 
1207
  const CHARSET_INFO *character_set_results;
 
1208
  const CHARSET_INFO *collation_connection;
1209
1209
public:
1210
 
  set_var_collation_client(CHARSET_INFO *client_coll_arg,
1211
 
                           CHARSET_INFO *connection_coll_arg,
1212
 
                           CHARSET_INFO *result_coll_arg)
 
1210
  set_var_collation_client(const CHARSET_INFO * const client_coll_arg,
 
1211
                           const CHARSET_INFO * const connection_coll_arg,
 
1212
                           const CHARSET_INFO * const result_coll_arg)
1213
1213
    :character_set_client(client_coll_arg),
1214
1214
     character_set_results(result_coll_arg),
1215
1215
     collation_connection(connection_coll_arg)
1286
1286
extern sys_var_str sys_init_slave;
1287
1287
extern sys_var_thd_time_zone sys_time_zone;
1288
1288
extern sys_var_thd_bit sys_autocommit;
1289
 
CHARSET_INFO *get_old_charset_by_name(const char *old_name);
 
1289
const CHARSET_INFO *get_old_charset_by_name(const char *old_name);
1290
1290
uchar* find_named(I_List<NAMED_LIST> *list, const char *name, uint length,
1291
1291
                NAMED_LIST **found);
1292
1292