summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_priv.h
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-04-29 15:49:51 +0000
committerAndrey Hristov <andrey@php.net>2010-04-29 15:49:51 +0000
commita3168a398c4bcb8b8b6800799ba6fee817a239d6 (patch)
tree646b003c55d7fa7181234cfc9c1fb2cf89e22ed8 /ext/mysqlnd/mysqlnd_priv.h
parent2c38266536989b2f587a8c7e4a91629b95646d8b (diff)
downloadphp-git-a3168a398c4bcb8b8b6800799ba6fee817a239d6.tar.gz
Handle OOM cases, in case of persistent connections this is real
and the Zend MM won't help.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_priv.h')
-rw-r--r--ext/mysqlnd/mysqlnd_priv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h
index 306be5b2e5..3f0bc7fed3 100644
--- a/ext/mysqlnd/mysqlnd_priv.h
+++ b/ext/mysqlnd/mysqlnd_priv.h
@@ -127,6 +127,9 @@
strlcpy(error_info.error, (c), sizeof(error_info.error)); \
}
+#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR(error_info, CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory)
+
+
#define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(stmt->error_info, a, b, c)
@@ -157,6 +160,7 @@ extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST +
PHPAPI extern const char * const mysqlnd_old_passwd;
PHPAPI extern const char * const mysqlnd_out_of_sync;
PHPAPI extern const char * const mysqlnd_server_gone;
+PHPAPI extern const char * const mysqlnd_out_of_memory;
enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC);