summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <peter@mysql.com>2002-08-07 19:26:41 +0400
committerunknown <peter@mysql.com>2002-08-07 19:26:41 +0400
commitb7b90430c4290e4fb633cb3a38bd2f501f39a998 (patch)
tree4637861168435bd66ecfe4458102fa7dbdb5aed7 /mysys
parent956d11450a7ea39472f9c45720703111304524ac (diff)
downloadmariadb-git-b7b90430c4290e4fb633cb3a38bd2f501f39a998.tar.gz
Fix bug of running the queries with no selected database while running with --lower_case_table_names
mysys/mf_casecnv.c: Fix writing to string which is possible to be "" constant
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_casecnv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mysys/mf_casecnv.c b/mysys/mf_casecnv.c
index 0302688ad1f..1fae3aead32 100644
--- a/mysys/mf_casecnv.c
+++ b/mysys/mf_casecnv.c
@@ -45,8 +45,11 @@ void caseup_str(my_string str)
}
else
#endif
- while ((*str = toupper(*str)) != 0)
+ while (*str!=0) /* iterate till the end of string */
+ {
+ *str= toupper(*str);
str++;
+ }
} /* caseup_str */
/* string to lowercase */
@@ -66,8 +69,11 @@ void casedn_str(my_string str)
}
else
#endif
- while ((*str= tolower(*str)) != 0)
+ while (*str!=0) /* iterate till the end of string */
+ {
+ *str= tolower(*str);
str++;
+ }
} /* casedn_str */