summaryrefslogtreecommitdiff
path: root/sql/parse_file.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-10-12 00:58:22 +0300
committermonty@mysql.com <>2005-10-12 00:58:22 +0300
commitf5fdf3e87a5f60fdb6442912ae5741a24b2461c8 (patch)
treece0e98ba05247bbe755ac299d0ceaa8c42d63b7a /sql/parse_file.cc
parent17d7ba931d2293f1db89cbd1107a4bc71bc4fcdf (diff)
downloadmariadb-git-f5fdf3e87a5f60fdb6442912ae5741a24b2461c8.tar.gz
Reviewing new pushed code
- CHAR() now returns binary string as default - CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR() - Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() (Some old systems returns ETIME and it's safer to test for both values than to try to write a wrapper for each old system) - Fixed new introduced bug in NOT BETWEEN X and X - Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed - Use octet2hex() for all conversion of string to hex - Simplify and optimize code
Diffstat (limited to 'sql/parse_file.cc')
-rw-r--r--sql/parse_file.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index 5c7053e6e2a..d3e5645bafc 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -372,8 +372,10 @@ my_bool rename_in_schema_file(const char *schema, const char *old_name,
if (revision > 0 && !access(arc_path, F_OK))
{
- ulonglong limit= (revision > num_view_backups) ? revision - num_view_backups : 0;
- while (revision > limit) {
+ ulonglong limit= ((revision > num_view_backups) ?
+ revision - num_view_backups : 0);
+ for (; revision > limit ; revision--)
+ {
my_snprintf(old_path, FN_REFLEN, "%s/%s%s-%04lu",
arc_path, old_name, reg_ext, (ulong)revision);
(void) unpack_filename(old_path, old_path);
@@ -381,7 +383,6 @@ my_bool rename_in_schema_file(const char *schema, const char *old_name,
arc_path, new_name, reg_ext, (ulong)revision);
(void) unpack_filename(new_path, new_path);
my_rename(old_path, new_path, MYF(0));
- revision--;
}
}
return 0;