Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1906 05/04/27 22:20:58 msvensson@neptunus.(none) +2 -0
BUG#9911 RENAME TABLE of type ARCHIVE fails with .ARN file error
- Different behaviuor in 5.0 pushes a warning when renaming a non existent file. Avoid
that by checking that the file exists before renaming.
sql/examples/ha_archive.cc
1.36 05/04/27 22:20:55 msvensson@neptunus.(none) +11 -6
Change ha_archive::rename_table to avoid warning when trying to rename non existent
file.
mysql-test/r/archive.result
1.7 05/04/27 22:20:55 msvensson@neptunus.(none) +0 -2
Warning is not produced anymore
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.0
--- 1.6/mysql-test/r/archive.result 2005-04-27 22:02:23 +02:00
+++ 1.7/mysql-test/r/archive.result 2005-04-27 22:20:55 +02:00
@@ -192,8 +192,6 @@
count(*)
1199
rename table t3 to t4;
-Warnings:
-Error 7 Error on rename of './test/t3.ARN' to './test/t4.ARN' (Errcode: 2)
select * from t4 where fld3='bonfire';
auto fld1 companynr fld3 fld4 fld5 fld6
1191 068504 00 bonfire corresponds positively
--- 1.35/sql/examples/ha_archive.cc 2005-04-27 12:51:30 +02:00
+++ 1.36/sql/examples/ha_archive.cc 2005-04-27 22:20:55 +02:00
@@ -455,17 +455,22 @@
int ha_archive::rename_table(const char * from, const char * to)
{
DBUG_ENTER("ha_archive::rename_table");
+ DBUG_PRINT("enter", ("from: %s, to: %s", from, to));
for (const char **ext=bas_ext(); *ext ; ext++)
{
- if (rename_file_ext(from,to,*ext))
+ // Check if the .arn file exists before rename
+ if (!my_strcasecmp(system_charset_info, *ext, ARN))
{
- if (my_errno == ENOENT &&
- !my_strcasecmp(system_charset_info, *ext, ARN))
+ char name[FN_REFLEN];
+ (void)strxnmov(name, FN_REFLEN, from, ARN, NullS);
+ if (access(name, F_OK))
+ {
+ DBUG_PRINT("info", ("%s does not exist on disk, skipping it", name));
continue;
-
- DBUG_RETURN(my_errno);
+ }
}
-
+ if (rename_file_ext(from,to,*ext))
+ DBUG_RETURN(my_errno);
}
DBUG_RETURN(0);
}
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.1906) BUG#9911 | msvensson | 27 Apr |