diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-10-02 00:12:27 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-10-02 00:12:27 +0400 |
commit | 49e715258ffd55e740f9060f68a49960f83b06ea (patch) | |
tree | 2118d6c50022f3510872d297e53f610abd13855f /sql/item_timefunc.cc | |
parent | 16076e6a6f13fe43a8f55100aa7f1a2fff44ff30 (diff) | |
parent | e1e838169a83acf352b43981a500684a68bec91a (diff) | |
download | mariadb-git-49e715258ffd55e740f9060f68a49960f83b06ea.tar.gz |
Manual merge from mysql-5.1-bugteam into mysql-5.5-bugteam.
conflicts:
conflict dbug/dbug.c
conflict sql/sql_load.cc
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index cc363398fdd..24cf4da0a95 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2338,8 +2338,6 @@ void Item_extract::print(String *str, enum_query_type query_type) void Item_extract::fix_length_and_dec() { - value.alloc(32); // alloc buffer - maybe_null=1; // If wrong date switch (int_type) { case INTERVAL_YEAR: max_length=4; date_value=1; break; @@ -2382,6 +2380,8 @@ longlong Item_extract::val_int() } else { + char buf[40]; + String value(buf, sizeof(buf), &my_charset_bin);; String *res= args[0]->val_str(&value); if (!res || str_to_time_with_warn(res->charset(), res->ptr(), res->length(), |