It can happen that the underlying pointer is freed (like in
the case of connection reconnect), and then it cannot be allocated
anymore, which means that NULL will be used consequently by the
functions that fetch the resource and the crash is immediate.
* Removed ini options, safe_mode*
* Removed --enable-safe-mode --with-exec-dir configure options on Unix
* Updated extensions, SAPI's and core
* php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
mysql_stmt_attr_set returns my_bool instead of int.
If it was int, then 0 is success and !0 is failure, but
for my_bool 0 (FALSE) is failure and !0 is success.
We need to use macros from mysqlnd to be able to read the
bit fields, as they are specially encoded. mysqlnd is always
there, 5.3+, so its macros can be used, even if mysqlnd is
not compiled as library of choice.
Do yourself a favour and use mysqlnd. mysqlnd has no isuses here.
If you insist on using the MySQL Client Library (libmysql) I strongly recommend to use mysqli_stmt_store_result() when fetching geometry data using prepared statements. When streaming data, which is the default for prepared statements, ext/mysqli will have to make a guess on the size of the result buffer it needs. The guess is based on a length reported by the MySQL CLient Library (libmysql). The MySQL Client Library reports 4GB (!) for a POINT - a conservative and safe guess. Consequently, ext/mysqli will try to allocate 4GB of RAM. The true (maximum) size of the column is not available before buffering the result on the client using mysqli_stmt_store_result(). If you call mysqli_stmt_store_result(), the result buffers will not get bigger than needed. However, store_result()/buffering is usually not what you want when you ask for prepared statements.
[DOC] This makes mysql_refresh() as described in
http://dev.mysql.com/doc/refman/6.0/en/mysql-refresh.html
available as mysqli_Refresh() and mysqli->refresh()
MYSQLI_REFRESH_BACKUP_LOG is only available when linking libmysql 6.0
or mysqlnd
We need to clone them, if there will be a transformation (convert_to_xxx)
which will change the origin
(bug#44390 bind_param / bind_result and Object member variables)
- Make mysqlnd more compatible to libmysql, in this case if the execute of
a statement fails set the state of the statement back to PREPARED
- A test case to check the case of a failing statement.