summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Baschy <codelion@php.net>2000-03-12 01:03:23 +0000
committerLeo Baschy <codelion@php.net>2000-03-12 01:03:23 +0000
commit355eda0cf37b7ecdb0f3dac1b1f3bede6755f1f4 (patch)
treef90aa77f6f5c4fc2580c8a8fe2c6a62de36b0d85
parent7cd40d3a534f3adfc4ef3738fdb64fe64e6ceba7 (diff)
downloadphp-git-355eda0cf37b7ecdb0f3dac1b1f3bede6755f1f4.tar.gz
remove recent patch to _close_odbc_conn calling _free_odbc_result
-rw-r--r--ext/odbc/php_odbc.c30
-rw-r--r--ext/odbc/php_odbc.h1
2 files changed, 0 insertions, 31 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 2f2b173189..b0996c8ec5 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -160,18 +160,10 @@ static void _free_odbc_result(odbc_result *res)
* zend_list_delete(res->conn_ptr->id);
*/
}
- if (res->conn_ptr) {
- if (res->conn_ptr->one_result == res) {
- res->conn_ptr->one_result = NULL;
- };
- };
efree(res);
}
}
-#define ODBC_REGISTER_RESULT_WITH_CONNECTION(result) if (!((result)->conn_ptr->one_result)) { \
- (result)->conn_ptr->one_result = (result); };
-
static void _close_odbc_conn(odbc_connection *conn)
{
/* FIXME
@@ -181,10 +173,6 @@ static void _close_odbc_conn(odbc_connection *conn)
*/
ODBCLS_FETCH();
- if (conn->one_result) {
- zend_list_delete(conn->one_result->id);
- conn->one_result = NULL;
- };
SQLDisconnect(conn->hdbc);
SQLFreeConnect(conn->hdbc);
SQLFreeEnv(conn->henv);
@@ -196,10 +184,6 @@ static void _close_odbc_pconn(odbc_connection *conn)
{
ODBCLS_FETCH();
- if (conn->one_result) {
- zend_list_delete(conn->one_result->id);
- conn->one_result = NULL;
- };
SQLDisconnect(conn->hdbc);
SQLFreeConnect(conn->hdbc);
SQLFreeEnv(conn->henv);
@@ -704,7 +688,6 @@ PHP_FUNCTION(odbc_prepare)
zend_list_addref(conn->id);
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
RETURN_RESOURCE(result->id);
}
/* }}} */
@@ -1034,7 +1017,6 @@ PHP_FUNCTION(odbc_exec)
zend_list_addref(conn->id);
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
RETURN_RESOURCE(result->id);
}
@@ -1601,7 +1583,6 @@ int odbc_sqlconnect(odbc_connection **conn, char *db, char *uid, char *pwd, int
*conn = (odbc_connection *)pemalloc(sizeof(odbc_connection), persistent);
(*conn)->persistent = persistent;
- (*conn)->one_result = NULL;
SQLAllocEnv(&((*conn)->henv));
SQLAllocConnect((*conn)->henv, &((*conn)->hdbc));
@@ -2270,7 +2251,6 @@ PHP_FUNCTION(odbc_tables)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2353,7 +2333,6 @@ PHP_FUNCTION(odbc_columns)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2433,7 +2412,6 @@ PHP_FUNCTION(odbc_columnprivileges)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2534,7 +2512,6 @@ PHP_FUNCTION(odbc_foreignkeys)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2608,7 +2585,6 @@ PHP_FUNCTION(odbc_gettypeinfo)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2684,7 +2660,6 @@ PHP_FUNCTION(odbc_primarykeys)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2768,7 +2743,6 @@ PHP_FUNCTION(odbc_procedurecolumns)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2850,7 +2824,6 @@ PHP_FUNCTION(odbc_procedures)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -2940,7 +2913,6 @@ PHP_FUNCTION(odbc_specialcolumns)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -3025,7 +2997,6 @@ PHP_FUNCTION(odbc_statistics)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
@@ -3102,7 +3073,6 @@ PHP_FUNCTION(odbc_tableprivileges)
}
result->conn_ptr = conn;
result->fetched = 0;
- ODBC_REGISTER_RESULT_WITH_CONNECTION(result);
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index 899b6e65af..658cac6976 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -218,7 +218,6 @@ typedef struct odbc_connection {
/* int open;*/
int id;
int persistent;
- struct odbc_result *one_result; // to enable _close_odbc_conn to call _free_odbc_result
} odbc_connection;
typedef struct odbc_result_value {