summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2011-10-31 11:46:24 +0000
committerAndrey Hristov <andrey@php.net>2011-10-31 11:46:24 +0000
commit8fb6bdd5b82fbfeb295f9a3d181a29606f7f670d (patch)
tree73a7516959ea1b8d464c7b816d407cff91d1ba16 /ext/mysqli/mysqli_api.c
parent63812d1849fed668b773b781c957144221019033 (diff)
downloadphp-git-8fb6bdd5b82fbfeb295f9a3d181a29606f7f670d.tar.gz
Split struct MYSQLND in struct MYSQLND and struct MYSQLD_CONN_DATA.
A step in the direction of keeping internal data private
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index a611fef4b3..20c7ff3d28 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1291,8 +1291,11 @@ PHP_FUNCTION(mysqli_get_host_info)
return;
}
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID);
-
+#if !defined(MYSQLI_USE_MYSQLND)
RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1);
+#else
+ RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : "", 1);
+#endif
}
/* }}} */
@@ -1804,7 +1807,7 @@ PHP_FUNCTION(mysqli_prepare)
memcpy(last_error, stmt->stmt->last_error, MYSQL_ERRMSG_SIZE);
memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1);
#else
- MYSQLND_ERROR_INFO error_info = *mysql->mysql->error_info;
+ MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info;
#endif
mysqli_stmt_close(stmt->stmt, FALSE);
stmt->stmt = NULL;
@@ -1815,7 +1818,7 @@ PHP_FUNCTION(mysqli_prepare)
memcpy(mysql->mysql->net.last_error, last_error, MYSQL_ERRMSG_SIZE);
memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1);
#else
- *mysql->mysql->error_info = error_info;
+ *mysql->mysql->data->error_info = error_info;
#endif
}
}