~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

  • Committer: Brian Aker
  • Date: 2009-02-26 05:21:02 UTC
  • mfrom: (896.1.5 fix-osxs)
  • Revision ID: brian@intel-mini-2.local-20090226052102-8xtbjt8kph6mi0qx
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
sys_collation_server(&vars, "collation_server", &SV::collation_server,
154
154
                     &default_charset_info,
155
155
                     sys_var::SESSION_VARIABLE_IN_BINLOG);
156
 
static sys_var_long_ptr sys_connect_timeout(&vars, "connect_timeout",
157
 
                                            &connect_timeout);
 
156
static sys_var_uint32_t_ptr     sys_connect_timeout(&vars, "connect_timeout",
 
157
                                                &connect_timeout);
158
158
static sys_var_const_str       sys_datadir(&vars, "datadir", drizzle_real_data_home);
159
159
static sys_var_enum             sys_delay_key_write(&vars, "delay_key_write",
160
160
                                            &delay_key_write_options,
701
701
    var->save_result.uint64_t_value= (size_t) var->value->val_int();
702
702
  else
703
703
  {
704
 
    ssize_t v= var->value->val_int();
 
704
    ssize_t v= (ssize_t)var->value->val_int();
705
705
    var->save_result.uint64_t_value= (size_t) ((v < 0) ? 0 : v);
706
706
  }
707
707
  return 0;
769
769
{
770
770
  bool not_used;
771
771
  pthread_mutex_lock(&LOCK_global_system_variables);
772
 
  *value= getopt_ull_limit_value((uint32_t) option_limits->def_value,
773
 
                                 option_limits, &not_used);
 
772
  *value= (uint32_t)getopt_ull_limit_value((uint32_t) option_limits->def_value,
 
773
                                           option_limits, &not_used);
774
774
  pthread_mutex_unlock(&LOCK_global_system_variables);
775
775
}
776
776
 
1051
1051
    bool not_used;
1052
1052
    pthread_mutex_lock(&LOCK_global_system_variables);
1053
1053
    global_system_variables.*offset=
1054
 
      getopt_ull_limit_value((size_t) option_limits->def_value,
1055
 
                             option_limits, &not_used);
 
1054
      (size_t)getopt_ull_limit_value((size_t) option_limits->def_value,
 
1055
                                     option_limits, &not_used);
1056
1056
    pthread_mutex_unlock(&LOCK_global_system_variables);
1057
1057
  }
1058
1058
  else
2594
2594
                                                           const LEX_STRING *)
2595
2595
{
2596
2596
  LEX_STRING opts;
2597
 
  uint64_t val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
 
2597
  uint32_t val= ((type == OPT_GLOBAL) ? global_system_variables.*offset :
2598
2598
                  session->variables.*offset);
2599
2599
  (void) symbolic_mode_representation(session, val, &opts);
2600
2600
  return (unsigned char *) opts.str;