summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <ramil/ram@myoffice.izhnet.ru>2006-11-22 10:10:55 +0400
committerunknown <ramil/ram@myoffice.izhnet.ru>2006-11-22 10:10:55 +0400
commit904e46968a34842797fd78f8b40141d462a23669 (patch)
tree085d393a4d1d11784efd58e25244f26ed9db6dbb /sql/item_timefunc.cc
parent560bc0ea845f8791936cd6b84536595339de65ca (diff)
parentc77bd19bc6eccf37f5d5cc73e7110d64fc76613e (diff)
downloadmariadb-git-904e46968a34842797fd78f8b40141d462a23669.tar.gz
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/usr/home/ram/work/bug22029/my51-bug22029 sql/item_timefunc.cc: Auto merged
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) {