mysql - mariadb 10 uncompress() return blob instead of string -
mysql - mariadb 10 uncompress() return blob instead of string -
according mysql , mariadb docs uncompress() returns string if input string compressed using compress().
also stated in examples:
select uncompress(compress('a string')); +----------------------------------+ | uncompress(compress('a string')) | +----------------------------------+ | string | +----------------------------------+
however on mysql workbench , navicat blob result. using
select convert(uncompress(compress('a string')) using utf8);
returns original string. wrong? docs wrong or misinterpreting here?
the result type of uncompress()
has been long_blob
since @ to the lowest degree mysql 5.1, before varbinary
.
background compress()
compresses string contents not preserve meta info character set or collation. uncompress()
returning uncompressed info binary info stream safe option. converting returned binary info specific character set , collation user, e.g. storing info out of band in separate column , using argument convert()
later.
mysql mariadb
Comments
Post a Comment