MDEV-6819 st_mysql_show_var::value should be void* not char*
This commit is contained in:
parent
20cacb0064
commit
18feb62fee
@ -190,12 +190,12 @@ enum enum_var_type
|
|||||||
|
|
||||||
struct st_mysql_show_var {
|
struct st_mysql_show_var {
|
||||||
const char *name;
|
const char *name;
|
||||||
char *value;
|
void *value;
|
||||||
enum enum_mysql_show_type type;
|
enum enum_mysql_show_type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SHOW_VAR_FUNC_BUFF_SIZE (256 * sizeof(void*))
|
#define SHOW_VAR_FUNC_BUFF_SIZE (256 * sizeof(void*))
|
||||||
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *, enum enum_var_type);
|
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *, enum enum_var_type);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -231,10 +231,10 @@ enum enum_var_type
|
|||||||
};
|
};
|
||||||
struct st_mysql_show_var {
|
struct st_mysql_show_var {
|
||||||
const char *name;
|
const char *name;
|
||||||
char *value;
|
void *value;
|
||||||
enum enum_mysql_show_type type;
|
enum enum_mysql_show_type type;
|
||||||
};
|
};
|
||||||
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
|
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
|
||||||
struct st_mysql_sys_var;
|
struct st_mysql_sys_var;
|
||||||
struct st_mysql_value;
|
struct st_mysql_value;
|
||||||
typedef int (*mysql_var_check_func)(void* thd,
|
typedef int (*mysql_var_check_func)(void* thd,
|
||||||
|
@ -231,10 +231,10 @@ enum enum_var_type
|
|||||||
};
|
};
|
||||||
struct st_mysql_show_var {
|
struct st_mysql_show_var {
|
||||||
const char *name;
|
const char *name;
|
||||||
char *value;
|
void *value;
|
||||||
enum enum_mysql_show_type type;
|
enum enum_mysql_show_type type;
|
||||||
};
|
};
|
||||||
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
|
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
|
||||||
struct st_mysql_sys_var;
|
struct st_mysql_sys_var;
|
||||||
struct st_mysql_value;
|
struct st_mysql_value;
|
||||||
typedef int (*mysql_var_check_func)(void* thd,
|
typedef int (*mysql_var_check_func)(void* thd,
|
||||||
|
@ -231,10 +231,10 @@ enum enum_var_type
|
|||||||
};
|
};
|
||||||
struct st_mysql_show_var {
|
struct st_mysql_show_var {
|
||||||
const char *name;
|
const char *name;
|
||||||
char *value;
|
void *value;
|
||||||
enum enum_mysql_show_type type;
|
enum enum_mysql_show_type type;
|
||||||
};
|
};
|
||||||
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
|
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
|
||||||
struct st_mysql_sys_var;
|
struct st_mysql_sys_var;
|
||||||
struct st_mysql_value;
|
struct st_mysql_value;
|
||||||
typedef int (*mysql_var_check_func)(void* thd,
|
typedef int (*mysql_var_check_func)(void* thd,
|
||||||
|
@ -231,10 +231,10 @@ enum enum_var_type
|
|||||||
};
|
};
|
||||||
struct st_mysql_show_var {
|
struct st_mysql_show_var {
|
||||||
const char *name;
|
const char *name;
|
||||||
char *value;
|
void *value;
|
||||||
enum enum_mysql_show_type type;
|
enum enum_mysql_show_type type;
|
||||||
};
|
};
|
||||||
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
|
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
|
||||||
struct st_mysql_sys_var;
|
struct st_mysql_sys_var;
|
||||||
struct st_mysql_value;
|
struct st_mysql_value;
|
||||||
typedef int (*mysql_var_check_func)(void* thd,
|
typedef int (*mysql_var_check_func)(void* thd,
|
||||||
|
@ -231,10 +231,10 @@ enum enum_var_type
|
|||||||
};
|
};
|
||||||
struct st_mysql_show_var {
|
struct st_mysql_show_var {
|
||||||
const char *name;
|
const char *name;
|
||||||
char *value;
|
void *value;
|
||||||
enum enum_mysql_show_type type;
|
enum enum_mysql_show_type type;
|
||||||
};
|
};
|
||||||
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *, enum enum_var_type);
|
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, void *, enum enum_var_type);
|
||||||
struct st_mysql_sys_var;
|
struct st_mysql_sys_var;
|
||||||
struct st_mysql_value;
|
struct st_mysql_value;
|
||||||
typedef int (*mysql_var_check_func)(void* thd,
|
typedef int (*mysql_var_check_func)(void* thd,
|
||||||
|
331
sql/mysqld.cc
331
sql/mysqld.cc
@ -3712,163 +3712,166 @@ static bool init_global_datetime_format(timestamp_type format_type,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define COM_STATUS(X) (void*) offsetof(STATUS_VAR, X), SHOW_LONG_STATUS
|
||||||
|
#define STMT_STATUS(X) COM_STATUS(com_stat[(uint) X])
|
||||||
|
|
||||||
SHOW_VAR com_status_vars[]= {
|
SHOW_VAR com_status_vars[]= {
|
||||||
{"admin_commands", (char*) offsetof(STATUS_VAR, com_other), SHOW_LONG_STATUS},
|
{"admin_commands", COM_STATUS(com_other)},
|
||||||
{"alter_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_DB]), SHOW_LONG_STATUS},
|
{"alter_db", STMT_STATUS(SQLCOM_ALTER_DB)},
|
||||||
{"alter_db_upgrade", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_DB_UPGRADE]), SHOW_LONG_STATUS},
|
{"alter_db_upgrade", STMT_STATUS(SQLCOM_ALTER_DB_UPGRADE)},
|
||||||
{"alter_event", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_EVENT]), SHOW_LONG_STATUS},
|
{"alter_event", STMT_STATUS(SQLCOM_ALTER_EVENT)},
|
||||||
{"alter_function", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_FUNCTION]), SHOW_LONG_STATUS},
|
{"alter_function", STMT_STATUS(SQLCOM_ALTER_FUNCTION)},
|
||||||
{"alter_procedure", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_PROCEDURE]), SHOW_LONG_STATUS},
|
{"alter_procedure", STMT_STATUS(SQLCOM_ALTER_PROCEDURE)},
|
||||||
{"alter_server", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_SERVER]), SHOW_LONG_STATUS},
|
{"alter_server", STMT_STATUS(SQLCOM_ALTER_SERVER)},
|
||||||
{"alter_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_TABLE]), SHOW_LONG_STATUS},
|
{"alter_table", STMT_STATUS(SQLCOM_ALTER_TABLE)},
|
||||||
{"alter_tablespace", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_TABLESPACE]), SHOW_LONG_STATUS},
|
{"alter_tablespace", STMT_STATUS(SQLCOM_ALTER_TABLESPACE)},
|
||||||
{"analyze", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ANALYZE]), SHOW_LONG_STATUS},
|
{"analyze", STMT_STATUS(SQLCOM_ANALYZE)},
|
||||||
{"assign_to_keycache", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ASSIGN_TO_KEYCACHE]), SHOW_LONG_STATUS},
|
{"assign_to_keycache", STMT_STATUS(SQLCOM_ASSIGN_TO_KEYCACHE)},
|
||||||
{"begin", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_BEGIN]), SHOW_LONG_STATUS},
|
{"begin", STMT_STATUS(SQLCOM_BEGIN)},
|
||||||
{"binlog", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_BINLOG_BASE64_EVENT]), SHOW_LONG_STATUS},
|
{"binlog", STMT_STATUS(SQLCOM_BINLOG_BASE64_EVENT)},
|
||||||
{"call_procedure", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CALL]), SHOW_LONG_STATUS},
|
{"call_procedure", STMT_STATUS(SQLCOM_CALL)},
|
||||||
{"change_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CHANGE_DB]), SHOW_LONG_STATUS},
|
{"change_db", STMT_STATUS(SQLCOM_CHANGE_DB)},
|
||||||
{"change_master", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CHANGE_MASTER]), SHOW_LONG_STATUS},
|
{"change_master", STMT_STATUS(SQLCOM_CHANGE_MASTER)},
|
||||||
{"check", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CHECK]), SHOW_LONG_STATUS},
|
{"check", STMT_STATUS(SQLCOM_CHECK)},
|
||||||
{"checksum", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CHECKSUM]), SHOW_LONG_STATUS},
|
{"checksum", STMT_STATUS(SQLCOM_CHECKSUM)},
|
||||||
{"commit", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_COMMIT]), SHOW_LONG_STATUS},
|
{"commit", STMT_STATUS(SQLCOM_COMMIT)},
|
||||||
{"compound_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_COMPOUND]), SHOW_LONG_STATUS},
|
{"compound_sql", STMT_STATUS(SQLCOM_COMPOUND)},
|
||||||
{"create_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_DB]), SHOW_LONG_STATUS},
|
{"create_db", STMT_STATUS(SQLCOM_CREATE_DB)},
|
||||||
{"create_event", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_EVENT]), SHOW_LONG_STATUS},
|
{"create_event", STMT_STATUS(SQLCOM_CREATE_EVENT)},
|
||||||
{"create_function", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_SPFUNCTION]), SHOW_LONG_STATUS},
|
{"create_function", STMT_STATUS(SQLCOM_CREATE_SPFUNCTION)},
|
||||||
{"create_index", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_INDEX]), SHOW_LONG_STATUS},
|
{"create_index", STMT_STATUS(SQLCOM_CREATE_INDEX)},
|
||||||
{"create_procedure", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_PROCEDURE]), SHOW_LONG_STATUS},
|
{"create_procedure", STMT_STATUS(SQLCOM_CREATE_PROCEDURE)},
|
||||||
{"create_role", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_ROLE]), SHOW_LONG_STATUS},
|
{"create_role", STMT_STATUS(SQLCOM_CREATE_ROLE)},
|
||||||
{"create_server", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_SERVER]), SHOW_LONG_STATUS},
|
{"create_server", STMT_STATUS(SQLCOM_CREATE_SERVER)},
|
||||||
{"create_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_TABLE]), SHOW_LONG_STATUS},
|
{"create_table", STMT_STATUS(SQLCOM_CREATE_TABLE)},
|
||||||
{"create_trigger", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_TRIGGER]), SHOW_LONG_STATUS},
|
{"create_trigger", STMT_STATUS(SQLCOM_CREATE_TRIGGER)},
|
||||||
{"create_udf", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_FUNCTION]), SHOW_LONG_STATUS},
|
{"create_udf", STMT_STATUS(SQLCOM_CREATE_FUNCTION)},
|
||||||
{"create_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_USER]), SHOW_LONG_STATUS},
|
{"create_user", STMT_STATUS(SQLCOM_CREATE_USER)},
|
||||||
{"create_view", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_VIEW]), SHOW_LONG_STATUS},
|
{"create_view", STMT_STATUS(SQLCOM_CREATE_VIEW)},
|
||||||
{"dealloc_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DEALLOCATE_PREPARE]), SHOW_LONG_STATUS},
|
{"dealloc_sql", STMT_STATUS(SQLCOM_DEALLOCATE_PREPARE)},
|
||||||
{"delete", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE]), SHOW_LONG_STATUS},
|
{"delete", STMT_STATUS(SQLCOM_DELETE)},
|
||||||
{"delete_multi", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE_MULTI]), SHOW_LONG_STATUS},
|
{"delete_multi", STMT_STATUS(SQLCOM_DELETE_MULTI)},
|
||||||
{"do", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DO]), SHOW_LONG_STATUS},
|
{"do", STMT_STATUS(SQLCOM_DO)},
|
||||||
{"drop_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_DB]), SHOW_LONG_STATUS},
|
{"drop_db", STMT_STATUS(SQLCOM_DROP_DB)},
|
||||||
{"drop_event", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_EVENT]), SHOW_LONG_STATUS},
|
{"drop_event", STMT_STATUS(SQLCOM_DROP_EVENT)},
|
||||||
{"drop_function", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_FUNCTION]), SHOW_LONG_STATUS},
|
{"drop_function", STMT_STATUS(SQLCOM_DROP_FUNCTION)},
|
||||||
{"drop_index", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_INDEX]), SHOW_LONG_STATUS},
|
{"drop_index", STMT_STATUS(SQLCOM_DROP_INDEX)},
|
||||||
{"drop_procedure", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_PROCEDURE]), SHOW_LONG_STATUS},
|
{"drop_procedure", STMT_STATUS(SQLCOM_DROP_PROCEDURE)},
|
||||||
{"drop_role", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_ROLE]), SHOW_LONG_STATUS},
|
{"drop_role", STMT_STATUS(SQLCOM_DROP_ROLE)},
|
||||||
{"drop_server", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_SERVER]), SHOW_LONG_STATUS},
|
{"drop_server", STMT_STATUS(SQLCOM_DROP_SERVER)},
|
||||||
{"drop_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_TABLE]), SHOW_LONG_STATUS},
|
{"drop_table", STMT_STATUS(SQLCOM_DROP_TABLE)},
|
||||||
{"drop_trigger", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_TRIGGER]), SHOW_LONG_STATUS},
|
{"drop_trigger", STMT_STATUS(SQLCOM_DROP_TRIGGER)},
|
||||||
{"drop_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_USER]), SHOW_LONG_STATUS},
|
{"drop_user", STMT_STATUS(SQLCOM_DROP_USER)},
|
||||||
{"drop_view", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_VIEW]), SHOW_LONG_STATUS},
|
{"drop_view", STMT_STATUS(SQLCOM_DROP_VIEW)},
|
||||||
{"empty_query", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_EMPTY_QUERY]), SHOW_LONG_STATUS},
|
{"empty_query", STMT_STATUS(SQLCOM_EMPTY_QUERY)},
|
||||||
{"execute_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_EXECUTE]), SHOW_LONG_STATUS},
|
{"execute_sql", STMT_STATUS(SQLCOM_EXECUTE)},
|
||||||
{"flush", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_FLUSH]), SHOW_LONG_STATUS},
|
{"flush", STMT_STATUS(SQLCOM_FLUSH)},
|
||||||
{"get_diagnostics", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_GET_DIAGNOSTICS]), SHOW_LONG_STATUS},
|
{"get_diagnostics", STMT_STATUS(SQLCOM_GET_DIAGNOSTICS)},
|
||||||
{"grant", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_GRANT]), SHOW_LONG_STATUS},
|
{"grant", STMT_STATUS(SQLCOM_GRANT)},
|
||||||
{"grant_role", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_GRANT_ROLE]), SHOW_LONG_STATUS},
|
{"grant_role", STMT_STATUS(SQLCOM_GRANT_ROLE)},
|
||||||
{"ha_close", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_HA_CLOSE]), SHOW_LONG_STATUS},
|
{"ha_close", STMT_STATUS(SQLCOM_HA_CLOSE)},
|
||||||
{"ha_open", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_HA_OPEN]), SHOW_LONG_STATUS},
|
{"ha_open", STMT_STATUS(SQLCOM_HA_OPEN)},
|
||||||
{"ha_read", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_HA_READ]), SHOW_LONG_STATUS},
|
{"ha_read", STMT_STATUS(SQLCOM_HA_READ)},
|
||||||
{"help", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_HELP]), SHOW_LONG_STATUS},
|
{"help", STMT_STATUS(SQLCOM_HELP)},
|
||||||
{"insert", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_INSERT]), SHOW_LONG_STATUS},
|
{"insert", STMT_STATUS(SQLCOM_INSERT)},
|
||||||
{"insert_select", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_INSERT_SELECT]), SHOW_LONG_STATUS},
|
{"insert_select", STMT_STATUS(SQLCOM_INSERT_SELECT)},
|
||||||
{"install_plugin", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_INSTALL_PLUGIN]), SHOW_LONG_STATUS},
|
{"install_plugin", STMT_STATUS(SQLCOM_INSTALL_PLUGIN)},
|
||||||
{"kill", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_KILL]), SHOW_LONG_STATUS},
|
{"kill", STMT_STATUS(SQLCOM_KILL)},
|
||||||
{"load", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_LOAD]), SHOW_LONG_STATUS},
|
{"load", STMT_STATUS(SQLCOM_LOAD)},
|
||||||
{"lock_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_LOCK_TABLES]), SHOW_LONG_STATUS},
|
{"lock_tables", STMT_STATUS(SQLCOM_LOCK_TABLES)},
|
||||||
{"optimize", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_OPTIMIZE]), SHOW_LONG_STATUS},
|
{"optimize", STMT_STATUS(SQLCOM_OPTIMIZE)},
|
||||||
{"preload_keys", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PRELOAD_KEYS]), SHOW_LONG_STATUS},
|
{"preload_keys", STMT_STATUS(SQLCOM_PRELOAD_KEYS)},
|
||||||
{"prepare_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PREPARE]), SHOW_LONG_STATUS},
|
{"prepare_sql", STMT_STATUS(SQLCOM_PREPARE)},
|
||||||
{"purge", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE]), SHOW_LONG_STATUS},
|
{"purge", STMT_STATUS(SQLCOM_PURGE)},
|
||||||
{"purge_before_date", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PURGE_BEFORE]), SHOW_LONG_STATUS},
|
{"purge_before_date", STMT_STATUS(SQLCOM_PURGE_BEFORE)},
|
||||||
{"release_savepoint", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RELEASE_SAVEPOINT]), SHOW_LONG_STATUS},
|
{"release_savepoint", STMT_STATUS(SQLCOM_RELEASE_SAVEPOINT)},
|
||||||
{"rename_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RENAME_TABLE]), SHOW_LONG_STATUS},
|
{"rename_table", STMT_STATUS(SQLCOM_RENAME_TABLE)},
|
||||||
{"rename_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RENAME_USER]), SHOW_LONG_STATUS},
|
{"rename_user", STMT_STATUS(SQLCOM_RENAME_USER)},
|
||||||
{"repair", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REPAIR]), SHOW_LONG_STATUS},
|
{"repair", STMT_STATUS(SQLCOM_REPAIR)},
|
||||||
{"replace", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REPLACE]), SHOW_LONG_STATUS},
|
{"replace", STMT_STATUS(SQLCOM_REPLACE)},
|
||||||
{"replace_select", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REPLACE_SELECT]), SHOW_LONG_STATUS},
|
{"replace_select", STMT_STATUS(SQLCOM_REPLACE_SELECT)},
|
||||||
{"reset", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RESET]), SHOW_LONG_STATUS},
|
{"reset", STMT_STATUS(SQLCOM_RESET)},
|
||||||
{"resignal", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RESIGNAL]), SHOW_LONG_STATUS},
|
{"resignal", STMT_STATUS(SQLCOM_RESIGNAL)},
|
||||||
{"revoke", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REVOKE]), SHOW_LONG_STATUS},
|
{"revoke", STMT_STATUS(SQLCOM_REVOKE)},
|
||||||
{"revoke_all", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REVOKE_ALL]), SHOW_LONG_STATUS},
|
{"revoke_all", STMT_STATUS(SQLCOM_REVOKE_ALL)},
|
||||||
{"revoke_role", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REVOKE_ROLE]), SHOW_LONG_STATUS},
|
{"revoke_role", STMT_STATUS(SQLCOM_REVOKE_ROLE)},
|
||||||
{"rollback", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ROLLBACK]), SHOW_LONG_STATUS},
|
{"rollback", STMT_STATUS(SQLCOM_ROLLBACK)},
|
||||||
{"rollback_to_savepoint",(char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ROLLBACK_TO_SAVEPOINT]), SHOW_LONG_STATUS},
|
{"rollback_to_savepoint",STMT_STATUS(SQLCOM_ROLLBACK_TO_SAVEPOINT)},
|
||||||
{"savepoint", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SAVEPOINT]), SHOW_LONG_STATUS},
|
{"savepoint", STMT_STATUS(SQLCOM_SAVEPOINT)},
|
||||||
{"select", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SELECT]), SHOW_LONG_STATUS},
|
{"select", STMT_STATUS(SQLCOM_SELECT)},
|
||||||
{"set_option", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SET_OPTION]), SHOW_LONG_STATUS},
|
{"set_option", STMT_STATUS(SQLCOM_SET_OPTION)},
|
||||||
{"show_authors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_AUTHORS]), SHOW_LONG_STATUS},
|
{"show_authors", STMT_STATUS(SQLCOM_SHOW_AUTHORS)},
|
||||||
{"show_binlog_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOG_EVENTS]), SHOW_LONG_STATUS},
|
{"show_binlog_events", STMT_STATUS(SQLCOM_SHOW_BINLOG_EVENTS)},
|
||||||
{"show_binlogs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOGS]), SHOW_LONG_STATUS},
|
{"show_binlogs", STMT_STATUS(SQLCOM_SHOW_BINLOGS)},
|
||||||
{"show_charsets", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CHARSETS]), SHOW_LONG_STATUS},
|
{"show_charsets", STMT_STATUS(SQLCOM_SHOW_CHARSETS)},
|
||||||
{"show_collations", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLLATIONS]), SHOW_LONG_STATUS},
|
{"show_collations", STMT_STATUS(SQLCOM_SHOW_COLLATIONS)},
|
||||||
{"show_contributors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CONTRIBUTORS]), SHOW_LONG_STATUS},
|
{"show_contributors", STMT_STATUS(SQLCOM_SHOW_CONTRIBUTORS)},
|
||||||
{"show_create_db", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
|
{"show_create_db", STMT_STATUS(SQLCOM_SHOW_CREATE_DB)},
|
||||||
{"show_create_event", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_EVENT]), SHOW_LONG_STATUS},
|
{"show_create_event", STMT_STATUS(SQLCOM_SHOW_CREATE_EVENT)},
|
||||||
{"show_create_func", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_FUNC]), SHOW_LONG_STATUS},
|
{"show_create_func", STMT_STATUS(SQLCOM_SHOW_CREATE_FUNC)},
|
||||||
{"show_create_proc", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_PROC]), SHOW_LONG_STATUS},
|
{"show_create_proc", STMT_STATUS(SQLCOM_SHOW_CREATE_PROC)},
|
||||||
{"show_create_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE]), SHOW_LONG_STATUS},
|
{"show_create_table", STMT_STATUS(SQLCOM_SHOW_CREATE)},
|
||||||
{"show_create_trigger", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_TRIGGER]), SHOW_LONG_STATUS},
|
{"show_create_trigger", STMT_STATUS(SQLCOM_SHOW_CREATE_TRIGGER)},
|
||||||
{"show_databases", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_DATABASES]), SHOW_LONG_STATUS},
|
{"show_databases", STMT_STATUS(SQLCOM_SHOW_DATABASES)},
|
||||||
{"show_engine_logs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_LOGS]), SHOW_LONG_STATUS},
|
{"show_engine_logs", STMT_STATUS(SQLCOM_SHOW_ENGINE_LOGS)},
|
||||||
{"show_engine_mutex", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_MUTEX]), SHOW_LONG_STATUS},
|
{"show_engine_mutex", STMT_STATUS(SQLCOM_SHOW_ENGINE_MUTEX)},
|
||||||
{"show_engine_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_STATUS]), SHOW_LONG_STATUS},
|
{"show_engine_status", STMT_STATUS(SQLCOM_SHOW_ENGINE_STATUS)},
|
||||||
{"show_errors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ERRORS]), SHOW_LONG_STATUS},
|
{"show_errors", STMT_STATUS(SQLCOM_SHOW_ERRORS)},
|
||||||
{"show_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_EVENTS]), SHOW_LONG_STATUS},
|
{"show_events", STMT_STATUS(SQLCOM_SHOW_EVENTS)},
|
||||||
{"show_explain", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_EXPLAIN]), SHOW_LONG_STATUS},
|
{"show_explain", STMT_STATUS(SQLCOM_SHOW_EXPLAIN)},
|
||||||
{"show_fields", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_FIELDS]), SHOW_LONG_STATUS},
|
{"show_fields", STMT_STATUS(SQLCOM_SHOW_FIELDS)},
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
{"show_function_code", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_FUNC_CODE]), SHOW_LONG_STATUS},
|
{"show_function_code", STMT_STATUS(SQLCOM_SHOW_FUNC_CODE)},
|
||||||
#endif
|
#endif
|
||||||
{"show_function_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS_FUNC]), SHOW_LONG_STATUS},
|
{"show_function_status", STMT_STATUS(SQLCOM_SHOW_STATUS_FUNC)},
|
||||||
{"show_generic", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GENERIC]), SHOW_LONG_STATUS},
|
{"show_generic", STMT_STATUS(SQLCOM_SHOW_GENERIC)},
|
||||||
{"show_grants", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
|
{"show_grants", STMT_STATUS(SQLCOM_SHOW_GRANTS)},
|
||||||
{"show_keys", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_KEYS]), SHOW_LONG_STATUS},
|
{"show_keys", STMT_STATUS(SQLCOM_SHOW_KEYS)},
|
||||||
{"show_master_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_MASTER_STAT]), SHOW_LONG_STATUS},
|
{"show_master_status", STMT_STATUS(SQLCOM_SHOW_MASTER_STAT)},
|
||||||
{"show_open_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_OPEN_TABLES]), SHOW_LONG_STATUS},
|
{"show_open_tables", STMT_STATUS(SQLCOM_SHOW_OPEN_TABLES)},
|
||||||
{"show_plugins", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PLUGINS]), SHOW_LONG_STATUS},
|
{"show_plugins", STMT_STATUS(SQLCOM_SHOW_PLUGINS)},
|
||||||
{"show_privileges", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PRIVILEGES]), SHOW_LONG_STATUS},
|
{"show_privileges", STMT_STATUS(SQLCOM_SHOW_PRIVILEGES)},
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
{"show_procedure_code", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PROC_CODE]), SHOW_LONG_STATUS},
|
{"show_procedure_code", STMT_STATUS(SQLCOM_SHOW_PROC_CODE)},
|
||||||
#endif
|
#endif
|
||||||
{"show_procedure_status",(char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS_PROC]), SHOW_LONG_STATUS},
|
{"show_procedure_status",STMT_STATUS(SQLCOM_SHOW_STATUS_PROC)},
|
||||||
{"show_processlist", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PROCESSLIST]), SHOW_LONG_STATUS},
|
{"show_processlist", STMT_STATUS(SQLCOM_SHOW_PROCESSLIST)},
|
||||||
{"show_profile", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PROFILE]), SHOW_LONG_STATUS},
|
{"show_profile", STMT_STATUS(SQLCOM_SHOW_PROFILE)},
|
||||||
{"show_profiles", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_PROFILES]), SHOW_LONG_STATUS},
|
{"show_profiles", STMT_STATUS(SQLCOM_SHOW_PROFILES)},
|
||||||
{"show_relaylog_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_RELAYLOG_EVENTS]), SHOW_LONG_STATUS},
|
{"show_relaylog_events", STMT_STATUS(SQLCOM_SHOW_RELAYLOG_EVENTS)},
|
||||||
{"show_slave_hosts", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_HOSTS]), SHOW_LONG_STATUS},
|
{"show_slave_hosts", STMT_STATUS(SQLCOM_SHOW_SLAVE_HOSTS)},
|
||||||
{"show_slave_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_STAT]), SHOW_LONG_STATUS},
|
{"show_slave_status", STMT_STATUS(SQLCOM_SHOW_SLAVE_STAT)},
|
||||||
{"show_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS]), SHOW_LONG_STATUS},
|
{"show_status", STMT_STATUS(SQLCOM_SHOW_STATUS)},
|
||||||
{"show_storage_engines", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STORAGE_ENGINES]), SHOW_LONG_STATUS},
|
{"show_storage_engines", STMT_STATUS(SQLCOM_SHOW_STORAGE_ENGINES)},
|
||||||
{"show_table_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLE_STATUS]), SHOW_LONG_STATUS},
|
{"show_table_status", STMT_STATUS(SQLCOM_SHOW_TABLE_STATUS)},
|
||||||
{"show_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLES]), SHOW_LONG_STATUS},
|
{"show_tables", STMT_STATUS(SQLCOM_SHOW_TABLES)},
|
||||||
{"show_triggers", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TRIGGERS]), SHOW_LONG_STATUS},
|
{"show_triggers", STMT_STATUS(SQLCOM_SHOW_TRIGGERS)},
|
||||||
{"show_variables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_VARIABLES]), SHOW_LONG_STATUS},
|
{"show_variables", STMT_STATUS(SQLCOM_SHOW_VARIABLES)},
|
||||||
{"show_warnings", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_WARNS]), SHOW_LONG_STATUS},
|
{"show_warnings", STMT_STATUS(SQLCOM_SHOW_WARNS)},
|
||||||
{"shutdown", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHUTDOWN]), SHOW_LONG_STATUS},
|
{"shutdown", STMT_STATUS(SQLCOM_SHUTDOWN)},
|
||||||
{"signal", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SIGNAL]), SHOW_LONG_STATUS},
|
{"signal", STMT_STATUS(SQLCOM_SIGNAL)},
|
||||||
{"start_all_slaves", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_ALL_START]), SHOW_LONG_STATUS},
|
{"start_all_slaves", STMT_STATUS(SQLCOM_SLAVE_ALL_START)},
|
||||||
{"start_slave", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_START]), SHOW_LONG_STATUS},
|
{"start_slave", STMT_STATUS(SQLCOM_SLAVE_START)},
|
||||||
{"stmt_close", (char*) offsetof(STATUS_VAR, com_stmt_close), SHOW_LONG_STATUS},
|
{"stmt_close", COM_STATUS(com_stmt_close)},
|
||||||
{"stmt_execute", (char*) offsetof(STATUS_VAR, com_stmt_execute), SHOW_LONG_STATUS},
|
{"stmt_execute", COM_STATUS(com_stmt_execute)},
|
||||||
{"stmt_fetch", (char*) offsetof(STATUS_VAR, com_stmt_fetch), SHOW_LONG_STATUS},
|
{"stmt_fetch", COM_STATUS(com_stmt_fetch)},
|
||||||
{"stmt_prepare", (char*) offsetof(STATUS_VAR, com_stmt_prepare), SHOW_LONG_STATUS},
|
{"stmt_prepare", COM_STATUS(com_stmt_prepare)},
|
||||||
{"stmt_reprepare", (char*) offsetof(STATUS_VAR, com_stmt_reprepare), SHOW_LONG_STATUS},
|
{"stmt_reprepare", COM_STATUS(com_stmt_reprepare)},
|
||||||
{"stmt_reset", (char*) offsetof(STATUS_VAR, com_stmt_reset), SHOW_LONG_STATUS},
|
{"stmt_reset", COM_STATUS(com_stmt_reset)},
|
||||||
{"stmt_send_long_data", (char*) offsetof(STATUS_VAR, com_stmt_send_long_data), SHOW_LONG_STATUS},
|
{"stmt_send_long_data", COM_STATUS(com_stmt_send_long_data)},
|
||||||
{"stop_all_slaves", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_ALL_STOP]), SHOW_LONG_STATUS},
|
{"stop_all_slaves", STMT_STATUS(SQLCOM_SLAVE_ALL_STOP)},
|
||||||
{"stop_slave", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_STOP]), SHOW_LONG_STATUS},
|
{"stop_slave", STMT_STATUS(SQLCOM_SLAVE_STOP)},
|
||||||
{"truncate", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_TRUNCATE]), SHOW_LONG_STATUS},
|
{"truncate", STMT_STATUS(SQLCOM_TRUNCATE)},
|
||||||
{"uninstall_plugin", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UNINSTALL_PLUGIN]), SHOW_LONG_STATUS},
|
{"uninstall_plugin", STMT_STATUS(SQLCOM_UNINSTALL_PLUGIN)},
|
||||||
{"unlock_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UNLOCK_TABLES]), SHOW_LONG_STATUS},
|
{"unlock_tables", STMT_STATUS(SQLCOM_UNLOCK_TABLES)},
|
||||||
{"update", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UPDATE]), SHOW_LONG_STATUS},
|
{"update", STMT_STATUS(SQLCOM_UPDATE)},
|
||||||
{"update_multi", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_UPDATE_MULTI]), SHOW_LONG_STATUS},
|
{"update_multi", STMT_STATUS(SQLCOM_UPDATE_MULTI)},
|
||||||
{"xa_commit", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_COMMIT]),SHOW_LONG_STATUS},
|
{"xa_commit", STMT_STATUS(SQLCOM_XA_COMMIT)},
|
||||||
{"xa_end", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_END]),SHOW_LONG_STATUS},
|
{"xa_end", STMT_STATUS(SQLCOM_XA_END)},
|
||||||
{"xa_prepare", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_PREPARE]),SHOW_LONG_STATUS},
|
{"xa_prepare", STMT_STATUS(SQLCOM_XA_PREPARE)},
|
||||||
{"xa_recover", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_RECOVER]),SHOW_LONG_STATUS},
|
{"xa_recover", STMT_STATUS(SQLCOM_XA_RECOVER)},
|
||||||
{"xa_rollback", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_ROLLBACK]),SHOW_LONG_STATUS},
|
{"xa_rollback", STMT_STATUS(SQLCOM_XA_ROLLBACK)},
|
||||||
{"xa_start", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_XA_START]),SHOW_LONG_STATUS},
|
{"xa_start", STMT_STATUS(SQLCOM_XA_START)},
|
||||||
{NullS, NullS, SHOW_LONG}
|
{NullS, NullS, SHOW_LONG}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3885,11 +3888,11 @@ PSI_statement_info com_statement_info[(uint) COM_END + 1];
|
|||||||
*/
|
*/
|
||||||
void init_sql_statement_info()
|
void init_sql_statement_info()
|
||||||
{
|
{
|
||||||
char *first_com= (char*) offsetof(STATUS_VAR, com_stat[0]);
|
size_t first_com= offsetof(STATUS_VAR, com_stat[0]);
|
||||||
char *last_com= (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_END]);
|
size_t last_com= offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_END]);
|
||||||
int record_size= (char*) offsetof(STATUS_VAR, com_stat[1])
|
int record_size= offsetof(STATUS_VAR, com_stat[1])
|
||||||
- (char*) offsetof(STATUS_VAR, com_stat[0]);
|
- offsetof(STATUS_VAR, com_stat[0]);
|
||||||
char *ptr;
|
size_t ptr;
|
||||||
uint i;
|
uint i;
|
||||||
uint com_index;
|
uint com_index;
|
||||||
|
|
||||||
@ -3903,7 +3906,7 @@ void init_sql_statement_info()
|
|||||||
SHOW_VAR *var= &com_status_vars[0];
|
SHOW_VAR *var= &com_status_vars[0];
|
||||||
while (var->name != NULL)
|
while (var->name != NULL)
|
||||||
{
|
{
|
||||||
ptr= var->value;
|
ptr= (size_t)(var->value);
|
||||||
if ((first_com <= ptr) && (ptr <= last_com))
|
if ((first_com <= ptr) && (ptr <= last_com))
|
||||||
{
|
{
|
||||||
com_index= ((int)(ptr - first_com))/record_size;
|
com_index= ((int)(ptr - first_com))/record_size;
|
||||||
@ -5330,11 +5333,11 @@ LEX_STRING sql_statement_names[(uint) SQLCOM_END + 1];
|
|||||||
|
|
||||||
static void init_sql_statement_names()
|
static void init_sql_statement_names()
|
||||||
{
|
{
|
||||||
char *first_com= (char*) offsetof(STATUS_VAR, com_stat[0]);
|
size_t first_com= offsetof(STATUS_VAR, com_stat[0]);
|
||||||
char *last_com= (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_END]);
|
size_t last_com= offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_END]);
|
||||||
int record_size= (char*) offsetof(STATUS_VAR, com_stat[1])
|
int record_size= offsetof(STATUS_VAR, com_stat[1])
|
||||||
- (char*) offsetof(STATUS_VAR, com_stat[0]);
|
- offsetof(STATUS_VAR, com_stat[0]);
|
||||||
char *ptr;
|
size_t ptr;
|
||||||
uint i;
|
uint i;
|
||||||
uint com_index;
|
uint com_index;
|
||||||
|
|
||||||
@ -5344,7 +5347,7 @@ static void init_sql_statement_names()
|
|||||||
SHOW_VAR *var= &com_status_vars[0];
|
SHOW_VAR *var= &com_status_vars[0];
|
||||||
while (var->name != NULL)
|
while (var->name != NULL)
|
||||||
{
|
{
|
||||||
ptr= var->value;
|
ptr= (size_t)(var->value);
|
||||||
if ((first_com <= ptr) && (ptr <= last_com))
|
if ((first_com <= ptr) && (ptr <= last_com))
|
||||||
{
|
{
|
||||||
com_index= ((int)(ptr - first_com))/record_size;
|
com_index= ((int)(ptr - first_com))/record_size;
|
||||||
|
@ -3132,15 +3132,15 @@ static bool show_status_array(THD *thd, const char *wild,
|
|||||||
name_buffer, wild))) &&
|
name_buffer, wild))) &&
|
||||||
(!cond || cond->val_int()))
|
(!cond || cond->val_int()))
|
||||||
{
|
{
|
||||||
char *value=var->value;
|
void *value=var->value;
|
||||||
const char *pos, *end; // We assign a lot of const's
|
const char *pos, *end; // We assign a lot of const's
|
||||||
|
|
||||||
if (show_type == SHOW_SYS)
|
if (show_type == SHOW_SYS)
|
||||||
{
|
{
|
||||||
sys_var *var= ((sys_var *) value);
|
sys_var *var= (sys_var *) value;
|
||||||
show_type= var->show_type();
|
show_type= var->show_type();
|
||||||
mysql_mutex_lock(&LOCK_global_system_variables);
|
mysql_mutex_lock(&LOCK_global_system_variables);
|
||||||
value= (char*) var->value_ptr(thd, scope, &null_lex_str);
|
value= var->value_ptr(thd, scope, &null_lex_str);
|
||||||
charset= var->charset(thd);
|
charset= var->charset(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3200,7 +3200,7 @@ static bool show_status_array(THD *thd, const char *wild,
|
|||||||
}
|
}
|
||||||
case SHOW_CHAR:
|
case SHOW_CHAR:
|
||||||
{
|
{
|
||||||
if (!(pos= value))
|
if (!(pos= (char*)value))
|
||||||
pos= "";
|
pos= "";
|
||||||
end= strend(pos);
|
end= strend(pos);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user