[MDEV-28036] gcol.gcol_supported_sql_funcs_xxx fail in FIPS mode Created: 2022-03-10  Updated: 2022-03-14  Resolved: 2022-03-14

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.2.44, 10.3.35, 10.4.25, 10.5.16, 10.6.8, 10.7.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Fixed Votes: 0
Labels: None


 Description   

10.3 1766a1

gcol.gcol_supported_sql_funcs_innodb 'innodb' w5 [ fail ]
        Test ended at 2022-03-10 16:22:50
 
CURRENT_TEST: gcol.gcol_supported_sql_funcs_innodb
--- /usr/share/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result	2022-03-10 15:37:04.000000000 +0000
+++ /dev/shm/var/5/log/gcol_supported_sql_funcs_innodb.reject	2022-03-10 16:22:50.664671851 +0000
@@ -2898,10 +2898,13 @@
   `b` varchar(1024) GENERATED ALWAYS AS (des_encrypt(des_decrypt(`a`,'adf'),'adf')) VIRTUAL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 insert into t1 values ('MySQL',default);
+Warnings:
+Warning	1108	Incorrect parameters to procedure 'des_encrypt'
 select * from t1;
 a	b
-MySQL	�w2��
-���
+MySQL	NULL
+Warnings:
+Warning	1108	Incorrect parameters to procedure 'des_encrypt'
 drop table t1;
 # INET_ATON(), INET_NTOA()
 set sql_warnings = 1;
 
mysqltest: Result length mismatch

Same with gcol.gcol_supported_sql_funcs_myisam.

An easy way to fix it would be to disable the tests in FIPS mode, e.g. by something like

diff --git a/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc
index 88268ddd6c4..3f48f86ce7c 100644
--- a/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc
+++ b/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc
@@ -12,6 +12,9 @@
 # Change Date:                                                                 #
 # Change:                                                                      #
 ################################################################################
+
+--source include/have_des.inc
+
 set time_zone="+03:00";
 --echo #
 --echo # NUMERIC FUNCTIONS

(I didn't check whether this exact patch does the trick, but anyway – by adding have_des.inc somewhere in these tests).

If that's okay, I can do it.

However, there was a talk about reshuffling the tests to extract des_encrypt|decrypt into a separate test file, so maybe the above isn't good enough.



 Comments   
Comment by Elena Stepanova [ 2022-03-14 ]

I've made the change for now (added a check for FIPS). It can always be removed if test re-arranging happens and all DES stuff is moved elsewhere.

Generated at Thu Feb 08 09:57:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.