- Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey)
+- Fixed bug #50575 (PDO_PGSQL LOBs are not compatible with PostgreSQL 8.5).
+ (Matteo)
- Fixed bug #50558 (Broken object model when extending tidy). (Pierrick)
- Fixed bug #50540 (Crash while running ldap_next_reference test cases).
(Sriram)
*/
static unsigned char *php_pdo_pgsql_unescape_bytea(unsigned char *strtext, size_t *retbuflen)
{
+#ifdef HAVE_PQUNESCAPEBYTEA
+ size_t tmp_len;
+ char *buffer;
+ char *tmp_ptr = PQunescapeBytea(strtext, &tmp_len);
+
+ if (!tmp_ptr) {
+ /* PQunescapeBytea returned an error, this
+ function will return en empty string */
+ tmp_len = 0;
+ buffer = emalloc(0);
+ } else {
+ buffer = emalloc(tmp_len);
+ memcpy(buffer, tmp_ptr, tmp_len);
+ PQfreemem(tmp_ptr);
+ }
+ *retbuflen = tmp_len;
+ return buffer;
+#else
size_t buflen;
unsigned char *buffer,
*sp,
if (strtext == NULL)
return NULL;
+
buflen = strlen(strtext); /* will shrink, also we discover if
* strtext */
buffer = (unsigned char *) emalloc(buflen); /* isn't NULL terminated */
*retbuflen = buflen;
return buffer;
+#endif
}
static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len, int *caller_frees TSRMLS_DC)