summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-10-06 16:15:53 -0700
committerunknown <jimw@mysql.com>2005-10-06 16:15:53 -0700
commit041123bade5372483d387a724d22a8f7e06d0645 (patch)
tree693fd4dac7cc4dc26e3cfcb8510751307ebd2e19 /mysql-test
parent78f5997adef773dfd5b05f6921b5da8066067c37 (diff)
downloadmariadb-git-041123bade5372483d387a724d22a8f7e06d0645.tar.gz
Handle errors returned by system crypt() in ENCRYPT(). (Bug #13619)
mysql-test/r/func_crypt.result: Add new results mysql-test/t/func_crypt.test: Add new regression test sql/item_strfunc.cc: Handle NULL result from call to crypt().
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_crypt.result3
-rw-r--r--mysql-test/t/func_crypt.test6
2 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/func_crypt.result b/mysql-test/r/func_crypt.result
index 2ee3e770a2e..afdec0f4d06 100644
--- a/mysql-test/r/func_crypt.result
+++ b/mysql-test/r/func_crypt.result
@@ -92,3 +92,6 @@ 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 password(_latin1'idkfa ') AS `password('idkfa ')`,old_password(_latin1'idkfa') AS `old_password('idkfa')`
+select encrypt('1234','_.');
+encrypt('1234','_.')
+#
diff --git a/mysql-test/t/func_crypt.test b/mysql-test/t/func_crypt.test
index 5e0283feb28..cc3cdb9564d 100644
--- a/mysql-test/t/func_crypt.test
+++ b/mysql-test/t/func_crypt.test
@@ -49,4 +49,10 @@ select old_password(' i d k f a ');
explain extended select password('idkfa '), old_password('idkfa');
+#
+# Bug #13619: Crash on FreeBSD with salt like '_.'
+#
+--replace_column 1 #
+select encrypt('1234','_.');
+
# End of 4.1 tests