~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sys_var.cc

  • Committer: Brian Aker
  • Date: 2011-07-25 14:24:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2373.
  • Revision ID: brian@tangent.org-20110725142419-3vobv9u6k7jp4qej
Remove the typedef on lexkey

Show diffs side-by-side

added added

removed removed

Lines of Context:
630
630
 
631
631
unsigned char *sys_var_session_uint32_t::value_ptr(Session *session,
632
632
                                                sql_var_t type,
633
 
                                                const LEX_STRING *)
 
633
                                                const lex_string_t *)
634
634
{
635
635
  if (type == OPT_GLOBAL)
636
636
    return (unsigned char*) &(global_system_variables.*offset);
682
682
 
683
683
unsigned char *sys_var_session_ha_rows::value_ptr(Session *session,
684
684
                                                  sql_var_t type,
685
 
                                                  const LEX_STRING *)
 
685
                                                  const lex_string_t *)
686
686
{
687
687
  if (type == OPT_GLOBAL)
688
688
    return (unsigned char*) &(global_system_variables.*offset);
740
740
 
741
741
unsigned char *sys_var_session_uint64_t::value_ptr(Session *session,
742
742
                                                   sql_var_t type,
743
 
                                                   const LEX_STRING *)
 
743
                                                   const lex_string_t *)
744
744
{
745
745
  if (type == OPT_GLOBAL)
746
746
    return (unsigned char*) &(global_system_variables.*offset);
795
795
 
796
796
unsigned char *sys_var_session_size_t::value_ptr(Session *session,
797
797
                                                 sql_var_t type,
798
 
                                                 const LEX_STRING *)
 
798
                                                 const lex_string_t *)
799
799
{
800
800
  if (type == OPT_GLOBAL)
801
801
    return (unsigned char*) &(global_system_variables.*offset);
829
829
 
830
830
unsigned char *sys_var_session_bool::value_ptr(Session *session,
831
831
                                               sql_var_t type,
832
 
                                               const LEX_STRING *)
 
832
                                               const lex_string_t *)
833
833
{
834
834
  if (type == OPT_GLOBAL)
835
835
    return (unsigned char*) &(global_system_variables.*offset);
888
888
  If type is not given, return local value if exists, else global.
889
889
*/
890
890
 
891
 
Item *sys_var::item(Session *session, sql_var_t var_type, const LEX_STRING *base)
 
891
Item *sys_var::item(Session *session, sql_var_t var_type, const lex_string_t *base)
892
892
{
893
893
  if (check_type(var_type))
894
894
  {
1015
1015
 
1016
1016
unsigned char *sys_var_session_enum::value_ptr(Session *session,
1017
1017
                                               sql_var_t type,
1018
 
                                               const LEX_STRING *)
 
1018
                                               const lex_string_t *)
1019
1019
{
1020
1020
  uint32_t tmp= ((type == OPT_GLOBAL) ?
1021
1021
              global_system_variables.*offset :
1037
1037
 
1038
1038
 
1039
1039
unsigned char *sys_var_session_bit::value_ptr(Session *session, sql_var_t,
1040
 
                                              const LEX_STRING *)
 
1040
                                              const lex_string_t *)
1041
1041
{
1042
1042
  /*
1043
1043
    If reverse is 0 (default) return 1 if bit is set.
1103
1103
 
1104
1104
unsigned char *sys_var_collation_sv::value_ptr(Session *session,
1105
1105
                                               sql_var_t type,
1106
 
                                               const LEX_STRING *)
 
1106
                                               const lex_string_t *)
1107
1107
{
1108
1108
  const charset_info_st *cs= ((type == OPT_GLOBAL) ?
1109
1109
                           global_system_variables.*offset :
1127
1127
 
1128
1128
 
1129
1129
unsigned char *sys_var_timestamp::value_ptr(Session *session, sql_var_t,
1130
 
                                            const LEX_STRING *)
 
1130
                                            const lex_string_t *)
1131
1131
{
1132
1132
  session->sys_var_tmp.int32_t_value= (int32_t) session->times.getCurrentTimestampEpoch();
1133
1133
  return (unsigned char*) &session->sys_var_tmp.int32_t_value;
1143
1143
 
1144
1144
unsigned char *sys_var_last_insert_id::value_ptr(Session *session,
1145
1145
                                                 sql_var_t,
1146
 
                                                 const LEX_STRING *)
 
1146
                                                 const lex_string_t *)
1147
1147
{
1148
1148
  /*
1149
1149
    this tmp var makes it robust againt change of type of
1196
1196
 
1197
1197
unsigned char *sys_var_session_lc_time_names::value_ptr(Session *session,
1198
1198
                                                        sql_var_t type,
1199
 
                                                        const LEX_STRING *)
 
1199
                                                        const lex_string_t *)
1200
1200
{
1201
1201
  return type == OPT_GLOBAL ?
1202
1202
                 (unsigned char *) global_system_variables.lc_time_names->name :
1569
1569
 
1570
1570
unsigned char *sys_var_session_storage_engine::value_ptr(Session *session,
1571
1571
                                                         sql_var_t type,
1572
 
                                                         const LEX_STRING *)
 
1572
                                                         const lex_string_t *)
1573
1573
{
1574
1574
  plugin::StorageEngine *engine= session->variables.*offset;
1575
1575
  if (type == OPT_GLOBAL)