diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-05-22 14:38:50 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-05-22 14:38:50 +0200 |
commit | 48083d73d3dc6b1c678dbb6df3b49f420cce84ad (patch) | |
tree | 706f364cc935ad866bf7d1314528e0b2c2eb7451 /sql/item_strfunc.cc | |
parent | ae134314b8cc35531472cf8af999fec464ad8efa (diff) | |
download | mariadb-git-48083d73d3dc6b1c678dbb6df3b49f420cce84ad.tar.gz |
After-merge fixes for problems seen in buildbot after merging MySQL-5.1.35.
- Version number.
- Valgrind false alarms in libz.
- New variant of suppression for Valgrind warning in dlclose().
- Fix double free() in plugin init error case.
configure.in:
Fix version number. We should reset the maria variant back to `1' when the MySQL version
number increases.
include/my_sys.h:
Fix false alarms in Valgrind for zlib.
Apply same fix as for archive storage handler also to the cases of compression in the
client protocol, and to the compression SQL function.
mysql-test/valgrind.supp:
A new variant of the dlclose() suppression is needed now.
mysys/my_compress.c:
Fix false alarms in Valgrind for zlib.
Apply same fix as for archive storage handler also to the cases of compression in the
client protocol, and to the compression SQL function.
sql/handler.cc:
Fix a double free() in error case for plugin initialisation.
sql/item_strfunc.cc:
Fix false alarms in Valgrind for zlib.
Apply same fix as for archive storage handler also to the cases of compression in the
client protocol, and to the compression SQL function.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 59f9dccfc79..77991c4fe6f 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3243,7 +3243,7 @@ longlong Item_func_crc32::val_int() String *Item_func_compress::val_str(String *str) { int err= Z_OK, code; - ulong new_size; + size_t new_size; String *res; Byte *body; char *tmp, *last_char; @@ -3279,8 +3279,8 @@ String *Item_func_compress::val_str(String *str) body= ((Byte*)buffer.ptr()) + 4; // As far as we have checked res->is_empty() we can use ptr() - if ((err= compress(body, &new_size, - (const Bytef*)res->ptr(), res->length())) != Z_OK) + if ((err= my_compress_buffer(body, &new_size, (const uchar *)res->ptr(), + res->length())) != Z_OK) { code= err==Z_MEM_ERROR ? ER_ZLIB_Z_MEM_ERROR : ER_ZLIB_Z_BUF_ERROR; push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,code,ER(code)); |