[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/sqlite sqlite.c

2006-04-18 Thread Ilia Alshanetsky
iliaa   Tue Apr 18 14:30:16 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/sqlite sqlite.c 
/php-srcNEWS 
  Log:
  Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/sqlite.c?r1=1.166.2.12r2=1.166.2.13diff_format=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.166.2.12 
php-src/ext/sqlite/sqlite.c:1.166.2.13
--- php-src/ext/sqlite/sqlite.c:1.166.2.12  Wed Mar 29 14:28:42 2006
+++ php-src/ext/sqlite/sqlite.c Tue Apr 18 14:30:15 2006
@@ -17,7 +17,7 @@
|  Marcus Boerger [EMAIL PROTECTED]  |
+--+
 
-   $Id: sqlite.c,v 1.166.2.12 2006/03/29 14:28:42 tony2001 Exp $
+   $Id: sqlite.c,v 1.166.2.13 2006/04/18 14:30:15 iliaa Exp $
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1124,7 +1124,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, SQLite support, enabled);
-   php_info_print_table_row(2, PECL Module version, 
PHP_SQLITE_MODULE_VERSION  $Id: sqlite.c,v 1.166.2.12 2006/03/29 14:28:42 
tony2001 Exp $);
+   php_info_print_table_row(2, PECL Module version, 
PHP_SQLITE_MODULE_VERSION  $Id: sqlite.c,v 1.166.2.13 2006/04/18 14:30:15 
iliaa Exp $);
php_info_print_table_row(2, SQLite Library, sqlite_libversion());
php_info_print_table_row(2, SQLite Encoding, sqlite_libencoding());
php_info_print_table_end();
@@ -1705,7 +1705,9 @@
add_index_string(return_value, i, colnames[ncols + i] ? 
(char *)colnames[ncols + i] : , 1);
}
}
-
+   if (res.vm) {
+   sqlite_finalize(res.vm, NULL);
+   }
 done:
sqlite_exec(db-db, PRAGMA show_datatypes = OFF, NULL, NULL, NULL);
 }
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.519r2=1.2027.2.520diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.519 php-src/NEWS:1.2027.2.520
--- php-src/NEWS:1.2027.2.519   Tue Apr 18 13:07:59 2006
+++ php-src/NEWSTue Apr 18 14:30:16 2006
@@ -24,6 +24,8 @@
 - Fixed Bug #36872 (session_destroy() fails after call to 
   session_regenerate_id(true)). (Ilia)
 - Fixed bug #36513 (comment will be outputed in last line). (Dmitry)
+- Fixed bug #29476 (sqlite_fetch_column_types() locks the database forever).
+  (Ilia)
 
 06 Apr 2006, PHP 5.1.3RC3
 - Eliminated run-time constant fetching for TRUE, FALSE and NULL. (Dmitry)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/sqlite sqlite.c /ext/sqlite/tests bug35248.phpt

2005-11-17 Thread Ilia Alshanetsky
iliaa   Thu Nov 17 09:38:36 2005 EDT

  Added files: (Branch: PHP_5_1)
/php-src/ext/sqlite/tests   bug35248.phpt 

  Modified files:  
/php-src/ext/sqlite sqlite.c 
/php-srcNEWS 
  Log:
  Fixed bug #35248 (sqlite_query() doesnt set error_msg when return value is
  being used).
  
  
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.166.2.5r2=1.166.2.6ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.166.2.5 
php-src/ext/sqlite/sqlite.c:1.166.2.6
--- php-src/ext/sqlite/sqlite.c:1.166.2.5   Mon Nov 14 17:02:58 2005
+++ php-src/ext/sqlite/sqlite.c Thu Nov 17 09:38:32 2005
@@ -17,7 +17,7 @@
|  Marcus Boerger [EMAIL PROTECTED]  |
+--+
 
-   $Id: sqlite.c,v 1.166.2.5 2005/11/14 22:02:58 tony2001 Exp $ 
+   $Id: sqlite.c,v 1.166.2.6 2005/11/17 14:38:32 iliaa Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1125,7 +1125,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, SQLite support, enabled);
-   php_info_print_table_row(2, PECL Module version, 
PHP_SQLITE_MODULE_VERSION  $Id: sqlite.c,v 1.166.2.5 2005/11/14 22:02:58 
tony2001 Exp $);
+   php_info_print_table_row(2, PECL Module version, 
PHP_SQLITE_MODULE_VERSION  $Id: sqlite.c,v 1.166.2.6 2005/11/17 14:38:32 iliaa 
Exp $);
php_info_print_table_row(2, SQLite Library, sqlite_libversion());
php_info_print_table_row(2, SQLite Encoding, sqlite_libencoding());
php_info_print_table_end();
@@ -1516,7 +1516,7 @@
 /* }}} */
 
 /* {{{ sqlite_query */
-void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long 
sql_len, int mode, int buffered, zval *return_value, struct php_sqlite_result 
**prres TSRMLS_DC)
+void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long 
sql_len, int mode, int buffered, zval *return_value, struct php_sqlite_result 
**prres, zval *errmsg TSRMLS_DC)
 {
struct php_sqlite_result res, *rres;
int ret;
@@ -1532,6 +1532,9 @@
 
if (ret != SQLITE_OK) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, errtext);
+   if (errmsg) {
+   ZVAL_STRING(errmsg, errtext, 1);
+   }
sqlite_freemem(errtext);
goto terminate;
} else if (!res.vm) { /* empty query */
@@ -1632,7 +1635,7 @@
return;
}
 
-   sqlite_query(object, db, sql, sql_len, (int)mode, 0, return_value, NULL 
TSRMLS_CC);
+   sqlite_query(object, db, sql, sql_len, (int)mode, 0, return_value, 
NULL, errmsg TSRMLS_CC);
 }
 /* }}} */
 
@@ -1757,7 +1760,7 @@
return;
}
 
-   sqlite_query(object, db, sql, sql_len, (int)mode, 1, return_value, NULL 
TSRMLS_CC);
+   sqlite_query(object, db, sql, sql_len, (int)mode, 1, return_value, 
NULL, errmsg TSRMLS_CC);
 }
 /* }}} */
 
@@ -2168,7 +2171,7 @@
}

rres = (struct php_sqlite_result *)emalloc(sizeof(*rres));
-   sqlite_query(NULL, db, sql, sql_len, (int)mode, 0, NULL, rres 
TSRMLS_CC);
+   sqlite_query(NULL, db, sql, sql_len, (int)mode, 0, NULL, rres, NULL 
TSRMLS_CC);
if (db-last_err_code != SQLITE_OK) {
if (rres) {
efree(rres);
@@ -2284,7 +2287,7 @@
}
 
rres = (struct php_sqlite_result *)emalloc(sizeof(*rres));
-   sqlite_query(NULL, db, sql, sql_len, PHPSQLITE_NUM, 0, NULL, rres 
TSRMLS_CC);
+   sqlite_query(NULL, db, sql, sql_len, PHPSQLITE_NUM, 0, NULL, rres, 
NULL TSRMLS_CC);
if (db-last_err_code != SQLITE_OK) {
if (rres) {
efree(rres);
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.197r2=1.2027.2.198ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.197 php-src/NEWS:1.2027.2.198
--- php-src/NEWS:1.2027.2.197   Thu Nov 17 09:19:39 2005
+++ php-src/NEWSThu Nov 17 09:38:35 2005
@@ -1,6 +1,18 @@
 PHPNEWS
 |||
+17 Nov 2005, PHP 5.1 Release Candidate 6
+- Make zend_parse_params handle integers in a non-strict fashion, but emit an 
+  E_NOTICE on non well formed interger values. (Ilia)
+- Fixed bug #35249 (compile failure when ext/readline is compiled as shared).
+  (Jani)
+- Fixed bug #35248 (sqlite_query() doesnt set error_msg when return value is
+  being used). (Ilia) 
+- Fixed bug #35079 (stream_set_blocking(true) toggles, not enables 
+  blocking). (askalski at gmail dot com, Tony)
+
 16 Nov 2005, PHP 5.1 Release Candidate 5
+- Added an E_STRICT warning on the usage of {} for accessing of string offsets.
+  (Ilia)
 - Changed type hints to allow null as default value for class and array.
   (Marcus, Derick, Dmitry)
 - Fixed __get/__set to allow recursive calls for different 

[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/sqlite sqlite.c

2005-10-17 Thread Ilia Alshanetsky
iliaa   Mon Oct 17 10:30:36 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
/php-src/ext/sqlite sqlite.c 
  Log:
  MFH: Fixed bug #34884 (Possible crash in ext/sqlite when sqlite.assoc_case 
  is being used).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.132r2=1.2027.2.133ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.132 php-src/NEWS:1.2027.2.133
--- php-src/NEWS:1.2027.2.132   Mon Oct 17 03:56:55 2005
+++ php-src/NEWSMon Oct 17 10:30:33 2005
@@ -2,6 +2,8 @@
 |||
 ?? Oct 2005, PHP 5.1 Release Candidate 3
 - Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)
+- Fixed bug #34884 (Possible crash in ext/sqlite when sqlite.assoc_case is 
+  being used). (Tony,Ilia)
 
 14 Oct 2005, PHP 5.1 Release Candidate 2
 - Changed SQLite extension to be a shared module in Windows distribution.
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.166.2.1r2=1.166.2.2ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.166.2.1 
php-src/ext/sqlite/sqlite.c:1.166.2.2
--- php-src/ext/sqlite/sqlite.c:1.166.2.1   Thu Sep  8 17:07:40 2005
+++ php-src/ext/sqlite/sqlite.c Mon Oct 17 10:30:35 2005
@@ -17,7 +17,7 @@
|  Marcus Boerger [EMAIL PROTECTED]  |
+--+
 
-   $Id: sqlite.c,v 1.166.2.1 2005/09/08 21:07:40 iliaa Exp $ 
+   $Id: sqlite.c,v 1.166.2.2 2005/10/17 14:30:35 iliaa Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1125,7 +1125,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, SQLite support, enabled);
-   php_info_print_table_row(2, PECL Module version, 
PHP_SQLITE_MODULE_VERSION  $Id: sqlite.c,v 1.166.2.1 2005/09/08 21:07:40 iliaa 
Exp $);
+   php_info_print_table_row(2, PECL Module version, 
PHP_SQLITE_MODULE_VERSION  $Id: sqlite.c,v 1.166.2.2 2005/10/17 14:30:35 iliaa 
Exp $);
php_info_print_table_row(2, SQLite Library, sqlite_libversion());
php_info_print_table_row(2, SQLite Encoding, sqlite_libencoding());
php_info_print_table_end();
@@ -1440,14 +1440,13 @@
/* first row - lets copy the column names */
rres-col_names = safe_emalloc(rres-ncolumns, sizeof(char *), 
0);
for (i = 0; i  rres-ncolumns; i++) {
-   colname = (char*)colnames[i];
+   rres-col_names[i] = estrdup((char*)colnames[i]);
 
if (SQLITE_G(assoc_case) == 1) {
-   php_sqlite_strtoupper(colname);
+   php_sqlite_strtoupper(rres-col_names[i]);
} else if (SQLITE_G(assoc_case) == 2) {
-   php_sqlite_strtolower(colname);
+   php_sqlite_strtolower(rres-col_names[i]);
}
-   rres-col_names[i] = estrdup(colname);
}
if (!rres-buffered) {
/* non buffered mode - also fetch memory for on single 
row */
@@ -1686,16 +1685,17 @@
array_init(return_value);
 
for (i = 0; i  ncols; i++) {
-   char *colname = (char *)colnames[i];
+   if (result_type == PHPSQLITE_ASSOC) {
+   char *colname = estrdup((char *)colnames[i]);
 
-   if (SQLITE_G(assoc_case) == 1) {
-   php_sqlite_strtoupper(colname);
-   } else if (SQLITE_G(assoc_case) == 2) {
-   php_sqlite_strtolower(colname);
-   }
+   if (SQLITE_G(assoc_case) == 1) {
+   php_sqlite_strtoupper(colname);
+   } else if (SQLITE_G(assoc_case) == 2) {
+   php_sqlite_strtolower(colname);
+   }
 
-   if (result_type == PHPSQLITE_ASSOC) {
add_assoc_string(return_value, colname, colnames[ncols 
+ i] ? (char *)colnames[ncols + i] : , 1);
+   efree(colname);
}
if (result_type == PHPSQLITE_NUM) {
add_index_string(return_value, i, colnames[ncols + i] ? 
(char *)colnames[ncols + i] : , 1);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php