~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Stewart Smith
  • Date: 2008-12-16 01:06:08 UTC
  • mfrom: (685 testable)
  • mto: This revision was merged to the branch mainline in revision 691.
  • Revision ID: stewart@flamingspork.com-20081216010608-s5mhsjcl4fz7c4by
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
392
392
uint32_t drizzle_data_home_len;
393
393
char drizzle_data_home_buff[2], *drizzle_data_home=drizzle_real_data_home;
394
394
char server_version[SERVER_VERSION_LENGTH];
395
 
char *opt_drizzle_tmpdir;
 
395
char *drizzle_tmpdir= NULL;
 
396
char *opt_drizzle_tmpdir= NULL;
396
397
const char *myisam_recover_options_str="OFF";
397
398
const char *myisam_stats_method_str="nulls_unequal";
398
399
 
414
415
struct system_variables max_system_variables;
415
416
struct system_status_var global_status_var;
416
417
 
417
 
MY_TMPDIR drizzle_tmpdir_list;
418
418
MY_BITMAP temp_pool;
419
419
 
420
420
const CHARSET_INFO *system_charset_info, *files_charset_info ;
832
832
    free_defaults(defaults_argv);
833
833
  free(sys_init_connect.value);
834
834
  free(sys_init_slave.value);
835
 
  free_tmpdir(&drizzle_tmpdir_list);
 
835
  free(drizzle_tmpdir);
836
836
  free(slave_load_tmpdir);
837
837
  if (opt_bin_logname)
838
838
    free(opt_bin_logname);
3170
3170
   (char**) &timed_mutexes, (char**) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0,
3171
3171
    0, 0, 0, 0, 0},
3172
3172
  {"tmpdir", 't',
3173
 
   N_("Path for temporary files. Several paths may be specified, separated "
3174
 
      "by a colon (:)"
3175
 
      ", in this case they are used in a round-robin fashion."),
 
3173
   N_("Path for temporary files."),
3176
3174
   (char**) &opt_drizzle_tmpdir,
3177
3175
   (char**) &opt_drizzle_tmpdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3178
3176
  {"transaction-isolation", OPT_TX_ISOLATION,
3924
3922
  binlog_cache_use=  binlog_cache_disk_use= 0;
3925
3923
  max_used_connections= slow_launch_threads = 0;
3926
3924
  drizzled_user= drizzled_chroot= opt_init_file= opt_bin_logname = 0;
3927
 
  opt_drizzle_tmpdir= my_bind_addr_str= NULL;
3928
 
  memset(&drizzle_tmpdir_list, 0, sizeof(drizzle_tmpdir_list));
 
3925
  my_bind_addr_str= NULL;
3929
3926
  memset(&global_status_var, 0, sizeof(global_status_var));
3930
3927
  key_map_full.set_all();
3931
3928
 
4415
4412
  convert_dirname(drizzle_charsets_dir, drizzle_charsets_dir, NULL);
4416
4413
  charsets_dir=drizzle_charsets_dir;
4417
4414
 
4418
 
  if (init_tmpdir(&drizzle_tmpdir_list, opt_drizzle_tmpdir))
4419
 
    exit(1);
 
4415
  {
 
4416
    char *tmp_string;
 
4417
    struct stat buf;
 
4418
 
 
4419
    tmp_string= getenv("TMPDIR");
 
4420
 
 
4421
    if (opt_drizzle_tmpdir)
 
4422
      drizzle_tmpdir= strdup(opt_drizzle_tmpdir);
 
4423
    else if (tmp_string == NULL)
 
4424
      drizzle_tmpdir= strdup(P_tmpdir);
 
4425
    else
 
4426
      drizzle_tmpdir= strdup(tmp_string);
 
4427
 
 
4428
    assert(drizzle_tmpdir);
 
4429
 
 
4430
    if (stat(drizzle_tmpdir, &buf) || (S_ISDIR(buf.st_mode) == false))
 
4431
    {
 
4432
      exit(1);
 
4433
    }
 
4434
  }
 
4435
 
4420
4436
  if (!slave_load_tmpdir)
4421
4437
  {
4422
4438
    if (!(slave_load_tmpdir = (char*) strdup(drizzle_tmpdir)))