summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-11-22 09:19:51 +0400
committerunknown <ramil/ram@mysql.com/myoffice.izhnet.ru>2006-11-22 09:19:51 +0400
commit8473844792f5b206d9828bb1e195a2188ea4e63e (patch)
tree6eee0f1c03ad74c3139d08b3729ff09f41d2959b /sql/item_timefunc.cc
parentd3144a9d6c5aa07b07568cd0d1d808cc9b9b9d89 (diff)
parent89a4a3e92c91a403740f1f2cdd057ab63afeef46 (diff)
downloadmariadb-git-8473844792f5b206d9828bb1e195a2188ea4e63e.tar.gz
Merge mysql.com:/usr/home/ram/work/bug22029/my41-bug22029
into mysql.com:/usr/home/ram/work/bug22029/my50-bug22029 mysql-test/r/date_formats.result: Auto merged mysql-test/t/date_formats.test: Auto merged sql/item_timefunc.cc: merging
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 9e1962835c8..087f0ca9813 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -171,15 +171,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) {