MFH: No mysqli stuff in ext/mysql

This commit is contained in:
Johannes Schlüter 2008-09-29 21:18:31 +00:00
parent 612beefba8
commit 3540da5344
2 changed files with 4 additions and 15 deletions

View File

@ -24,18 +24,7 @@
#include "ext/mysqlnd/mysqlnd_libmysql_compat.h"
/* Here comes non-libmysql API to have less ifdefs in mysqli*/
#define MYSQLI_CLOSE_EXPLICIT MYSQLND_CLOSE_EXPLICIT
#define MYSQLI_CLOSE_IMPLICIT MYSQLND_CLOSE_IMPLICIT
#define MYSQLI_CLOSE_DISCONNECTED MYSQLND_CLOSE_DISCONNECTED
#define mysqli_result_is_unbuffered(r) ((r)->unbuf)
#define mysqli_server_status(c) (c)->upsert_status.server_status
#define mysqli_stmt_warning_count(s) mysqlnd_stmt_warning_count((s))
#define mysqli_stmt_server_status(s) (s)->upsert_status.server_status
#define mysqli_stmt_get_connection(s) (s)->conn
#define mysqli_close(c, how) mysqlnd_close((c), (how))
#define mysqli_stmt_close(c, implicit) mysqlnd_stmt_close((c), (implicit))
#define mysqli_free_result(r, implicit) mysqlnd_free_result((r), (implicit))
/* Here comes non-libmysql API to have less ifdefs in mysqli */
#define mysql_result_is_unbuffered(r) ((r)->unbuf)
#endif

View File

@ -274,7 +274,7 @@ void timeout(int sig);
\
mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id, &type); \
if (mysql_result && type==le_result) { \
if (mysqli_result_is_unbuffered(mysql_result) && !mysql_eof(mysql_result)) { \
if (mysql_result_is_unbuffered(mysql_result) && !mysql_eof(mysql_result)) { \
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Function called without first fetching all rows from a previous unbuffered query"); \
} \
zend_list_delete(mysql->active_result_id); \
@ -888,7 +888,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
#endif
/* free mysql structure */
#ifdef MYSQL_USE_MYSQLND
mysqli_close(mysql->conn, MYSQLI_CLOSE_DISCONNECTED);
mysqlnd_close(mysql->conn, MYSQLND_CLOSE_DISCONNECTED);
#endif
efree(hashed_details);
efree(mysql);