Bug 129277

Summary: databases/php5-pdo_sqlite doesn't manage BLOB types
Product: Ports & Packages Reporter: Lapo Luchini <lapo>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me CC: lapo
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch-sqlite_statement.c none

Description Lapo Luchini 2008-11-29 13:30:01 UTC
PHP's 5.3 SQLite PDO doesn't really support PARAM_LOB type,
it falls through to PARAM_STR, thus the DB doesn't know the
data received is meant to be a BLOB type.

Fix: An official patch from
http://bugs.php.net/bug.php?id=42443
seems to have landed in 5.3+.

This is the patch from the comment applied on the current sources,
ready for the files/ subdirectory.
How-To-Repeat: 
1. insert some binary data in the DB
2. SELECT TYPEOF(column), LENGTH(column) FROM table;
3. notice the TEXT type in the first column
4. notice the wrong length in the second column (ends at first \0)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-11-29 13:30:12 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2008-12-07 11:58:49 UTC
State Changed
From-To: open->closed

Committed, thanks.