cvs: pecl /dbdo dbdo.c dbdo_object.c /dbdo/tests 40_fetching.phpt 41_fetching.phpt 80_info.phpt
| From: | Alan Knowles | Date: | Wed, 30 Mar 2005 16:08:02 +0000 |
| Subject: | cvs: pecl /dbdo dbdo.c dbdo_object.c /dbdo/tests 40_fetching.phpt 41_fetching.phpt 80_info.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-2910@lists.php.net to get a copy of this message | ||
alan_k Wed Mar 30 11:08:02 2005 EDT
Modified files:
/pecl/dbdo dbdo.c dbdo_object.c
/pecl/dbdo/tests 40_fetching.phpt 41_fetching.phpt 80_info.phpt
Log:
now we are thread safe...
http://cvs.php.net/diff.php/pecl/dbdo/dbdo.c?r1=1.75&r2=1.76&ty=u
Index: pecl/dbdo/dbdo.c
diff -u pecl/dbdo/dbdo.c:1.75 pecl/dbdo/dbdo.c:1.76
--- pecl/dbdo/dbdo.c:1.75 Thu Mar 24 08:56:22 2005
+++ pecl/dbdo/dbdo.c Wed Mar 30 11:08:02 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dbdo.c,v 1.75 2005/03/24 13:56:22 alan_k Exp $ */
+/* $Id: dbdo.c,v 1.76 2005/03/30 16:08:02 alan_k Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -601,7 +601,7 @@
GdaProviderInfo *info;
php_info_print_table_start();
php_info_print_table_header(2, "DBDO support", "enabled");
- php_info_print_table_row(2, "CVS id", "$Id: dbdo.c,v 1.75 2005/03/24 13:56:22
alan_k Exp $");
+ php_info_print_table_row(2, "CVS id", "$Id: dbdo.c,v 1.76 2005/03/30 16:08:02
alan_k Exp $");
prov_list = gda_config_get_provider_list ();
@@ -815,7 +815,7 @@
zval *zconfig[5];
array_init(ret);
- config = dbdo_config_get(obj->table->dsn);
+ config = dbdo_config_get(obj->table->dsn TSRMLS_CC);
MAKE_STD_ZVAL(zconfig[0]);
ZVAL_STRING(zconfig[0], config->require_path ? config->require_path : "", 1);
@@ -969,7 +969,7 @@
RETURN_FALSE;
}
- obj->table = dbdo_table_new(database_name, table_name);
+ obj->table = dbdo_table_new(database_name, table_name TSRMLS_CC);
if (!dbdo_connect(obj TSRMLS_CC)) {
DBDO_DEBUG0(16,"CONNECT FAILED!");
@@ -1056,7 +1056,7 @@
efree(fn);
eretval = emalloc(sizeof(zval));
compiled_string_description = zend_make_compiled_string_description("DBDO::factory()"
TSRMLS_CC);
- zend_eval_string(cmd, eretval, compiled_string_description TSRMLS_DC);
+ zend_eval_string(cmd, eretval, compiled_string_description TSRMLS_CC);
efree(compiled_string_description );
efree(cmd);
zval_dtor(eretval);
@@ -1408,7 +1408,7 @@
return;
}
- dbdo_connect(obj);
+ dbdo_connect(obj TSRMLS_CC);
/* TODO:
@@ -2133,7 +2133,7 @@
MAKE_STD_ZVAL(ztitle);
ZVAL_STRING(ztitle, title, 1);
- value = dbdo_property_read(object, ztitle, 0 TSRMLS_DC);
+ value = dbdo_property_read(object, ztitle, 0 TSRMLS_CC);
zval_dtor(ztitle);
FREE_ZVAL(ztitle);
http://cvs.php.net/diff.php/pecl/dbdo/dbdo_object.c?r1=1.17&r2=1.18&ty=u
Index: pecl/dbdo/dbdo_object.c
diff -u pecl/dbdo/dbdo_object.c:1.17 pecl/dbdo/dbdo_object.c:1.18
--- pecl/dbdo/dbdo_object.c:1.17 Tue Mar 22 09:55:16 2005
+++ pecl/dbdo/dbdo_object.c Wed Mar 30 11:08:02 2005
@@ -66,7 +66,6 @@
{
dbdo_config *con;
- TSRMLS_FETCH();
if (obj->con && GDA_IS_CONNECTION (obj->con)) {
return 1;
@@ -161,7 +160,7 @@
return 1; /* already got it... */
}
/* big question? - should we cache this!!! */
- if (!dbdo_connect(obj)) {
+ if (!dbdo_connect(obj TSRMLS_CC)) {
return 0;
}
@@ -195,8 +194,8 @@
GdaValue *value;
gchar *string;
gchar *title;
-
- dbdo_schema_load(obj TSRMLS_CC);
+ TSRMLS_FETCH();
+ dbdo_schema_load(obj TSRMLS_CC);
column_id = gda_data_model_get_column_position(obj->table->schema,"Field name");
if (column_id == -1) {
@@ -225,7 +224,7 @@
gint col,row_id;
GdaValue *value;
gchar *string;
-
+ TSRMLS_FETCH();
dbdo_schema_load(obj TSRMLS_CC);
row_id = dbdo_schema_get_col_row(obj,name);
@@ -247,7 +246,7 @@
gchar *string;
gint row_id;
char *coltype;
-
+ TSRMLS_FETCH();
coltype = dbdo_schema_get_type(obj, name);
DBDO_DEBUG2(16,"dbdo_object.value_type_from_column getting type for column %s = %s",
name ,coltype);
@@ -717,7 +716,7 @@
GdaDataSourceInfo *info;
ds_list = gda_config_get_data_source_list ();
-
+ TSRMLS_FETCH();
DBDO_DEBUG0(16,"datasources?");
for (node = g_list_first (ds_list); node != NULL; node = g_list_next (node))
{
@@ -982,12 +981,12 @@
dbdo_sequence_guess(dbdo_object *obj)
{
gint row_id,column_id;
-
+ TSRMLS_FETCH();
/* have we already tried to get it? */
if (obj->table->sequenceAssigned == TRUE) {
return TRUE;
}
-
+
dbdo_schema_load(obj TSRMLS_CC);
/* flag we have attempted this! */
obj->table->sequenceAssigned = TRUE;
http://cvs.php.net/diff.php/pecl/dbdo/tests/40_fetching.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/dbdo/tests/40_fetching.phpt
diff -u pecl/dbdo/tests/40_fetching.phpt:1.1 pecl/dbdo/tests/40_fetching.phpt:1.2
--- pecl/dbdo/tests/40_fetching.phpt:1.1 Tue Feb 8 09:14:58 2005
+++ pecl/dbdo/tests/40_fetching.phpt Wed Mar 30 11:08:02 2005
@@ -51,7 +51,7 @@
INSERT INTO test ( name , username , password , firstname , lastname ) VALUES ( 'test2' ,
'testusernam2' , 'testpwd2' , 'testfname2' , 'testlname2' )
in %s on line %s
-Warning: DBDO:(Debug) DBDO::query(SQL):
+Warning: DBDO:(Debug) QUERY:
SELECT id,name FROM test WHERE (id in (%s,%s))
in %s on line %s
Array
http://cvs.php.net/diff.php/pecl/dbdo/tests/41_fetching.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/dbdo/tests/41_fetching.phpt
diff -u pecl/dbdo/tests/41_fetching.phpt:1.1 pecl/dbdo/tests/41_fetching.phpt:1.2
--- pecl/dbdo/tests/41_fetching.phpt:1.1 Tue Feb 8 09:14:58 2005
+++ pecl/dbdo/tests/41_fetching.phpt Wed Mar 30 11:08:02 2005
@@ -51,7 +51,7 @@
INSERT INTO test ( name , username , password , firstname , lastname ) VALUES ( 'test2' ,
'testusernam2' , 'testpwd2' , 'testfname2' , 'testlname2' )
in %s on line %s
-Warning: DBDO:(Debug) DBDO::query(SQL):
+Warning: DBDO:(Debug) QUERY:
SELECT name FROM test WHERE (id in (%s,%s))
in %s on line %s
Array
http://cvs.php.net/diff.php/pecl/dbdo/tests/80_info.phpt?r1=1.1&r2=1.2&ty=u
Index: pecl/dbdo/tests/80_info.phpt
diff -u pecl/dbdo/tests/80_info.phpt:1.1 pecl/dbdo/tests/80_info.phpt:1.2
--- pecl/dbdo/tests/80_info.phpt:1.1 Sun Jan 9 00:54:00 2005
+++ pecl/dbdo/tests/80_info.phpt Wed Mar 30 11:08:02 2005
@@ -40,7 +40,7 @@
[table] => test
[dsn] => test
[database] => test
- [cnc] => DATABASE=test
+ [cnc] => DATABASE=test;USER=alan
[provider] => MySQL
[username] => %s
[password] =>