summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorramil/ram@myoffice.izhnet.ru <>2006-11-22 10:10:55 +0400
committerramil/ram@myoffice.izhnet.ru <>2006-11-22 10:10:55 +0400
commit530325adeccecc7c9c7a403942cf6d088fa30f9d (patch)
tree085d393a4d1d11784efd58e25244f26ed9db6dbb /sql/item_timefunc.cc
parentef77a83bc2ebae5f4b04c97e21d6b0e41bb096ae (diff)
parent5060fa10f84250377e839686d045c0dbdc0e90a9 (diff)
downloadmariadb-git-530325adeccecc7c9c7a403942cf6d088fa30f9d.tar.gz
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/usr/home/ram/work/bug22029/my51-bug22029
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 8c9e32a3ce9..7231a9eb027 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -290,15 +290,16 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
for (; ptr != end && val != val_end; ptr++)
{
+ /* Skip pre-space between each argument */
+ while (val != val_end && my_isspace(cs, *val))
+ val++;
+
if (*ptr == '%' && ptr+1 != end)
{
int val_len;
char *tmp;
error= 0;
- /* Skip pre-space between each argument */
- while (val != val_end && my_isspace(cs, *val))
- val++;
val_len= (uint) (val_end - val);
switch (*++ptr) {