Issues

ZF-7625: Zend_Db and BINARY Fields

Description

Apache crashs (sometimes) and MySql throws errors (sometimes).

This bug appears on Windows only! On Linux it work's fine.

I made a SELECT statement with Zend_Db_Select. It gives follow string:

SELECT * FROM comment INNER JOIN user ON comment.userUid = user.uid WHERE (comment.eventUid = '}êüÊ£ä©\Zª\'m¦Ý\r') limit 25, 25

All fields named "uid" ("comment.userUid" and "eventUid") are BINARY(16) fields (for UUIDs). With some uids PHP have big problems. The UUID above (}êüÊ£ä©\Zª\'m¦Ý\r) represented in hex-text is: 7deafccaa3e4a97f1aaa276da690dd0d.

Sometimes the Apache crashes. In another SELECT statement I have two WHERE conditions with UUIDs and MySQL throws an error, that one parameter were not given.

If I CAST the hex-string with "...WHERE (comment.eventUid = CAST (0x7deafccaa3e4a97f1aaa276da690dd0d as BINARY) " I didn't get errors and all work fine!

This is a problem with PHP and WINDOWS. With Linux there are no problems!

Comments

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.