~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Monty Taylor
  • Date: 2008-11-07 04:42:46 UTC
  • mfrom: (575.4.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: monty@inaugust.com-20081107044246-n8hnlrzsjn0uvca0
Merged from ysano. Reverted changes to storage/innobase/handler, which is not built by drizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
 
124
124
 
125
125
/*
126
 
  Creates path to a file: mysql_data_dir/db/table.ext
 
126
  Creates path to a file: drizzle_data_dir/db/table.ext
127
127
 
128
128
  SYNOPSIS
129
129
   build_table_filename()
139
139
  NOTES
140
140
 
141
141
    Uses database and table name, and extension to create
142
 
    a file name in mysql_data_dir. Database and table
 
142
    a file name in drizzle_data_dir. Database and table
143
143
    names are converted from system_charset_info into "fscs".
144
144
    Unless flags indicate a temporary table name.
145
145
    'db' is always converted.
169
169
  tablename_to_filename(db, dbbuff, sizeof(dbbuff));
170
170
 
171
171
  char *end = buff + bufflen;
172
 
  /* Don't add FN_ROOTDIR if mysql_data_home already includes it */
173
 
  char *pos = my_stpncpy(buff, mysql_data_home, bufflen);
 
172
  /* Don't add FN_ROOTDIR if dirzzle_data_home already includes it */
 
173
  char *pos = my_stpncpy(buff, drizzle_data_home, bufflen);
174
174
  int rootdir_len= strlen(FN_ROOTDIR);
175
175
  if (pos - rootdir_len >= buff &&
176
176
      memcmp(pos - rootdir_len, FN_ROOTDIR, rootdir_len) != 0)
4420
4420
                                              alter_info->tablespace_op));
4421
4421
  char* pos= new_name_buff;
4422
4422
  char* pos_end= pos+strlen(new_name_buff)-1;
4423
 
  pos= my_stpncpy(new_name_buff, mysql_data_home, pos_end-pos);
 
4423
  pos= my_stpncpy(new_name_buff, drizzle_data_home, pos_end-pos);
4424
4424
  pos= my_stpncpy(new_name_buff, "/", pos_end-pos);
4425
4425
  pos= my_stpncpy(new_name_buff, db, pos_end-pos);
4426
4426
  pos= my_stpncpy(new_name_buff, "/", pos_end-pos);