~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Toru Maesaka
  • Date: 2008-12-11 07:45:27 UTC
  • mto: (670.1.11 devel)
  • mto: This revision was merged to the branch mainline in revision 672.
  • Revision ID: dev@torum.net-20081211074527-yu0cpi5pumqifgg5
Added namespacing for std to .cc files that needed it

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <drizzled/db.h>
30
30
#include <drizzled/replicator.h>
31
31
 
 
32
using namespace std;
 
33
 
32
34
extern HASH lock_db_cache;
33
35
 
34
36
int creating_table= 0;        // How many mysql_create_table are running
180
182
uint32_t build_table_filename(char *buff, size_t bufflen, const char *db,
181
183
                          const char *table_name, const char *ext, uint32_t flags)
182
184
{
183
 
  std::string table_path;
 
185
  string table_path;
184
186
  char dbbuff[FN_REFLEN];
185
187
  char tbbuff[FN_REFLEN];
186
188
  int rootdir_len= strlen(FN_ROOTDIR);
239
241
uint32_t build_tmptable_filename(Session* session, char *buff, size_t bufflen)
240
242
{
241
243
  uint32_t length;
242
 
  std::ostringstream path_str, post_tmpdir_str;
243
 
  std::string tmp;
 
244
  ostringstream path_str, post_tmpdir_str;
 
245
  string tmp;
244
246
 
245
247
  path_str << drizzle_tmpdir;
246
248
  post_tmpdir_str << "/" << TMP_FILE_PREFIX << current_pid;
248
250
  tmp= post_tmpdir_str.str();
249
251
 
250
252
  if (lower_case_table_names)
251
 
    std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower);
 
253
    transform(tmp.begin(), tmp.end(), tmp.begin(), ::tolower);
252
254
 
253
255
  path_str << tmp;
254
256
 
4407
4409
                       uint32_t order_num, order_st *order, bool ignore)
4408
4410
{
4409
4411
  Table *table, *new_table=0, *name_lock= 0;;
4410
 
  std::string new_name_str;
 
4412
  string new_name_str;
4411
4413
  int error= 0;
4412
4414
  char tmp_name[80],old_name[32],new_name_buff[FN_REFLEN];
4413
4415
  char new_alias_buff[FN_REFLEN], *table_name, *db, *new_alias, *alias;
4443
4445
    /* Conditionally writes to binlog. */
4444
4446
    return(mysql_discard_or_import_tablespace(session,table_list,
4445
4447
                                              alter_info->tablespace_op));
4446
 
  std::ostringstream oss;
 
4448
  ostringstream oss;
4447
4449
  oss << drizzle_data_home << "/" << db << "/" << table_name << reg_ext;
4448
4450
 
4449
4451
  (void) unpack_filename(new_name_buff, oss.str().c_str());