~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to sql/sql_rename.cc

  • Committer: monty at mysql
  • Date: 2002-03-27 04:44:23 UTC
  • mfrom: (973.111.4)
  • mto: (973.26.124)
  • mto: This revision was merged to the branch mainline in revision 997.
  • Revision ID: sp1r-monty@hundin.mysql.fi-20020327044423-16587
merge (remove conflicting zip files)

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
    new_table=ren_table->next;
127
127
 
128
128
    sprintf(name,"%s/%s/%s%s",mysql_data_home,
129
 
            new_table->db,new_table->name,
 
129
            new_table->db,new_table->real_name,
130
130
            reg_ext);
131
131
    if (!access(name,F_OK))
132
132
    {
134
134
      DBUG_RETURN(ren_table);                   // This can't be skipped
135
135
    }
136
136
    sprintf(name,"%s/%s/%s%s",mysql_data_home,
137
 
            ren_table->db,ren_table->name,
 
137
            ren_table->db,ren_table->real_name,
138
138
            reg_ext);
139
139
    if ((table_type=get_table_type(name)) == DB_TYPE_UNKNOWN)
140
140
    {
143
143
        DBUG_RETURN(ren_table);
144
144
    }
145
145
    else if (mysql_rename_table(table_type,
146
 
                                ren_table->db, ren_table->name,
147
 
                                new_table->db, new_table->name))
 
146
                                ren_table->db, ren_table->real_name,
 
147
                                new_table->db, new_table->real_name))
148
148
    {
149
149
      if (!skip_error)
150
 
        return ren_table;
 
150
        DBUG_RETURN(ren_table);
151
151
    }
152
152
  }
153
153
  DBUG_RETURN(0);