on production systems, if of course measured performance degradation is not
minimal.
*/
-#if A0 && PHP_DEBUG
+#if defined(A0) && PHP_DEBUG
#define MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND 1
#endif
}
if (flags & MYSQLND_DEBUG_DUMP_TIME) {
/* The following from FF's DBUG library, which is in the public domain */
-#if defined(PHP_WIN32)
+#ifdef PHP_WIN32
/* FIXME This doesn't give microseconds as in Unix case, and the resolution is
in system ticks, 10 ms intervals. See my_getsystime.c for high res */
SYSTEMTIME loc_t;
}
if (flags & MYSQLND_DEBUG_DUMP_TIME) {
/* The following from FF's DBUG library, which is in the public domain */
-#if defined(PHP_WIN32)
+#ifdef PHP_WIN32
/* FIXME This doesn't give microseconds as in Unix case, and the resolution is
in system ticks, 10 ms intervals. See my_getsystime.c for high res */
SYSTEMTIME loc_t;
mysqlnd_plugin_core.plugin_header.plugin_stats.values = mysqlnd_global_stats;
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_plugin_core);
}
-#if defined(MYSQLND_DBG_ENABLED) && MYSQLND_DBG_ENABLED == 1
+#if MYSQLND_DBG_ENABLED == 1
mysqlnd_example_plugin_register();
#endif
mysqlnd_debug_trace_plugin_register();
#include "mysqlnd_debug.h"
/*--------------------------------------------------------------------*/
-#if defined(MYSQLND_DBG_ENABLED) && MYSQLND_DBG_ENABLED == 1
+#if MYSQLND_DBG_ENABLED == 1
static enum_func_status mysqlnd_example_plugin_end(void * p);
static MYSQLND_STATS * mysqlnd_plugin_example_stats = NULL;
mysqlnd_plugin_register_ex((struct st_mysqlnd_plugin_header *) &mysqlnd_example_plugin);
}
/* }}} */
-#endif /* defined(MYSQLND_DBG_ENABLED) && MYSQLND_DBG_ENABLED == 1 */
+#endif /* MYSQLND_DBG_ENABLED == 1 */
/*--------------------------------------------------------------------*/
static HashTable mysqlnd_registered_plugins;
DBG_INF_FMT("writing "MYSQLND_SZ_T_SPEC" bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE);
bytes_sent = vio->data->m.network_write(vio, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, conn_stats, error_info);
pfc->data->compressed_envelope_packet_no++;
- #if WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY
+ #ifdef WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY
if (res == Z_OK) {
size_t decompressed_size = left + MYSQLND_HEADER_SIZE;
zend_uchar * decompressed_data = mnd_malloc(decompressed_size);
max_allowed_packet_size on the server and resending the data.
*/
#ifdef MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND
-#if HAVE_USLEEP && !defined(PHP_WIN32)
+#if defined(HAVE_USLEEP) && !defined(PHP_WIN32)
usleep(120000);
#endif
if ((packet_len = conn->protocol_frame_codec->m.consume_uneaten_data(conn->protocol_frame_codec, COM_STMT_SEND_LONG_DATA))) {
" bytes after end of packet", (p + len) - packet_end - 1);
DBG_RETURN(FAIL);
} else {
-#if defined(MYSQLND_STRING_TO_INT_CONVERSION)
+#ifdef MYSQLND_STRING_TO_INT_CONVERSION
struct st_mysqlnd_perm_bind perm_bind =
mysqlnd_ps_fetch_functions[fields_metadata[i].type];
#endif