~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: lbieber
  • Date: 2010-09-26 03:23:39 UTC
  • mfrom: (1793.1.1 build)
  • Revision ID: lbieber@orisndriz08-20100926032339-59p5xxhkloa09759
Merge Monty - Beginning of catalog support, adds a default local catalog. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1808
1808
/*==========*/
1809
1809
  module::Context &context) /*!< in: Drizzle Plugin Context */
1810
1810
{
1811
 
  static char current_dir[3];   /*!< Set if using current lib */
1812
1811
  int   err;
1813
1812
  bool    ret;
1814
 
  char    *default_path;
1815
1813
  uint    format_id;
1816
1814
  InnobaseEngine *actuall_engine_ptr;
1817
1815
  const module::option_map &vm= context.getOptions();
1839
1837
  {
1840
1838
    innobase_data_home_dir= strdup(vm["data-home-dir"].as<string>().c_str());
1841
1839
  }
1842
 
 
1843
1840
  else
1844
1841
  {
1845
 
    innobase_data_home_dir= NULL;
 
1842
    innobase_data_home_dir= strdup(getDataHome().c_str());
1846
1843
  }
1847
1844
 
1848
1845
  if (vm.count("fast-shutdown"))
2122
2119
 
2123
2120
  os_innodb_umask = (ulint)internal::my_umask;
2124
2121
 
2125
 
  /* First calculate the default path for innodb_data_home_dir etc.,
2126
 
    in case the user has not given any value.
2127
 
 
2128
 
    Note that when using the embedded server, the datadirectory is not
2129
 
    necessarily the current directory of this program. */
2130
 
 
2131
 
  /* It's better to use current lib, to keep paths short */
2132
 
  current_dir[0] = FN_CURLIB;
2133
 
  current_dir[1] = FN_LIBCHAR;
2134
 
  current_dir[2] = 0;
2135
 
  default_path = current_dir;
2136
 
 
2137
 
  ut_a(default_path);
2138
2122
 
2139
2123
  /* Set InnoDB initialization parameters according to the values
2140
2124
    read from MySQL .cnf file */
2143
2127
 
2144
2128
  /* The default dir for data files is the datadir of MySQL */
2145
2129
 
2146
 
  srv_data_home = (innobase_data_home_dir ? innobase_data_home_dir :
2147
 
                   default_path);
 
2130
  srv_data_home = (char *)innobase_data_home_dir;
2148
2131
 
2149
2132
  /* Set default InnoDB data file size to 10 MB and let it be
2150
2133
    auto-extending. Thus users can use InnoDB in >= 4.0 without having
2181
2164
  }
2182
2165
  else
2183
2166
  {
2184
 
    innobase_log_group_home_dir = default_path;
 
2167
    innobase_log_group_home_dir = const_cast<char *>(getDataHome().c_str());
2185
2168
  }
2186
2169
 
2187
2170
#ifdef UNIV_LOG_ARCHIVE
6497
6480
    }
6498
6481
 
6499
6482
    snprintf(path, sizeof(path), "%s/%s%s",
6500
 
             data_home, ib_table->name, ".dfe");
 
6483
             getDataHomeCatalog().c_str(), ib_table->name, ".dfe");
6501
6484
 
6502
6485
    internal::unpack_filename(path,path);
6503
6486