Bug 23180

Summary: encrypt() function not working
Product: [Retired] Red Hat Linux Reporter: Hao Li <hli>
Component: mysqlAssignee: Patrick Macdonald <patrickm>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: rhbug
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-02 17:30:12 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Hao Li 2001-01-02 16:38:30 EST
encrypt() always gives "NULL" on Red Hat 7.0:

[hli@lexus] ~ $ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 98 to server version: 3.23.29-gamma-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer

mysql> select encrypt("hello");
+------------------+
| encrypt("hello") |
+------------------+
| NULL             |
+------------------+
1 row in set (0.00 sec)

mysql> select encrypt("hello",1234);
+-----------------------+
| encrypt("hello",1234) |
+-----------------------+
| NULL                  |
+-----------------------+
1 row in set (0.00 sec)



I am using Red Hat 7.0's updated mysql-3.23.29-1 and glibc-2.2-9.
According to
http://www.mysql.com/documentation/mysql/commented/manual.php?section=Miscellaneous_functions
"If crypt() is not available on your system, ENCRYPT() always returns
NULL.". So I suspect that this is glibc's problem.

Before I upgraded to RH70 I was running mysql-3.22.32 with glibc-2.1.3
(both compiled myself), and encrypt definitely worked. Now with glibc-2.2
even if I pull out the same /usb/bin/mysql executable from mysql-3.22.32
encrypt gives NULL.

I noticed this problem because after the upgrade to RH70 my bugzilla broke.
The authenticate doesn't work any more and I traced it down to the
encrypt() which always give NULL.

Any help would be greatly appreciated since it is impossible for me to
downgrade glibc, unless I bring up a new box with RH62.
Comment 1 Hao Li 2001-01-02 16:58:33 EST
Sorry I gave some incorrect information. Indeed as previous bug report on the
same issue encrypt() works in mysql-3.22.32.

And switching to PostgreSQL is not always a viable solution for everyone. For
example bugzilla users don't have this option since bugzilla is tied to mysql,
and Red Hat is unfortunately one of them.

BTW I apologize for having posted the duplicate bug report. Somehow my first
search for similar bugs didn't turn up anything.
Comment 2 Ian Prowell 2001-01-02 17:30:09 EST
I setup a RedHat 7.0 system from scratch and had bugzilla functioning, but this
morning I updated the packages that have been updated since Dec 13, 2000 and the
problem described started.  It seems like one of the recent updates broke
encrypt() in mysql.
Comment 3 Trond Eivind Glomsrxd 2001-01-03 05:51:12 EST

*** This bug has been marked as a duplicate of 22649 ***