svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/sqlite3/sqlite3.c trunk/ext/sqlite3/sqlite3.c
| From: | Scott MacVicar | Date: | Thu, 06 Jan 2011 00:08:59 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/sqlite3/sqlite3.c trunk/ext/sqlite3/sqlite3.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-64279@lists.php.net to get a copy of this message | ||
scottmac Thu, 06 Jan 2011 00:08:59 +0000
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;