59
63
using namespace drizzled;
60
64
using namespace std;
65
namespace fs=boost::filesystem;
62
67
static pthread_t select_thread;
63
68
static uint32_t thr_kill_signal;
66
72
All global error messages are sent here where the first one is stored
241
247
select_thread=pthread_self();
242
248
select_thread_in_use=1;
244
if (chdir(data_home_real) && !opt_help)
246
errmsg_printf(ERRMSG_LVL_ERROR, _("Data directory %s does not exist\n"), data_home_real);
252
if (chdir(getDataHome().c_str()))
254
errmsg_printf(ERRMSG_LVL_ERROR,
255
_("Data directory %s does not exist\n"),
256
getDataHome().c_str());
259
if (mkdir("local", 0700))
261
/* We don't actually care */
265
errmsg_printf(ERRMSG_LVL_ERROR,
266
_("Local catalog %s/local does not exist\n"),
267
getDataHome().c_str());
270
/* TODO: This is a hack until we can properly support std::string in sys_var*/
271
char **data_home_ptr= getDatadirPtr();
272
*data_home_ptr= new char[getDataHome().size()+1] ();
273
fs::path full_data_home_path(fs::system_complete(fs::path(getDataHome())));
274
std::string full_data_home(full_data_home_path.file_string());
275
memcpy(*data_home_ptr, full_data_home.c_str(), full_data_home.size());
276
getDataHomeCatalog()= "./";
277
getDataHome()= "../";
249
data_home= data_home_buff;
250
data_home[0]=FN_CURLIB; // all paths are relative from here
254
282
if (server_id == 0)