[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/sqlite3/sqlite3.c trunk/ext/sqlite3/sqlite3.c
scottmac Thu, 06 Jan 2011 00:08:59 + Revision: http://svn.php.net/viewvc?view=revision&revision=307143 Log: Implemented FR #53466 (SQLite3Result::columnType() should return false after all of the rows have been fetched). Bug: http://bugs.php.net/53466 (Open) sqlite3 columnType() returns SQLITE3_NULL when not in fetch loop Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/trunk/ext/sqlite3/sqlite3.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-01-05 21:20:08 UTC (rev 307142) +++ php/php-src/branches/PHP_5_3/NEWS 2011-01-06 00:08:59 UTC (rev 307143) @@ -85,6 +85,7 @@ - SQLite3 extension: . Fixed memory leaked introduced by the NULL poisoning patch (Mateusz Kocielski, Pierre) . Add SQlite3_Stmt::readonly() for checking if a statement is read only. (Scott) + . Implemented FR #53466 (SQLite3Result::columnType() should return false after all of the rows have been fetched). (Scott) - Streams: . Implemented FR #26158 (open arbitrary file descriptor with fopen). (Gustavo) Modified: php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c === --- php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2011-01-05 21:20:08 UTC (rev 307142) +++ php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2011-01-06 00:08:59 UTC (rev 307143) @@ -1585,6 +1585,10 @@ return; } + if (result_obj->complete) { + RETURN_FALSE; + } + RETURN_LONG(sqlite3_column_type(result_obj->stmt_obj->stmt, column)); } /* }}} */ @@ -1634,6 +1638,7 @@ break; case SQLITE_DONE: + result_obj->complete = 1; RETURN_FALSE; break; Modified: php/php-src/trunk/ext/sqlite3/sqlite3.c === --- php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-01-05 21:20:08 UTC (rev 307142) +++ php/php-src/trunk/ext/sqlite3/sqlite3.c 2011-01-06 00:08:59 UTC (rev 307143) @@ -1582,6 +1582,10 @@ return; } + if (result_obj->complete) { + RETURN_FALSE; + } + RETURN_LONG(sqlite3_column_type(result_obj->stmt_obj->stmt, column)); } /* }}} */ @@ -1631,6 +1635,7 @@ break; case SQLITE_DONE: + result_obj->complete = 1; RETURN_FALSE; break; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/sqlite3/sqlite3.c trunk/ext/sqlite3/sqlite3.c
iliaaWed, 09 Jun 2010 16:04:54 + Revision: http://svn.php.net/viewvc?view=revision&revision=300318 Log: Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command). Bug: http://bugs.php.net/52010 (Open) open_basedir restrictions mismatch on vacuum command Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c U php/php-src/trunk/ext/sqlite3/sqlite3.c Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2010-06-09 15:48:22 UTC (rev 300317) +++ php/php-src/branches/PHP_5_3/NEWS 2010-06-09 16:04:54 UTC (rev 300318) @@ -67,6 +67,8 @@ requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert) - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas) +- Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command). + (Ilia) - Fixed bug #51991 (spl_autoload and *nix support with namespace). (Felipe) - Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with constant array). (Felipe) Modified: php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c === --- php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2010-06-09 15:48:22 UTC (rev 300317) +++ php/php-src/branches/PHP_5_3/ext/sqlite3/sqlite3.c 2010-06-09 16:04:54 UTC (rev 300318) @@ -1788,7 +1788,7 @@ switch (access_type) { case SQLITE_ATTACH: { - if (strncmp(arg3, ":memory:", sizeof(":memory:")-1)) { + if (strncmp(arg3, ":memory:", sizeof(":memory:")-1) && *arg3) { TSRMLS_FETCH(); #if PHP_API_VERSION < 20100412 Modified: php/php-src/trunk/ext/sqlite3/sqlite3.c === --- php/php-src/trunk/ext/sqlite3/sqlite3.c 2010-06-09 15:48:22 UTC (rev 300317) +++ php/php-src/trunk/ext/sqlite3/sqlite3.c 2010-06-09 16:04:54 UTC (rev 300318) @@ -1788,7 +1788,7 @@ switch (access_type) { case SQLITE_ATTACH: { - if (strncmp(arg3, ":memory:", sizeof(":memory:")-1)) { + if (strncmp(arg3, ":memory:", sizeof(":memory:")-1) && *arg3) { TSRMLS_FETCH(); #if PHP_API_VERSION < 20100412 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php