Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The db_prepare_binary_string() function was designed for use with db_query(), and therefore used to surround the binary string to encode with single quotes. Use of db_query_bound() with the function's return value would result in a corrupted attachment because the quotes would be treated as integral part of the binary data. MySQL does not require any special encoding (except regular string processing which is already done by db_query_bound()). For PostgreSQL, instead of calling pg_escape_bytea() directly, we now use ADOdb connection's BlobEncode() method. MSSQL encoding was left as is was (no test platform available). Based on documentation, Oracle (oci8) should not require any encoding either, but was not tested either. Fixes #12955
- Loading branch information