summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_compress.test
diff options
context:
space:
mode:
authorunknown <vva@eagle.mysql.r18.ru>2003-04-09 20:50:30 -0400
committerunknown <vva@eagle.mysql.r18.ru>2003-04-09 20:50:30 -0400
commit75bdeb1b21dca9266c077f9bade0e88bec716e9c (patch)
treebd0630d1e16baaeb815da46e7de6032c9f3d82e7 /mysql-test/t/func_compress.test
parent90527436fa6901b1132c4cabd6f2a3b10adce226 (diff)
downloadmariadb-git-75bdeb1b21dca9266c077f9bade0e88bec716e9c.tar.gz
added compress/uncompress function
sql/mysql_priv.h: added have_compress variable sql/mysqld.cc: added have_compress variable sql/set_var.cc: added have_compress variable
Diffstat (limited to 'mysql-test/t/func_compress.test')
-rw-r--r--mysql-test/t/func_compress.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/func_compress.test b/mysql-test/t/func_compress.test
new file mode 100644
index 00000000000..2f86a414792
--- /dev/null
+++ b/mysql-test/t/func_compress.test
@@ -0,0 +1,20 @@
+-- source include/have_compress.inc
+#
+# Test for compress and uncompress functions:
+#
+
+select @test_compress_string:='string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ';
+select length(@test_compress_string);
+
+select uncompress(compress(@test_compress_string));
+select uncompress(@test_compress_string);
+select uncompressed_length(compress(@test_compress_string))=length(@test_compress_string);
+select uncompressed_length(compress(@test_compress_string));
+select length(compress(@test_compress_string))<length(@test_compress_string);
+
+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;
+select uncompress(b) from t1;
+select concat('|',c,'|') from t1;
+drop table t1; \ No newline at end of file