diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index 2882c3cc28a..be62ebb4688 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2006 MySQL AB +/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -5110,6 +5110,9 @@ int Item_hex_string::save_in_field(Field *field, bool no_conversions) ulonglong nr; uint32 length= str_value.length(); + if (!length) + return 1; + if (length > 8) { nr= field->flags & UNSIGNED_FLAG ? ULONGLONG_MAX : LONGLONG_MAX; |