diff options
author | tnurnberg@salvation.intern.azundris.com <> | 2006-08-07 07:35:28 +0200 |
---|---|---|
committer | tnurnberg@salvation.intern.azundris.com <> | 2006-08-07 07:35:28 +0200 |
commit | dbf62f252a7d0dbfa0fa0d99e18ff5f21e670c0a (patch) | |
tree | f2262aff5e7905aeb523509dbc7a16d1313c71c0 /sql/item_timefunc.cc | |
parent | 820f14b153b28209054473dede73b496d0043ab4 (diff) | |
download | mariadb-git-dbf62f252a7d0dbfa0fa0d99e18ff5f21e670c0a.tar.gz |
Bug #20987: str_to_date doesn't accept user variable for specification
str_to_date() would sometimes render NULL if %D was used as rule other than last.
since this was due to two pointers getting mixed up in the server, this behaviour
seemed somewhat non-deterministic at SQL level.
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 44d9b422263..e3b71851824 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -223,7 +223,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, tmp= (char*) val + min(2, val_len); l_time->day= (int) my_strtoll10(val, &tmp, &error); /* Skip 'st, 'nd, 'th .. */ - val= tmp + min((int) (end-tmp), 2); + val= tmp + min((int) (val_end-tmp), 2); break; /* Hour */ |