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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -