~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Stewart Smith
  • Date: 2009-03-03 07:20:52 UTC
  • mto: (910.4.2 sparc) (908.3.6 work)
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: stewart@flamingspork.com-20090303072052-tm5k7m1oh4oz9kbu
Remove MYSQL50_TABLE_NAME_PREFIX.

not needed for drizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
                    system_charset_info,  to, to_length, &errors);
125
125
    if (errors) // Old 5.0 name
126
126
    {
127
 
      strcpy(to, MYSQL50_TABLE_NAME_PREFIX);
128
 
      strncat(to, from, to_length-MYSQL50_TABLE_NAME_PREFIX_LENGTH-1);
 
127
      to[0]='\0';
 
128
      strncat(to, from, to_length-1);
129
129
      res= strlen(to);
130
130
      errmsg_printf(ERRMSG_LVL_ERROR, _("Invalid (old?) table or database name '%s'"), from);
131
131
    }
151
151
{
152
152
  uint32_t errors, length;
153
153
 
154
 
  if (from[0] == '#' && !strncmp(from, MYSQL50_TABLE_NAME_PREFIX,
155
 
                                 MYSQL50_TABLE_NAME_PREFIX_LENGTH))
156
 
    return((uint32_t) (strncpy(to, from+MYSQL50_TABLE_NAME_PREFIX_LENGTH,
157
 
                           to_length-1) -
158
 
                           (from + MYSQL50_TABLE_NAME_PREFIX_LENGTH)));
159
154
  length= strconvert(system_charset_info, from,
160
155
                     &my_charset_filename, to, to_length, &errors);
161
156
  if (check_if_legal_tablename(to) &&