wrong output for md5 query
Brought to you by:
ansgarbecker
Originally created by: akrue...@gmail.com
What exact steps will reproduce the problem?
1. run query: select md5('test')
What was the expected output?
098f6bcd4621d373cade4e832627b4f6
What happened instead?
0x3039386636626364343632316433373363616465346538333236323762346636
Suggested fix (optional)?
give back correct md5 string
Version used?
HeidiSQL revision: 2399
MySQL Server version: 5.0.60sp1-enterprise-gpl-log
Operating system: redhat-linux-gnu
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: rosenfie...@gmail.com
This is an issue in MySQL Server, it can be reported at http://bugs.mysql.com/.
The output from md5() is ASCII text and numbers, therefore md5() should return it
with a collation representing text.
Instead, md5() currently returns collation id 63 (BINARY, same as is normally used
for BLOB fields) to the client.
Workaround:
SELECT CONVERT(md5('test') USING latin1)
Labels: Severity-Broken
Status: Upstream