]> granicus.if.org Git - php/commitdiff
No mysqli stuff in ext/mysql
authorJohannes Schlüter <johannes@php.net>
Mon, 29 Sep 2008 21:15:16 +0000 (21:15 +0000)
committerJohannes Schlüter <johannes@php.net>
Mon, 29 Sep 2008 21:15:16 +0000 (21:15 +0000)
ext/mysql/mysql_mysqlnd.h
ext/mysql/php_mysql.c

index cf74618a925ea6562274544ba70df21fe21fb6a1..9b4de3d9f568cca74df6c55ab9aaa43b01059661 100644 (file)
 
 #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 mysql */
+#define mysql_result_is_unbuffered(r)  ((r)->unbuf)
 
 #endif
index 3f9a57e4b70bc88b091a0dedab1b3c14f33d349c..6a946a7a09a6aa69e482ac8a9dfb082e6ae4f64a 100644 (file)
@@ -269,7 +269,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);      \
@@ -915,7 +915,7 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        efree(hashed_details);
                        /* free mysql structure */
 #ifdef MYSQL_USE_MYSQLND
-                       mysqli_close(mysql->conn, MYSQLI_CLOSE_DISCONNECTED);
+                       mysqlnd_close(mysql->conn, MYSQLND_CLOSE_DISCONNECTED);
 #endif
                        efree(mysql);
                        MYSQL_DO_CONNECT_RETURN_FALSE();