mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
30c97ed175
BitKeeper/etc/ignore: auto-union include/m_ctype.h: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/func_compress.result: Auto merged mysql-test/t/date_formats.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_create.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.h: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged strings/ctype-bin.c: Auto merged include/mysqld_error.h: Merge error messages mysql-test/r/date_formats.result: merge sql/derror.cc: Fixed wront return value sql/item_timefunc.cc: merge sql/item_timefunc.h: merge sql/mysqld.cc: merge sql/share/czech/errmsg.txt: Merge error messages sql/share/danish/errmsg.txt: Merge error messages sql/share/dutch/errmsg.txt: Merge error messages sql/share/english/errmsg.txt: Merge error messages sql/share/estonian/errmsg.txt: Merge error messages sql/share/french/errmsg.txt: Merge error messages sql/share/german/errmsg.txt: Merge error messages sql/share/greek/errmsg.txt: Merge error messages sql/share/hungarian/errmsg.txt: Merge error messages sql/share/italian/errmsg.txt: Merge error messages sql/share/japanese/errmsg.txt: Merge error messages sql/share/korean/errmsg.txt: Merge error messages sql/share/norwegian-ny/errmsg.txt: Merge error messages sql/share/norwegian/errmsg.txt: Merge error messages sql/share/polish/errmsg.txt: Merge error messages sql/share/portuguese/errmsg.txt: Merge error messages sql/share/romanian/errmsg.txt: Merge error messages sql/share/russian/errmsg.txt: Merge error messages sql/share/serbian/errmsg.txt: Merge error messages sql/share/slovak/errmsg.txt: Merge error messages sql/share/spanish/errmsg.txt: Merge error messages sql/share/swedish/errmsg.txt: Merge error messages sql/share/ukrainian/errmsg.txt: Merge error messages
70 lines
3.1 KiB
Text
70 lines
3.1 KiB
Text
select @test_compress_string:='string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ';
|
|
@test_compress_string:='string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '
|
|
string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
select length(@test_compress_string);
|
|
length(@test_compress_string)
|
|
117
|
|
select uncompress(compress(@test_compress_string));
|
|
uncompress(compress(@test_compress_string))
|
|
string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
explain extended select uncompress(compress(@test_compress_string));
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority no_cache uncompress(compress((@test_compress_string))) AS `uncompress(compress(@test_compress_string))`
|
|
select uncompressed_length(compress(@test_compress_string))=length(@test_compress_string);
|
|
uncompressed_length(compress(@test_compress_string))=length(@test_compress_string)
|
|
1
|
|
explain extended select uncompressed_length(compress(@test_compress_string))=length(@test_compress_string);
|
|
id select_type table type possible_keys key key_len ref rows Extra
|
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
Warnings:
|
|
Note 1003 select high_priority no_cache (uncompressed_length(compress((@test_compress_string))) = length((@test_compress_string))) AS `uncompressed_length(compress(@test_compress_string))=length(@test_compress_string)`
|
|
select uncompressed_length(compress(@test_compress_string));
|
|
uncompressed_length(compress(@test_compress_string))
|
|
117
|
|
select length(compress(@test_compress_string))<length(@test_compress_string);
|
|
length(compress(@test_compress_string))<length(@test_compress_string)
|
|
1
|
|
create table t1 (a text, b char(255), c char(4)) type=myisam;
|
|
insert into t1 (a,b,c) values (compress(@test_compress_string),compress(@test_compress_string),'d ');
|
|
select uncompress(a) from t1;
|
|
uncompress(a)
|
|
string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
select uncompress(b) from t1;
|
|
uncompress(b)
|
|
string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|
select concat('|',c,'|') from t1;
|
|
concat('|',c,'|')
|
|
|d|
|
|
drop table t1;
|
|
select compress("");
|
|
compress("")
|
|
|
|
select uncompress("");
|
|
uncompress("")
|
|
|
|
select uncompress(compress(""));
|
|
uncompress(compress(""))
|
|
|
|
select uncompressed_length("");
|
|
uncompressed_length("")
|
|
0
|
|
create table t1 (a text);
|
|
insert t1 values (compress(null)), ('A\0\0\0BBBBBBBB'), (compress(space(50000))), (space(50000));
|
|
select length(a) from t1;
|
|
length(a)
|
|
NULL
|
|
12
|
|
76
|
|
50000
|
|
select length(uncompress(a)) from t1;
|
|
length(uncompress(a))
|
|
NULL
|
|
NULL
|
|
50000
|
|
NULL
|
|
Warnings:
|
|
Error 1258 ZLIB: Input data was corrupted for zlib
|
|
Error 1255 Too big size of uncompressed data. The maximum size is 1048576. (probably, length of uncompressed data was corrupted)
|
|
drop table t1;
|