mirror of
https://github.com/php/php-src.git
synced 2026-04-27 10:16:41 +02:00
cvs sync
This commit is contained in:
@@ -722,6 +722,13 @@ PHP_MINIT_FUNCTION(mysqli)
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_NUM_FLAG", NUM_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_PART_KEY_FLAG", PART_KEY_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_GROUP_FLAG", GROUP_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_ENUM_FLAG", ENUM_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_BINARY_FLAG", BINARY_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_NO_DEFAULT_VALUE_FLAG", NO_DEFAULT_VALUE_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
#if (MYSQL_VERSION_ID > 51122 && MYSQL_VERSION_ID < 60000) || (MYSQLI_VERSION_ID > 60003) || defined(HAVE_MYSQLND)
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_ON_UPDATE_NOW_FLAG", ON_UPDATE_NOW_FLAG, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_DECIMAL", FIELD_TYPE_DECIMAL, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_TYPE_TINY", FIELD_TYPE_TINY, CONST_CS | CONST_PERSISTENT);
|
||||
@@ -770,6 +777,18 @@ PHP_MINIT_FUNCTION(mysqli)
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_REPORT_ALL", MYSQLI_REPORT_ALL, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_REPORT_OFF", 0, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
REGISTER_LONG_CONSTANT("MYSQLI_DEBUG_TRACE_ENABLED",
|
||||
#ifdef HAVE_MYSQLND
|
||||
MYSQLND_DBG_ENABLED
|
||||
#else
|
||||
#ifndef DBUG_OFF
|
||||
0
|
||||
#else
|
||||
1
|
||||
#endif
|
||||
#endif
|
||||
, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "mysqlnd_charset.h"
|
||||
#include "mysqlnd_debug.h"
|
||||
#include "mysqlnd_block_alloc.h"
|
||||
/* for php_get_current_user() */
|
||||
#include "ext/standard/basic_functions.h"
|
||||
|
||||
/* the server doesn't support 4byte utf8, but let's make it forward compatible */
|
||||
#define MYSQLND_MAX_ALLOWED_USER_LEN 256 /* 64 char * 4byte */
|
||||
|
||||
@@ -46,6 +46,12 @@
|
||||
#define MYSQLND_DO_WIRE_CHECK_BEFORE_COMMAND 1
|
||||
#endif
|
||||
|
||||
#if PHP_DEBUG && !defined(PHP_WIN32)
|
||||
#define MYSQLND_DBG_ENABLED 1
|
||||
#else
|
||||
#define MYSQLND_DBG_ENABLED 0
|
||||
#endif
|
||||
|
||||
#ifdef ZTS
|
||||
#include "TSRM.h"
|
||||
#endif
|
||||
|
||||
@@ -433,7 +433,8 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
|
||||
}
|
||||
i = j;
|
||||
} else {
|
||||
self->file_name = (char *) mysqlnd_debug_default_trace_file;
|
||||
if (!self->file_name)
|
||||
self->file_name = (char *) mysqlnd_debug_default_trace_file;
|
||||
}
|
||||
state = PARSER_WAIT_COLON;
|
||||
break;
|
||||
@@ -491,9 +492,10 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const
|
||||
if ((i + 1) < mode_len && mode[i+1] == ',') {
|
||||
i+= 2;
|
||||
while (i < mode_len) {
|
||||
if (mode[i++] == ':') {
|
||||
if (mode[i] == ':') {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
state = PARSER_WAIT_COLON;
|
||||
|
||||
@@ -78,7 +78,8 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D);
|
||||
|
||||
char * mysqlnd_get_backtrace(TSRMLS_D);
|
||||
|
||||
#if PHP_DEBUG && !defined(PHP_WIN32)
|
||||
#if MYSQLND_DBG_ENABLED == 1
|
||||
|
||||
#define DBG_INF(msg) do { if (dbg_skip_trace == FALSE) MYSQLND_G(dbg)->m->log(MYSQLND_G(dbg), __LINE__, __FILE__, -1, "info : ", (msg)); } while (0)
|
||||
#define DBG_ERR(msg) do { if (dbg_skip_trace == FALSE) MYSQLND_G(dbg)->m->log(MYSQLND_G(dbg), __LINE__, __FILE__, -1, "error: ", (msg)); } while (0)
|
||||
#define DBG_INF_FMT(...) do { if (dbg_skip_trace == FALSE) MYSQLND_G(dbg)->m->log_va(MYSQLND_G(dbg), __LINE__, __FILE__, -1, "info : ", __VA_ARGS__); } while (0)
|
||||
@@ -90,7 +91,9 @@ char * mysqlnd_get_backtrace(TSRMLS_D);
|
||||
|
||||
|
||||
|
||||
#else
|
||||
#elif MYSQLND_DBG_ENABLED == 0
|
||||
|
||||
|
||||
static inline void DBG_INF(char *msg) {}
|
||||
static inline void DBG_ERR(char *msg) {}
|
||||
static inline void DBG_INF_FMT(char *format, ...) {}
|
||||
|
||||
@@ -210,6 +210,7 @@ typedef enum mysqlnd_server_option
|
||||
#define TIMESTAMP_FLAG 1024
|
||||
#define SET_FLAG 2048
|
||||
#define NO_DEFAULT_VALUE_FLAG 4096
|
||||
#define ON_UPDATE_NOW_FLAG 8192
|
||||
#define PART_KEY_FLAG 16384
|
||||
#define GROUP_FLAG 32768
|
||||
#define NUM_FLAG 32768
|
||||
|
||||
@@ -399,9 +399,6 @@ struct st_mysqlnd_connection
|
||||
unsigned long client_flag;
|
||||
unsigned long server_capabilities;
|
||||
|
||||
int tmp_int;
|
||||
|
||||
|
||||
/* For UPSERT queries */
|
||||
mysqlnd_upsert_status upsert_status;
|
||||
char *last_message;
|
||||
|
||||
Reference in New Issue
Block a user