summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <peter@linux.local>2002-06-11 13:37:48 +0400
committerunknown <peter@linux.local>2002-06-11 13:37:48 +0400
commit1027b8355409b1c2fc82f398fd59d805bf723ef4 (patch)
treeb7b63c5072690768a1b6914399e49cc5422ea4ec /mysql-test
parentf71837b99748e42849b3b566af9750d1889450ee (diff)
downloadmariadb-git-1027b8355409b1c2fc82f398fd59d805bf723ef4.tar.gz
This changeset is mostly new version of previous commit modified according
to Monty's code style and optimization comments client/client_priv.h: New value for --single-transaction option client/mysqldump.c: Add --single-transaction option for consistent dumps mysql-test/r/func_str.result: New functions test results mysql-test/t/func_str.test: Tests for SHA/AES functions mysys/Makefile.am: Extra files require compilation now sql/item_create.cc: New functions sql/item_create.h: New functions sql/item_strfunc.cc: Implementation of SHA/AES_ENCRYPT/AES_DECRYPT sql/item_strfunc.h: Required class definition sql/lex.h: Add symbols for implemented functions BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result30
-rw-r--r--mysql-test/t/func_str.test10
2 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index a58f3c57169..e02ee3a7343 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -83,6 +83,36 @@ soundex('') soundex('he') soundex('hello all folks')
select md5('hello');
md5('hello')
5d41402abc4b2a76b9719d911017c592
+select sha('abc');
+sha('abc')
+a9993e364706816aba3e25717850c26c9cd0d89d
+select sha1('abc');
+sha1('abc')
+a9993e364706816aba3e25717850c26c9cd0d89d
+select aes_decrypt(aes_encrypt('abc','1'),'1');
+aes_decrypt(aes_encrypt('abc','1'),'1')
+abc
+select aes_decrypt(aes_encrypt('abc','1'),1);
+aes_decrypt(aes_encrypt('abc','1'),1)
+abc
+select aes_encrypt(NULL,"a");
+aes_encrypt(NULL,"a")
+NULL
+select aes_encrypt("a",NULL);
+aes_encrypt("a",NULL)
+NULL
+select aes_decrypt(NULL,"a");
+aes_decrypt(NULL,"a")
+NULL
+select aes_decrypt("a",NULL);
+aes_decrypt("a",NULL)
+NULL
+select aes_decrypt("a","a");
+aes_decrypt("a","a")
+NULL
+select aes_decrypt(aes_encrypt("","a"),"a");
+aes_decrypt(aes_encrypt("","a"),"a")
+
select repeat('monty',5),concat('*',space(5),'*');
repeat('monty',5) concat('*',space(5),'*')
montymontymontymontymonty * *
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 26272fba03f..68b94d2aeff 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -37,6 +37,16 @@ select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb')
select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL') ;
select soundex(''),soundex('he'),soundex('hello all folks');
select md5('hello');
+select sha('abc');
+select sha1('abc');
+select aes_decrypt(aes_encrypt('abc','1'),'1');
+select aes_decrypt(aes_encrypt('abc','1'),1);
+select aes_encrypt(NULL,"a");
+select aes_encrypt("a",NULL);
+select aes_decrypt(NULL,"a");
+select aes_decrypt("a",NULL);
+select aes_decrypt("a","a");
+select aes_decrypt(aes_encrypt("","a"),"a");
select repeat('monty',5),concat('*',space(5),'*');
select reverse('abc'),reverse('abcd');
select rpad('a',4,'1'),rpad('a',4,'12'),rpad('abcd',3,'12');