Ilia Alshanetsky ha scritto: > iliaa Tue May 19 19:15:18 2009 UTC > > Modified files: (Branch: PHP_5_3) > /php-src/ext/pdo_sqlite sqlite_statement.c > Log: > The \0 removal is only needed prior to 3.4.0
I hate to do this (and as a php-src newbie I'm a bit afraid to), but once again this is simply wrong. The commit breaks compatibility with sqlite < 3.4.0. You are trying to fix something that has never been broken. The sqlite3.h comment was wrong and the missing parens were leading you to think that the issue existed and was being worked around in PHP. Otherwise PDO_SQLITE would have been returning strings with trailing '\0' since Feb 2005 to June 2007, which is quite unlikely. See: http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/sqlite_statement.c?r1=1.12&r2=1.13&view=patch http://www.sqlite.org/changes.html#version_3_4_0 I've verified the compatibility break by compiling PHP 5.3 with a cvs checkout of sqlite 3.3.8 (-D 2007-01-01). Here's the result of one of the many failing tests: TEST 6/14 [ext/pdo_sqlite/tests/bug46139.phpt] ========DIFF======== 002+ 'fo' 002- 'foo' 004+ 'fo' 004- 'foo' 006+ 'fo' 006- 'foo' ========DONE======== I hope this is enough proof to back up my theory and for you to revert your latest changes. Cheers -- Matteo Beccati OpenX - http://www.openx.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php