From 2b76ee2435cd9c436dfc592d76317f5eff9392a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Nov 2006 15:58:06 +0800 Subject: [PATCH 001/137] ndb - fix for BUG#23137, ha_ndbcluster.m4 bug. Because NDB_CXXFLAGS is just used in ndb engine, moved NDB_CXXFLAGS from ha_ndbcluster.m4 to ndb/config/common.mk.am. config/ac-macros/ha_ndbcluster.m4: removed NDB_CXXFLAGS. storage/ndb/config/common.mk.am: Added NDB_CXXFLAGS to AM_CXXFLAGS. --- config/ac-macros/ha_ndbcluster.m4 | 1 - storage/ndb/config/common.mk.am | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index ee31fa9fca2..0371eff6537 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -197,7 +197,6 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [ MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster" - CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)" if test "$have_ndb_debug" = "default" then have_ndb_debug=$with_debug diff --git a/storage/ndb/config/common.mk.am b/storage/ndb/config/common.mk.am index a9ff5fdfc77..fca68a87550 100644 --- a/storage/ndb/config/common.mk.am +++ b/storage/ndb/config/common.mk.am @@ -10,3 +10,5 @@ INCLUDES = $(INCLUDES_LOC) LDADD = $(LDADD_LOC) DEFS = @DEFS@ @NDB_DEFS@ $(DEFS_LOC) $(NDB_EXTRA_FLAGS) NDB_CXXFLAGS=@ndb_cxxflags_fix@ $(NDB_CXXFLAGS_LOC) +NDB_AM_CXXFLAGS:= $(AM_CXXFLAGS) +AM_CXXFLAGS=$(NDB_AM_CXXFLAGS) $(NDB_CXXFLAGS) From 1fc7f2117bddfcf91e1220f22714beb86d26c544 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Mar 2007 08:43:45 -0800 Subject: [PATCH 002/137] WL#2936 "Server Variables for Plugins" Implement support for plugins to declare server variables. Demonstrate functionality by removing InnoDB specific code from sql/* New feature for HASH - HASH_UNIQUE flag New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr. Completed support for plugin reference counting. include/hash.h: New flag for HASH HASH_UNIQUE include/my_getopt.h: New data types for options: ENUM and SET. Use typelib to enumerate possible values. New flag variable: my_getopt_skip_unknown include/my_sys.h: change to DYNAMIC_ARRAY init functions to support pre-allocated buffers include/mysql.h: relocate inclusion of typelib due to longlong requirement include/mysql/plugin.h: wl2936 New declarations for plugin server variable support. New functions for use by plugins include/mysys_err.h: new my_getopt return value: EXIT_ARGUMENT_INVALID include/typelib.h: new typelib function: find_typeset(), returns an int which is a SET of the elements in the typelib mysql-test/r/im_utils.result: change to more specific command line settings --skip-innodb => --skip-plugin-innodb etc. mysql-test/r/log_tables.result: set default storage engine to MEMORY so that test will succeed even when some of the other named storage engines are not present mysql-test/r/ndb_dd_basic.result: change in error message mysql-test/r/partition_innodb.result: change in results mysql-test/r/ps_1general.result: bdb doesn't exist, use myisam for a non-transactional engine mysql-test/r/variables.result: information schema doesn't sort row results for server variables. mysql-test/t/log_tables.test: set default storage engine to MEMORY so that test will succeed even when some of the other named storage engines are not present mysql-test/t/ndb_dd_basic.test: ALTER LOGFILE GROUP no longer silently fail here mysql-test/t/partition_innodb.test: ALTER TABLE no longer silently fails for unknown storage engine mysql-test/t/ps_1general.test: remove unneccessary parts use myisam as it is an always present non-transactional engine mysql-test/t/variables.test: information schema doesn't sort row results for server variables. mysql-test/t/warnings_engine_disabled-master.opt: use the new style command line option mysys/array.c: change to DYNAMIC_ARRAY init functions to support pre-allocated buffers mysys/hash.c: New flag for HASH HASH_UNIQUE Implement HASH_UNIQUE functionality by performing a hash_search mysys/my_getopt.c: New data types for options: ENUM and SET. Use typelib to enumerate possible values. New flag variable: my_getopt_skip_unknown mysys/typelib.c: new typelib function: find_typeset(), returns an int which is a SET of the elements in the typelib sql/ha_ndbcluster.cc: use ha_statistic_increment() method instead of statistic_increment() function ha_ndbcluster variable has gone away. sql/ha_partition.cc: fix for reference counting sql/ha_partition.h: fix for reference counting sql/handler.cc: fixes for reference counting sql/handler.h: fixes for reference counting some new methods to aid storage engine writers sql/item_func.cc: find_sys_var() function now requires thd sql/item_sum.cc: fixes for ref counting sql/mysql_priv.h: remove unneccessary globals. new lock: LOCK_system_variables_hash sql/mysqld.cc: Remove InnoBase specific code. Support plugin command line processing. sql/set_var.cc: Remove InnoBase specific declarations Remove redundant declarations changes to permit new variables at run time changes for ref counting sql/set_var.h: changes to permit new variables at run time changes for ref counting sql/sql_base.cc: changes for ref counting sql/sql_cache.cc: mark code as needing work in the future sql/sql_class.cc: new functions to aid plugin authors initialize variables for dynamic plugin variables sql/sql_class.h: remove InnoBase specific declarations New declarations for plugin variables. sql/sql_connect.cc: initialization and cleanup of plugin variables sql/sql_delete.cc: change for ref counting sql/sql_insert.cc: change for ref counting sql/sql_lex.cc: changes for ref counting and plugin variables sql/sql_lex.h: add properties for plugin ref counting, add to distructor to clean up sql/sql_partition.cc: changes for ref counting sql/sql_plugin.cc: WL2936 Plugin Variables New methods and code to support server variables for plugins. New code to complete plugin reference counting Debug code adds further indirection so that malloc debugging can be used to aid finding plugin ref count leaks sql/sql_plugin.h: WL2936 Plugin Variables New methods and code to support server variables for plugins. New code to complete plugin reference counting Debug code adds further indirection so that malloc debugging can be used to aid finding plugin ref count leaks sql/sql_repl.cc: replication system variables moved here from set_var.cc sql/sql_repl.h: new function to initialise replication server variables sql/sql_select.cc: changes for ref counting sql/sql_show.cc: changes for ref counting sql/sql_table.cc: changes for ref counting sql/sql_tablespace.cc: use supplied functions instead of digging into data structures manually sql/sql_yacc.yy: changes for ref counting find_sys_var() now requires thd parameter changes on reporting errors to keep user-visible behaviour the same. sql/structs.h: changes for ref counting sql/table.cc: changes for ref counting sql/table.h: changes for ref counting storage/federated/ha_federated.cc: use ha_statistic_increment() method instead of statistic_increment() function storage/heap/ha_heap.cc: use ha_statistic_increment() method instead of statistic_increment() function storage/innobase/handler/ha_innodb.cc: use ha_statistic_increment() method instead of statistic_increment() function WL2936 Move InnoBase specific code out of mysqld.cc and into here Declare all required server variables for InnoBase storage/innobase/include/trx0trx.h: store a bit more state so that InnoBase does not have to dig into mysqld internal data structures. storage/myisam/ha_myisam.cc: use ha_statistic_increment() method instead of statistic_increment() function storage/myisammrg/ha_myisammrg.cc: use ha_statistic_increment() method instead of statistic_increment() function --- include/hash.h | 3 + include/my_getopt.h | 9 +- include/my_sys.h | 11 +- include/mysql.h | 3 +- include/mysql/plugin.h | 277 +- include/mysys_err.h | 1 + include/typelib.h | 1 + mysql-test/r/im_utils.result | 8 +- mysql-test/r/log_tables.result | 3 + mysql-test/r/ndb_dd_basic.result | 4 +- mysql-test/r/partition_innodb.result | 5 +- mysql-test/r/ps_1general.result | 3 +- mysql-test/r/variables.result | 16 +- mysql-test/t/log_tables.test | 3 + mysql-test/t/ndb_dd_basic.test | 1 + mysql-test/t/partition_innodb.test | 1 + mysql-test/t/ps_1general.test | 8 +- mysql-test/t/variables.test | 16 +- .../t/warnings_engine_disabled-master.opt | 2 +- mysys/array.c | 61 +- mysys/hash.c | 17 + mysys/my_getopt.c | 50 +- mysys/typelib.c | 48 + sql/ha_ndbcluster.cc | 35 +- sql/ha_partition.cc | 25 +- sql/ha_partition.h | 6 +- sql/handler.cc | 168 +- sql/handler.h | 11 +- sql/item_func.cc | 2 +- sql/item_sum.cc | 2 +- sql/mysql_priv.h | 14 +- sql/mysqld.cc | 504 +--- sql/set_var.cc | 1358 ++++------ sql/set_var.h | 393 +-- sql/sql_base.cc | 4 +- sql/sql_cache.cc | 18 +- sql/sql_class.cc | 88 +- sql/sql_class.h | 18 +- sql/sql_connect.cc | 3 + sql/sql_delete.cc | 2 +- sql/sql_insert.cc | 2 +- sql/sql_lex.cc | 22 + sql/sql_lex.h | 7 + sql/sql_partition.cc | 22 +- sql/sql_plugin.cc | 2285 ++++++++++++++++- sql/sql_plugin.h | 62 +- sql/sql_repl.cc | 143 ++ sql/sql_repl.h | 1 + sql/sql_select.cc | 24 +- sql/sql_show.cc | 93 +- sql/sql_table.cc | 24 +- sql/sql_tablespace.cc | 4 +- sql/sql_yacc.yy | 71 +- sql/structs.h | 4 + sql/table.cc | 53 +- sql/table.h | 7 +- storage/federated/ha_federated.cc | 11 +- storage/heap/ha_heap.cc | 33 +- storage/innobase/handler/ha_innodb.cc | 545 ++-- storage/innobase/include/trx0trx.h | 8 + storage/myisam/ha_myisam.cc | 40 +- storage/myisammrg/ha_myisammrg.cc | 37 +- 62 files changed, 4546 insertions(+), 2154 deletions(-) diff --git a/include/hash.h b/include/hash.h index 97e947d7c6a..78499a4f810 100644 --- a/include/hash.h +++ b/include/hash.h @@ -27,6 +27,9 @@ extern "C" { */ #define HASH_OVERHEAD (sizeof(char*)*2) +/* flags for hash_init */ +#define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */ + typedef byte *(*hash_get_key)(const byte *,uint*,my_bool); typedef void (*hash_free_key)(void *); diff --git a/include/my_getopt.h b/include/my_getopt.h index dcd6ad9d79b..fd523e08d7f 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -29,12 +29,16 @@ C_MODE_START #define GET_STR 9 #define GET_STR_ALLOC 10 #define GET_DISABLED 11 +#define GET_ENUM 12 +#define GET_SET 13 #define GET_ASK_ADDR 128 #define GET_TYPE_MASK 127 enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; +struct st_typelib; + struct my_option { const char *name; /* Name of the option */ @@ -42,7 +46,7 @@ struct my_option const char *comment; /* option comment, for autom. --help */ gptr *value; /* The variable value */ gptr *u_max_value; /* The user def. max variable value */ - const char **str_values; /* Pointer to possible values */ + struct st_typelib *typelib; /* Pointer to possible values */ ulong var_type; enum get_opt_arg_type arg_type; longlong def_value; /* Default value */ @@ -50,7 +54,7 @@ struct my_option longlong max_value; /* Max allowed value */ longlong sub_size; /* Subtract this from given value */ long block_size; /* Value should be a mult. of this */ - int app_type; /* To be used by an application */ + long app_type; /* To be used by an application */ }; typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * ); @@ -58,6 +62,7 @@ typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... extern char *disabled_my_option; extern my_bool my_getopt_print_errors; +extern my_bool my_getopt_skip_unknown; extern my_error_reporter my_getopt_error_reporter; extern int handle_options (int *argc, char ***argv, diff --git a/include/my_sys.h b/include/my_sys.h index 8e831b448d7..dd28ac7ef31 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -758,8 +758,15 @@ extern my_bool real_open_cached_file(IO_CACHE *cache); extern void close_cached_file(IO_CACHE *cache); File create_temp_file(char *to, const char *dir, const char *pfx, int mode, myf MyFlags); -#define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_INFO) -#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_CALLER_INFO) +#define my_init_dynamic_array(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D CALLER_INFO) +#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array2(A,B,NULL,C,D ORIG_CALLER_INFO) +#define my_init_dynamic_array2(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E CALLER_INFO) +#define my_init_dynamic_array2_ci(A,B,C,D,E) init_dynamic_array2(A,B,C,D,E ORIG_CALLER_INFO) +extern my_bool init_dynamic_array2(DYNAMIC_ARRAY *array,uint element_size, + void *init_buffer, uint init_alloc, + uint alloc_increment + CALLER_INFO_PROTO); +/* init_dynamic_array() function is deprecated */ extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size, uint init_alloc,uint alloc_increment CALLER_INFO_PROTO); diff --git a/include/mysql.h b/include/mysql.h index f76ae10ca16..352f9953d5a 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -67,7 +67,6 @@ typedef int my_socket; #include "mysql_version.h" #include "mysql_com.h" #include "mysql_time.h" -#include "typelib.h" #include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ @@ -126,6 +125,8 @@ typedef unsigned long long my_ulonglong; #endif #endif +#include "typelib.h" + #define MYSQL_COUNT_ERROR (~(my_ulonglong) 0) /* backward compatibility define - to be removed eventually */ diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 660ce49d7ee..6c75ca75a54 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -16,6 +16,15 @@ #ifndef _my_plugin_h #define _my_plugin_h +#ifdef __cplusplus +class THD; +class Item; +#define MYSQL_THD THD* +#else +#define MYSQL_THD void* +#endif + + /************************************************************************* Plugin API. Common for all plugin types. */ @@ -85,7 +94,225 @@ struct st_mysql_show_var { }; #define SHOW_VAR_FUNC_BUFF_SIZE 1024 -typedef int (*mysql_show_var_func)(void *, struct st_mysql_show_var*, char *); +typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *); + + +/* + declarations for server variables and command line options +*/ + + +#define PLUGIN_VAR_BOOL 0x0001 +#define PLUGIN_VAR_INT 0x0002 +#define PLUGIN_VAR_LONG 0x0003 +#define PLUGIN_VAR_LONGLONG 0x0004 +#define PLUGIN_VAR_STR 0x0005 +#define PLUGIN_VAR_ENUM 0x0006 +#define PLUGIN_VAR_SET 0x0007 +#define PLUGIN_VAR_UNSIGNED 0x0080 +#define PLUGIN_VAR_THDLOCAL 0x0100 /* Variable is per-connection */ +#define PLUGIN_VAR_READONLY 0x0200 /* Server variable is read only */ +#define PLUGIN_VAR_NOSYSVAR 0x0400 /* Not a server variable */ +#define PLUGIN_VAR_NOCMDOPT 0x0800 /* Not a command line option */ +#define PLUGIN_VAR_NOCMDARG 0x1000 /* No argument for cmd line */ +#define PLUGIN_VAR_RQCMDARG 0x0000 /* Argument required for cmd line */ +#define PLUGIN_VAR_OPCMDARG 0x2000 /* Argument optional for cmd line */ +#define PLUGIN_VAR_MEMALLOC 0x8000 /* String needs memory allocated */ + +struct st_mysql_sys_var; +struct st_mysql_value; + +typedef int (*mysql_var_check_func)(MYSQL_THD thd, + struct st_mysql_sys_var *var, + void *save, struct st_mysql_value *value); +typedef void (*mysql_var_update_func)(MYSQL_THD thd, + struct st_mysql_sys_var *var, + void *var_ptr, void *save); + + +/* the following declarations are for internal use only */ + + +#define PLUGIN_VAR_MASK \ + (PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | \ + PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NOCMDARG | \ + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC) + +#define MYSQL_PLUGIN_VAR_HEADER \ + int flags; \ + const char *name; \ + const char *comment; \ + mysql_var_check_func check; \ + mysql_var_update_func update + +#define MYSQL_SYSVAR_NAME(name) mysql_sysvar_ ## name +#define MYSQL_SYSVAR(name) \ + ((struct st_mysql_sys_var *)&(MYSQL_SYSVAR_NAME(name))) + +/* + for global variables, the value pointer is the first + element after the header, the default value is the second. + for thread variables, the value offset is the first + element after the header, the default value is the second. +*/ + + +#define DECLARE_MYSQL_SYSVAR_BASIC(name, type) struct { \ + MYSQL_PLUGIN_VAR_HEADER; \ + type *value, def_val; \ +} MYSQL_SYSVAR_NAME(name) + +#define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \ + MYSQL_PLUGIN_VAR_HEADER; \ + type *value, def_val, min_val,\ + max_val, blk_sz; \ +} MYSQL_SYSVAR_NAME(name) + +#define DECLARE_MYSQL_SYSVAR_TYPELIB(name) struct { \ + MYSQL_PLUGIN_VAR_HEADER; \ + unsigned long *value, def_val;\ + TYPELIB *typelib; \ +} MYSQL_SYSVAR_NAME(name) + +#define DECLARE_THDVAR_FUNC(type) \ + type *(*resolve)(MYSQL_THD thd, int offset) + +#define DECLARE_MYSQL_THDVAR_BASIC(name, type) struct { \ + MYSQL_PLUGIN_VAR_HEADER; \ + int offset; \ + type def_val; \ + DECLARE_THDVAR_FUNC(type); \ +} MYSQL_SYSVAR_NAME(name) + +#define DECLARE_MYSQL_THDVAR_SIMPLE(name, type) struct { \ + MYSQL_PLUGIN_VAR_HEADER; \ + int offset; \ + type def_val, min_val, max_val, blk_sz; \ + DECLARE_THDVAR_FUNC(type); \ +} MYSQL_SYSVAR_NAME(name) + +#define DECLARE_MYSQL_THDVAR_TYPELIB(name) struct { \ + MYSQL_PLUGIN_VAR_HEADER; \ + int offset; \ + unsigned long def_val; \ + DECLARE_THDVAR_FUNC(unsigned long); \ + TYPELIB *typelib; \ +} MYSQL_SYSVAR_NAME(name) + + +/* + the following declarations are for use by plugin implementors +*/ + +#define MYSQL_SYSVAR_BOOL(name, varname, opt, comment, check, update, def) \ +DECLARE_MYSQL_SYSVAR_BASIC(name, char) = { \ + PLUGIN_VAR_BOOL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def} + +#define MYSQL_SYSVAR_STR(name, varname, opt, comment, check, update, def) \ +DECLARE_MYSQL_SYSVAR_BASIC(name, char *) = { \ + PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def} + +#define MYSQL_SYSVAR_INT(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, int) = { \ + PLUGIN_VAR_INT | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + +#define MYSQL_SYSVAR_UINT(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned int) = { \ + PLUGIN_VAR_INT | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + +#define MYSQL_SYSVAR_LONG(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, long) = { \ + PLUGIN_VAR_LONG | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + +#define MYSQL_SYSVAR_ULONG(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long) = { \ + PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + +#define MYSQL_SYSVAR_LONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, longlong) = { \ + PLUGIN_VAR_LONGLONG | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + +#define MYSQL_SYSVAR_ULONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, ulonglong) = { \ + PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + +#define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \ +DECLARE_MYSQL_SYSVAR_TYPELIB(name) = { \ + PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, typelib } + +#define MYSQL_SYSVAR_SET(name, varname, opt, comment, check, update, def, typelib) \ +DECLARE_MYSQL_SYSVAR_TYPELIB(name) = { \ + PLUGIN_VAR_SET | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, typelib } + +#define MYSQL_THDVAR_BOOL(name, opt, comment, check, update, def) \ +DECLARE_MYSQL_THDVAR_BASIC(name, char) = { \ + PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, NULL} + +#define MYSQL_THDVAR_STR(name, opt, comment, check, update, def) \ +DECLARE_MYSQL_THDVAR_BASIC(name, char *) = { \ + PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, NULL} + +#define MYSQL_THDVAR_INT(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, int) = { \ + PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + +#define MYSQL_THDVAR_UINT(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned int) = { \ + PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + +#define MYSQL_THDVAR_LONG(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, long) = { \ + PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + +#define MYSQL_THDVAR_ULONG(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long) = { \ + PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + +#define MYSQL_THDVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, longlong) = { \ + PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + +#define MYSQL_THDVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, ulonglong) = { \ + PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + +#define MYSQL_THDVAR_ENUM(name, opt, comment, check, update, def, typelib) \ +DECLARE_MYSQL_THDVAR_TYPELIB(name) = { \ + PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, NULL, typelib } + +#define MYSQL_THDVAR_SET(name, opt, comment, check, update, def, typelib) \ +DECLARE_MYSQL_THDVAR_TYPELIB(name) = { \ + PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, NULL, typelib } + +/* accessor macros */ + +#define SYSVAR(name) \ + (*(MYSQL_SYSVAR_NAME(name).value)) + +/* when thd == null, result points to global value */ +#define THDVAR(thd, name) \ + (*(MYSQL_SYSVAR_NAME(name).resolve(thd, MYSQL_SYSVAR_NAME(name).offset))) + /* Plugin description structure. @@ -103,8 +330,8 @@ struct st_mysql_plugin int (*deinit)(void *);/* the function to invoke when plugin is unloaded */ unsigned int version; /* plugin version (for SHOW PLUGINS) */ struct st_mysql_show_var *status_vars; - void * __reserved1; /* placeholder for system variables */ - void * __reserved2; /* placeholder for config options */ + struct st_mysql_sys_var **system_vars; + void * __reserved1; /* reserved for dependency checking */ }; /************************************************************************* @@ -328,6 +555,8 @@ struct st_mysql_storage_engine int interface_version; }; +struct handlerton; + /* Here we define only the descriptor structure, that is referred from st_mysql_plugin. @@ -348,5 +577,47 @@ struct st_mysql_information_schema int interface_version; }; + +/* + st_mysql_value struct for reading values from mysqld. + Used by server variables framework to parse user-provided values. + Will be used for arguments when implementing UDFs. +*/ + +#define MYSQL_VALUE_TYPE_STRING 0 +#define MYSQL_VALUE_TYPE_REAL 1 +#define MYSQL_VALUE_TYPE_INT 2 + +struct st_mysql_value +{ + int (*value_type)(struct st_mysql_value *); + const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length); + int (*val_real)(struct st_mysql_value *, void *realbuf, int realsize); + int (*val_int)(struct st_mysql_value *, void *intbuf, int intsize); +}; + + +/************************************************************************* + Miscellaneous functions for plugin implementors +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +int thd_in_lock_tables(const MYSQL_THD thd); +int thd_tablespace_op(const MYSQL_THD thd); +long long thd_test_options(const MYSQL_THD thd, long long test_options); +int thd_sql_command(const MYSQL_THD thd); +const char *thd_proc_info(MYSQL_THD thd, const char *info); +void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton); +char *thd_security_context(MYSQL_THD thd, char *buffer, int length, + int max_query_len); + + +#ifdef __cplusplus +}; +#endif + #endif diff --git a/include/mysys_err.h b/include/mysys_err.h index b92027a4e3c..09e77248c17 100644 --- a/include/mysys_err.h +++ b/include/mysys_err.h @@ -79,6 +79,7 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */ #define EXIT_NO_PTR_TO_VARIABLE 10 #define EXIT_CANNOT_CONNECT_TO_SERVICE 11 #define EXIT_OPTION_DISABLED 12 +#define EXIT_ARGUMENT_INVALID 13 #ifdef __cplusplus diff --git a/include/typelib.h b/include/typelib.h index 75d170e59d3..eb3f59722a3 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -26,6 +26,7 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; +extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position); extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); diff --git a/mysql-test/r/im_utils.result b/mysql-test/r/im_utils.result index b7c68965ada..b2885030637 100644 --- a/mysql-test/r/im_utils.result +++ b/mysql-test/r/im_utils.result @@ -20,8 +20,8 @@ character-sets-dir VALUE basedir VALUE server_id VALUE skip-stack-trace VALUE -skip-innodb VALUE -skip-ndbcluster VALUE +skip-plugin-innodb VALUE +skip-plugin-ndbcluster VALUE log-output VALUE SHOW INSTANCE OPTIONS mysqld2; option_name value @@ -38,8 +38,8 @@ character-sets-dir VALUE basedir VALUE server_id VALUE skip-stack-trace VALUE -skip-innodb VALUE -skip-ndbcluster VALUE +skip-plugin-innodb VALUE +skip-plugin-ndbcluster VALUE nonguarded VALUE log-output VALUE START INSTANCE mysqld2; diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 8264f252287..5a90c22fa06 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -169,6 +169,8 @@ lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL; unlock tables; set global general_log='OFF'; set global slow_query_log='OFF'; +set @save_storage_engine= @@session.storage_engine; +set storage_engine= MEMORY; alter table mysql.slow_log engine=ndb; ERROR HY000: This storage engine cannot be used for log tables" alter table mysql.slow_log engine=innodb; @@ -177,6 +179,7 @@ alter table mysql.slow_log engine=archive; ERROR HY000: This storage engine cannot be used for log tables" alter table mysql.slow_log engine=blackhole; ERROR HY000: This storage engine cannot be used for log tables" +set storage_engine= @save_storage_engine; drop table mysql.slow_log; drop table mysql.general_log; drop table mysql.general_log; diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result index 724b42b6db3..91bd111bbdf 100644 --- a/mysql-test/r/ndb_dd_basic.result +++ b/mysql-test/r/ndb_dd_basic.result @@ -10,9 +10,7 @@ ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undofile02.dat' INITIAL_SIZE = 4M ENGINE=XYZ; -Warnings: -Error 1286 Unknown table engine 'XYZ' -Error 1466 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +ERROR 42000: Unknown table engine 'XYZ' CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 8619d0909ee..799f1b2c76f 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -54,7 +54,7 @@ create table t1 (a int) engine = x partition by key (a); Warnings: -Error 1286 Unknown table engine 'x' +Warning 1266 Using storage engine MyISAM for table 't1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -66,8 +66,7 @@ engine = innodb partition by list (a) (partition p0 values in (0)); alter table t1 engine = x; -Warnings: -Error 1286 Unknown table engine 'x' +ERROR 42000: Unknown table engine 'x' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index 762ceeaa03b..26692a992fe 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -303,8 +303,9 @@ prepare stmt4 from ' show variables like ''sql_mode'' '; execute stmt4; Variable_name Value sql_mode -prepare stmt4 from ' show engine bdb logs '; +prepare stmt4 from ' show engine myisam logs '; execute stmt4; +Type Name Status prepare stmt4 from ' show grants for user '; prepare stmt4 from ' show create table t2 '; prepare stmt4 from ' show master status '; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index ec4c7c9b2aa..dc5874436e4 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -236,7 +236,7 @@ net_buffer_length 1024 net_read_timeout 300 net_retry_count 10 net_write_timeout 200 -select * from information_schema.global_variables where variable_name like 'net_%'; +select * from information_schema.global_variables where variable_name like 'net_%' order by 1; VARIABLE_NAME VARIABLE_VALUE NET_BUFFER_LENGTH 1024 NET_READ_TIMEOUT 300 @@ -248,7 +248,7 @@ net_buffer_length 2048 net_read_timeout 600 net_retry_count 10 net_write_timeout 500 -select * from information_schema.session_variables where variable_name like 'net_%'; +select * from information_schema.session_variables where variable_name like 'net_%' order by 1; VARIABLE_NAME VARIABLE_VALUE NET_BUFFER_LENGTH 2048 NET_READ_TIMEOUT 600 @@ -261,7 +261,7 @@ net_buffer_length 1024 net_read_timeout 900 net_retry_count 10 net_write_timeout 1000 -select * from information_schema.global_variables where variable_name like 'net_%'; +select * from information_schema.global_variables where variable_name like 'net_%' order by 1; VARIABLE_NAME VARIABLE_VALUE NET_BUFFER_LENGTH 1024 NET_READ_TIMEOUT 900 @@ -273,7 +273,7 @@ net_buffer_length 7168 net_read_timeout 600 net_retry_count 10 net_write_timeout 500 -select * from information_schema.session_variables where variable_name like 'net_%'; +select * from information_schema.session_variables where variable_name like 'net_%' order by 1; VARIABLE_NAME VARIABLE_VALUE NET_BUFFER_LENGTH 7168 NET_READ_TIMEOUT 600 @@ -314,7 +314,7 @@ query_prealloc_size 8192 range_alloc_block_size 2048 transaction_alloc_block_size 8192 transaction_prealloc_size 4096 -select * from information_schema.session_variables where variable_name like '%alloc%'; +select * from information_schema.session_variables where variable_name like '%alloc%' order by 1; VARIABLE_NAME VARIABLE_VALUE QUERY_ALLOC_BLOCK_SIZE 8192 QUERY_PREALLOC_SIZE 8192 @@ -336,7 +336,7 @@ query_prealloc_size 18432 range_alloc_block_size 16384 transaction_alloc_block_size 19456 transaction_prealloc_size 20480 -select * from information_schema.session_variables where variable_name like '%alloc%'; +select * from information_schema.session_variables where variable_name like '%alloc%' order by 1; VARIABLE_NAME VARIABLE_VALUE QUERY_ALLOC_BLOCK_SIZE 17408 QUERY_PREALLOC_SIZE 18432 @@ -353,7 +353,7 @@ query_prealloc_size 8192 range_alloc_block_size 2048 transaction_alloc_block_size 8192 transaction_prealloc_size 4096 -select * from information_schema.session_variables where variable_name like '%alloc%'; +select * from information_schema.session_variables where variable_name like '%alloc%' order by 1; VARIABLE_NAME VARIABLE_VALUE QUERY_ALLOC_BLOCK_SIZE 8192 QUERY_PREALLOC_SIZE 8192 @@ -881,7 +881,7 @@ ssl_capath # ssl_cert # ssl_cipher # ssl_key # -select * from information_schema.session_variables where variable_name like 'ssl%'; +select * from information_schema.session_variables where variable_name like 'ssl%' order by 1; VARIABLE_NAME VARIABLE_VALUE SSL_CA # SSL_CAPATH # diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index f1ff91a6d1d..b02a47dde6b 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -252,6 +252,8 @@ set global general_log='OFF'; set global slow_query_log='OFF'; # check that alter table doesn't work for other engines +set @save_storage_engine= @@session.storage_engine; +set storage_engine= MEMORY; --error ER_UNSUPORTED_LOG_ENGINE alter table mysql.slow_log engine=ndb; --error ER_UNSUPORTED_LOG_ENGINE @@ -260,6 +262,7 @@ alter table mysql.slow_log engine=innodb; alter table mysql.slow_log engine=archive; --error ER_UNSUPORTED_LOG_ENGINE alter table mysql.slow_log engine=blackhole; +set storage_engine= @save_storage_engine; drop table mysql.slow_log; drop table mysql.general_log; diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test index 5d43d7997b0..551c3c089ae 100644 --- a/mysql-test/t/ndb_dd_basic.test +++ b/mysql-test/t/ndb_dd_basic.test @@ -21,6 +21,7 @@ INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=MYISAM; +--error ER_UNKNOWN_STORAGE_ENGINE ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undofile02.dat' INITIAL_SIZE = 4M diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 782e204742f..9f8792c924f 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -71,6 +71,7 @@ engine = innodb partition by list (a) (partition p0 values in (0)); +--error ER_UNKNOWN_STORAGE_ENGINE alter table t1 engine = x; show create table t1; drop table t1; diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index a9d4488b1be..2d5dd14e847 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -321,14 +321,8 @@ prepare stmt4 from ' show status like ''Threads_running'' '; execute stmt4; prepare stmt4 from ' show variables like ''sql_mode'' '; execute stmt4; -# The output depends on the bdb being enabled and on the history -# history (actions of the bdb engine). -# That is the reason why, we switch the output here off. -# (The real output will be tested in ps_6bdb.test) ---disable_result_log -prepare stmt4 from ' show engine bdb logs '; +prepare stmt4 from ' show engine myisam logs '; execute stmt4; ---enable_result_log prepare stmt4 from ' show grants for user '; prepare stmt4 from ' show create table t2 '; prepare stmt4 from ' show master status '; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 4f91b75ced1..cde0d0f7374 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -151,14 +151,14 @@ set global net_retry_count=10, session net_retry_count=10; set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300; set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600; show global variables like 'net_%'; -select * from information_schema.global_variables where variable_name like 'net_%'; +select * from information_schema.global_variables where variable_name like 'net_%' order by 1; show session variables like 'net_%'; -select * from information_schema.session_variables where variable_name like 'net_%'; +select * from information_schema.session_variables where variable_name like 'net_%' order by 1; set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000; show global variables like 'net_%'; -select * from information_schema.global_variables where variable_name like 'net_%'; +select * from information_schema.global_variables where variable_name like 'net_%' order by 1; show session variables like 'net_%'; -select * from information_schema.session_variables where variable_name like 'net_%'; +select * from information_schema.session_variables where variable_name like 'net_%' order by 1; set net_buffer_length=1; show variables like 'net_buffer_length'; select * from information_schema.session_variables where variable_name like 'net_buffer_length'; @@ -175,7 +175,7 @@ set @@rand_seed1=10000000,@@rand_seed2=1000000; select ROUND(RAND(),5); show variables like '%alloc%'; -select * from information_schema.session_variables where variable_name like '%alloc%'; +select * from information_schema.session_variables where variable_name like '%alloc%' order by 1; set @@range_alloc_block_size=1024*16; set @@query_alloc_block_size=1024*17+2; set @@query_prealloc_size=1024*18; @@ -183,12 +183,12 @@ set @@transaction_alloc_block_size=1024*20-1; set @@transaction_prealloc_size=1024*21-1; select @@query_alloc_block_size; show variables like '%alloc%'; -select * from information_schema.session_variables where variable_name like '%alloc%'; +select * from information_schema.session_variables where variable_name like '%alloc%' order by 1; set @@range_alloc_block_size=default; set @@query_alloc_block_size=default, @@query_prealloc_size=default; set transaction_alloc_block_size=default, @@transaction_prealloc_size=default; show variables like '%alloc%'; -select * from information_schema.session_variables where variable_name like '%alloc%'; +select * from information_schema.session_variables where variable_name like '%alloc%' order by 1; # # Bug #10904 Illegal mix of collations between @@ -669,7 +669,7 @@ select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key; --replace_column 2 # show variables like 'ssl%'; --replace_column 2 # -select * from information_schema.session_variables where variable_name like 'ssl%'; +select * from information_schema.session_variables where variable_name like 'ssl%' order by 1; # # Bug #19616: make log_queries_not_using_indexes available in SHOW VARIABLES diff --git a/mysql-test/t/warnings_engine_disabled-master.opt b/mysql-test/t/warnings_engine_disabled-master.opt index 99837e4a4cb..f51c1789a16 100644 --- a/mysql-test/t/warnings_engine_disabled-master.opt +++ b/mysql-test/t/warnings_engine_disabled-master.opt @@ -1 +1 @@ ---loose-skip-ndb +--loose-skip-plugin-ndbcluster diff --git a/mysys/array.c b/mysys/array.c index 8f4a6087c00..dd715452fec 100644 --- a/mysys/array.c +++ b/mysys/array.c @@ -26,9 +26,10 @@ Initiate dynamic array SYNOPSIS - init_dynamic_array() + init_dynamic_array2() array Pointer to an array element_size Size of element + init_buffer Initial buffer pointer init_alloc Number of initial elements alloc_increment Increment for adding new elements @@ -36,14 +37,15 @@ init_dynamic_array() initiates array and allocate space for init_alloc eilements. Array is usable even if space allocation failed. + Static buffers must begin immediately after the array structure. RETURN VALUE TRUE my_malloc_ci() failed FALSE Ok */ -my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, - uint init_alloc, +my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, + void *init_buffer, uint init_alloc, uint alloc_increment CALLER_INFO_PROTO) { DBUG_ENTER("init_dynamic_array"); @@ -56,10 +58,14 @@ my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, if (!init_alloc) init_alloc=alloc_increment; + else + init_buffer= 0; array->elements=0; array->max_element=init_alloc; array->alloc_increment=alloc_increment; array->size_of_element=element_size; + if ((array->buffer= init_buffer)) + DBUG_RETURN(FALSE); if (!(array->buffer=(char*) my_malloc_ci(element_size*init_alloc,MYF(MY_WME)))) { array->max_element=0; @@ -68,6 +74,14 @@ my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, DBUG_RETURN(FALSE); } +my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size, + uint init_alloc, + uint alloc_increment CALLER_INFO_PROTO) +{ + /* placeholder to preserve ABI */ + return my_init_dynamic_array_ci(array, element_size, init_alloc, + alloc_increment); +} /* Insert element at the end of array. Allocate memory if needed. @@ -121,6 +135,21 @@ byte *alloc_dynamic(DYNAMIC_ARRAY *array) if (array->elements == array->max_element) { char *new_ptr; + if (array->buffer == (char *)(array + 1)) + { + /* + In this senerio, the buffer is statically preallocated, + so we have to create an all-new malloc since we overflowed + */ + if (!(new_ptr= (char *) my_malloc((array->max_element+ + array->alloc_increment) * + array->size_of_element, + MYF(MY_WME)))) + return 0; + memcpy(new_ptr, array->buffer, + array->elements * array->size_of_element); + } + else if (!(new_ptr=(char*) my_realloc(array->buffer,(array->max_element+ array->alloc_increment)* array->size_of_element, @@ -180,6 +209,20 @@ my_bool set_dynamic(DYNAMIC_ARRAY *array, gptr element, uint idx) char *new_ptr; size=(idx+array->alloc_increment)/array->alloc_increment; size*= array->alloc_increment; + if (array->buffer == (char *)(array + 1)) + { + /* + In this senerio, the buffer is statically preallocated, + so we have to create an all-new malloc since we overflowed + */ + if (!(new_ptr= (char *) my_malloc(size * + array->size_of_element, + MYF(MY_WME)))) + return 0; + memcpy(new_ptr, array->buffer, + array->elements * array->size_of_element); + } + else if (!(new_ptr=(char*) my_realloc(array->buffer,size* array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR)))) @@ -230,6 +273,12 @@ void get_dynamic(DYNAMIC_ARRAY *array, gptr element, uint idx) void delete_dynamic(DYNAMIC_ARRAY *array) { + /* + Just mark as empty if we are using a static buffer + */ + if (array->buffer == (char *)(array + 1)) + array->elements= 0; + else if (array->buffer) { my_free(array->buffer,MYF(MY_WME)); @@ -269,6 +318,12 @@ void freeze_size(DYNAMIC_ARRAY *array) { uint elements=max(array->elements,1); + /* + Do nothing if we are using a static buffer + */ + if (array->buffer == (char *)(array + 1)) + return; + if (array->buffer && array->max_element != elements) { array->buffer=(char*) my_realloc(array->buffer, diff --git a/mysys/hash.c b/mysys/hash.c index 60168e01e20..ab875848989 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -315,6 +315,10 @@ my_bool my_hash_insert(HASH *info,const byte *record) LINT_INIT(gpos); LINT_INIT(gpos2); LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2); + if (HASH_UNIQUE & info->flags && + hash_search(info, hash_key(info, record, &idx, 1), idx)) + return(TRUE); /* Duplicate entry */ + flag=0; if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array))) return(TRUE); /* No more memory */ @@ -530,6 +534,19 @@ my_bool hash_update(HASH *hash,byte *record,byte *old_key,uint old_key_length) uint idx,new_index,new_pos_index,blength,records,empty; HASH_LINK org_link,*data,*previous,*pos; DBUG_ENTER("hash_update"); + + if (HASH_UNIQUE & hash->flags) + { + HASH_SEARCH_STATE state; + byte *found, *new_key= hash_key(hash, record, &idx, 1); + if ((found= hash_first(hash, new_key, idx, &state))) + do + { + if (found != record) + DBUG_RETURN(1); /* Duplicate entry */ + } + while ((found= hash_next(hash, new_key, idx, &state))); + } data=dynamic_element(&hash->array,0,HASH_LINK*); blength=hash->blength; records=hash->records; diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index aa470282aa4..f893cf89b5c 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -58,6 +58,13 @@ char *disabled_my_option= (char*) "0"; my_bool my_getopt_print_errors= 1; +/* + This is a flag that can be set in client programs. 1 means that + my_getopt will skip over options it does not know how to handle. +*/ + +my_bool my_getopt_skip_unknown= 0; + static void default_reporter(enum loglevel level, const char *format, ...) { @@ -110,6 +117,7 @@ int handle_options(int *argc, char ***argv, for (pos= *argv, pos_end=pos+ *argc; pos != pos_end ; pos++) { + char **first= pos; char *cur_arg= *pos; if (cur_arg[0] == '-' && cur_arg[1] && !end_of_options) /* must be opt */ { @@ -259,6 +267,19 @@ int handle_options(int *argc, char ***argv, } if (!opt_found) { + if (my_getopt_skip_unknown) + { + /* + preserve all the components of this unknown option, this may + occurr when the user provides options like: "-O foo" or + "--set-variable foo" (note that theres a space in there) + Generally, these kind of options are to be avoided + */ + do { + (*argv)[argvpos++]= *first++; + } while (first <= pos); + continue; + } if (must_be_var) { if (my_getopt_print_errors) @@ -596,6 +617,15 @@ static int setval(const struct my_option *opts, gptr *value, char *argument, if (!(*((char**) result_pos)= my_strdup(argument, MYF(MY_WME)))) return EXIT_OUT_OF_MEMORY; break; + case GET_ENUM: + if (((*(int*)result_pos)= find_type(argument, opts->typelib, 2) - 1) < 0) + return EXIT_ARGUMENT_INVALID; + break; + case GET_SET: + *((ulonglong*)result_pos)= find_typeset(argument, opts->typelib, &err); + if (err) + return EXIT_ARGUMENT_INVALID; + break; default: /* dummy default to avoid compiler warnings */ break; } @@ -788,6 +818,7 @@ static void init_one_value(const struct my_option *option, gptr *variable, *((int*) variable)= (int) value; break; case GET_UINT: + case GET_ENUM: *((uint*) variable)= (uint) value; break; case GET_LONG: @@ -800,6 +831,7 @@ static void init_one_value(const struct my_option *option, gptr *variable, *((longlong*) variable)= (longlong) value; break; case GET_ULL: + case GET_SET: *((ulonglong*) variable)= (ulonglong) value; break; default: /* dummy default to avoid compiler warnings */ @@ -928,7 +960,8 @@ void my_print_help(const struct my_option *options) void my_print_variables(const struct my_option *options) { - uint name_space= 34, length; + uint name_space= 34, length, nr; + ulonglong bit, llvalue; char buff[255]; const struct my_option *optp; @@ -946,6 +979,21 @@ void my_print_variables(const struct my_option *options) for (; length < name_space; length++) putchar(' '); switch ((optp->var_type & GET_TYPE_MASK)) { + case GET_SET: + if (!(llvalue= *(ulonglong*) value)) + printf("%s\n", "(No default value)"); + else + for (nr= 0, bit= 1; llvalue && nr < optp->typelib->count; nr++, bit<<=1) + { + if (!(bit & llvalue)) + continue; + llvalue&= ~bit; + printf( llvalue ? "%s," : "%s\n", get_type(optp->typelib, nr)); + } + break; + case GET_ENUM: + printf("%s\n", get_type(optp->typelib, *(uint*) value)); + break; case GET_STR: case GET_STR_ALLOC: /* fall through */ printf("%s\n", *((char**) value) ? *((char**) value) : diff --git a/mysys/typelib.c b/mysys/typelib.c index 4fab6f20493..5013423799c 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -120,6 +120,54 @@ const char *get_type(TYPELIB *typelib, uint nr) } +static const char field_separator=','; + +/* + Create an integer value to represent the supplied comma-seperated + string where each string in the TYPELIB denotes a bit position. + + SYNOPSIS + find_typeset() + x string to decompose + lib TYPELIB (struct of pointer to values + count) + err index (not char position) of string element which was not + found or 0 if there was no error + + RETURN + a integer representation of the supplied string +*/ + +my_ulonglong find_typeset(my_string x, TYPELIB *lib, int *err) +{ + my_ulonglong result; + int find; + my_string i; + DBUG_ENTER("find_set"); + DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) lib)); + + if (!lib->count) + { + DBUG_PRINT("exit",("no count")); + DBUG_RETURN(0); + } + result= 0; + *err= 0; + while (*x) + { + (*err)++; + i= x; + while (*x && *x != field_separator) x++; + if (*x) + *x++= 0; + if ((find= find_type(i, lib, 2) - 1) < 0) + DBUG_RETURN(0); + result|= (ULL(1) << find); + } + *err= 0; + DBUG_RETURN(result); +} /* find_set */ + + /* Create a copy of a specified TYPELIB structure. diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 393856e62ba..4f4f32c1fa5 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2629,7 +2629,7 @@ int ha_ndbcluster::write_row(byte *record) DBUG_RETURN(peek_res); } - statistic_increment(thd->status_var.ha_write_count, &LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); @@ -2849,7 +2849,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data) DBUG_RETURN(peek_res); } - statistic_increment(thd->status_var.ha_update_count, &LOCK_status); + ha_statistic_increment(&SSV::ha_update_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) { table->timestamp_field->set_time(); @@ -3016,7 +3016,7 @@ int ha_ndbcluster::delete_row(const byte *record) DBUG_ENTER("delete_row"); m_write_op= TRUE; - statistic_increment(thd->status_var.ha_delete_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_delete_count); m_rows_changed++; if (m_use_partition_function && @@ -3372,7 +3372,7 @@ int ha_ndbcluster::index_read_idx(byte *buf, uint index_no, const byte *key, uint key_len, enum ha_rkey_function find_flag) { - statistic_increment(current_thd->status_var.ha_read_key_count, &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); DBUG_ENTER("ha_ndbcluster::index_read_idx"); DBUG_PRINT("enter", ("index_no: %u, key_len: %u", index_no, key_len)); close_scan(); @@ -3384,8 +3384,7 @@ int ha_ndbcluster::index_read_idx(byte *buf, uint index_no, int ha_ndbcluster::index_next(byte *buf) { DBUG_ENTER("ha_ndbcluster::index_next"); - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); DBUG_RETURN(next_result(buf)); } @@ -3393,8 +3392,7 @@ int ha_ndbcluster::index_next(byte *buf) int ha_ndbcluster::index_prev(byte *buf) { DBUG_ENTER("ha_ndbcluster::index_prev"); - statistic_increment(current_thd->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); DBUG_RETURN(next_result(buf)); } @@ -3402,8 +3400,7 @@ int ha_ndbcluster::index_prev(byte *buf) int ha_ndbcluster::index_first(byte *buf) { DBUG_ENTER("ha_ndbcluster::index_first"); - statistic_increment(current_thd->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); // Start the ordered index scan and fetch the first row // Only HA_READ_ORDER indexes get called by index_first @@ -3414,7 +3411,7 @@ int ha_ndbcluster::index_first(byte *buf) int ha_ndbcluster::index_last(byte *buf) { DBUG_ENTER("ha_ndbcluster::index_last"); - statistic_increment(current_thd->status_var.ha_read_last_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); DBUG_RETURN(ordered_index_scan(0, 0, TRUE, TRUE, buf, NULL)); } @@ -3600,8 +3597,7 @@ int ha_ndbcluster::rnd_end() int ha_ndbcluster::rnd_next(byte *buf) { DBUG_ENTER("rnd_next"); - statistic_increment(current_thd->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); if (!m_active_cursor) DBUG_RETURN(full_table_scan(buf)); @@ -3619,8 +3615,7 @@ int ha_ndbcluster::rnd_next(byte *buf) int ha_ndbcluster::rnd_pos(byte *buf, byte *pos) { DBUG_ENTER("rnd_pos"); - statistic_increment(current_thd->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); // The primary key for the record is stored in pos // Perform a pk_read using primary key "index" { @@ -6743,7 +6738,7 @@ static int ndbcluster_init(void *p) { handlerton *h= ndbcluster_hton; - h->state= have_ndbcluster; + h->state= SHOW_OPTION_YES; h->db_type= DB_TYPE_NDBCLUSTER; h->close_connection= ndbcluster_close_connection; h->commit= ndbcluster_commit; @@ -6765,9 +6760,6 @@ static int ndbcluster_init(void *p) h->table_exists_in_engine= ndbcluster_table_exists_in_engine; } - if (have_ndbcluster != SHOW_OPTION_YES) - DBUG_RETURN(0); // nothing else to do - // Initialize ndb interface ndb_init_internal(); @@ -6883,7 +6875,6 @@ ndbcluster_init_error: if (g_ndb_cluster_connection) delete g_ndb_cluster_connection; g_ndb_cluster_connection= NULL; - have_ndbcluster= SHOW_OPTION_DISABLED; // If we couldn't use handler ndbcluster_hton->state= SHOW_OPTION_DISABLED; // If we couldn't use handler DBUG_RETURN(TRUE); @@ -10220,10 +10211,6 @@ ndbcluster_show_status(handlerton *hton, THD* thd, stat_print_fn *stat_print, uint buflen; DBUG_ENTER("ndbcluster_show_status"); - if (have_ndbcluster != SHOW_OPTION_YES) - { - DBUG_RETURN(FALSE); - } if (stat_type != HA_ENGINE_STATUS) { DBUG_RETURN(FALSE); diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 87d24207dcd..d8fd3b5f934 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1987,6 +1987,8 @@ bool ha_partition::create_handler_file(const char *name) void ha_partition::clear_handler_file() { + if (m_engine_array) + plugin_unlock_list(NULL, m_engine_array, m_tot_parts); my_free((char*) m_file_buffer, MYF(MY_ALLOW_ZERO_PTR)); my_free((char*) m_engine_array, MYF(MY_ALLOW_ZERO_PTR)); m_file_buffer= NULL; @@ -2009,6 +2011,7 @@ bool ha_partition::create_handlers(MEM_ROOT *mem_root) { uint i; uint alloc_len= (m_tot_parts + 1) * sizeof(handler*); + handlerton *hton0; DBUG_ENTER("create_handlers"); if (!(m_file= (handler **) alloc_root(mem_root, alloc_len))) @@ -2017,19 +2020,21 @@ bool ha_partition::create_handlers(MEM_ROOT *mem_root) bzero((char*) m_file, alloc_len); for (i= 0; i < m_tot_parts; i++) { + handlerton *hton= plugin_data(m_engine_array[i], handlerton*); if (!(m_file[i]= get_new_handler(table_share, mem_root, - m_engine_array[i]))) + hton))) DBUG_RETURN(TRUE); - DBUG_PRINT("info", ("engine_type: %u", m_engine_array[i]->db_type)); + DBUG_PRINT("info", ("engine_type: %u", hton->db_type)); } /* For the moment we only support partition over the same table engine */ - if (m_engine_array[0] == myisam_hton) + hton0= plugin_data(m_engine_array[0], handlerton*); + if (hton0 == myisam_hton) { DBUG_PRINT("info", ("MyISAM")); m_myisam= TRUE; } /* INNODB may not be compiled in... */ - else if (ha_legacy_type(m_engine_array[0]) == DB_TYPE_INNODB) + else if (ha_legacy_type(hton0) == DB_TYPE_INNODB) { DBUG_PRINT("info", ("InnoDB")); m_innodb= TRUE; @@ -2160,8 +2165,7 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root) m_tot_parts= uint4korr((file_buffer) + 8); DBUG_PRINT("info", ("No of parts = %u", m_tot_parts)); tot_partition_words= (m_tot_parts + 3) / 4; - if (!(engine_array= (handlerton **) my_malloc(m_tot_parts * sizeof(handlerton*),MYF(0)))) - goto err2; + engine_array= (handlerton **) my_alloca(m_tot_parts * sizeof(handlerton*)); for (i= 0; i < m_tot_parts; i++) engine_array[i]= ha_resolve_by_legacy_type(current_thd, (enum legacy_db_type) @@ -2174,7 +2178,14 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root) VOID(my_close(file, MYF(0))); m_file_buffer= file_buffer; // Will be freed in clear_handler_file() m_name_buffer_ptr= name_buffer_ptr; - m_engine_array= engine_array; + + if (!(m_engine_array= (plugin_ref*) + my_malloc(m_tot_parts * sizeof(plugin_ref), MYF(MY_WME)))) + goto err2; + + for (i= 0; i < m_tot_parts; i++) + m_engine_array[i]= ha_lock_engine(NULL, engine_array[i]); + if (!m_file && create_handlers(mem_root)) { clear_handler_file(); diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 4fdf325fa06..a2904562930 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -27,6 +27,7 @@ enum partition_keywords The partition implements the minimum of what you will probably need. */ +#ifdef NOT_USED typedef struct st_partition_share { char *table_name; @@ -34,6 +35,7 @@ typedef struct st_partition_share pthread_mutex_t mutex; THR_LOCK lock; } PARTITION_SHARE; +#endif #define PARTITION_BYTES_IN_POS 2 @@ -54,7 +56,7 @@ private: uint m_open_test_lock; // Open test_if_locked char *m_file_buffer; // Buffer with names char *m_name_buffer_ptr; // Pointer to first partition name - handlerton **m_engine_array; // Array of types of the handlers + plugin_ref *m_engine_array; // Array of types of the handlers handler **m_file; // Array of references to handler inst. uint m_file_tot_parts; // Debug handler **m_new_file; // Array of references to new handlers @@ -130,7 +132,9 @@ private: Variables for lock structures. */ THR_LOCK_DATA lock; /* MySQL lock */ +#ifdef NOT_USED PARTITION_SHARE *share; /* Shared lock info */ +#endif public: virtual void set_part_info(partition_info *part_info) diff --git a/sql/handler.cc b/sql/handler.cc index 2244aaa5311..bb7c39be262 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -77,6 +77,15 @@ static TYPELIB known_extensions= {0,"known_exts", NULL, NULL}; uint known_extensions_id= 0; + +static plugin_ref ha_default_plugin(THD *thd) +{ + if (thd->variables.table_plugin) + return thd->variables.table_plugin; + return my_plugin_lock(thd, &global_system_variables.table_plugin); +} + + /** @brief Return the default storage engine handlerton for thread @@ -89,10 +98,11 @@ uint known_extensions_id= 0; */ handlerton *ha_default_handlerton(THD *thd) { - return (thd->variables.table_type != NULL) ? - thd->variables.table_type : - (global_system_variables.table_type != NULL ? - global_system_variables.table_type : myisam_hton); + plugin_ref plugin= ha_default_plugin(thd); + DBUG_ASSERT(plugin); + handlerton *hton= plugin_data(plugin, handlerton*); + DBUG_ASSERT(hton); + return hton; } @@ -105,26 +115,30 @@ handlerton *ha_default_handlerton(THD *thd) name name of storage engine RETURN - pointer to handlerton + pointer to storage engine plugin handle */ -handlerton *ha_resolve_by_name(THD *thd, const LEX_STRING *name) +plugin_ref ha_resolve_by_name(THD *thd, const LEX_STRING *name) { const LEX_STRING *table_alias; - st_plugin_int *plugin; + plugin_ref plugin; redo: /* my_strnncoll is a macro and gcc doesn't do early expansion of macro */ if (thd && !my_charset_latin1.coll->strnncoll(&my_charset_latin1, (const uchar *)name->str, name->length, (const uchar *)STRING_WITH_LEN("DEFAULT"), 0)) - return ha_default_handlerton(thd); + return ha_default_plugin(thd); - if ((plugin= plugin_lock(name, MYSQL_STORAGE_ENGINE_PLUGIN))) + if ((plugin= my_plugin_lock_by_name(thd, name, MYSQL_STORAGE_ENGINE_PLUGIN))) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (!(hton->flags & HTON_NOT_USER_SELECTABLE)) - return hton; - plugin_unlock(plugin); + return plugin; + + /* + unlocking plugin immediately after locking is relatively low cost. + */ + plugin_unlock(thd, plugin); } /* @@ -145,19 +159,19 @@ redo: } -const char *ha_get_storage_engine(enum legacy_db_type db_type) +plugin_ref ha_lock_engine(THD *thd, handlerton *hton) { - switch (db_type) { - case DB_TYPE_DEFAULT: - return "DEFAULT"; - default: - if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT && - installed_htons[db_type]) - return hton2plugin[installed_htons[db_type]->slot]->name.str; - /* fall through */ - case DB_TYPE_UNKNOWN: - return "UNKNOWN"; + if (hton) + { + st_plugin_int **plugin= hton2plugin + hton->slot; + +#ifdef DBUG_OFF; + return my_plugin_lock(thd, plugin); +#else + return my_plugin_lock(thd, &plugin); +#endif } + return NULL; } @@ -172,14 +186,16 @@ static handler *create_default(TABLE_SHARE *table, MEM_ROOT *mem_root) handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type) { + plugin_ref plugin; switch (db_type) { case DB_TYPE_DEFAULT: return ha_default_handlerton(thd); - case DB_TYPE_UNKNOWN: - return NULL; default: - if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT) - return installed_htons[db_type]; + if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT && + (plugin= ha_lock_engine(thd, installed_htons[db_type]))) + return plugin_data(plugin, handlerton*); + /* fall through */ + case DB_TYPE_UNKNOWN: return NULL; } } @@ -199,7 +215,7 @@ handlerton *ha_checktype(THD *thd, enum legacy_db_type database_type, { if (report_error) { - const char *engine_name= ha_get_storage_engine(database_type); + const char *engine_name= ha_resolve_storage_engine_name(hton); my_error(ER_FEATURE_DISABLED,MYF(0),engine_name,engine_name); } return NULL; @@ -238,8 +254,7 @@ handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc, Here the call to current_thd() is ok as we call this function a lot of times but we enter this branch very seldom. */ - DBUG_RETURN(get_new_handler(share, alloc, - current_thd->variables.table_type)); + DBUG_RETURN(get_new_handler(share, alloc, ha_default_handlerton(current_thd))); } @@ -522,10 +537,10 @@ int ha_end() DBUG_RETURN(error); } -static my_bool dropdb_handlerton(THD *unused1, st_plugin_int *plugin, +static my_bool dropdb_handlerton(THD *unused1, plugin_ref plugin, void *path) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->drop_database) hton->drop_database(hton, (char *)path); return FALSE; @@ -538,10 +553,10 @@ void ha_drop_database(char* path) } -static my_bool closecon_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool closecon_handlerton(THD *thd, plugin_ref plugin, void *unused) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); /* there's no need to rollback here as all transactions must be rolled back already @@ -638,7 +653,7 @@ int ha_prepare(THD *thd) { push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), - hton2plugin[(*ht)->slot]->name.str); + ha_resolve_storage_engine_name(*ht)); } } } @@ -886,10 +901,10 @@ struct xahton_st { int result; }; -static my_bool xacommit_handlerton(THD *unused1, st_plugin_int *plugin, +static my_bool xacommit_handlerton(THD *unused1, plugin_ref plugin, void *arg) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->recover) { hton->commit_by_xid(hton, ((struct xahton_st *)arg)->xid); @@ -898,10 +913,10 @@ static my_bool xacommit_handlerton(THD *unused1, st_plugin_int *plugin, return FALSE; } -static my_bool xarollback_handlerton(THD *unused1, st_plugin_int *plugin, +static my_bool xarollback_handlerton(THD *unused1, plugin_ref plugin, void *arg) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->recover) { hton->rollback_by_xid(hton, ((struct xahton_st *)arg)->xid); @@ -1004,10 +1019,10 @@ struct xarecover_st bool dry_run; }; -static my_bool xarecover_handlerton(THD *unused, st_plugin_int *plugin, +static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, void *arg) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); struct xarecover_st *info= (struct xarecover_st *) arg; int got; @@ -1016,7 +1031,7 @@ static my_bool xarecover_handlerton(THD *unused, st_plugin_int *plugin, while ((got= hton->recover(hton, info->list, info->len)) > 0 ) { sql_print_information("Found %d prepared transaction(s) in %s", - got, hton2plugin[hton->slot]->name.str); + got, ha_resolve_storage_engine_name(hton)); for (int i=0; i < got; i ++) { my_xid x=info->list[i].get_my_xid(); @@ -1192,10 +1207,10 @@ bool mysql_xa_recover(THD *thd) thd: the thread handle of the current connection return value: always 0 */ -static my_bool release_temporary_latches(THD *thd, st_plugin_int *plugin, +static my_bool release_temporary_latches(THD *thd, plugin_ref plugin, void *unused) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->release_temporary_latches) hton->release_temporary_latches(hton, thd); @@ -1318,10 +1333,10 @@ int ha_release_savepoint(THD *thd, SAVEPOINT *sv) } -static my_bool snapshot_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool snapshot_handlerton(THD *thd, plugin_ref plugin, void *arg) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->start_consistent_snapshot) { @@ -1349,10 +1364,10 @@ int ha_start_consistent_snapshot(THD *thd) } -static my_bool flush_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool flush_handlerton(THD *thd, plugin_ref plugin, void *arg) { - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->flush_logs && hton->flush_logs(hton)) return TRUE; @@ -1397,7 +1412,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path, /* DB_TYPE_UNKNOWN is used in ALTER TABLE when renaming only .frm files */ if (table_type == NULL || - ! (file=get_new_handler(&dummy_share, thd->mem_root, table_type))) + ! (file=get_new_handler((TABLE_SHARE*)0, thd->mem_root, table_type))) DBUG_RETURN(ENOENT); if (lower_case_table_names == 2 && !(file->ha_table_flags() & HA_FILE_BASED)) @@ -1438,6 +1453,8 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path, dummy_share.table_name.length= strlen(alias); dummy_table.alias= alias; + file->table_share= &dummy_share; + file->table= &dummy_table; file->print_error(error, 0); strmake(new_error, thd->net.last_error, sizeof(buff)-1); @@ -1458,7 +1475,7 @@ int ha_delete_table(THD *thd, handlerton *table_type, const char *path, ****************************************************************************/ handler *handler::clone(MEM_ROOT *mem_root) { - handler *new_handler= get_new_handler(table->s, mem_root, table->s->db_type); + handler *new_handler= get_new_handler(table->s, mem_root, table->s->db_type()); if (new_handler && !new_handler->ha_open(table, table->s->normalized_path.str, table->db_stat, @@ -1474,6 +1491,26 @@ void handler::ha_statistic_increment(ulong SSV::*offset) const statistic_increment(table->in_use->status_var.*offset, &LOCK_status); } +enum enum_tx_isolation handler::ha_tx_isolation(void) const +{ + return (enum_tx_isolation) ha_thd()->variables.tx_isolation; +} + +uint handler::ha_sql_command(void) const +{ + return (uint) ha_thd()->lex->sql_command; +} + +void **handler::ha_data(void) const +{ + return (void **) ha_thd()->ha_data + ht->slot; +} + +THD *handler::ha_thd(void) const +{ + return (table && table->in_use) ? table->in_use : current_thd; +} + bool handler::check_if_log_table_locking_is_allowed(uint sql_command, ulong type, TABLE *table) @@ -1567,8 +1604,7 @@ int handler::read_first_row(byte * buf, uint primary_key) register int error; DBUG_ENTER("handler::read_first_row"); - statistic_increment(table->in_use->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); /* If there is very few deleted rows in the table, find the first row by @@ -2785,11 +2821,11 @@ struct st_discover_args uint* frmlen; }; -static my_bool discover_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool discover_handlerton(THD *thd, plugin_ref plugin, void *arg) { st_discover_args *vargs= (st_discover_args *)arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->discover && (!(hton->discover(hton, thd, vargs->db, vargs->name, vargs->frmblob, @@ -2834,11 +2870,11 @@ struct st_find_files_args List *files; }; -static my_bool find_files_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool find_files_handlerton(THD *thd, plugin_ref plugin, void *arg) { st_find_files_args *vargs= (st_find_files_args *)arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->find_files) @@ -2881,11 +2917,11 @@ struct st_table_exists_in_engine_args const char *name; }; -static my_bool table_exists_in_engine_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool table_exists_in_engine_handlerton(THD *thd, plugin_ref plugin, void *arg) { st_table_exists_in_engine_args *vargs= (st_table_exists_in_engine_args *)arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->table_exists_in_engine) if ((hton->table_exists_in_engine(hton, thd, vargs->db, vargs->name)) == 1) @@ -2929,10 +2965,10 @@ struct binlog_func_st /** @brief Listing handlertons first to avoid recursive calls and deadlock */ -static my_bool binlog_func_list(THD *thd, st_plugin_int *plugin, void *arg) +static my_bool binlog_func_list(THD *thd, plugin_ref plugin, void *arg) { hton_list_st *hton_list= (hton_list_st *)arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->binlog_func) { uint sz= hton_list->sz; @@ -3019,10 +3055,10 @@ static my_bool binlog_log_query_handlerton2(THD *thd, } static my_bool binlog_log_query_handlerton(THD *thd, - st_plugin_int *plugin, + plugin_ref plugin, void *args) { - return binlog_log_query_handlerton2(thd, (handlerton *)plugin->data, args); + return binlog_log_query_handlerton2(thd, plugin_data(plugin, handlerton *), args); } void ha_binlog_log_query(THD *thd, handlerton *hton, @@ -3310,11 +3346,11 @@ int handler::index_read_idx(byte * buf, uint index, const byte * key, RETURN VALUE pointer pointer to TYPELIB structure */ -static my_bool exts_handlerton(THD *unused, st_plugin_int *plugin, +static my_bool exts_handlerton(THD *unused, plugin_ref plugin, void *arg) { List *found_exts= (List *) arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); handler *file; if (hton->state == SHOW_OPTION_YES && hton->create && (file= hton->create(hton, (TABLE_SHARE*) 0, current_thd->mem_root))) @@ -3385,11 +3421,11 @@ static bool stat_print(THD *thd, const char *type, uint type_len, } -static my_bool showstat_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool showstat_handlerton(THD *thd, plugin_ref plugin, void *arg) { enum ha_stat_type stat= *(enum ha_stat_type *) arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (hton->state == SHOW_OPTION_YES && hton->show_status && hton->show_status(hton, thd, stat_print, stat)) return TRUE; diff --git a/sql/handler.h b/sql/handler.h index 82970cc1ac6..fbdd48fcc6d 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -876,6 +876,8 @@ public: class handler :public Sql_alloc { friend class ha_partition; + friend int ha_delete_table(THD*,handlerton*,const char*,const char*, + const char*,bool); protected: struct st_table_share *table_share; /* The table definition */ @@ -894,7 +896,12 @@ class handler :public Sql_alloc virtual int rnd_init(bool scan) =0; virtual int rnd_end() { return 0; } virtual ulonglong table_flags(void) const =0; + void ha_statistic_increment(ulong SSV::*offset) const; + enum enum_tx_isolation ha_tx_isolation(void) const; + uint ha_sql_command(void) const; + void **ha_data(void) const; + THD *ha_thd(void) const; ha_rows estimation_rows_to_insert; virtual void start_bulk_insert(ha_rows rows) {} @@ -1626,9 +1633,9 @@ extern ulong total_ha, total_ha_2pc; /* lookups */ handlerton *ha_default_handlerton(THD *thd); -handlerton *ha_resolve_by_name(THD *thd, const LEX_STRING *name); +plugin_ref ha_resolve_by_name(THD *thd, const LEX_STRING *name); +plugin_ref ha_lock_engine(THD *thd, handlerton *hton); handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type); -const char *ha_get_storage_engine(enum legacy_db_type db_type); handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc, handlerton *db_type); handlerton *ha_checktype(THD *thd, enum legacy_db_type database_type, diff --git a/sql/item_func.cc b/sql/item_func.cc index aa344a343de..8272d15e5ae 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4887,7 +4887,7 @@ Item *get_system_var(THD *thd, enum_var_type var_type, LEX_STRING name, component_name= &component; // Empty string } - if (!(var= find_sys_var(base_name->str, base_name->length))) + if (!(var= find_sys_var(thd, base_name->str, base_name->length))) return 0; if (component.str) { diff --git a/sql/item_sum.cc b/sql/item_sum.cc index f34fc008186..27c48604907 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -2469,7 +2469,7 @@ bool Item_sum_count_distinct::setup(THD *thd) table->file->extra(HA_EXTRA_NO_ROWS); // Don't update rows table->no_rows=1; - if (table->s->db_type == heap_hton) + if (table->s->db_type() == heap_hton) { /* No blobs, otherwise it would have been MyISAM: set up a compare diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index bf6bd374ef8..4968fde7f64 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -546,11 +546,6 @@ inline THD *_current_thd(void) } #define current_thd _current_thd() -/* below functions are required for plugins as THD class is opaque */ -my_bool thd_in_lock_tables(const THD *thd); -my_bool thd_tablespace_op(const THD *thd); -const char *thd_proc_info(THD *thd, const char *info); -void **thd_ha_data(const THD *thd, const struct handlerton *hton); /* External variables @@ -1098,6 +1093,7 @@ int add_status_vars(SHOW_VAR *list); void remove_status_vars(SHOW_VAR *list); void init_status_vars(); void free_status_vars(); +void reset_status_vars(); /* information schema */ extern LEX_STRING information_schema_name; @@ -1659,6 +1655,7 @@ extern pthread_mutex_t LOCK_server_started; extern pthread_cond_t COND_server_started; extern int mysqld_server_started; extern rw_lock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; +extern rw_lock_t LOCK_system_variables_hash; extern pthread_cond_t COND_refresh, COND_thread_count, COND_manager; extern pthread_cond_t COND_global_read_lock; extern pthread_attr_t connection_attrib; @@ -1667,7 +1664,7 @@ extern I_List key_caches; extern MY_BITMAP temp_pool; extern String my_empty_string; extern const String my_null_string; -extern SHOW_VAR init_vars[], status_vars[], internal_vars[]; +extern SHOW_VAR status_vars[]; extern struct system_variables global_system_variables; extern struct system_variables max_system_variables; extern struct system_status_var global_status_var; @@ -1690,11 +1687,6 @@ extern TYPELIB log_output_typelib; /* optional things, have_* variables */ -extern SHOW_COMP_OPTION have_innodb; -extern SHOW_COMP_OPTION have_csv_db; -extern SHOW_COMP_OPTION have_ndbcluster; -extern SHOW_COMP_OPTION have_partition_db; - extern handlerton *partition_hton; extern handlerton *myisam_hton; extern handlerton *heap_hton; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index a6525c1c78c..c1ba05e24bd 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -29,22 +29,13 @@ #include "rpl_injector.h" -#ifdef WITH_INNOBASE_STORAGE_ENGINE -#define OPT_INNODB_DEFAULT 1 -#else -#define OPT_INNODB_DEFAULT 0 -#endif -#define OPT_BDB_DEFAULT 0 #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE -#define OPT_NDBCLUSTER_DEFAULT 0 #if defined(NOT_ENOUGH_TESTED) \ && defined(NDB_SHM_TRANSPORTER) && MYSQL_VERSION_ID >= 50000 #define OPT_NDB_SHM_DEFAULT 1 #else #define OPT_NDB_SHM_DEFAULT 0 #endif -#else -#define OPT_NDBCLUSTER_DEFAULT 0 #endif #ifndef DEFAULT_SKIP_THREAD_PRIORITY @@ -323,7 +314,6 @@ static bool lower_case_table_names_used= 0; static bool volatile select_thread_in_use, signal_thread_in_use; static bool volatile ready_to_exit; static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0; -static my_bool opt_ndbcluster; static my_bool opt_short_log_format= 0; static uint kill_cached_threads, wake_thread; static ulong killed_threads, thread_created; @@ -366,7 +356,6 @@ my_bool opt_local_infile, opt_slave_compressed_protocol; my_bool opt_safe_user_create = 0, opt_no_mix_types = 0; my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0; my_bool opt_log_slave_updates= 0; -my_bool opt_innodb; /* Legacy global handlerton. These will be removed (please do not add more). @@ -375,44 +364,6 @@ handlerton *heap_hton; handlerton *myisam_hton; handlerton *partition_hton; -#ifdef WITH_INNOBASE_STORAGE_ENGINE -extern ulong innobase_fast_shutdown; -extern ulong innobase_large_page_size; -extern char *innobase_home, *innobase_tmpdir, *innobase_logdir; -extern long innobase_lock_scan_time; -extern long innobase_mirrored_log_groups, innobase_log_files_in_group; -extern longlong innobase_log_file_size; -extern long innobase_log_buffer_size; -extern longlong innobase_buffer_pool_size; -extern long innobase_additional_mem_pool_size; -extern long innobase_file_io_threads, innobase_lock_wait_timeout; -extern long innobase_force_recovery; -extern long innobase_open_files; -extern char *innobase_data_home_dir, *innobase_data_file_path; -extern char *innobase_log_group_home_dir, *innobase_log_arch_dir; -extern char *innobase_unix_file_flush_method; -/* The following variables have to be my_bool for SHOW VARIABLES to work */ -extern my_bool innobase_log_archive, - innobase_use_doublewrite, - innobase_use_checksums, - innobase_use_large_pages, - innobase_use_native_aio, - innobase_file_per_table, innobase_locks_unsafe_for_binlog, - innobase_rollback_on_timeout, - innobase_create_status_file; -extern "C" { -extern ulong srv_max_buf_pool_modified_pct; -extern ulong srv_max_purge_lag; -extern ulong srv_auto_extend_increment; -extern ulong srv_n_spin_wait_rounds; -extern ulong srv_n_free_tickets_to_enter; -extern ulong srv_thread_sleep_delay; -extern ulong srv_thread_concurrency; -extern ulong srv_commit_concurrency; -extern ulong srv_flush_log_at_trx_commit; -} -#endif - #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE const char *opt_ndbcluster_connectstring= 0; const char *opt_ndb_connectstring= 0; @@ -594,6 +545,7 @@ pthread_mutex_t LOCK_prepared_stmt_count; pthread_mutex_t LOCK_des_key_file; #endif rw_lock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; +rw_lock_t LOCK_system_variables_hash; pthread_cond_t COND_refresh, COND_thread_count, COND_global_read_lock; pthread_t signal_thread; pthread_attr_t connection_attrib; @@ -625,6 +577,7 @@ static ulong opt_specialflag, opt_myisam_block_size; static char *opt_update_logname, *opt_binlog_index_name; static char *opt_tc_heuristic_recover; static char *mysql_home_ptr, *pidfile_name_ptr; +static int defaults_argc; static char **defaults_argv; static char *opt_bin_logname; @@ -716,7 +669,9 @@ struct st_VioSSLFd *ssl_acceptor_fd; pthread_handler_t signal_hand(void *arg); static void mysql_init_variables(void); -static void get_options(int argc,char **argv); +static void get_options(int *argc,char **argv); +static my_bool get_one_option(int, const struct my_option *, char *); +static void usage(void); static void set_server_version(void); static int init_thread_environment(); static char *get_relative_path(const char *path); @@ -1161,6 +1116,8 @@ void unireg_end(void) extern "C" void unireg_abort(int exit_code) { DBUG_ENTER("unireg_abort"); + if (opt_help) + usage(); if (exit_code) sql_print_error("Aborting\n"); clean_up(exit_code || !opt_bootstrap); /* purecov: inspected */ @@ -1347,6 +1304,7 @@ static void clean_up_mutexes() (void) rwlock_destroy(&LOCK_sys_init_connect); (void) rwlock_destroy(&LOCK_sys_init_slave); (void) pthread_mutex_destroy(&LOCK_global_system_variables); + (void) rwlock_destroy(&LOCK_system_variables_hash); (void) pthread_mutex_destroy(&LOCK_global_read_lock); (void) pthread_mutex_destroy(&LOCK_uuid_generator); (void) pthread_mutex_destroy(&LOCK_prepared_stmt_count); @@ -2753,7 +2711,8 @@ static int init_common_variables(const char *conf_file_name, int argc, load_defaults(conf_file_name, groups, &argc, &argv); defaults_argv=argv; - get_options(argc,argv); + defaults_argc=argc; + get_options(&defaults_argc, defaults_argv); set_server_version(); DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname, @@ -2765,10 +2724,6 @@ static int init_common_variables(const char *conf_file_name, int argc, { my_use_large_pages= 1; my_large_page_size= opt_large_page_size; -#ifdef WITH_INNOBASE_STORAGE_ENGINE - innobase_use_large_pages= 1; - innobase_large_page_size= opt_large_page_size; -#endif } #endif /* HAVE_LARGE_PAGES */ @@ -2831,7 +2786,12 @@ static int init_common_variables(const char *conf_file_name, int argc, if (item_create_init()) return 1; item_init(); - set_var_init(); + if (set_var_init()) + return 1; +#ifdef HAVE_REPLICATION + if (init_replication_sys_vars()) + return 1; +#endif mysys_uses_curses=0; #ifdef USE_REGEX my_regex_init(&my_charset_latin1); @@ -2984,6 +2944,7 @@ static int init_thread_environment() (void) pthread_mutex_init(&LOCK_user_conn, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_active_mi, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_global_system_variables, MY_MUTEX_INIT_FAST); + (void) my_rwlock_init(&LOCK_system_variables_hash, NULL); (void) pthread_mutex_init(&LOCK_global_read_lock, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_prepared_stmt_count, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_uuid_generator, MY_MUTEX_INIT_FAST); @@ -3319,10 +3280,42 @@ server."); using_update_log=1; } - if (plugin_init(opt_bootstrap)) + if (plugin_init(&defaults_argc, defaults_argv, + (opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) | + (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0))) { - sql_print_error("Failed to init plugins."); - return 1; + sql_print_error("Failed to initialize plugins."); + unireg_abort(1); + } + + if (opt_help) + unireg_abort(0); + + /* we do want to exit if there are any other unknown options */ + if (defaults_argc > 1) + { + int ho_error; + struct my_option no_opts[] = + { + {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} + }; + /* + We need to eat any 'loose' arguments first before we conclude + that there are unprocessed options + */ + my_getopt_skip_unknown= 0; + + if ((ho_error= handle_options(&defaults_argc, &defaults_argv, no_opts, + get_one_option))) + unireg_abort(ho_error); + + if (defaults_argc) + { + fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n" + "Use --verbose --help to get a list of available options\n", + my_progname, *defaults_argv); + unireg_abort(1); + } } /* We have to initialize the storage engines before CSV logging */ @@ -3353,7 +3346,8 @@ server."); else { /* fall back to the log files if tables are not present */ - if (have_csv_db == SHOW_OPTION_NO) + LEX_STRING csv_name={C_STRING_WITH_LEN("csv")}; + if (!plugin_is_ready(&csv_name, MYSQL_STORAGE_ENGINE_PLUGIN)) { /* purecov: begin inspected */ sql_print_error("CSV engine is not present, falling back to the " @@ -3373,11 +3367,16 @@ server."); /* Check that the default storage engine is actually available. */ + if (default_storage_engine_str) { LEX_STRING name= { default_storage_engine_str, strlen(default_storage_engine_str) }; - handlerton *hton= ha_resolve_by_name(0, &name); - if (hton == NULL) + plugin_ref plugin; + handlerton *hton; + + if ((plugin= ha_resolve_by_name(0, &name))) + hton= plugin_data(plugin, handlerton*); + else { sql_print_error("Unknown/unsupported table type: %s", default_storage_engine_str); @@ -3391,9 +3390,17 @@ server."); default_storage_engine_str); unireg_abort(1); } - hton= myisam_hton; + DBUG_ASSERT(global_system_variables.table_plugin); + } + else + { + /* + Need to unlock as global_system_variables.table_plugin + was acquired during plugin_init() + */ + plugin_unlock(0, global_system_variables.table_plugin); + global_system_variables.table_plugin= plugin; } - global_system_variables.table_type= hton; } tc_log= (total_ha_2pc > 1 ? (opt_bin_log ? @@ -4797,11 +4804,6 @@ enum options_mysqld OPT_STORAGE_ENGINE, OPT_INIT_FILE, OPT_DELAY_KEY_WRITE_ALL, OPT_SLOW_QUERY_LOG, OPT_DELAY_KEY_WRITE, OPT_CHARSETS_DIR, - OPT_BDB_HOME, OPT_BDB_LOG, - OPT_BDB_TMP, OPT_BDB_SYNC, - OPT_BDB_LOCK, OPT_BDB, - OPT_BDB_NO_RECOVER, OPT_BDB_SHARED, - OPT_BDB_DATA_DIRECT, OPT_BDB_LOG_DIRECT, OPT_MASTER_HOST, OPT_MASTER_USER, OPT_MASTER_PASSWORD, OPT_MASTER_PORT, OPT_MASTER_INFO_FILE, OPT_MASTER_CONNECT_RETRY, @@ -4820,28 +4822,14 @@ enum options_mysqld OPT_WANT_CORE, OPT_CONCURRENT_INSERT, OPT_MEMLOCK, OPT_MYISAM_RECOVER, OPT_REPLICATE_REWRITE_DB, OPT_SERVER_ID, - OPT_SKIP_SLAVE_START, OPT_SKIP_INNOBASE, + OPT_SKIP_SLAVE_START, OPT_SAFE_SHOW_DB, OPT_SAFEMALLOC_MEM_LIMIT, OPT_REPLICATE_DO_TABLE, OPT_REPLICATE_IGNORE_TABLE, OPT_REPLICATE_WILD_DO_TABLE, OPT_REPLICATE_WILD_IGNORE_TABLE, OPT_REPLICATE_SAME_SERVER_ID, OPT_DISCONNECT_SLAVE_EVENT_COUNT, OPT_TC_HEURISTIC_RECOVER, OPT_ABORT_SLAVE_EVENT_COUNT, - OPT_INNODB_DATA_HOME_DIR, - OPT_INNODB_DATA_FILE_PATH, - OPT_INNODB_LOG_GROUP_HOME_DIR, - OPT_INNODB_LOG_ARCH_DIR, - OPT_INNODB_LOG_ARCHIVE, - OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT, - OPT_INNODB_FLUSH_METHOD, - OPT_INNODB_DOUBLEWRITE, - OPT_INNODB_CHECKSUMS, - OPT_INNODB_FAST_SHUTDOWN, - OPT_INNODB_FILE_PER_TABLE, OPT_CRASH_BINLOG_INNODB, - OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG, OPT_LOG_BIN_TRUST_FUNCTION_CREATORS, - OPT_SAFE_SHOW_DB, OPT_INNODB_SAFE_BINLOG, - OPT_INNODB, OPT_ISAM, - OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, + OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDB_CONNECTSTRING, OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS, OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ, OPT_NDB_SHM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_NDB_CACHE_CHECK_TIME, @@ -4904,33 +4892,6 @@ enum options_mysqld OPT_THREAD_CONCURRENCY, OPT_THREAD_CACHE_SIZE, OPT_TMP_TABLE_SIZE, OPT_THREAD_STACK, OPT_WAIT_TIMEOUT, OPT_MYISAM_REPAIR_THREADS, - OPT_INNODB_MIRRORED_LOG_GROUPS, - OPT_INNODB_LOG_FILES_IN_GROUP, - OPT_INNODB_LOG_FILE_SIZE, - OPT_INNODB_LOG_BUFFER_SIZE, - OPT_INNODB_BUFFER_POOL_SIZE, - OPT_INNODB_BUFFER_POOL_AWE_MEM_MB, - OPT_INNODB_ADDITIONAL_MEM_POOL_SIZE, - OPT_INNODB_MAX_PURGE_LAG, - OPT_INNODB_FILE_IO_THREADS, - OPT_INNODB_LOCK_WAIT_TIMEOUT, - OPT_INNODB_THREAD_CONCURRENCY, - OPT_INNODB_COMMIT_CONCURRENCY, - OPT_INNODB_FORCE_RECOVERY, - OPT_INNODB_STATUS_FILE, - OPT_INNODB_MAX_DIRTY_PAGES_PCT, - OPT_INNODB_TABLE_LOCKS, - OPT_INNODB_SUPPORT_XA, - OPT_INNODB_OPEN_FILES, - OPT_INNODB_AUTOEXTEND_INCREMENT, - OPT_INNODB_SYNC_SPIN_LOOPS, - OPT_INNODB_CONCURRENCY_TICKETS, - OPT_INNODB_THREAD_SLEEP_DELAY, - OPT_BDB_CACHE_SIZE, - OPT_BDB_CACHE_PARTS, - OPT_BDB_LOG_BUFFER_SIZE, - OPT_BDB_MAX_LOCK, - OPT_BDB_REGION_SIZE, OPT_ERROR_LOG_FILE, OPT_DEFAULT_WEEK_FORMAT, OPT_RANGE_ALLOC_BLOCK_SIZE, OPT_ALLOW_SUSPICIOUS_UDFS, @@ -4940,7 +4901,6 @@ enum options_mysqld OPT_SYNC_REPLICATION, OPT_SYNC_REPLICATION_SLAVE_ID, OPT_SYNC_REPLICATION_TIMEOUT, - OPT_BDB_NOSYNC, OPT_ENABLE_SHARED_MEMORY, OPT_SHARED_MEMORY_BASE_NAME, OPT_OLD_PASSWORDS, @@ -4970,12 +4930,12 @@ enum options_mysqld OPT_OLD_STYLE_USER_LIMITS, OPT_LOG_SLOW_ADMIN_STATEMENTS, OPT_TABLE_LOCK_WAIT_TIMEOUT, + OPT_PLUGIN_LOAD, OPT_PLUGIN_DIR, OPT_LOG_OUTPUT, OPT_PORT_OPEN_TIMEOUT, OPT_GENERAL_LOG, OPT_SLOW_LOG, - OPT_MERGE, OPT_THREAD_HANDLING, OPT_INNODB_ROLLBACK_ON_TIMEOUT }; @@ -5193,94 +5153,6 @@ Disable with --skip-large-pages.", {"init-slave", OPT_INIT_SLAVE, "Command(s) that are executed when a slave connects to this master", (gptr*) &opt_init_slave, (gptr*) &opt_init_slave, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"innodb", OPT_INNODB, "Enable InnoDB (if this version of MySQL supports it). \ -Disable with --skip-innodb (will save memory).", - (gptr*) &opt_innodb, (gptr*) &opt_innodb, 0, GET_BOOL, NO_ARG, OPT_INNODB_DEFAULT, 0, 0, - 0, 0, 0}, -#ifdef WITH_INNOBASE_STORAGE_ENGINE - {"innodb_checksums", OPT_INNODB_CHECKSUMS, "Enable InnoDB checksums validation (enabled by default). \ -Disable with --skip-innodb-checksums.", (gptr*) &innobase_use_checksums, - (gptr*) &innobase_use_checksums, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, -#endif - {"innodb_data_file_path", OPT_INNODB_DATA_FILE_PATH, - "Path to individual files and their sizes.", - 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, -#ifdef WITH_INNOBASE_STORAGE_ENGINE - {"innodb_data_home_dir", OPT_INNODB_DATA_HOME_DIR, - "The common part for InnoDB table spaces.", (gptr*) &innobase_data_home_dir, - (gptr*) &innobase_data_home_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, - 0}, - {"innodb_doublewrite", OPT_INNODB_DOUBLEWRITE, "Enable InnoDB doublewrite buffer (enabled by default). \ -Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite, - (gptr*) &innobase_use_doublewrite, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, - {"innodb_fast_shutdown", OPT_INNODB_FAST_SHUTDOWN, - "Speeds up the shutdown process of the InnoDB storage engine. Possible " - "values are 0, 1 (faster)" - /* - NetWare can't close unclosed files, can't automatically kill remaining - threads, etc, so on this OS we disable the crash-like InnoDB shutdown. - */ -#ifndef __NETWARE__ - " or 2 (fastest - crash-like)" -#endif - ".", - (gptr*) &innobase_fast_shutdown, - (gptr*) &innobase_fast_shutdown, 0, GET_ULONG, OPT_ARG, 1, 0, - IF_NETWARE(1,2), 0, 0, 0}, - {"innodb_file_per_table", OPT_INNODB_FILE_PER_TABLE, - "Stores each InnoDB table to an .ibd file in the database dir.", - (gptr*) &innobase_file_per_table, - (gptr*) &innobase_file_per_table, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"innodb_flush_log_at_trx_commit", OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT, - "Set to 0 (write and flush once per second), 1 (write and flush at each commit) or 2 (write at commit, flush once per second).", - (gptr*) &srv_flush_log_at_trx_commit, - (gptr*) &srv_flush_log_at_trx_commit, - 0, GET_ULONG, OPT_ARG, 1, 0, 2, 0, 0, 0}, - {"innodb_flush_method", OPT_INNODB_FLUSH_METHOD, - "With which method to flush data.", (gptr*) &innobase_unix_file_flush_method, - (gptr*) &innobase_unix_file_flush_method, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, - 0, 0, 0}, - {"innodb_locks_unsafe_for_binlog", OPT_INNODB_LOCKS_UNSAFE_FOR_BINLOG, - "Force InnoDB to not use next-key locking, to use only row-level locking.", - (gptr*) &innobase_locks_unsafe_for_binlog, - (gptr*) &innobase_locks_unsafe_for_binlog, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"innodb_log_arch_dir", OPT_INNODB_LOG_ARCH_DIR, - "Where full logs should be archived.", (gptr*) &innobase_log_arch_dir, - (gptr*) &innobase_log_arch_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"innodb_log_archive", OPT_INNODB_LOG_ARCHIVE, - "Set to 1 if you want to have logs archived.", 0, 0, 0, GET_LONG, OPT_ARG, - 0, 0, 0, 0, 0, 0}, - {"innodb_log_group_home_dir", OPT_INNODB_LOG_GROUP_HOME_DIR, - "Path to InnoDB log files.", (gptr*) &innobase_log_group_home_dir, - (gptr*) &innobase_log_group_home_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, - 0, 0}, - {"innodb_max_dirty_pages_pct", OPT_INNODB_MAX_DIRTY_PAGES_PCT, - "Percentage of dirty pages allowed in bufferpool.", (gptr*) &srv_max_buf_pool_modified_pct, - (gptr*) &srv_max_buf_pool_modified_pct, 0, GET_ULONG, REQUIRED_ARG, 90, 0, 100, 0, 0, 0}, - {"innodb_max_purge_lag", OPT_INNODB_MAX_PURGE_LAG, - "Desired maximum length of the purge queue (0 = no limit)", - (gptr*) &srv_max_purge_lag, - (gptr*) &srv_max_purge_lag, 0, GET_LONG, REQUIRED_ARG, 0, 0, ~0L, - 0, 1L, 0}, - {"innodb_rollback_on_timeout", OPT_INNODB_ROLLBACK_ON_TIMEOUT, - "Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)", - (gptr*) &innobase_rollback_on_timeout, (gptr*) &innobase_rollback_on_timeout, - 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"innodb_status_file", OPT_INNODB_STATUS_FILE, - "Enable SHOW INNODB STATUS output in the innodb_status. file", - (gptr*) &innobase_create_status_file, (gptr*) &innobase_create_status_file, - 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"innodb_support_xa", OPT_INNODB_SUPPORT_XA, - "Enable InnoDB support for the XA two-phase commit", - (gptr*) &global_system_variables.innodb_support_xa, - (gptr*) &global_system_variables.innodb_support_xa, - 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, - {"innodb_table_locks", OPT_INNODB_TABLE_LOCKS, - "Enable InnoDB locking in LOCK TABLES", - (gptr*) &global_system_variables.innodb_table_locks, - (gptr*) &global_system_variables.innodb_table_locks, - 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, -#endif /* End WITH_INNOBASE_STORAGE_ENGINE */ {"language", 'L', "Client error messages in given language. May be given as a full path.", (gptr*) &language_ptr, (gptr*) &language_ptr, 0, GET_STR, REQUIRED_ARG, @@ -5454,10 +5326,6 @@ master-ssl", "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.", (gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"ndbcluster", OPT_NDBCLUSTER, "Enable NDB Cluster (if this version of MySQL supports it). \ -Disable with --skip-ndbcluster (will save memory).", - (gptr*) &opt_ndbcluster, (gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, - OPT_NDBCLUSTER_DEFAULT, 0, 0, 0, 0, 0}, #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE {"ndb-connectstring", OPT_NDB_CONNECTSTRING, "Connect string for ndbcluster.", @@ -5913,84 +5781,6 @@ log and this option does nothing anymore.", (gptr*) &global_system_variables.group_concat_max_len, (gptr*) &max_system_variables.group_concat_max_len, 0, GET_ULONG, REQUIRED_ARG, 1024, 4, (long) ~0, 0, 1, 0}, -#ifdef WITH_INNOBASE_STORAGE_ENGINE - {"innodb_additional_mem_pool_size", OPT_INNODB_ADDITIONAL_MEM_POOL_SIZE, - "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.", - (gptr*) &innobase_additional_mem_pool_size, - (gptr*) &innobase_additional_mem_pool_size, 0, GET_LONG, REQUIRED_ARG, - 1*1024*1024L, 512*1024L, ~0L, 0, 1024, 0}, - {"innodb_autoextend_increment", OPT_INNODB_AUTOEXTEND_INCREMENT, - "Data file autoextend increment in megabytes", - (gptr*) &srv_auto_extend_increment, - (gptr*) &srv_auto_extend_increment, - 0, GET_LONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0}, - {"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE, - "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", - (gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0, - GET_LL, REQUIRED_ARG, 8*1024*1024L, 1024*1024L, LONGLONG_MAX, 0, - 1024*1024L, 0}, - {"innodb_commit_concurrency", OPT_INNODB_COMMIT_CONCURRENCY, - "Helps in performance tuning in heavily concurrent environments.", - (gptr*) &srv_commit_concurrency, (gptr*) &srv_commit_concurrency, - 0, GET_LONG, REQUIRED_ARG, 0, 0, 1000, 0, 1, 0}, - {"innodb_concurrency_tickets", OPT_INNODB_CONCURRENCY_TICKETS, - "Number of times a thread is allowed to enter InnoDB within the same \ - SQL query after it has once got the ticket", - (gptr*) &srv_n_free_tickets_to_enter, - (gptr*) &srv_n_free_tickets_to_enter, - 0, GET_LONG, REQUIRED_ARG, 500L, 1L, ~0L, 0, 1L, 0}, - {"innodb_file_io_threads", OPT_INNODB_FILE_IO_THREADS, - "Number of file I/O threads in InnoDB.", (gptr*) &innobase_file_io_threads, - (gptr*) &innobase_file_io_threads, 0, GET_LONG, REQUIRED_ARG, 4, 4, 64, 0, - 1, 0}, - {"innodb_force_recovery", OPT_INNODB_FORCE_RECOVERY, - "Helps to save your data in case the disk image of the database becomes corrupt.", - (gptr*) &innobase_force_recovery, (gptr*) &innobase_force_recovery, 0, - GET_LONG, REQUIRED_ARG, 0, 0, 6, 0, 1, 0}, - {"innodb_lock_wait_timeout", OPT_INNODB_LOCK_WAIT_TIMEOUT, - "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back.", - (gptr*) &innobase_lock_wait_timeout, (gptr*) &innobase_lock_wait_timeout, - 0, GET_LONG, REQUIRED_ARG, 50, 1, 1024 * 1024 * 1024, 0, 1, 0}, - {"innodb_log_buffer_size", OPT_INNODB_LOG_BUFFER_SIZE, - "The size of the buffer which InnoDB uses to write log to the log files on disk.", - (gptr*) &innobase_log_buffer_size, (gptr*) &innobase_log_buffer_size, 0, - GET_LONG, REQUIRED_ARG, 1024*1024L, 256*1024L, ~0L, 0, 1024, 0}, - {"innodb_log_file_size", OPT_INNODB_LOG_FILE_SIZE, - "Size of each log file in a log group.", - (gptr*) &innobase_log_file_size, (gptr*) &innobase_log_file_size, 0, - GET_LL, REQUIRED_ARG, 5*1024*1024L, 1*1024*1024L, LONGLONG_MAX, 0, - 1024*1024L, 0}, - {"innodb_log_files_in_group", OPT_INNODB_LOG_FILES_IN_GROUP, - "Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here.", - (gptr*) &innobase_log_files_in_group, (gptr*) &innobase_log_files_in_group, - 0, GET_LONG, REQUIRED_ARG, 2, 2, 100, 0, 1, 0}, - {"innodb_mirrored_log_groups", OPT_INNODB_MIRRORED_LOG_GROUPS, - "Number of identical copies of log groups we keep for the database. Currently this should be set to 1.", - (gptr*) &innobase_mirrored_log_groups, - (gptr*) &innobase_mirrored_log_groups, 0, GET_LONG, REQUIRED_ARG, 1, 1, 10, - 0, 1, 0}, - {"innodb_open_files", OPT_INNODB_OPEN_FILES, - "How many files at the maximum InnoDB keeps open at the same time.", - (gptr*) &innobase_open_files, (gptr*) &innobase_open_files, 0, - GET_LONG, REQUIRED_ARG, 300L, 10L, ~0L, 0, 1L, 0}, - {"innodb_sync_spin_loops", OPT_INNODB_SYNC_SPIN_LOOPS, - "Count of spin-loop rounds in InnoDB mutexes", - (gptr*) &srv_n_spin_wait_rounds, - (gptr*) &srv_n_spin_wait_rounds, - 0, GET_LONG, REQUIRED_ARG, 20L, 0L, ~0L, 0, 1L, 0}, - {"innodb_thread_concurrency", OPT_INNODB_THREAD_CONCURRENCY, - "Helps in performance tuning in heavily concurrent environments. " - "Sets the maximum number of threads allowed inside InnoDB. Value 0" - " will disable the thread throttling.", - (gptr*) &srv_thread_concurrency, (gptr*) &srv_thread_concurrency, - 0, GET_LONG, REQUIRED_ARG, 8, 0, 1000, 0, 1, 0}, - {"innodb_thread_sleep_delay", OPT_INNODB_THREAD_SLEEP_DELAY, - "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0" - " disable a sleep", - (gptr*) &srv_thread_sleep_delay, - (gptr*) &srv_thread_sleep_delay, - 0, GET_LONG, REQUIRED_ARG, 10000L, 0L, ~0L, 0, 1L, 0}, -#endif /* WITH_INNOBASE_STORAGE_ENGINE */ {"interactive_timeout", OPT_INTERACTIVE_TIMEOUT, "The number of seconds the server waits for activity on an interactive connection before closing it.", (gptr*) &global_system_variables.net_interactive_timeout, @@ -6216,6 +6006,11 @@ The minimum value for this variable is 4096.", "Directory for plugins.", (gptr*) &opt_plugin_dir_ptr, (gptr*) &opt_plugin_dir_ptr, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"plugin_load", OPT_PLUGIN_LOAD, + "Optional colon separated list of plugins to load, where each plugin is " + "identified by name and path to library seperated by an equals.", + (gptr*) &opt_plugin_load, (gptr*) &opt_plugin_load, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE, "The size of the buffer that is allocated when preloading indexes", (gptr*) &global_system_variables.preload_buff_size, @@ -7015,8 +6810,8 @@ Starts the MySQL database server\n"); fix_paths(); set_ports(); - my_print_help(my_long_options); - my_print_variables(my_long_options); + /* Print out all the options including plugin supplied options */ + my_print_help_inc_plugins(my_long_options, sizeof(my_long_options)/sizeof(my_option)); puts("\n\ To see what values a running MySQL server is using, type\n\ @@ -7058,6 +6853,7 @@ static void mysql_init_variables(void) mqh_used= 0; segfaulted= kill_in_progress= 0; cleanup_done= 0; + defaults_argc= 0; defaults_argv= 0; server_id_supplied= 0; test_flags= select_errors= dropping_tables= ha_open_options=0; @@ -7145,7 +6941,7 @@ static void mysql_init_variables(void) /* Set default values for some option variables */ default_storage_engine_str= (char*) "MyISAM"; - global_system_variables.table_type= myisam_hton; + global_system_variables.table_plugin= NULL; global_system_variables.tx_isolation= ISO_REPEATABLE_READ; global_system_variables.select_limit= (ulonglong) HA_POS_ERROR; max_system_variables.select_limit= (ulonglong) HA_POS_ERROR; @@ -7166,36 +6962,13 @@ static void mysql_init_variables(void) "d:t:i:o,/tmp/mysqld.trace"); #endif opt_error_log= IF_WIN(1,0); -#ifdef WITH_INNOBASE_STORAGE_ENGINE - have_innodb= SHOW_OPTION_YES; -#else - have_innodb= SHOW_OPTION_NO; -#endif -#ifdef WITH_CSV_STORAGE_ENGINE - have_csv_db= SHOW_OPTION_YES; -#else - have_csv_db= SHOW_OPTION_NO; -#endif #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE - have_ndbcluster= SHOW_OPTION_DISABLED; -#else - have_ndbcluster= SHOW_OPTION_NO; -#endif -#ifdef WITH_PARTITION_STORAGE_ENGINE - have_partition_db= SHOW_OPTION_YES; -#else - have_partition_db= SHOW_OPTION_NO; -#endif -#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE - have_ndbcluster=SHOW_OPTION_DISABLED; global_system_variables.ndb_index_stat_enable=FALSE; max_system_variables.ndb_index_stat_enable=TRUE; global_system_variables.ndb_index_stat_cache_entries=32; max_system_variables.ndb_index_stat_cache_entries=~0L; global_system_variables.ndb_index_stat_update_freq=20; max_system_variables.ndb_index_stat_update_freq=~0L; -#else - have_ndbcluster=SHOW_OPTION_NO; #endif #ifdef HAVE_OPENSSL have_openssl=SHOW_OPTION_YES; @@ -7655,17 +7428,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), global_system_variables.tx_isolation= (type-1); break; } - case OPT_MERGE: - case OPT_BDB: - break; - case OPT_NDBCLUSTER: -#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE - if (opt_ndbcluster) - have_ndbcluster= SHOW_OPTION_YES; - else - have_ndbcluster= SHOW_OPTION_DISABLED; -#endif - break; #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE case OPT_NDB_MGMD: case OPT_NDB_NODEID: @@ -7713,24 +7475,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ndb_extra_logging= atoi(argument); break; #endif - case OPT_INNODB: -#ifdef WITH_INNOBASE_STORAGE_ENGINE - if (opt_innodb) - have_innodb= SHOW_OPTION_YES; - else - have_innodb= SHOW_OPTION_DISABLED; -#endif - break; - case OPT_INNODB_DATA_FILE_PATH: -#ifdef WITH_INNOBASE_STORAGE_ENGINE - innobase_data_file_path= argument; -#endif - break; -#ifdef WITH_INNOBASE_STORAGE_ENGINE - case OPT_INNODB_LOG_ARCHIVE: - innobase_log_archive= argument ? test(atoi(argument)) : 1; - break; -#endif /* WITH_INNOBASE_STORAGE_ENGINE */ case OPT_MYISAM_RECOVER: { if (!argument || !argument[0]) @@ -7884,7 +7628,7 @@ static void option_error_reporter(enum loglevel level, const char *format, ...) } -static void get_options(int argc,char **argv) +static void get_options(int *argc,char **argv) { int ho_error; @@ -7892,34 +7636,20 @@ static void get_options(int argc,char **argv) strmake(def_ft_boolean_syntax, ft_boolean_syntax, sizeof(ft_boolean_syntax)-1); my_getopt_error_reporter= option_error_reporter; - if ((ho_error= handle_options(&argc, &argv, my_long_options, + + /* Skip unknown options so that they may be processed later by plugins */ + my_getopt_skip_unknown= TRUE; + + if ((ho_error= handle_options(argc, &argv, my_long_options, get_one_option))) exit(ho_error); + (*argc)++; /* add back one for the progname handle_options removes */ + /* no need to do this for argv as we are discarding it. */ -#ifndef WITH_NDBCLUSTER_STORAGE_ENGINE - if (opt_ndbcluster) - sql_print_warning("this binary does not contain NDBCLUSTER storage engine"); -#endif -#ifndef WITH_INNOBASE_STORAGE_ENGINE - if (opt_innodb) - sql_print_warning("this binary does not contain INNODB storage engine"); -#endif if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes) && !opt_slow_log) sql_print_warning("options --log-slow-admin-statements and --log-queries-not-using-indexes have no effect if --log-slow-queries is not set"); - if (argc > 0) - { - fprintf(stderr, "%s: Too many arguments (first extra is '%s').\nUse --help to get a list of available options\n", my_progname, *argv); - /* FIXME add EXIT_TOO_MANY_ARGUMENTS to "mysys_err.h" and return that code? */ - exit(1); - } - - if (opt_help) - { - usage(); - exit(0); - } #if defined(HAVE_BROKEN_REALPATH) my_use_symdir=0; my_disable_symlinks=1; @@ -8238,12 +7968,7 @@ void refresh_status(THD *thd) bzero((char*) &thd->status_var, sizeof(thd->status_var)); /* Reset some global variables */ - for (SHOW_VAR *ptr= status_vars; ptr->name; ptr++) - { - /* Note that SHOW_LONG_NOFLUSH variables are not reset */ - if (ptr->type == SHOW_LONG) - *(ulong*) ptr->value= 0; - } + reset_status_vars(); /* Reset the counters of all key caches (default and named). */ process_key_caches(reset_key_cache_counters); @@ -8262,50 +7987,9 @@ void refresh_status(THD *thd) /***************************************************************************** - Instantiate have_xyx for missing storage engines + Instantiate variables for missing storage engines + This section should go away soon *****************************************************************************/ -#undef have_innodb -#undef have_ndbcluster -#undef have_csv_db - -SHOW_COMP_OPTION have_innodb= SHOW_OPTION_NO; -SHOW_COMP_OPTION have_ndbcluster= SHOW_OPTION_NO; -SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; -SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; - -#ifndef WITH_INNOBASE_STORAGE_ENGINE -uint innobase_flush_log_at_trx_commit; -ulong innobase_fast_shutdown; -long innobase_mirrored_log_groups, innobase_log_files_in_group; -longlong innobase_log_file_size; -long innobase_log_buffer_size; -longlong innobase_buffer_pool_size; -long innobase_additional_mem_pool_size; -long innobase_file_io_threads, innobase_lock_wait_timeout; -long innobase_force_recovery; -long innobase_open_files; -char *innobase_data_home_dir, *innobase_data_file_path; -char *innobase_log_group_home_dir, *innobase_log_arch_dir; -char *innobase_unix_file_flush_method; -my_bool innobase_log_archive, - innobase_use_doublewrite, - innobase_use_checksums, - innobase_file_per_table, - innobase_locks_unsafe_for_binlog, - innobase_rollback_on_timeout; - -extern "C" { -ulong srv_max_buf_pool_modified_pct; -ulong srv_max_purge_lag; -ulong srv_auto_extend_increment; -ulong srv_n_spin_wait_rounds; -ulong srv_n_free_tickets_to_enter; -ulong srv_thread_sleep_delay; -ulong srv_thread_concurrency; -ulong srv_commit_concurrency; -} - -#endif #ifndef WITH_NDBCLUSTER_STORAGE_ENGINE ulong ndb_cache_check_time; diff --git a/sql/set_var.cc b/sql/set_var.cc index ad5559165f3..8a51a0f2e62 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -58,39 +58,6 @@ #include "events.h" -/* WITH_INNOBASE_STORAGE_ENGINE */ -extern uint innobase_flush_log_at_trx_commit; -extern ulong innobase_fast_shutdown; -extern long innobase_mirrored_log_groups, innobase_log_files_in_group; -extern longlong innobase_log_file_size; -extern long innobase_log_buffer_size; -extern longlong innobase_buffer_pool_size; -extern long innobase_additional_mem_pool_size; -extern long innobase_file_io_threads, innobase_lock_wait_timeout; -extern long innobase_force_recovery; -extern long innobase_open_files; -extern char *innobase_data_home_dir, *innobase_data_file_path; -extern char *innobase_log_group_home_dir, *innobase_log_arch_dir; -extern char *innobase_unix_file_flush_method; -/* The following variables have to be my_bool for SHOW VARIABLES to work */ -extern my_bool innobase_log_archive, - innobase_use_doublewrite, - innobase_use_checksums, - innobase_file_per_table, - innobase_locks_unsafe_for_binlog, - innobase_rollback_on_timeout; - -extern "C" { -extern ulong srv_max_buf_pool_modified_pct; -extern ulong srv_max_purge_lag; -extern ulong srv_auto_extend_increment; -extern ulong srv_n_spin_wait_rounds; -extern ulong srv_n_free_tickets_to_enter; -extern ulong srv_thread_sleep_delay; -extern ulong srv_thread_concurrency; -extern ulong srv_commit_concurrency; -extern ulong srv_flush_log_at_trx_commit; -} /* WITH_NDBCLUSTER_STORAGE_ENGINE */ extern ulong ndb_cache_check_time; @@ -100,9 +67,12 @@ extern ulong ndb_report_thresh_binlog_epoch_slip; extern ulong ndb_report_thresh_binlog_mem_usage; #endif +extern CHARSET_INFO *character_set_filesystem; +static DYNAMIC_ARRAY fixed_show_vars; static HASH system_variable_hash; + const char *bool_type_names[]= { "OFF", "ON", NullS }; TYPELIB bool_typelib= { @@ -169,849 +139,554 @@ static void sys_default_slow_log_path(THD *thd, enum_var_type type); it in the constructor (see sys_var class for details). */ -sys_var *sys_var::first= NULL; -uint sys_var::sys_vars= 0; +static sys_var_chain vars = { NULL, NULL }; -sys_var_thd_ulong sys_auto_increment_increment("auto_increment_increment", +static sys_var_thd_ulong sys_auto_increment_increment(&vars, "auto_increment_increment", &SV::auto_increment_increment); -sys_var_thd_ulong sys_auto_increment_offset("auto_increment_offset", +static sys_var_thd_ulong sys_auto_increment_offset(&vars, "auto_increment_offset", &SV::auto_increment_offset); -sys_var_bool_ptr sys_automatic_sp_privileges("automatic_sp_privileges", +static sys_var_bool_ptr sys_automatic_sp_privileges(&vars, "automatic_sp_privileges", &sp_automatic_privileges); -sys_var_const_str sys_basedir("basedir", mysql_home); -sys_var_long_ptr sys_binlog_cache_size("binlog_cache_size", +static sys_var_const_str sys_basedir(&vars, "basedir", mysql_home); +static sys_var_long_ptr sys_binlog_cache_size(&vars, "binlog_cache_size", &binlog_cache_size); -sys_var_thd_binlog_format sys_binlog_format("binlog_format", +static sys_var_thd_binlog_format sys_binlog_format(&vars, "binlog_format", &SV::binlog_format); -sys_var_thd_ulong sys_bulk_insert_buff_size("bulk_insert_buffer_size", +static sys_var_thd_ulong sys_bulk_insert_buff_size(&vars, "bulk_insert_buffer_size", &SV::bulk_insert_buff_size); -sys_var_character_set_server sys_character_set_server("character_set_server"); -sys_var_const_str sys_charset_system("character_set_system", +static sys_var_character_set_sv sys_character_set_server(&vars, "character_set_server", + &SV::collation_server, + &default_charset_info); +sys_var_const_str sys_charset_system(&vars, "character_set_system", (char *)my_charset_utf8_general_ci.name); -sys_var_character_set_database sys_character_set_database("character_set_database"); -sys_var_character_set_client sys_character_set_client("character_set_client"); -sys_var_character_set_connection sys_character_set_connection("character_set_connection"); -sys_var_character_set_results sys_character_set_results("character_set_results"); -sys_var_character_set_filesystem sys_character_set_filesystem("character_set_filesystem"); -sys_var_thd_ulong sys_completion_type("completion_type", +static sys_var_character_set_database sys_character_set_database(&vars, "character_set_database"); +static sys_var_character_set_sv sys_character_set_client(&vars, "character_set_client", + &SV::character_set_client, + &default_charset_info); +static sys_var_character_set_sv sys_character_set_connection(&vars, "character_set_connection", + &SV::collation_connection, + &default_charset_info); +static sys_var_character_set_sv sys_character_set_results(&vars, "character_set_results", + &SV::character_set_results, + &default_charset_info, true); +static sys_var_character_set_sv sys_character_set_filesystem(&vars, "character_set_filesystem", + &SV::character_set_filesystem, + &character_set_filesystem); +static sys_var_thd_ulong sys_completion_type(&vars, "completion_type", &SV::completion_type, check_completion_type, fix_completion_type); -sys_var_collation_connection sys_collation_connection("collation_connection"); -sys_var_collation_database sys_collation_database("collation_database"); -sys_var_collation_server sys_collation_server("collation_server"); -sys_var_long_ptr sys_concurrent_insert("concurrent_insert", +static sys_var_collation_sv sys_collation_connection(&vars, "collation_connection", + &SV::collation_connection, + &default_charset_info); +static sys_var_collation_sv sys_collation_database(&vars, "collation_database", + &SV::collation_database, + &default_charset_info); +static sys_var_collation_sv sys_collation_server(&vars, "collation_server", + &SV::collation_server, + &default_charset_info); +static sys_var_long_ptr sys_concurrent_insert(&vars, "concurrent_insert", &myisam_concurrent_insert); -sys_var_long_ptr sys_connect_timeout("connect_timeout", +static sys_var_long_ptr sys_connect_timeout(&vars, "connect_timeout", &connect_timeout); -sys_var_const_str sys_datadir("datadir", mysql_real_data_home); +static sys_var_const_str sys_datadir(&vars, "datadir", mysql_real_data_home); #ifndef DBUG_OFF -sys_var_thd_dbug sys_dbug("debug"); +static sys_var_thd_dbug sys_dbug(&vars, "debug"); #endif -sys_var_enum sys_delay_key_write("delay_key_write", +static sys_var_enum sys_delay_key_write(&vars, "delay_key_write", &delay_key_write_options, &delay_key_write_typelib, fix_delay_key_write); -sys_var_long_ptr sys_delayed_insert_limit("delayed_insert_limit", +static sys_var_long_ptr sys_delayed_insert_limit(&vars, "delayed_insert_limit", &delayed_insert_limit); -sys_var_long_ptr sys_delayed_insert_timeout("delayed_insert_timeout", +static sys_var_long_ptr sys_delayed_insert_timeout(&vars, "delayed_insert_timeout", &delayed_insert_timeout); -sys_var_long_ptr sys_delayed_queue_size("delayed_queue_size", +static sys_var_long_ptr sys_delayed_queue_size(&vars, "delayed_queue_size", &delayed_queue_size); -sys_var_event_scheduler sys_event_scheduler("event_scheduler"); -sys_var_long_ptr sys_expire_logs_days("expire_logs_days", +static sys_var_event_scheduler sys_event_scheduler(&vars, "event_scheduler"); +static sys_var_long_ptr sys_expire_logs_days(&vars, "expire_logs_days", &expire_logs_days); -sys_var_bool_ptr sys_flush("flush", &myisam_flush); -sys_var_long_ptr sys_flush_time("flush_time", &flush_time); -sys_var_str sys_ft_boolean_syntax("ft_boolean_syntax", +static sys_var_bool_ptr sys_flush(&vars, "flush", &myisam_flush); +static sys_var_long_ptr sys_flush_time(&vars, "flush_time", &flush_time); +static sys_var_str sys_ft_boolean_syntax(&vars, "ft_boolean_syntax", sys_check_ftb_syntax, sys_update_ftb_syntax, sys_default_ftb_syntax, ft_boolean_syntax); -sys_var_str sys_init_connect("init_connect", 0, +sys_var_str sys_init_connect(&vars, "init_connect", 0, sys_update_init_connect, sys_default_init_connect,0); -sys_var_str sys_init_slave("init_slave", 0, +sys_var_str sys_init_slave(&vars, "init_slave", 0, sys_update_init_slave, sys_default_init_slave,0); -sys_var_thd_ulong sys_interactive_timeout("interactive_timeout", +static sys_var_thd_ulong sys_interactive_timeout(&vars, "interactive_timeout", &SV::net_interactive_timeout); -sys_var_thd_ulong sys_join_buffer_size("join_buffer_size", +static sys_var_thd_ulong sys_join_buffer_size(&vars, "join_buffer_size", &SV::join_buff_size); -sys_var_key_buffer_size sys_key_buffer_size("key_buffer_size"); -sys_var_key_cache_long sys_key_cache_block_size("key_cache_block_size", +static sys_var_key_buffer_size sys_key_buffer_size(&vars, "key_buffer_size"); +static sys_var_key_cache_long sys_key_cache_block_size(&vars, "key_cache_block_size", offsetof(KEY_CACHE, param_block_size)); -sys_var_key_cache_long sys_key_cache_division_limit("key_cache_division_limit", +static sys_var_key_cache_long sys_key_cache_division_limit(&vars, "key_cache_division_limit", offsetof(KEY_CACHE, param_division_limit)); -sys_var_key_cache_long sys_key_cache_age_threshold("key_cache_age_threshold", +static sys_var_key_cache_long sys_key_cache_age_threshold(&vars, "key_cache_age_threshold", offsetof(KEY_CACHE, param_age_threshold)); -sys_var_bool_ptr sys_local_infile("local_infile", +static sys_var_bool_ptr sys_local_infile(&vars, "local_infile", &opt_local_infile); -sys_var_trust_routine_creators -sys_trust_routine_creators("log_bin_trust_routine_creators", +static sys_var_trust_routine_creators +sys_trust_routine_creators(&vars, "log_bin_trust_routine_creators", &trust_function_creators); -sys_var_bool_ptr -sys_trust_function_creators("log_bin_trust_function_creators", +static sys_var_bool_ptr +sys_trust_function_creators(&vars, "log_bin_trust_function_creators", &trust_function_creators); -sys_var_bool_ptr - sys_log_queries_not_using_indexes("log_queries_not_using_indexes", +static sys_var_bool_ptr + sys_log_queries_not_using_indexes(&vars, "log_queries_not_using_indexes", &opt_log_queries_not_using_indexes); -sys_var_thd_ulong sys_log_warnings("log_warnings", &SV::log_warnings); -sys_var_thd_ulong sys_long_query_time("long_query_time", +static sys_var_thd_ulong sys_log_warnings(&vars, "log_warnings", &SV::log_warnings); +static sys_var_thd_ulong sys_long_query_time(&vars, "long_query_time", &SV::long_query_time); -sys_var_thd_bool sys_low_priority_updates("low_priority_updates", +static sys_var_thd_bool sys_low_priority_updates(&vars, "low_priority_updates", &SV::low_priority_updates, fix_low_priority_updates); #ifndef TO_BE_DELETED /* Alias for the low_priority_updates */ -sys_var_thd_bool sys_sql_low_priority_updates("sql_low_priority_updates", +static sys_var_thd_bool sys_sql_low_priority_updates(&vars, "sql_low_priority_updates", &SV::low_priority_updates, fix_low_priority_updates); #endif -sys_var_thd_ulong sys_max_allowed_packet("max_allowed_packet", +static sys_var_thd_ulong sys_max_allowed_packet(&vars, "max_allowed_packet", &SV::max_allowed_packet); -sys_var_long_ptr sys_max_binlog_cache_size("max_binlog_cache_size", +static sys_var_long_ptr sys_max_binlog_cache_size(&vars, "max_binlog_cache_size", &max_binlog_cache_size); -sys_var_long_ptr sys_max_binlog_size("max_binlog_size", +static sys_var_long_ptr sys_max_binlog_size(&vars, "max_binlog_size", &max_binlog_size, fix_max_binlog_size); -sys_var_long_ptr sys_max_connections("max_connections", +static sys_var_long_ptr sys_max_connections(&vars, "max_connections", &max_connections, fix_max_connections); -sys_var_long_ptr sys_max_connect_errors("max_connect_errors", +static sys_var_long_ptr sys_max_connect_errors(&vars, "max_connect_errors", &max_connect_errors); -sys_var_thd_ulong sys_max_insert_delayed_threads("max_insert_delayed_threads", +static sys_var_thd_ulong sys_max_insert_delayed_threads(&vars, "max_insert_delayed_threads", &SV::max_insert_delayed_threads, check_max_delayed_threads, fix_max_connections); -sys_var_thd_ulong sys_max_delayed_threads("max_delayed_threads", +static sys_var_thd_ulong sys_max_delayed_threads(&vars, "max_delayed_threads", &SV::max_insert_delayed_threads, check_max_delayed_threads, fix_max_connections); -sys_var_thd_ulong sys_max_error_count("max_error_count", +static sys_var_thd_ulong sys_max_error_count(&vars, "max_error_count", &SV::max_error_count); -sys_var_thd_ulonglong sys_max_heap_table_size("max_heap_table_size", +static sys_var_thd_ulonglong sys_max_heap_table_size(&vars, "max_heap_table_size", &SV::max_heap_table_size); -sys_var_thd_ulong sys_pseudo_thread_id("pseudo_thread_id", +static sys_var_thd_ulong sys_pseudo_thread_id(&vars, "pseudo_thread_id", &SV::pseudo_thread_id, check_pseudo_thread_id, 0); -sys_var_thd_ha_rows sys_max_join_size("max_join_size", +static sys_var_thd_ha_rows sys_max_join_size(&vars, "max_join_size", &SV::max_join_size, fix_max_join_size); -sys_var_thd_ulong sys_max_seeks_for_key("max_seeks_for_key", +static sys_var_thd_ulong sys_max_seeks_for_key(&vars, "max_seeks_for_key", &SV::max_seeks_for_key); -sys_var_thd_ulong sys_max_length_for_sort_data("max_length_for_sort_data", +static sys_var_thd_ulong sys_max_length_for_sort_data(&vars, "max_length_for_sort_data", &SV::max_length_for_sort_data); #ifndef TO_BE_DELETED /* Alias for max_join_size */ -sys_var_thd_ha_rows sys_sql_max_join_size("sql_max_join_size", +static sys_var_thd_ha_rows sys_sql_max_join_size(&vars, "sql_max_join_size", &SV::max_join_size, fix_max_join_size); #endif static sys_var_long_ptr_global -sys_max_prepared_stmt_count("max_prepared_stmt_count", +sys_max_prepared_stmt_count(&vars, "max_prepared_stmt_count", &max_prepared_stmt_count, &LOCK_prepared_stmt_count); -sys_var_long_ptr sys_max_relay_log_size("max_relay_log_size", +static sys_var_long_ptr sys_max_relay_log_size(&vars, "max_relay_log_size", &max_relay_log_size, fix_max_relay_log_size); -sys_var_thd_ulong sys_max_sort_length("max_sort_length", +static sys_var_thd_ulong sys_max_sort_length(&vars, "max_sort_length", &SV::max_sort_length); -sys_var_thd_ulong sys_max_sp_recursion_depth("max_sp_recursion_depth", +static sys_var_thd_ulong sys_max_sp_recursion_depth(&vars, "max_sp_recursion_depth", &SV::max_sp_recursion_depth); -sys_var_max_user_conn sys_max_user_connections("max_user_connections"); -sys_var_thd_ulong sys_max_tmp_tables("max_tmp_tables", +static sys_var_max_user_conn sys_max_user_connections(&vars, "max_user_connections"); +static sys_var_thd_ulong sys_max_tmp_tables(&vars, "max_tmp_tables", &SV::max_tmp_tables); -sys_var_long_ptr sys_max_write_lock_count("max_write_lock_count", +static sys_var_long_ptr sys_max_write_lock_count(&vars, "max_write_lock_count", &max_write_lock_count); -sys_var_thd_ulong sys_multi_range_count("multi_range_count", +static sys_var_thd_ulong sys_multi_range_count(&vars, "multi_range_count", &SV::multi_range_count); -sys_var_long_ptr sys_myisam_data_pointer_size("myisam_data_pointer_size", +static sys_var_long_ptr sys_myisam_data_pointer_size(&vars, "myisam_data_pointer_size", &myisam_data_pointer_size); -sys_var_thd_ulonglong sys_myisam_max_sort_file_size("myisam_max_sort_file_size", &SV::myisam_max_sort_file_size, fix_myisam_max_sort_file_size, 1); -sys_var_thd_ulong sys_myisam_repair_threads("myisam_repair_threads", &SV::myisam_repair_threads); -sys_var_thd_ulong sys_myisam_sort_buffer_size("myisam_sort_buffer_size", &SV::myisam_sort_buff_size); -sys_var_bool_ptr sys_myisam_use_mmap("myisam_use_mmap", +static sys_var_thd_ulonglong sys_myisam_max_sort_file_size(&vars, "myisam_max_sort_file_size", &SV::myisam_max_sort_file_size, fix_myisam_max_sort_file_size, 1); +static sys_var_thd_ulong sys_myisam_repair_threads(&vars, "myisam_repair_threads", &SV::myisam_repair_threads); +static sys_var_thd_ulong sys_myisam_sort_buffer_size(&vars, "myisam_sort_buffer_size", &SV::myisam_sort_buff_size); +static sys_var_bool_ptr sys_myisam_use_mmap(&vars, "myisam_use_mmap", &opt_myisam_use_mmap); -sys_var_thd_enum sys_myisam_stats_method("myisam_stats_method", +static sys_var_thd_enum sys_myisam_stats_method(&vars, "myisam_stats_method", &SV::myisam_stats_method, &myisam_stats_method_typelib, NULL); -sys_var_thd_ulong sys_net_buffer_length("net_buffer_length", +static sys_var_thd_ulong sys_net_buffer_length(&vars, "net_buffer_length", &SV::net_buffer_length); -sys_var_thd_ulong sys_net_read_timeout("net_read_timeout", +static sys_var_thd_ulong sys_net_read_timeout(&vars, "net_read_timeout", &SV::net_read_timeout, 0, fix_net_read_timeout); -sys_var_thd_ulong sys_net_write_timeout("net_write_timeout", +static sys_var_thd_ulong sys_net_write_timeout(&vars, "net_write_timeout", &SV::net_write_timeout, 0, fix_net_write_timeout); -sys_var_thd_ulong sys_net_retry_count("net_retry_count", +static sys_var_thd_ulong sys_net_retry_count(&vars, "net_retry_count", &SV::net_retry_count, 0, fix_net_retry_count); -sys_var_thd_bool sys_new_mode("new", &SV::new_mode); -sys_var_thd_bool sys_old_alter_table("old_alter_table", +static sys_var_thd_bool sys_new_mode(&vars, "new", &SV::new_mode); +sys_var_thd_bool sys_old_alter_table(&vars, "old_alter_table", &SV::old_alter_table); -sys_var_thd_bool sys_old_passwords("old_passwords", &SV::old_passwords); -sys_var_thd_ulong sys_optimizer_prune_level("optimizer_prune_level", +sys_var_thd_bool sys_old_passwords(&vars, "old_passwords", &SV::old_passwords); +static sys_var_thd_ulong sys_optimizer_prune_level(&vars, "optimizer_prune_level", &SV::optimizer_prune_level); -sys_var_thd_ulong sys_optimizer_search_depth("optimizer_search_depth", +static sys_var_thd_ulong sys_optimizer_search_depth(&vars, "optimizer_search_depth", &SV::optimizer_search_depth); -sys_var_thd_ulong sys_preload_buff_size("preload_buffer_size", +static sys_var_thd_ulong sys_preload_buff_size(&vars, "preload_buffer_size", &SV::preload_buff_size); -sys_var_thd_ulong sys_read_buff_size("read_buffer_size", +static sys_var_thd_ulong sys_read_buff_size(&vars, "read_buffer_size", &SV::read_buff_size); -sys_var_opt_readonly sys_readonly("read_only", &opt_readonly); -sys_var_thd_ulong sys_read_rnd_buff_size("read_rnd_buffer_size", +static sys_var_opt_readonly sys_readonly(&vars, "read_only", &opt_readonly); +static sys_var_thd_ulong sys_read_rnd_buff_size(&vars, "read_rnd_buffer_size", &SV::read_rnd_buff_size); -sys_var_thd_ulong sys_div_precincrement("div_precision_increment", +static sys_var_thd_ulong sys_div_precincrement(&vars, "div_precision_increment", &SV::div_precincrement); -#ifdef HAVE_REPLICATION -sys_var_bool_ptr sys_relay_log_purge("relay_log_purge", - &relay_log_purge); -#endif -sys_var_long_ptr sys_rpl_recovery_rank("rpl_recovery_rank", +static sys_var_long_ptr sys_rpl_recovery_rank(&vars, "rpl_recovery_rank", &rpl_recovery_rank); -sys_var_long_ptr sys_query_cache_size("query_cache_size", +static sys_var_long_ptr sys_query_cache_size(&vars, "query_cache_size", &query_cache_size, fix_query_cache_size); -sys_var_thd_ulong sys_range_alloc_block_size("range_alloc_block_size", +static sys_var_thd_ulong sys_range_alloc_block_size(&vars, "range_alloc_block_size", &SV::range_alloc_block_size); -sys_var_thd_ulong sys_query_alloc_block_size("query_alloc_block_size", +static sys_var_thd_ulong sys_query_alloc_block_size(&vars, "query_alloc_block_size", &SV::query_alloc_block_size, 0, fix_thd_mem_root); -sys_var_thd_ulong sys_query_prealloc_size("query_prealloc_size", +static sys_var_thd_ulong sys_query_prealloc_size(&vars, "query_prealloc_size", &SV::query_prealloc_size, 0, fix_thd_mem_root); -sys_var_readonly sys_tmpdir("tmpdir", OPT_GLOBAL, SHOW_CHAR, get_tmpdir); -sys_var_thd_ulong sys_trans_alloc_block_size("transaction_alloc_block_size", +static sys_var_readonly sys_tmpdir(&vars, "tmpdir", OPT_GLOBAL, SHOW_CHAR, get_tmpdir); +static sys_var_thd_ulong sys_trans_alloc_block_size(&vars, "transaction_alloc_block_size", &SV::trans_alloc_block_size, 0, fix_trans_mem_root); -sys_var_thd_ulong sys_trans_prealloc_size("transaction_prealloc_size", +static sys_var_thd_ulong sys_trans_prealloc_size(&vars, "transaction_prealloc_size", &SV::trans_prealloc_size, 0, fix_trans_mem_root); -sys_var_thd_enum sys_thread_handling("thread_handling", +sys_var_thd_enum sys_thread_handling(&vars, "thread_handling", &SV::thread_handling, &thread_handling_typelib, NULL); #ifdef HAVE_QUERY_CACHE -sys_var_long_ptr sys_query_cache_limit("query_cache_limit", +static sys_var_long_ptr sys_query_cache_limit(&vars, "query_cache_limit", &query_cache.query_cache_limit); -sys_var_long_ptr sys_query_cache_min_res_unit("query_cache_min_res_unit", +static sys_var_long_ptr sys_query_cache_min_res_unit(&vars, "query_cache_min_res_unit", &query_cache_min_res_unit, fix_query_cache_min_res_unit); -sys_var_thd_enum sys_query_cache_type("query_cache_type", +static sys_var_thd_enum sys_query_cache_type(&vars, "query_cache_type", &SV::query_cache_type, &query_cache_type_typelib); -sys_var_thd_bool -sys_query_cache_wlock_invalidate("query_cache_wlock_invalidate", +static sys_var_thd_bool +sys_query_cache_wlock_invalidate(&vars, "query_cache_wlock_invalidate", &SV::query_cache_wlock_invalidate); #endif /* HAVE_QUERY_CACHE */ -sys_var_bool_ptr sys_secure_auth("secure_auth", &opt_secure_auth); -sys_var_long_ptr sys_server_id("server_id", &server_id, fix_server_id); -sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol", +static sys_var_bool_ptr sys_secure_auth(&vars, "secure_auth", &opt_secure_auth); +static sys_var_long_ptr sys_server_id(&vars, "server_id", &server_id, fix_server_id); +static sys_var_bool_ptr sys_slave_compressed_protocol(&vars, "slave_compressed_protocol", &opt_slave_compressed_protocol); -#ifdef HAVE_REPLICATION -sys_var_long_ptr sys_slave_net_timeout("slave_net_timeout", - &slave_net_timeout); -sys_var_long_ptr sys_slave_trans_retries("slave_transaction_retries", - &slave_trans_retries); -#endif -sys_var_long_ptr sys_slow_launch_time("slow_launch_time", +static sys_var_long_ptr sys_slow_launch_time(&vars, "slow_launch_time", &slow_launch_time); -sys_var_thd_ulong sys_sort_buffer("sort_buffer_size", +static sys_var_thd_ulong sys_sort_buffer(&vars, "sort_buffer_size", &SV::sortbuff_size); -sys_var_thd_sql_mode sys_sql_mode("sql_mode", +static sys_var_thd_sql_mode sys_sql_mode(&vars, "sql_mode", &SV::sql_mode); #ifdef HAVE_OPENSSL extern char *opt_ssl_ca, *opt_ssl_capath, *opt_ssl_cert, *opt_ssl_cipher, *opt_ssl_key; -sys_var_const_str_ptr sys_ssl_ca("ssl_ca", &opt_ssl_ca); -sys_var_const_str_ptr sys_ssl_capath("ssl_capath", &opt_ssl_capath); -sys_var_const_str_ptr sys_ssl_cert("ssl_cert", &opt_ssl_cert); -sys_var_const_str_ptr sys_ssl_cipher("ssl_cipher", &opt_ssl_cipher); -sys_var_const_str_ptr sys_ssl_key("ssl_key", &opt_ssl_key); +static sys_var_const_str_ptr sys_ssl_ca(&vars, "ssl_ca", &opt_ssl_ca); +static sys_var_const_str_ptr sys_ssl_capath(&vars, "ssl_capath", &opt_ssl_capath); +static sys_var_const_str_ptr sys_ssl_cert(&vars, "ssl_cert", &opt_ssl_cert); +static sys_var_const_str_ptr sys_ssl_cipher(&vars, "ssl_cipher", &opt_ssl_cipher); +static sys_var_const_str_ptr sys_ssl_key(&vars, "ssl_key", &opt_ssl_key); #else -sys_var_const_str sys_ssl_ca("ssl_ca", NULL); -sys_var_const_str sys_ssl_capath("ssl_capath", NULL); -sys_var_const_str sys_ssl_cert("ssl_cert", NULL); -sys_var_const_str sys_ssl_cipher("ssl_cipher", NULL); -sys_var_const_str sys_ssl_key("ssl_key", NULL); +static sys_var_const_str sys_ssl_ca(&vars, "ssl_ca", NULL); +static sys_var_const_str sys_ssl_capath(&vars, "ssl_capath", NULL); +static sys_var_const_str sys_ssl_cert(&vars, "ssl_cert", NULL); +static sys_var_const_str sys_ssl_cipher(&vars, "ssl_cipher", NULL); +static sys_var_const_str sys_ssl_key(&vars, "ssl_key", NULL); #endif -sys_var_thd_enum -sys_updatable_views_with_limit("updatable_views_with_limit", +static sys_var_thd_enum +sys_updatable_views_with_limit(&vars, "updatable_views_with_limit", &SV::updatable_views_with_limit, &updatable_views_with_limit_typelib); -sys_var_thd_table_type sys_table_type("table_type", - &SV::table_type); -sys_var_thd_storage_engine sys_storage_engine("storage_engine", - &SV::table_type); -#ifdef HAVE_REPLICATION -sys_var_sync_binlog_period sys_sync_binlog_period("sync_binlog", &sync_binlog_period); -#endif -sys_var_bool_ptr sys_sync_frm("sync_frm", &opt_sync_frm); -sys_var_const_str sys_system_time_zone("system_time_zone", +static sys_var_thd_table_type sys_table_type(&vars, "table_type", + &SV::table_plugin); +static sys_var_thd_storage_engine sys_storage_engine(&vars, "storage_engine", + &SV::table_plugin); +static sys_var_bool_ptr sys_sync_frm(&vars, "sync_frm", &opt_sync_frm); +static sys_var_const_str sys_system_time_zone(&vars, "system_time_zone", system_time_zone); -sys_var_long_ptr sys_table_def_size("table_definition_cache", +static sys_var_long_ptr sys_table_def_size(&vars, "table_definition_cache", &table_def_size); -sys_var_long_ptr sys_table_cache_size("table_open_cache", +static sys_var_long_ptr sys_table_cache_size(&vars, "table_open_cache", &table_cache_size); -sys_var_long_ptr sys_table_lock_wait_timeout("table_lock_wait_timeout", +static sys_var_long_ptr sys_table_lock_wait_timeout(&vars, "table_lock_wait_timeout", &table_lock_wait_timeout); -sys_var_long_ptr sys_thread_cache_size("thread_cache_size", +static sys_var_long_ptr sys_thread_cache_size(&vars, "thread_cache_size", &thread_cache_size); #if HAVE_POOL_OF_THREADS == 1 -sys_var_long_ptr sys_thread_pool_size("thread_pool_size", +sys_var_long_ptr sys_thread_pool_size(&vars, "thread_pool_size", &thread_pool_size); #endif -sys_var_thd_enum sys_tx_isolation("tx_isolation", +static sys_var_thd_enum sys_tx_isolation(&vars, "tx_isolation", &SV::tx_isolation, &tx_isolation_typelib, fix_tx_isolation, check_tx_isolation); -sys_var_thd_ulonglong sys_tmp_table_size("tmp_table_size", +static sys_var_thd_ulonglong sys_tmp_table_size(&vars, "tmp_table_size", &SV::tmp_table_size); -sys_var_bool_ptr sys_timed_mutexes("timed_mutexes", +static sys_var_bool_ptr sys_timed_mutexes(&vars, "timed_mutexes", &timed_mutexes); -sys_var_const_str sys_version("version", server_version); -sys_var_const_str sys_version_comment("version_comment", +static sys_var_const_str sys_version(&vars, "version", server_version); +static sys_var_const_str sys_version_comment(&vars, "version_comment", MYSQL_COMPILATION_COMMENT); -sys_var_const_str sys_version_compile_machine("version_compile_machine", +static sys_var_const_str sys_version_compile_machine(&vars, "version_compile_machine", MACHINE_TYPE); -sys_var_const_str sys_version_compile_os("version_compile_os", +static sys_var_const_str sys_version_compile_os(&vars, "version_compile_os", SYSTEM_TYPE); -sys_var_thd_ulong sys_net_wait_timeout("wait_timeout", +static sys_var_thd_ulong sys_net_wait_timeout(&vars, "wait_timeout", &SV::net_wait_timeout); -#ifdef WITH_INNOBASE_STORAGE_ENGINE -sys_var_long_ptr sys_innodb_fast_shutdown("innodb_fast_shutdown", - &innobase_fast_shutdown); -sys_var_long_ptr sys_innodb_max_dirty_pages_pct("innodb_max_dirty_pages_pct", - &srv_max_buf_pool_modified_pct); -sys_var_long_ptr sys_innodb_max_purge_lag("innodb_max_purge_lag", - &srv_max_purge_lag); -sys_var_thd_bool sys_innodb_table_locks("innodb_table_locks", - &SV::innodb_table_locks); -sys_var_thd_bool sys_innodb_support_xa("innodb_support_xa", - &SV::innodb_support_xa); -sys_var_long_ptr sys_innodb_autoextend_increment("innodb_autoextend_increment", - &srv_auto_extend_increment); -sys_var_long_ptr sys_innodb_sync_spin_loops("innodb_sync_spin_loops", - &srv_n_spin_wait_rounds); -sys_var_long_ptr sys_innodb_concurrency_tickets("innodb_concurrency_tickets", - &srv_n_free_tickets_to_enter); -sys_var_long_ptr sys_innodb_thread_sleep_delay("innodb_thread_sleep_delay", - &srv_thread_sleep_delay); -sys_var_long_ptr sys_innodb_thread_concurrency("innodb_thread_concurrency", - &srv_thread_concurrency); -sys_var_long_ptr sys_innodb_commit_concurrency("innodb_commit_concurrency", - &srv_commit_concurrency); -sys_var_long_ptr sys_innodb_flush_log_at_trx_commit( - "innodb_flush_log_at_trx_commit", - &srv_flush_log_at_trx_commit); -#endif + /* Condition pushdown to storage engine */ -sys_var_thd_bool -sys_engine_condition_pushdown("engine_condition_pushdown", +static sys_var_thd_bool +sys_engine_condition_pushdown(&vars, "engine_condition_pushdown", &SV::engine_condition_pushdown); /* ndb thread specific variable settings */ -sys_var_thd_ulong -sys_ndb_autoincrement_prefetch_sz("ndb_autoincrement_prefetch_sz", +static sys_var_thd_ulong +sys_ndb_autoincrement_prefetch_sz(&vars, "ndb_autoincrement_prefetch_sz", &SV::ndb_autoincrement_prefetch_sz); -sys_var_thd_bool -sys_ndb_force_send("ndb_force_send", &SV::ndb_force_send); +static sys_var_thd_bool +sys_ndb_force_send(&vars, "ndb_force_send", &SV::ndb_force_send); #ifdef HAVE_NDB_BINLOG -sys_var_long_ptr -sys_ndb_report_thresh_binlog_epoch_slip("ndb_report_thresh_binlog_epoch_slip", +static sys_var_long_ptr +sys_ndb_report_thresh_binlog_epoch_slip(&vars, "ndb_report_thresh_binlog_epoch_slip", &ndb_report_thresh_binlog_epoch_slip); -sys_var_long_ptr -sys_ndb_report_thresh_binlog_mem_usage("ndb_report_thresh_binlog_mem_usage", +static sys_var_long_ptr +sys_ndb_report_thresh_binlog_mem_usage(&vars, "ndb_report_thresh_binlog_mem_usage", &ndb_report_thresh_binlog_mem_usage); #endif -sys_var_thd_bool -sys_ndb_use_exact_count("ndb_use_exact_count", &SV::ndb_use_exact_count); -sys_var_thd_bool -sys_ndb_use_transactions("ndb_use_transactions", &SV::ndb_use_transactions); -sys_var_long_ptr -sys_ndb_cache_check_time("ndb_cache_check_time", &ndb_cache_check_time); -sys_var_thd_bool -sys_ndb_index_stat_enable("ndb_index_stat_enable", +static sys_var_thd_bool +sys_ndb_use_exact_count(&vars, "ndb_use_exact_count", &SV::ndb_use_exact_count); +static sys_var_thd_bool +sys_ndb_use_transactions(&vars, "ndb_use_transactions", &SV::ndb_use_transactions); +static sys_var_long_ptr +sys_ndb_cache_check_time(&vars, "ndb_cache_check_time", &ndb_cache_check_time); +static sys_var_thd_bool +sys_ndb_index_stat_enable(&vars, "ndb_index_stat_enable", &SV::ndb_index_stat_enable); -sys_var_thd_ulong -sys_ndb_index_stat_cache_entries("ndb_index_stat_cache_entries", +static sys_var_thd_ulong +sys_ndb_index_stat_cache_entries(&vars, "ndb_index_stat_cache_entries", &SV::ndb_index_stat_cache_entries); -sys_var_thd_ulong -sys_ndb_index_stat_update_freq("ndb_index_stat_update_freq", +static sys_var_thd_ulong +sys_ndb_index_stat_update_freq(&vars, "ndb_index_stat_update_freq", &SV::ndb_index_stat_update_freq); -sys_var_long_ptr -sys_ndb_extra_logging("ndb_extra_logging", &ndb_extra_logging); -sys_var_thd_bool -sys_ndb_use_copying_alter_table("ndb_use_copying_alter_table", &SV::ndb_use_copying_alter_table); +static sys_var_long_ptr +sys_ndb_extra_logging(&vars, "ndb_extra_logging", &ndb_extra_logging); +static sys_var_thd_bool +sys_ndb_use_copying_alter_table(&vars, "ndb_use_copying_alter_table", &SV::ndb_use_copying_alter_table); /* Time/date/datetime formats */ -sys_var_thd_date_time_format sys_time_format("time_format", +static sys_var_thd_date_time_format sys_time_format(&vars, "time_format", &SV::time_format, MYSQL_TIMESTAMP_TIME); -sys_var_thd_date_time_format sys_date_format("date_format", +static sys_var_thd_date_time_format sys_date_format(&vars, "date_format", &SV::date_format, MYSQL_TIMESTAMP_DATE); -sys_var_thd_date_time_format sys_datetime_format("datetime_format", +static sys_var_thd_date_time_format sys_datetime_format(&vars, "datetime_format", &SV::datetime_format, MYSQL_TIMESTAMP_DATETIME); /* Variables that are bits in THD */ -sys_var_thd_bit sys_autocommit("autocommit", 0, +sys_var_thd_bit sys_autocommit(&vars, "autocommit", 0, set_option_autocommit, OPTION_NOT_AUTOCOMMIT, 1); -static sys_var_thd_bit sys_big_tables("big_tables", 0, +static sys_var_thd_bit sys_big_tables(&vars, "big_tables", 0, set_option_bit, OPTION_BIG_TABLES); #ifndef TO_BE_DELETED /* Alias for big_tables */ -static sys_var_thd_bit sys_sql_big_tables("sql_big_tables", 0, +static sys_var_thd_bit sys_sql_big_tables(&vars, "sql_big_tables", 0, set_option_bit, OPTION_BIG_TABLES); #endif -static sys_var_thd_bit sys_big_selects("sql_big_selects", 0, +static sys_var_thd_bit sys_big_selects(&vars, "sql_big_selects", 0, set_option_bit, OPTION_BIG_SELECTS); -static sys_var_thd_bit sys_log_off("sql_log_off", +static sys_var_thd_bit sys_log_off(&vars, "sql_log_off", check_log_update, set_option_bit, OPTION_LOG_OFF); -static sys_var_thd_bit sys_log_update("sql_log_update", +static sys_var_thd_bit sys_log_update(&vars, "sql_log_update", check_log_update, set_log_update, OPTION_BIN_LOG); -static sys_var_thd_bit sys_log_binlog("sql_log_bin", +static sys_var_thd_bit sys_log_binlog(&vars, "sql_log_bin", check_log_update, set_option_bit, OPTION_BIN_LOG); -static sys_var_thd_bit sys_sql_warnings("sql_warnings", 0, +static sys_var_thd_bit sys_sql_warnings(&vars, "sql_warnings", 0, set_option_bit, OPTION_WARNINGS); -static sys_var_thd_bit sys_sql_notes("sql_notes", 0, +static sys_var_thd_bit sys_sql_notes(&vars, "sql_notes", 0, set_option_bit, OPTION_SQL_NOTES); -static sys_var_thd_bit sys_auto_is_null("sql_auto_is_null", 0, +static sys_var_thd_bit sys_auto_is_null(&vars, "sql_auto_is_null", 0, set_option_bit, OPTION_AUTO_IS_NULL); -static sys_var_thd_bit sys_safe_updates("sql_safe_updates", 0, +static sys_var_thd_bit sys_safe_updates(&vars, "sql_safe_updates", 0, set_option_bit, OPTION_SAFE_UPDATES); -static sys_var_thd_bit sys_buffer_results("sql_buffer_result", 0, +static sys_var_thd_bit sys_buffer_results(&vars, "sql_buffer_result", 0, set_option_bit, OPTION_BUFFER_RESULT); -static sys_var_thd_bit sys_quote_show_create("sql_quote_show_create", 0, +static sys_var_thd_bit sys_quote_show_create(&vars, "sql_quote_show_create", 0, set_option_bit, OPTION_QUOTE_SHOW_CREATE); -static sys_var_thd_bit sys_foreign_key_checks("foreign_key_checks", 0, +static sys_var_thd_bit sys_foreign_key_checks(&vars, "foreign_key_checks", 0, set_option_bit, OPTION_NO_FOREIGN_KEY_CHECKS, 1); -static sys_var_thd_bit sys_unique_checks("unique_checks", 0, +static sys_var_thd_bit sys_unique_checks(&vars, "unique_checks", 0, set_option_bit, OPTION_RELAXED_UNIQUE_CHECKS, 1); /* Local state variables */ -static sys_var_thd_ha_rows sys_select_limit("sql_select_limit", +static sys_var_thd_ha_rows sys_select_limit(&vars, "sql_select_limit", &SV::select_limit); -static sys_var_timestamp sys_timestamp("timestamp"); -static sys_var_last_insert_id sys_last_insert_id("last_insert_id"); -static sys_var_last_insert_id sys_identity("identity"); +static sys_var_timestamp sys_timestamp(&vars, "timestamp"); +static sys_var_last_insert_id sys_last_insert_id(&vars, "last_insert_id"); +static sys_var_last_insert_id sys_identity(&vars, "identity"); -static sys_var_thd_lc_time_names sys_lc_time_names("lc_time_names"); +static sys_var_thd_lc_time_names sys_lc_time_names(&vars, "lc_time_names"); -static sys_var_insert_id sys_insert_id("insert_id"); -static sys_var_readonly sys_error_count("error_count", +static sys_var_insert_id sys_insert_id(&vars, "insert_id"); +static sys_var_readonly sys_error_count(&vars, "error_count", OPT_SESSION, SHOW_LONG, get_error_count); -static sys_var_readonly sys_warning_count("warning_count", +static sys_var_readonly sys_warning_count(&vars, "warning_count", OPT_SESSION, SHOW_LONG, get_warning_count); /* alias for last_insert_id() to be compatible with Sybase */ -#ifdef HAVE_REPLICATION -static sys_var_slave_skip_counter sys_slave_skip_counter("sql_slave_skip_counter"); -#endif -static sys_var_rand_seed1 sys_rand_seed1("rand_seed1"); -static sys_var_rand_seed2 sys_rand_seed2("rand_seed2"); +static sys_var_rand_seed1 sys_rand_seed1(&vars, "rand_seed1"); +static sys_var_rand_seed2 sys_rand_seed2(&vars, "rand_seed2"); -static sys_var_thd_ulong sys_default_week_format("default_week_format", +static sys_var_thd_ulong sys_default_week_format(&vars, "default_week_format", &SV::default_week_format); -sys_var_thd_ulong sys_group_concat_max_len("group_concat_max_len", +sys_var_thd_ulong sys_group_concat_max_len(&vars, "group_concat_max_len", &SV::group_concat_max_len); -sys_var_thd_time_zone sys_time_zone("time_zone"); +sys_var_thd_time_zone sys_time_zone(&vars, "time_zone"); /* Read only variables */ -sys_var_have_variable sys_have_compress("have_compress", &have_compress); -sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt); -sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db); -sys_var_have_variable sys_have_dlopen("have_dynamic_loading", &have_dlopen); -sys_var_have_variable sys_have_geometry("have_geometry", &have_geometry); -sys_var_have_variable sys_have_innodb("have_innodb", &have_innodb); -sys_var_have_variable sys_have_ndbcluster("have_ndbcluster", &have_ndbcluster); -sys_var_have_variable sys_have_openssl("have_openssl", &have_openssl); -sys_var_have_variable sys_have_partition_db("have_partitioning", - &have_partition_db); -sys_var_have_variable sys_have_query_cache("have_query_cache", +static sys_var_have_variable sys_have_compress(&vars, "have_compress", &have_compress); +static sys_var_have_variable sys_have_crypt(&vars, "have_crypt", &have_crypt); +static sys_var_have_plugin sys_have_csv(&vars, "have_csv", C_STRING_WITH_LEN("csv"), MYSQL_STORAGE_ENGINE_PLUGIN); +static sys_var_have_variable sys_have_dlopen(&vars, "have_dynamic_loading", &have_dlopen); +static sys_var_have_variable sys_have_geometry(&vars, "have_geometry", &have_geometry); +static sys_var_have_plugin sys_have_innodb(&vars, "have_innodb", C_STRING_WITH_LEN("innodb"), MYSQL_STORAGE_ENGINE_PLUGIN); +static sys_var_have_plugin sys_have_ndbcluster(&vars, "have_ndbcluster", C_STRING_WITH_LEN("ndbcluster"), MYSQL_STORAGE_ENGINE_PLUGIN); +static sys_var_have_variable sys_have_openssl(&vars, "have_openssl", &have_openssl); +static sys_var_have_plugin sys_have_partition_db(&vars, "have_partitioning", C_STRING_WITH_LEN("partition"), MYSQL_STORAGE_ENGINE_PLUGIN); +static sys_var_have_variable sys_have_query_cache(&vars, "have_query_cache", &have_query_cache); -sys_var_have_variable sys_have_rtree_keys("have_rtree_keys", &have_rtree_keys); -sys_var_have_variable sys_have_symlink("have_symlink", &have_symlink); +static sys_var_have_variable sys_have_rtree_keys(&vars, "have_rtree_keys", &have_rtree_keys); +static sys_var_have_variable sys_have_symlink(&vars, "have_symlink", &have_symlink); /* Global read-only variable describing server license */ -sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE)); +static sys_var_const_str sys_license(&vars, "license", STRINGIFY_ARG(LICENSE)); /* Global variables which enable|disable logging */ -sys_var_log_state sys_var_general_log("general_log", &opt_log, +static sys_var_log_state sys_var_general_log(&vars, "general_log", &opt_log, QUERY_LOG_GENERAL); -sys_var_log_state sys_var_slow_query_log("slow_query_log", &opt_slow_log, +static sys_var_log_state sys_var_slow_query_log(&vars, "slow_query_log", &opt_slow_log, QUERY_LOG_SLOW); -sys_var_str sys_var_general_log_path("general_log_file", sys_check_log_path, +sys_var_str sys_var_general_log_path(&vars, "general_log_file", sys_check_log_path, sys_update_general_log_path, sys_default_general_log_path, opt_logname); -sys_var_str sys_var_slow_log_path("slow_query_log_file", sys_check_log_path, +sys_var_str sys_var_slow_log_path(&vars, "slow_query_log_file", sys_check_log_path, sys_update_slow_log_path, sys_default_slow_log_path, opt_slow_logname); -sys_var_log_output sys_var_log_output_state("log_output", &log_output_options, +static sys_var_log_output sys_var_log_output_state(&vars, "log_output", &log_output_options, &log_output_typelib, 0); -#ifdef HAVE_REPLICATION -static int show_slave_skip_errors(THD *thd, SHOW_VAR *var, char *buff) -{ - var->type=SHOW_CHAR; - var->value= buff; - if (!use_slave_mask || bitmap_is_clear_all(&slave_error_mask)) - { - var->value= const_cast("OFF"); - } - else if (bitmap_is_set_all(&slave_error_mask)) - { - var->value= const_cast("ALL"); - } - else - { - /* 10 is enough assuming errors are max 4 digits */ - int i; - var->value= buff; - for (i= 1; - i < MAX_SLAVE_ERROR && - (buff - var->value) < SHOW_VAR_FUNC_BUFF_SIZE; - i++) - { - if (bitmap_is_set(&slave_error_mask, i)) - { - buff= int10_to_str(i, buff, 10); - *buff++= ','; - } - } - if (var->value != buff) - buff--; // Remove last ',' - if (i < MAX_SLAVE_ERROR) - buff= strmov(buff, "..."); // Couldn't show all errors - *buff=0; - } - return 0; -} -#endif /* HAVE_REPLICATION */ /* - Variables shown by SHOW VARIABLES in alphabetical order + Additional variables (not derived from sys_var class, not accessible as + @@varname in SELECT or SET). Sorted in alphabetical order to facilitate + maintenance - SHOW VARIABLES will sort its output. + TODO: remove this list completely */ -SHOW_VAR init_vars[]= { - {"auto_increment_increment", (char*) &sys_auto_increment_increment, SHOW_SYS}, - {"auto_increment_offset", (char*) &sys_auto_increment_offset, SHOW_SYS}, - {sys_automatic_sp_privileges.name,(char*) &sys_automatic_sp_privileges, SHOW_SYS}, +#define FIXED_VARS_SIZE (sizeof(fixed_vars) / sizeof(SHOW_VAR)) +static SHOW_VAR fixed_vars[]= { {"back_log", (char*) &back_log, SHOW_LONG}, - {sys_basedir.name, (char*) &sys_basedir, SHOW_SYS}, - {sys_binlog_cache_size.name,(char*) &sys_binlog_cache_size, SHOW_SYS}, - {sys_binlog_format.name, (char*) &sys_binlog_format, SHOW_SYS}, - {sys_bulk_insert_buff_size.name,(char*) &sys_bulk_insert_buff_size,SHOW_SYS}, - {sys_character_set_client.name,(char*) &sys_character_set_client, SHOW_SYS}, - {sys_character_set_connection.name,(char*) &sys_character_set_connection,SHOW_SYS}, - {sys_character_set_database.name, (char*) &sys_character_set_database,SHOW_SYS}, - {sys_character_set_filesystem.name,(char*) &sys_character_set_filesystem, SHOW_SYS}, - {sys_character_set_results.name,(char*) &sys_character_set_results, SHOW_SYS}, - {sys_character_set_server.name, (char*) &sys_character_set_server,SHOW_SYS}, - {sys_charset_system.name, (char*) &sys_charset_system, SHOW_SYS}, {"character_sets_dir", mysql_charsets_dir, SHOW_CHAR}, - {sys_collation_connection.name,(char*) &sys_collation_connection, SHOW_SYS}, - {sys_collation_database.name,(char*) &sys_collation_database, SHOW_SYS}, - {sys_collation_server.name,(char*) &sys_collation_server, SHOW_SYS}, - {sys_completion_type.name, (char*) &sys_completion_type, SHOW_SYS}, - {sys_concurrent_insert.name,(char*) &sys_concurrent_insert, SHOW_SYS}, - {sys_connect_timeout.name, (char*) &sys_connect_timeout, SHOW_SYS}, - {sys_datadir.name, (char*) &sys_datadir, SHOW_SYS}, - {sys_date_format.name, (char*) &sys_date_format, SHOW_SYS}, - {sys_datetime_format.name, (char*) &sys_datetime_format, SHOW_SYS}, -#ifndef DBUG_OFF - {sys_dbug.name, (char*) &sys_dbug, SHOW_SYS}, -#endif - {sys_default_week_format.name, (char*) &sys_default_week_format, SHOW_SYS}, - {sys_delay_key_write.name, (char*) &sys_delay_key_write, SHOW_SYS}, - {sys_delayed_insert_limit.name, (char*) &sys_delayed_insert_limit,SHOW_SYS}, - {sys_delayed_insert_timeout.name, (char*) &sys_delayed_insert_timeout, SHOW_SYS}, - {sys_delayed_queue_size.name,(char*) &sys_delayed_queue_size, SHOW_SYS}, - {sys_div_precincrement.name,(char*) &sys_div_precincrement,SHOW_SYS}, - {sys_engine_condition_pushdown.name, - (char*) &sys_engine_condition_pushdown, SHOW_SYS}, - {sys_event_scheduler.name, (char*) &sys_event_scheduler, SHOW_SYS}, - {sys_expire_logs_days.name, (char*) &sys_expire_logs_days, SHOW_SYS}, - {sys_flush.name, (char*) &sys_flush, SHOW_SYS}, - {sys_flush_time.name, (char*) &sys_flush_time, SHOW_SYS}, - {sys_ft_boolean_syntax.name,(char*) &ft_boolean_syntax, SHOW_CHAR}, {"ft_max_word_len", (char*) &ft_max_word_len, SHOW_LONG}, {"ft_min_word_len", (char*) &ft_min_word_len, SHOW_LONG}, {"ft_query_expansion_limit",(char*) &ft_query_expansion_limit, SHOW_LONG}, {"ft_stopword_file", (char*) &ft_stopword_file, SHOW_CHAR_PTR}, - {sys_var_general_log.name, (char*) &opt_log, SHOW_MY_BOOL}, - {sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS}, - {sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS}, - {sys_have_compress.name, (char*) &have_compress, SHOW_HAVE}, - {sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE}, - {sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE}, - {sys_have_dlopen.name, (char*) &have_dlopen, SHOW_HAVE}, - {sys_have_geometry.name, (char*) &have_geometry, SHOW_HAVE}, - {sys_have_innodb.name, (char*) &have_innodb, SHOW_HAVE}, - {sys_have_ndbcluster.name, (char*) &have_ndbcluster, SHOW_HAVE}, - {sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE}, - {sys_have_partition_db.name,(char*) &have_partition_db, SHOW_HAVE}, - {sys_have_query_cache.name, (char*) &have_query_cache, SHOW_HAVE}, - {sys_have_rtree_keys.name, (char*) &have_rtree_keys, SHOW_HAVE}, - {sys_have_symlink.name, (char*) &have_symlink, SHOW_HAVE}, - {"init_connect", (char*) &sys_init_connect, SHOW_SYS}, {"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR}, - {"init_slave", (char*) &sys_init_slave, SHOW_SYS}, -#ifdef WITH_INNOBASE_STORAGE_ENGINE - {"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG }, - {sys_innodb_autoextend_increment.name, (char*) &sys_innodb_autoextend_increment, SHOW_SYS}, - {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG }, - {"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL}, - {sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS}, - {sys_innodb_concurrency_tickets.name, (char*) &sys_innodb_concurrency_tickets, SHOW_SYS}, - {"innodb_data_file_path", (char*) &innobase_data_file_path, SHOW_CHAR_PTR}, - {"innodb_data_home_dir", (char*) &innobase_data_home_dir, SHOW_CHAR_PTR}, - {"innodb_doublewrite", (char*) &innobase_use_doublewrite, SHOW_MY_BOOL}, - {sys_innodb_fast_shutdown.name,(char*) &sys_innodb_fast_shutdown, SHOW_SYS}, - {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG }, - {"innodb_file_per_table", (char*) &innobase_file_per_table, SHOW_MY_BOOL}, - {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, - {"innodb_force_recovery", (char*) &innobase_force_recovery, SHOW_LONG }, - {"innodb_lock_wait_timeout", (char*) &innobase_lock_wait_timeout, SHOW_LONG }, - {"innodb_locks_unsafe_for_binlog", (char*) &innobase_locks_unsafe_for_binlog, SHOW_MY_BOOL}, - {"innodb_log_arch_dir", (char*) &innobase_log_arch_dir, SHOW_CHAR_PTR}, - {"innodb_log_archive", (char*) &innobase_log_archive, SHOW_MY_BOOL}, - {"innodb_log_buffer_size", (char*) &innobase_log_buffer_size, SHOW_LONG }, - {"innodb_log_file_size", (char*) &innobase_log_file_size, SHOW_LONGLONG}, - {"innodb_log_files_in_group", (char*) &innobase_log_files_in_group, SHOW_LONG}, - {"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR}, - {sys_innodb_max_dirty_pages_pct.name, (char*) &sys_innodb_max_dirty_pages_pct, SHOW_SYS}, - {sys_innodb_max_purge_lag.name, (char*) &sys_innodb_max_purge_lag, SHOW_SYS}, - {"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG}, - {"innodb_open_files", (char*) &innobase_open_files, SHOW_LONG }, - {"innodb_rollback_on_timeout", (char*) &innobase_rollback_on_timeout, SHOW_MY_BOOL}, - {sys_innodb_support_xa.name, (char*) &sys_innodb_support_xa, SHOW_SYS}, - {sys_innodb_sync_spin_loops.name, (char*) &sys_innodb_sync_spin_loops, SHOW_SYS}, - {sys_innodb_table_locks.name, (char*) &sys_innodb_table_locks, SHOW_SYS}, - {sys_innodb_thread_concurrency.name, (char*) &sys_innodb_thread_concurrency, SHOW_SYS}, - {sys_innodb_thread_sleep_delay.name, (char*) &sys_innodb_thread_sleep_delay, SHOW_SYS}, - {sys_innodb_flush_log_at_trx_commit.name, (char*) &sys_innodb_flush_log_at_trx_commit, SHOW_SYS}, -#endif - {sys_interactive_timeout.name,(char*) &sys_interactive_timeout, SHOW_SYS}, - {sys_join_buffer_size.name, (char*) &sys_join_buffer_size, SHOW_SYS}, - {sys_key_buffer_size.name, (char*) &sys_key_buffer_size, SHOW_SYS}, - {sys_key_cache_age_threshold.name, (char*) &sys_key_cache_age_threshold, - SHOW_SYS}, - {sys_key_cache_block_size.name, (char*) &sys_key_cache_block_size, - SHOW_SYS}, - {sys_key_cache_division_limit.name, (char*) &sys_key_cache_division_limit, - SHOW_SYS}, {"language", language, SHOW_CHAR}, {"large_files_support", (char*) &opt_large_files, SHOW_BOOL}, {"large_page_size", (char*) &opt_large_page_size, SHOW_INT}, {"large_pages", (char*) &opt_large_pages, SHOW_MY_BOOL}, - {sys_lc_time_names.name, (char*) &sys_lc_time_names, SHOW_SYS}, - {sys_license.name, (char*) &sys_license, SHOW_SYS}, - {sys_local_infile.name, (char*) &sys_local_infile, SHOW_SYS}, #ifdef HAVE_MLOCKALL - {"locked_in_memory", (char*) &locked_in_memory, SHOW_BOOL}, + {"locked_in_memory", (char*) &locked_in_memory, SHOW_MY_BOOL}, #endif - {"log", (char*) &opt_log, SHOW_BOOL}, + {"log", (char*) &opt_log, SHOW_MY_BOOL}, {"log_bin", (char*) &opt_bin_log, SHOW_BOOL}, - {sys_trust_function_creators.name,(char*) &sys_trust_function_creators, SHOW_SYS}, {"log_error", (char*) log_error_file, SHOW_CHAR}, - {sys_var_log_output_state.name, (char*) &sys_var_log_output_state, SHOW_SYS}, - {sys_log_queries_not_using_indexes.name, - (char*) &sys_log_queries_not_using_indexes, SHOW_SYS}, -#ifdef HAVE_REPLICATION - {"log_slave_updates", (char*) &opt_log_slave_updates, SHOW_MY_BOOL}, -#endif - {"log_slow_queries", (char*) &opt_slow_log, SHOW_BOOL}, - {sys_log_warnings.name, (char*) &sys_log_warnings, SHOW_SYS}, - {sys_long_query_time.name, (char*) &sys_long_query_time, SHOW_SYS}, - {sys_low_priority_updates.name, (char*) &sys_low_priority_updates, SHOW_SYS}, + {"log_slow_queries", (char*) &opt_slow_log, SHOW_MY_BOOL}, {"lower_case_file_system", (char*) &lower_case_file_system, SHOW_MY_BOOL}, {"lower_case_table_names", (char*) &lower_case_table_names, SHOW_INT}, - {sys_max_allowed_packet.name,(char*) &sys_max_allowed_packet, SHOW_SYS}, - {sys_max_binlog_cache_size.name,(char*) &sys_max_binlog_cache_size, SHOW_SYS}, - {sys_max_binlog_size.name, (char*) &sys_max_binlog_size, SHOW_SYS}, - {sys_max_connect_errors.name, (char*) &sys_max_connect_errors, SHOW_SYS}, - {sys_max_connections.name, (char*) &sys_max_connections, SHOW_SYS}, - {sys_max_delayed_threads.name,(char*) &sys_max_delayed_threads, SHOW_SYS}, - {sys_max_error_count.name, (char*) &sys_max_error_count, SHOW_SYS}, - {sys_max_heap_table_size.name,(char*) &sys_max_heap_table_size, SHOW_SYS}, - {sys_max_insert_delayed_threads.name, - (char*) &sys_max_insert_delayed_threads, SHOW_SYS}, - {sys_max_join_size.name, (char*) &sys_max_join_size, SHOW_SYS}, - {sys_max_length_for_sort_data.name, (char*) &sys_max_length_for_sort_data, - SHOW_SYS}, - {sys_max_prepared_stmt_count.name, (char*) &sys_max_prepared_stmt_count, - SHOW_SYS}, - {sys_max_relay_log_size.name, (char*) &sys_max_relay_log_size, SHOW_SYS}, - {sys_max_seeks_for_key.name, (char*) &sys_max_seeks_for_key, SHOW_SYS}, - {sys_max_sort_length.name, (char*) &sys_max_sort_length, SHOW_SYS}, - {sys_max_sp_recursion_depth.name, - (char*) &sys_max_sp_recursion_depth, SHOW_SYS}, - {sys_max_tmp_tables.name, (char*) &sys_max_tmp_tables, SHOW_SYS}, - {sys_max_user_connections.name,(char*) &sys_max_user_connections, SHOW_SYS}, - {sys_max_write_lock_count.name, (char*) &sys_max_write_lock_count,SHOW_SYS}, - {sys_multi_range_count.name, (char*) &sys_multi_range_count, SHOW_SYS}, - {sys_myisam_data_pointer_size.name, (char*) &sys_myisam_data_pointer_size, SHOW_SYS}, - {sys_myisam_max_sort_file_size.name, (char*) &sys_myisam_max_sort_file_size, - SHOW_SYS}, {"myisam_recover_options", (char*) &myisam_recover_options_str, SHOW_CHAR_PTR}, - {sys_myisam_repair_threads.name, (char*) &sys_myisam_repair_threads, - SHOW_SYS}, - {sys_myisam_sort_buffer_size.name, (char*) &sys_myisam_sort_buffer_size, SHOW_SYS}, - - {sys_myisam_stats_method.name, (char*) &sys_myisam_stats_method, SHOW_SYS}, - {sys_myisam_use_mmap.name, (char*) &sys_myisam_use_mmap, SHOW_SYS}, - #ifdef __NT__ {"named_pipe", (char*) &opt_enable_named_pipe, SHOW_MY_BOOL}, #endif - {sys_ndb_autoincrement_prefetch_sz.name, - (char*) &sys_ndb_autoincrement_prefetch_sz, SHOW_SYS}, - {sys_ndb_cache_check_time.name,(char*) &sys_ndb_cache_check_time, SHOW_SYS}, - {sys_ndb_extra_logging.name,(char*) &sys_ndb_extra_logging, SHOW_SYS}, - {sys_ndb_force_send.name, (char*) &sys_ndb_force_send, SHOW_SYS}, - {sys_ndb_index_stat_cache_entries.name, (char*) &sys_ndb_index_stat_cache_entries, SHOW_SYS}, - {sys_ndb_index_stat_enable.name, (char*) &sys_ndb_index_stat_enable, SHOW_SYS}, - {sys_ndb_index_stat_update_freq.name, (char*) &sys_ndb_index_stat_update_freq, SHOW_SYS}, -#ifdef HAVE_NDB_BINLOG - {sys_ndb_report_thresh_binlog_epoch_slip.name, - (char*) &sys_ndb_report_thresh_binlog_epoch_slip, SHOW_SYS}, - {sys_ndb_report_thresh_binlog_mem_usage.name, - (char*) &sys_ndb_report_thresh_binlog_mem_usage, SHOW_SYS}, -#endif - {sys_ndb_use_copying_alter_table.name, - (char*) &sys_ndb_use_copying_alter_table, SHOW_SYS}, - {sys_ndb_use_exact_count.name,(char*) &sys_ndb_use_exact_count, SHOW_SYS}, - {sys_ndb_use_transactions.name,(char*) &sys_ndb_use_transactions, SHOW_SYS}, - {sys_net_buffer_length.name,(char*) &sys_net_buffer_length, SHOW_SYS}, - {sys_net_read_timeout.name, (char*) &sys_net_read_timeout, SHOW_SYS}, - {sys_net_retry_count.name, (char*) &sys_net_retry_count, SHOW_SYS}, - {sys_net_write_timeout.name,(char*) &sys_net_write_timeout, SHOW_SYS}, - {sys_new_mode.name, (char*) &sys_new_mode, SHOW_SYS}, - {sys_old_alter_table.name, (char*) &sys_old_alter_table, SHOW_SYS}, - {sys_old_passwords.name, (char*) &sys_old_passwords, SHOW_SYS}, {"open_files_limit", (char*) &open_files_limit, SHOW_LONG}, - {sys_optimizer_prune_level.name, (char*) &sys_optimizer_prune_level, - SHOW_SYS}, - {sys_optimizer_search_depth.name,(char*) &sys_optimizer_search_depth, - SHOW_SYS}, {"pid_file", (char*) pidfile_name, SHOW_CHAR}, {"plugin_dir", (char*) opt_plugin_dir, SHOW_CHAR}, - {"port", (char*) &mysqld_port, SHOW_INT}, - {sys_preload_buff_size.name, (char*) &sys_preload_buff_size, SHOW_SYS}, + {"port", (char*) &mysqld_port, SHOW_INT}, {"protocol_version", (char*) &protocol_version, SHOW_INT}, - {sys_query_alloc_block_size.name, (char*) &sys_query_alloc_block_size, - SHOW_SYS}, -#ifdef HAVE_QUERY_CACHE - {sys_query_cache_limit.name,(char*) &sys_query_cache_limit, SHOW_SYS}, - {sys_query_cache_min_res_unit.name, (char*) &sys_query_cache_min_res_unit, - SHOW_SYS}, - {sys_query_cache_size.name, (char*) &sys_query_cache_size, SHOW_SYS}, - {sys_query_cache_type.name, (char*) &sys_query_cache_type, SHOW_SYS}, - {sys_query_cache_wlock_invalidate.name, - (char *) &sys_query_cache_wlock_invalidate, SHOW_SYS}, -#endif /* HAVE_QUERY_CACHE */ - {sys_query_prealloc_size.name, (char*) &sys_query_prealloc_size, SHOW_SYS}, - {sys_range_alloc_block_size.name, (char*) &sys_range_alloc_block_size, - SHOW_SYS}, - {sys_read_buff_size.name, (char*) &sys_read_buff_size, SHOW_SYS}, - {sys_readonly.name, (char*) &sys_readonly, SHOW_SYS}, - {sys_read_rnd_buff_size.name,(char*) &sys_read_rnd_buff_size, SHOW_SYS}, -#ifdef HAVE_REPLICATION - {sys_relay_log_purge.name, (char*) &sys_relay_log_purge, SHOW_SYS}, - {"relay_log_space_limit", (char*) &relay_log_space_limit, SHOW_LONGLONG}, -#endif - {sys_rpl_recovery_rank.name,(char*) &sys_rpl_recovery_rank, SHOW_SYS}, - {"secure_auth", (char*) &sys_secure_auth, SHOW_SYS}, #ifdef HAVE_SMEM {"shared_memory", (char*) &opt_enable_shared_memory, SHOW_MY_BOOL}, {"shared_memory_base_name", (char*) &shared_memory_base_name, SHOW_CHAR_PTR}, #endif - {sys_server_id.name, (char*) &sys_server_id, SHOW_SYS}, {"skip_external_locking", (char*) &my_disable_locking, SHOW_MY_BOOL}, {"skip_networking", (char*) &opt_disable_networking, SHOW_BOOL}, {"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL}, -#ifdef HAVE_REPLICATION - {sys_slave_compressed_protocol.name, - (char*) &sys_slave_compressed_protocol, SHOW_SYS}, - {"slave_load_tmpdir", (char*) &slave_load_tmpdir, SHOW_CHAR_PTR}, - {sys_slave_net_timeout.name,(char*) &sys_slave_net_timeout, SHOW_SYS}, - {"slave_skip_errors", (char*) &show_slave_skip_errors, SHOW_FUNC}, - {sys_slave_trans_retries.name,(char*) &sys_slave_trans_retries, SHOW_SYS}, -#endif - {sys_slow_launch_time.name, (char*) &sys_slow_launch_time, SHOW_SYS}, - {sys_var_slow_query_log.name, (char*) &opt_slow_log, SHOW_MY_BOOL}, - {sys_var_slow_log_path.name, (char*) &sys_var_slow_log_path, SHOW_SYS}, #ifdef HAVE_SYS_UN_H - {"socket", (char*) &mysqld_unix_port, SHOW_CHAR_PTR}, -#endif - {sys_sort_buffer.name, (char*) &sys_sort_buffer, SHOW_SYS}, - {sys_big_selects.name, (char*) &sys_big_selects, SHOW_SYS}, - {sys_sql_mode.name, (char*) &sys_sql_mode, SHOW_SYS}, - {"sql_notes", (char*) &sys_sql_notes, SHOW_SYS}, - {"sql_warnings", (char*) &sys_sql_warnings, SHOW_SYS}, - {sys_ssl_ca.name, (char*) &sys_ssl_ca, SHOW_SYS}, - {sys_ssl_capath.name, (char*) &sys_ssl_capath, SHOW_SYS}, - {sys_ssl_cert.name, (char*) &sys_ssl_cert, SHOW_SYS}, - {sys_ssl_cipher.name, (char*) &sys_ssl_cipher, SHOW_SYS}, - {sys_ssl_key.name, (char*) &sys_ssl_key, SHOW_SYS}, - {sys_storage_engine.name, (char*) &sys_storage_engine, SHOW_SYS}, -#ifdef HAVE_REPLICATION - {sys_sync_binlog_period.name,(char*) &sys_sync_binlog_period, SHOW_SYS}, -#endif - {sys_sync_frm.name, (char*) &sys_sync_frm, SHOW_SYS}, -#ifdef HAVE_TZNAME - {"system_time_zone", system_time_zone, SHOW_CHAR}, + {"socket", (char*) &mysqld_unix_port, SHOW_CHAR_PTR}, #endif {"table_definition_cache", (char*) &table_def_size, SHOW_LONG}, {"table_lock_wait_timeout", (char*) &table_lock_wait_timeout, SHOW_LONG }, - {"table_open_cache", (char*) &table_cache_size, SHOW_LONG}, - {sys_table_type.name, (char*) &sys_table_type, SHOW_SYS}, - {sys_thread_cache_size.name,(char*) &sys_thread_cache_size, SHOW_SYS}, #ifdef HAVE_THR_SETCONCURRENCY {"thread_concurrency", (char*) &concurrency, SHOW_LONG}, #endif @@ -1020,24 +695,6 @@ SHOW_VAR init_vars[]= { {sys_thread_pool_size.name, (char*) &sys_thread_pool_size, SHOW_SYS}, #endif {"thread_stack", (char*) &thread_stack, SHOW_LONG}, - {sys_time_format.name, (char*) &sys_time_format, SHOW_SYS}, - {"time_zone", (char*) &sys_time_zone, SHOW_SYS}, - {sys_timed_mutexes.name, (char*) &sys_timed_mutexes, SHOW_SYS}, - {sys_tmp_table_size.name, (char*) &sys_tmp_table_size, SHOW_SYS}, - {sys_tmpdir.name, (char*) &sys_tmpdir, SHOW_SYS}, - {sys_trans_alloc_block_size.name, (char*) &sys_trans_alloc_block_size, - SHOW_SYS}, - {sys_trans_prealloc_size.name, (char*) &sys_trans_prealloc_size, SHOW_SYS}, - {sys_tx_isolation.name, (char*) &sys_tx_isolation, SHOW_SYS}, - {sys_updatable_views_with_limit.name, - (char*) &sys_updatable_views_with_limit,SHOW_SYS}, - {sys_version.name, (char*) &sys_version, SHOW_SYS}, - {sys_version_comment.name, (char*) &sys_version_comment, SHOW_SYS}, - {sys_version_compile_machine.name, (char*) &sys_version_compile_machine, - SHOW_SYS}, - {sys_version_compile_os.name, (char*) &sys_version_compile_os, SHOW_SYS}, - {sys_net_wait_timeout.name, (char*) &sys_net_wait_timeout, SHOW_SYS}, - {NullS, NullS, SHOW_LONG} }; @@ -1332,7 +989,8 @@ bool sys_var_thd_binlog_format::is_readonly() const /* Cluster does not support changing the binlog format on the fly yet. */ - if (opt_bin_log && (have_ndbcluster == SHOW_OPTION_YES)) + LEX_STRING ndb_name= {(char*)STRING_WITH_LEN("ndbcluster")}; + if (opt_bin_log && plugin_is_ready(&ndb_name, MYSQL_STORAGE_ENGINE_PLUGIN)) { my_error(ER_NDB_CANT_SWITCH_BINLOG_FORMAT, MYF(0)); return 1; @@ -1423,9 +1081,9 @@ static void fix_server_id(THD *thd, enum_var_type type) sys_var_long_ptr:: -sys_var_long_ptr(const char *name_arg, ulong *value_ptr_arg, +sys_var_long_ptr(sys_var_chain *chain, const char *name_arg, ulong *value_ptr_arg, sys_after_update_func after_update_arg) - :sys_var_long_ptr_global(name_arg, value_ptr_arg, + :sys_var_long_ptr_global(chain, name_arg, value_ptr_arg, &LOCK_global_system_variables, after_update_arg) {} @@ -1809,7 +1467,13 @@ Item *sys_var::item(THD *thd, enum_var_type var_type, LEX_STRING *base) return new Item_int((longlong) value); } case SHOW_MY_BOOL: - return new Item_int((int32) *(my_bool*) value_ptr(thd, var_type, base),1); + { + int32 value; + pthread_mutex_lock(&LOCK_global_system_variables); + value= *(my_bool*) value_ptr(thd, var_type, base); + pthread_mutex_unlock(&LOCK_global_system_variables); + return new Item_int(value,1); + } case SHOW_CHAR: { Item *tmp; @@ -2118,122 +1782,25 @@ byte *sys_var_character_set::value_ptr(THD *thd, enum_var_type type, } -CHARSET_INFO ** sys_var_character_set_connection::ci_ptr(THD *thd, - enum_var_type type) +void sys_var_character_set_sv::set_default(THD *thd, enum_var_type type) { if (type == OPT_GLOBAL) - return &global_system_variables.collation_connection; + global_system_variables.*offset= *global_default; else - return &thd->variables.collation_connection; + { + thd->variables.*offset= global_system_variables.*offset; + thd->update_charset(); + } } - - -void sys_var_character_set_connection::set_default(THD *thd, - enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.collation_connection= default_charset_info; - else - { - thd->variables.collation_connection= global_system_variables.collation_connection; - thd->update_charset(); - } -} - - -CHARSET_INFO ** sys_var_character_set_client::ci_ptr(THD *thd, - enum_var_type type) +CHARSET_INFO **sys_var_character_set_sv::ci_ptr(THD *thd, enum_var_type type) { if (type == OPT_GLOBAL) - return &global_system_variables.character_set_client; + return &(global_system_variables.*offset); else - return &thd->variables.character_set_client; + return &(thd->variables.*offset); } -void sys_var_character_set_client::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.character_set_client= default_charset_info; - else - { - thd->variables.character_set_client= (global_system_variables. - character_set_client); - thd->update_charset(); - } -} - - -CHARSET_INFO ** -sys_var_character_set_filesystem::ci_ptr(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - return &global_system_variables.character_set_filesystem; - else - return &thd->variables.character_set_filesystem; -} - - -extern CHARSET_INFO *character_set_filesystem; - -void -sys_var_character_set_filesystem::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.character_set_filesystem= character_set_filesystem; - else - { - thd->variables.character_set_filesystem= (global_system_variables. - character_set_filesystem); - thd->update_charset(); - } -} - - -CHARSET_INFO ** -sys_var_character_set_results::ci_ptr(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - return &global_system_variables.character_set_results; - else - return &thd->variables.character_set_results; -} - - -void sys_var_character_set_results::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.character_set_results= default_charset_info; - else - { - thd->variables.character_set_results= (global_system_variables. - character_set_results); - thd->update_charset(); - } -} - - -CHARSET_INFO ** -sys_var_character_set_server::ci_ptr(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - return &global_system_variables.collation_server; - else - return &thd->variables.collation_server; -} - - -void sys_var_character_set_server::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.collation_server= default_charset_info; - else - { - thd->variables.collation_server= global_system_variables.collation_server; - thd->update_charset(); - } -} - CHARSET_INFO ** sys_var_character_set_database::ci_ptr(THD *thd, enum_var_type type) { @@ -2256,113 +1823,39 @@ void sys_var_character_set_database::set_default(THD *thd, enum_var_type type) } -bool sys_var_collation_connection::update(THD *thd, set_var *var) +bool sys_var_collation_sv::update(THD *thd, set_var *var) { if (var->type == OPT_GLOBAL) - global_system_variables.collation_connection= var->save_result.charset; + global_system_variables.*offset= var->save_result.charset; else { - thd->variables.collation_connection= var->save_result.charset; + thd->variables.*offset= var->save_result.charset; thd->update_charset(); } return 0; } -byte *sys_var_collation_connection::value_ptr(THD *thd, enum_var_type type, - LEX_STRING *base) +void sys_var_collation_sv::set_default(THD *thd, enum_var_type type) { - CHARSET_INFO *cs= ((type == OPT_GLOBAL) ? - global_system_variables.collation_connection : - thd->variables.collation_connection); - return cs ? (byte*) cs->name : (byte*) "NULL"; -} - - -void sys_var_collation_connection::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.collation_connection= default_charset_info; - else - { - thd->variables.collation_connection= (global_system_variables. - collation_connection); - thd->update_charset(); - } -} - -bool sys_var_collation_database::update(THD *thd, set_var *var) -{ - if (var->type == OPT_GLOBAL) - global_system_variables.collation_database= var->save_result.charset; + if (type == OPT_GLOBAL) + global_system_variables.*offset= *global_default; else { - thd->variables.collation_database= var->save_result.charset; + thd->variables.*offset= global_system_variables.*offset; thd->update_charset(); } - return 0; } -byte *sys_var_collation_database::value_ptr(THD *thd, enum_var_type type, - LEX_STRING *base) +byte *sys_var_collation_sv::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { CHARSET_INFO *cs= ((type == OPT_GLOBAL) ? - global_system_variables.collation_database : - thd->variables.collation_database); + global_system_variables.*offset : thd->variables.*offset); return cs ? (byte*) cs->name : (byte*) "NULL"; } -void sys_var_collation_database::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.collation_database= default_charset_info; - else - { - thd->variables.collation_database= (global_system_variables. - collation_database); - thd->update_charset(); - } -} - - -bool sys_var_collation_server::update(THD *thd, set_var *var) -{ - if (var->type == OPT_GLOBAL) - global_system_variables.collation_server= var->save_result.charset; - else - { - thd->variables.collation_server= var->save_result.charset; - thd->update_charset(); - } - return 0; -} - - -byte *sys_var_collation_server::value_ptr(THD *thd, enum_var_type type, - LEX_STRING *base) -{ - CHARSET_INFO *cs= ((type == OPT_GLOBAL) ? - global_system_variables.collation_server : - thd->variables.collation_server); - return cs ? (byte*) cs->name : (byte*) "NULL"; -} - - -void sys_var_collation_server::set_default(THD *thd, enum_var_type type) -{ - if (type == OPT_GLOBAL) - global_system_variables.collation_server= default_charset_info; - else - { - thd->variables.collation_server= (global_system_variables. - collation_server); - thd->update_charset(); - } -} - - LEX_STRING default_key_cache_base= {(char *) "default", 7 }; static KEY_CACHE zero_key_cache; @@ -2804,52 +2297,6 @@ byte *sys_var_insert_id::value_ptr(THD *thd, enum_var_type type, } -#ifdef HAVE_REPLICATION -bool sys_var_slave_skip_counter::check(THD *thd, set_var *var) -{ - int result= 0; - pthread_mutex_lock(&LOCK_active_mi); - pthread_mutex_lock(&active_mi->rli.run_lock); - if (active_mi->rli.slave_running) - { - my_message(ER_SLAVE_MUST_STOP, ER(ER_SLAVE_MUST_STOP), MYF(0)); - result=1; - } - pthread_mutex_unlock(&active_mi->rli.run_lock); - pthread_mutex_unlock(&LOCK_active_mi); - var->save_result.ulong_value= (ulong) var->value->val_int(); - return result; -} - - -bool sys_var_slave_skip_counter::update(THD *thd, set_var *var) -{ - pthread_mutex_lock(&LOCK_active_mi); - pthread_mutex_lock(&active_mi->rli.run_lock); - /* - The following test should normally never be true as we test this - in the check function; To be safe against multiple - SQL_SLAVE_SKIP_COUNTER request, we do the check anyway - */ - if (!active_mi->rli.slave_running) - { - pthread_mutex_lock(&active_mi->rli.data_lock); - active_mi->rli.slave_skip_counter= var->save_result.ulong_value; - pthread_mutex_unlock(&active_mi->rli.data_lock); - } - pthread_mutex_unlock(&active_mi->rli.run_lock); - pthread_mutex_unlock(&LOCK_active_mi); - return 0; -} - - -bool sys_var_sync_binlog_period::update(THD *thd, set_var *var) -{ - sync_binlog_period= (ulong) var->save_result.ulonglong_value; - return 0; -} -#endif /* HAVE_REPLICATION */ - bool sys_var_rand_seed1::update(THD *thd, set_var *var) { thd->rand.seed1= (ulong) var->save_result.ulonglong_value; @@ -3234,22 +2681,151 @@ static byte *get_sys_var_length(const sys_var *var, uint *length, /* - Initialises sys variables and put them in system_variable_hash + Add variables to the dynamic hash of system variables + + SYNOPSIS + mysql_add_sys_var_chain() + first Pointer to first system variable to add + long_opt (optional)command line arguments may be tied for limit checks. + + RETURN VALUES + 0 SUCCESS + otherwise FAILURE */ - -void set_var_init() +int mysql_add_sys_var_chain(sys_var *first, struct my_option *long_options) { sys_var *var; - - hash_init(&system_variable_hash, system_charset_info, sys_var::sys_vars, 0, - 0, (hash_get_key) get_sys_var_length, 0, 0); - for (var= sys_var::first; var; var= var->next) + + /* A write lock should be held on LOCK_system_variables_hash */ + + for (var= first; var; var= var->next) { var->name_length= strlen(var->name); - var->option_limits= find_option(my_long_options, var->name); - my_hash_insert(&system_variable_hash, (byte*) var); + /* this fails if there is a conflicting variable name. see HASH_UNIQUE */ + if (my_hash_insert(&system_variable_hash, (byte*) var)) + goto error; + if (long_options) + var->option_limits= find_option(long_options, var->name); } + return 0; + +error: + for (; first != var; first= first->next) + hash_delete(&system_variable_hash, (byte*) first); + return 1; +} + + +/* + Remove variables to the dynamic hash of system variables + + SYNOPSIS + mysql_del_sys_var_chain() + first Pointer to first system variable to remove + + RETURN VALUES + 0 SUCCESS + otherwise FAILURE +*/ + +int mysql_del_sys_var_chain(sys_var *first) +{ + int result= 0; + + /* A write lock should be held on LOCK_system_variables_hash */ + + for (sys_var *var= first; var; var= var->next) + result|= hash_delete(&system_variable_hash, (byte*) var); + + return result; +} + + +static int show_cmp(SHOW_VAR *a, SHOW_VAR *b) +{ + return strcmp(a->name, b->name); +} + + +/* + Constructs an array of system variables for display to the user. + + SYNOPSIS + enumerate_sys_vars() + thd current thread + sorted If TRUE, the system variables should be sorted + + RETURN VALUES + pointer Array of SHOW_VAR elements for display + NULL FAILURE +*/ + +SHOW_VAR* enumerate_sys_vars(THD *thd, bool sorted) +{ + int count= system_variable_hash.records, i; + int fixed_count= fixed_show_vars.elements; + int size= sizeof(SHOW_VAR) * (count + fixed_count + 1); + SHOW_VAR *result= (SHOW_VAR*) thd->alloc(size); + + if (result) + { + SHOW_VAR *show= result + fixed_count; + memcpy(result, fixed_show_vars.buffer, fixed_count * sizeof(SHOW_VAR)); + + for (i= 0; i < count; i++) + { + sys_var *var= (sys_var*) hash_element(&system_variable_hash, i); + show->name= var->name; + show->value= (char*) var; + show->type= SHOW_SYS; + show++; + } + + /* sort into order */ + if (sorted) + qsort(result, count + fixed_count, sizeof(SHOW_VAR), (qsort_cmp)show_cmp); + + /* make last element empty */ + bzero(show, sizeof(SHOW_VAR)); + } + return result; +} + + +/* + Initialize the system variables + + SYNOPSIS + set_var_init() + + RETURN VALUES + 0 SUCCESS + otherwise FAILURE +*/ + +int set_var_init() +{ + uint count= 0; + DBUG_ENTER("set_var_init"); + + for (sys_var *var=vars.first; var; var= var->next, count++); + + if (my_init_dynamic_array(&fixed_show_vars, sizeof(SHOW_VAR), + FIXED_VARS_SIZE + 64, 64)) + goto error; + + fixed_show_vars.elements= FIXED_VARS_SIZE; + memcpy(fixed_show_vars.buffer, fixed_vars, sizeof(fixed_vars)); + + if (hash_init(&system_variable_hash, system_charset_info, count, 0, + 0, (hash_get_key) get_sys_var_length, 0, HASH_UNIQUE)) + goto error; + + vars.last->next= NULL; + if (mysql_add_sys_var_chain(vars.first, my_long_options)) + goto error; + /* Special cases Needed because MySQL can't find the limits for a variable it it has @@ -3257,12 +2833,41 @@ void set_var_init() As these variables are deprecated, this code will disappear soon... */ sys_sql_max_join_size.option_limits= sys_max_join_size.option_limits; + + DBUG_RETURN(0); + +error: + fprintf(stderr, "failed to initialize system variables"); + pthread_mutex_unlock(&LOCK_global_system_variables); + DBUG_RETURN(1); } void set_var_free() { hash_free(&system_variable_hash); + delete_dynamic(&fixed_show_vars); +} + + +/* + Add elements to the dynamic list of read-only system variables. + + SYNOPSIS + mysql_append_static_vars() + show_vars Pointer to start of array + count Number of elements + + RETURN VALUES + 0 SUCCESS + otherwise FAILURE +*/ +int mysql_append_static_vars(const SHOW_VAR *show_vars, uint count) +{ + for (; count > 0; count--, show_vars++) + if (insert_dynamic(&fixed_show_vars, (char*) show_vars)) + return 1; + return 0; } @@ -3270,7 +2875,7 @@ void set_var_free() Find a user set-table variable SYNOPSIS - find_sys_var() + intern_find_sys_var() str Name of system variable to find length Length of variable. zero means that we should use strlen() on the variable @@ -3280,14 +2885,19 @@ void set_var_free() 0 Unknown variable (error message is given) */ -sys_var *find_sys_var(const char *str, uint length) +sys_var *intern_find_sys_var(const char *str, uint length, bool no_error) { - sys_var *var= (sys_var*) hash_search(&system_variable_hash, - (byte*) str, - length ? length : - strlen(str)); - if (!var) + sys_var *var; + + /* + This function is only called from the sql_plugin.cc. + A lock on LOCK_system_variable_hash should be held + */ + var= (sys_var*) hash_search(&system_variable_hash, + (byte*) str, length ? length : strlen(str)); + if (!(var || no_error)) my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), (char*) str); + return var; } @@ -3553,14 +3163,16 @@ bool sys_var_thd_storage_engine::check(THD *thd, set_var *var) const char *value; String str(buff, sizeof(buff), &my_charset_latin1), *res; + var->save_result.plugin= NULL; if (var->value->result_type() == STRING_RESULT) { LEX_STRING name; - handlerton *db_type; + handlerton *hton; if (!(res=var->value->val_str(&str)) || !(name.str= (char *)res->ptr()) || !(name.length= res->length()) || - !(var->save_result.hton= db_type= ha_resolve_by_name(thd, &name)) || - ha_checktype(thd, ha_legacy_type(db_type), 1, 0) != db_type) + !(var->save_result.plugin= ha_resolve_by_name(thd, &name)) || + !(hton= plugin_data(var->save_result.plugin, handlerton *)) || + ha_checktype(thd, ha_legacy_type(hton), 1, 0) != hton) { value= res ? res->c_ptr() : "NULL"; goto err; @@ -3578,28 +3190,52 @@ err: byte *sys_var_thd_storage_engine::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { - handlerton *val; - val= (type == OPT_GLOBAL) ? global_system_variables.*offset : - thd->variables.*offset; - return (byte *) hton2plugin[val->slot]->name.str; + byte* result; + handlerton *hton; + LEX_STRING *name; + plugin_ref plugin= thd->variables.*offset; + if (type == OPT_GLOBAL) + plugin= my_plugin_lock(thd, &(global_system_variables.*offset)); + hton= plugin_data(plugin, handlerton*); + name= &hton2plugin[hton->slot]->name; + result= (byte *) thd->strmake(name->str, name->length); + if (type == OPT_GLOBAL) + plugin_unlock(thd, plugin); + return result; } void sys_var_thd_storage_engine::set_default(THD *thd, enum_var_type type) { + plugin_ref old_value, new_value, *value; if (type == OPT_GLOBAL) - global_system_variables.*offset= myisam_hton; + { + value= &(global_system_variables.*offset); + new_value= ha_lock_engine(NULL, myisam_hton); + } else - thd->variables.*offset= global_system_variables.*offset; + { + value= &(thd->variables.*offset); + new_value= my_plugin_lock(NULL, &(global_system_variables.*offset)); + } + DBUG_ASSERT(new_value); + old_value= *value; + *value= new_value; + plugin_unlock(NULL, old_value); } bool sys_var_thd_storage_engine::update(THD *thd, set_var *var) { - handlerton **value= &(global_system_variables.*offset); - if (var->type != OPT_GLOBAL) - value= &(thd->variables.*offset); - *value= var->save_result.hton; + plugin_ref *value= &(global_system_variables.*offset), old_value; + if (var->type != OPT_GLOBAL) + value= &(thd->variables.*offset); + old_value= *value; + if (old_value != var->save_result.plugin) + { + *value= my_plugin_lock(NULL, &var->save_result.plugin); + plugin_unlock(NULL, old_value); + } return 0; } diff --git a/sql/set_var.h b/sql/set_var.h index 8887d91ec69..2813a756b8e 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -26,6 +26,7 @@ class sys_var; class set_var; +class sys_var_pluginvar; /* opaque */ typedef struct system_variables SV; typedef struct my_locale_st MY_LOCALE; @@ -37,11 +38,15 @@ typedef void (*sys_after_update_func)(THD *,enum_var_type); typedef void (*sys_set_default_func)(THD *, enum_var_type); typedef byte *(*sys_value_ptr_func)(THD *thd); +struct sys_var_chain +{ + sys_var *first; + sys_var *last; +}; + class sys_var { public: - static sys_var *first; - static uint sys_vars; sys_var *next; struct my_option *option_limits; /* Updated by by set_var_init() */ uint name_length; /* Updated by by set_var_init() */ @@ -52,13 +57,15 @@ public: sys_var(const char *name_arg,sys_after_update_func func= NULL) :name(name_arg), after_update(func) , no_support_one_shot(1) - { add_sys_var(); } + {} virtual ~sys_var() {} - void add_sys_var() + void chain_sys_var(sys_var_chain *chain_arg) { - next= first; - first= this; - sys_vars++; + if (chain_arg->last) + chain_arg->last->next= this; + else + chain_arg->first= this; + chain_arg->last= this; } virtual bool check(THD *thd, set_var *var); bool check_enum(THD *thd, set_var *var, TYPELIB *enum_names); @@ -77,6 +84,7 @@ public: Item *item(THD *thd, enum_var_type type, LEX_STRING *base); virtual bool is_struct() { return 0; } virtual bool is_readonly() const { return 0; } + virtual sys_var_pluginvar *cast_pluginvar() { return 0; } }; @@ -105,12 +113,12 @@ class sys_var_long_ptr_global: public sys_var_global { public: ulong *value; - sys_var_long_ptr_global(const char *name_arg, ulong *value_ptr_arg, + sys_var_long_ptr_global(sys_var_chain *chain, const char *name_arg, ulong *value_ptr_arg, pthread_mutex_t *guard_arg, sys_after_update_func after_update_arg= NULL) :sys_var_global(name_arg, after_update_arg, guard_arg), value(value_ptr_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); @@ -127,7 +135,7 @@ public: class sys_var_long_ptr :public sys_var_long_ptr_global { public: - sys_var_long_ptr(const char *name_arg, ulong *value_ptr, + sys_var_long_ptr(sys_var_chain *chain, const char *name_arg, ulong *value_ptr, sys_after_update_func after_update_arg= NULL); }; @@ -136,11 +144,13 @@ class sys_var_ulonglong_ptr :public sys_var { public: ulonglong *value; - sys_var_ulonglong_ptr(const char *name_arg, ulonglong *value_ptr_arg) - :sys_var(name_arg),value(value_ptr_arg) {} - sys_var_ulonglong_ptr(const char *name_arg, ulonglong *value_ptr_arg, + sys_var_ulonglong_ptr(sys_var_chain *chain, const char *name_arg, ulonglong *value_ptr_arg) + :sys_var(name_arg),value(value_ptr_arg) + { chain_sys_var(chain); } + sys_var_ulonglong_ptr(sys_var_chain *chain, const char *name_arg, ulonglong *value_ptr_arg, sys_after_update_func func) - :sys_var(name_arg,func), value(value_ptr_arg) {} + :sys_var(name_arg,func), value(value_ptr_arg) + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); SHOW_TYPE show_type() { return SHOW_LONGLONG; } @@ -153,9 +163,9 @@ class sys_var_bool_ptr :public sys_var { public: my_bool *value; - sys_var_bool_ptr(const char *name_arg, my_bool *value_arg) + sys_var_bool_ptr(sys_var_chain *chain, const char *name_arg, my_bool *value_arg) :sys_var(name_arg),value(value_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { return check_enum(thd, var, &bool_typelib); @@ -177,14 +187,14 @@ public: sys_check_func check_func; sys_update_func update_func; sys_set_default_func set_default_func; - sys_var_str(const char *name_arg, + sys_var_str(sys_var_chain *chain, const char *name_arg, sys_check_func check_func_arg, sys_update_func update_func_arg, sys_set_default_func set_default_func_arg, char *value_arg) :sys_var(name_arg), value(value_arg), check_func(check_func_arg), update_func(update_func_arg),set_default_func(set_default_func_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var) { @@ -209,9 +219,9 @@ class sys_var_const_str :public sys_var { public: char *value; // Pointer to const value - sys_var_const_str(const char *name_arg, const char *value_arg) + sys_var_const_str(sys_var_chain *chain, const char *name_arg, const char *value_arg) :sys_var(name_arg),value((char*) value_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { return 1; @@ -238,9 +248,9 @@ class sys_var_const_str_ptr :public sys_var { public: char **value; // Pointer to const value - sys_var_const_str_ptr(const char *name_arg, char **value_arg) + sys_var_const_str_ptr(sys_var_chain *chain, const char *name_arg, char **value_arg) :sys_var(name_arg),value(value_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { return 1; @@ -268,10 +278,10 @@ class sys_var_enum :public sys_var uint *value; TYPELIB *enum_names; public: - sys_var_enum(const char *name_arg, uint *value_arg, + sys_var_enum(sys_var_chain *chain, const char *name_arg, uint *value_arg, TYPELIB *typelib, sys_after_update_func func) :sys_var(name_arg,func), value(value_arg), enum_names(typelib) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { return check_enum(thd, var, enum_names); @@ -286,7 +296,8 @@ public: class sys_var_thd :public sys_var { public: - sys_var_thd(const char *name_arg, sys_after_update_func func= NULL) + sys_var_thd(const char *name_arg, + sys_after_update_func func= NULL) :sys_var(name_arg,func) {} bool check_type(enum_var_type type) { return 0; } @@ -302,13 +313,13 @@ class sys_var_thd_ulong :public sys_var_thd sys_check_func check_func; public: ulong SV::*offset; - sys_var_thd_ulong(const char *name_arg, ulong SV::*offset_arg) + sys_var_thd_ulong(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg) :sys_var_thd(name_arg), check_func(0), offset(offset_arg) - {} - sys_var_thd_ulong(const char *name_arg, ulong SV::*offset_arg, + { chain_sys_var(chain); } + sys_var_thd_ulong(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, sys_check_func c_func, sys_after_update_func au_func) :sys_var_thd(name_arg,au_func), check_func(c_func), offset(offset_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); @@ -321,13 +332,15 @@ class sys_var_thd_ha_rows :public sys_var_thd { public: ha_rows SV::*offset; - sys_var_thd_ha_rows(const char *name_arg, ha_rows SV::*offset_arg) + sys_var_thd_ha_rows(sys_var_chain *chain, const char *name_arg, + ha_rows SV::*offset_arg) :sys_var_thd(name_arg), offset(offset_arg) - {} - sys_var_thd_ha_rows(const char *name_arg, ha_rows SV::*offset_arg, + { chain_sys_var(chain); } + sys_var_thd_ha_rows(sys_var_chain *chain, const char *name_arg, + ha_rows SV::*offset_arg, sys_after_update_func func) :sys_var_thd(name_arg,func), offset(offset_arg) - {} + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); SHOW_TYPE show_type() { return SHOW_HA_ROWS; } @@ -340,14 +353,16 @@ class sys_var_thd_ulonglong :public sys_var_thd public: ulonglong SV::*offset; bool only_global; - sys_var_thd_ulonglong(const char *name_arg, ulonglong SV::*offset_arg) + sys_var_thd_ulonglong(sys_var_chain *chain, const char *name_arg, + ulonglong SV::*offset_arg) :sys_var_thd(name_arg), offset(offset_arg) - {} - sys_var_thd_ulonglong(const char *name_arg, ulonglong SV::*offset_arg, + { chain_sys_var(chain); } + sys_var_thd_ulonglong(sys_var_chain *chain, const char *name_arg, + ulonglong SV::*offset_arg, sys_after_update_func func, bool only_global_arg) :sys_var_thd(name_arg, func), offset(offset_arg), only_global(only_global_arg) - {} + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); SHOW_TYPE show_type() { return SHOW_LONGLONG; } @@ -367,13 +382,13 @@ class sys_var_thd_bool :public sys_var_thd { public: my_bool SV::*offset; - sys_var_thd_bool(const char *name_arg, my_bool SV::*offset_arg) + sys_var_thd_bool(sys_var_chain *chain, const char *name_arg, my_bool SV::*offset_arg) :sys_var_thd(name_arg), offset(offset_arg) - {} - sys_var_thd_bool(const char *name_arg, my_bool SV::*offset_arg, + { chain_sys_var(chain); } + sys_var_thd_bool(sys_var_chain *chain, const char *name_arg, my_bool SV::*offset_arg, sys_after_update_func func) :sys_var_thd(name_arg,func), offset(offset_arg) - {} + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); SHOW_TYPE show_type() { return SHOW_MY_BOOL; } @@ -393,23 +408,23 @@ protected: TYPELIB *enum_names; sys_check_func check_func; public: - sys_var_thd_enum(const char *name_arg, ulong SV::*offset_arg, + sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, TYPELIB *typelib) :sys_var_thd(name_arg), offset(offset_arg), enum_names(typelib), check_func(0) - {} - sys_var_thd_enum(const char *name_arg, ulong SV::*offset_arg, + { chain_sys_var(chain); } + sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, TYPELIB *typelib, sys_after_update_func func) :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib), check_func(0) - {} - sys_var_thd_enum(const char *name_arg, ulong SV::*offset_arg, + { chain_sys_var(chain); } + sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, TYPELIB *typelib, sys_after_update_func func, sys_check_func check) :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib), check_func(check) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { int ret= 0; @@ -430,8 +445,9 @@ extern void fix_sql_mode_var(THD *thd, enum_var_type type); class sys_var_thd_sql_mode :public sys_var_thd_enum { public: - sys_var_thd_sql_mode(const char *name_arg, ulong SV::*offset_arg) - :sys_var_thd_enum(name_arg, offset_arg, &sql_mode_typelib, + sys_var_thd_sql_mode(sys_var_chain *chain, const char *name_arg, + ulong SV::*offset_arg) + :sys_var_thd_enum(chain, name_arg, offset_arg, &sql_mode_typelib, fix_sql_mode_var) {} bool check(THD *thd, set_var *var) @@ -448,11 +464,12 @@ public: class sys_var_thd_storage_engine :public sys_var_thd { protected: - handlerton *SV::*offset; + plugin_ref SV::*offset; public: - sys_var_thd_storage_engine(const char *name_arg, handlerton *SV::*offset_arg) + sys_var_thd_storage_engine(sys_var_chain *chain, const char *name_arg, + plugin_ref SV::*offset_arg) :sys_var_thd(name_arg), offset(offset_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) @@ -467,8 +484,9 @@ public: class sys_var_thd_table_type :public sys_var_thd_storage_engine { public: - sys_var_thd_table_type(const char *name_arg, handlerton *SV::*offset_arg) - :sys_var_thd_storage_engine(name_arg, offset_arg) + sys_var_thd_table_type(sys_var_chain *chain, const char *name_arg, + plugin_ref SV::*offset_arg) + :sys_var_thd_storage_engine(chain, name_arg, offset_arg) {} void warn_deprecated(THD *thd); void set_default(THD *thd, enum_var_type type); @@ -482,12 +500,12 @@ class sys_var_thd_bit :public sys_var_thd public: ulonglong bit_flag; bool reverse; - sys_var_thd_bit(const char *name_arg, + sys_var_thd_bit(sys_var_chain *chain, const char *name_arg, sys_check_func c_func, sys_update_func u_func, ulonglong bit, bool reverse_arg=0) :sys_var_thd(name_arg), check_func(c_func), update_func(u_func), bit_flag(bit), reverse(reverse_arg) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); bool check_update_type(Item_result type) { return 0; } @@ -499,7 +517,9 @@ public: class sys_var_thd_dbug :public sys_var_thd { public: - sys_var_thd_dbug(const char *name_arg) :sys_var_thd(name_arg) {} + sys_var_thd_dbug(sys_var_chain *chain, const char *name_arg) + :sys_var_thd(name_arg) + { chain_sys_var(chain); } bool check_update_type(Item_result type) { return type != STRING_RESULT; } bool check(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_CHAR; } @@ -515,7 +535,9 @@ public: class sys_var_timestamp :public sys_var { public: - sys_var_timestamp(const char *name_arg) :sys_var(name_arg) {} + sys_var_timestamp(sys_var_chain *chain, const char *name_arg) + :sys_var(name_arg) + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } @@ -528,7 +550,9 @@ public: class sys_var_last_insert_id :public sys_var { public: - sys_var_last_insert_id(const char *name_arg) :sys_var(name_arg) {} + sys_var_last_insert_id(sys_var_chain *chain, const char *name_arg) + :sys_var(name_arg) + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } SHOW_TYPE show_type() { return SHOW_LONGLONG; } @@ -539,7 +563,9 @@ public: class sys_var_insert_id :public sys_var { public: - sys_var_insert_id(const char *name_arg) :sys_var(name_arg) {} + sys_var_insert_id(sys_var_chain *chain, const char *name_arg) + :sys_var(name_arg) + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } SHOW_TYPE show_type() { return SHOW_LONGLONG; } @@ -547,33 +573,12 @@ public: }; -#ifdef HAVE_REPLICATION -class sys_var_slave_skip_counter :public sys_var -{ -public: - sys_var_slave_skip_counter(const char *name_arg) :sys_var(name_arg) {} - bool check(THD *thd, set_var *var); - bool update(THD *thd, set_var *var); - bool check_type(enum_var_type type) { return type != OPT_GLOBAL; } - /* - We can't retrieve the value of this, so we don't have to define - show_type() or value_ptr() - */ -}; - -class sys_var_sync_binlog_period :public sys_var_long_ptr -{ -public: - sys_var_sync_binlog_period(const char *name_arg, ulong *value_ptr_arg) - :sys_var_long_ptr(name_arg,value_ptr_arg) {} - bool update(THD *thd, set_var *var); -}; -#endif - class sys_var_rand_seed1 :public sys_var { public: - sys_var_rand_seed1(const char *name_arg) :sys_var(name_arg) {} + sys_var_rand_seed1(sys_var_chain *chain, const char *name_arg) + :sys_var(name_arg) + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } }; @@ -581,7 +586,9 @@ public: class sys_var_rand_seed2 :public sys_var { public: - sys_var_rand_seed2(const char *name_arg) :sys_var(name_arg) {} + sys_var_rand_seed2(sys_var_chain *chain, const char *name_arg) + :sys_var(name_arg) + { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } }; @@ -590,7 +597,8 @@ public: class sys_var_collation :public sys_var_thd { public: - sys_var_collation(const char *name_arg) :sys_var_thd(name_arg) + sys_var_collation(const char *name_arg) + :sys_var_thd(name_arg) { no_support_one_shot= 0; } @@ -608,10 +616,9 @@ class sys_var_character_set :public sys_var_thd { public: bool nullable; - sys_var_character_set(const char *name_arg) : - sys_var_thd(name_arg) + sys_var_character_set(const char *name_arg, bool is_nullable= 0) : + sys_var_thd(name_arg), nullable(is_nullable) { - nullable= 0; /* In fact only almost all variables derived from sys_var_character_set support ONE_SHOT; character_set_results doesn't. But that's good enough. @@ -631,83 +638,47 @@ public: virtual CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type)= 0; }; -class sys_var_character_set_filesystem :public sys_var_character_set + +class sys_var_character_set_sv :public sys_var_character_set { + CHARSET_INFO **global_default; + CHARSET_INFO *SV::*offset; public: - sys_var_character_set_filesystem(const char *name_arg) : - sys_var_character_set(name_arg) {} + sys_var_character_set_sv(sys_var_chain *chain, const char *name_arg, + CHARSET_INFO *SV::*offset_arg, + CHARSET_INFO **global_default_arg, + bool is_nullable= 0) + : sys_var_character_set(name_arg, is_nullable), + offset(offset_arg), global_default(global_default_arg) + { chain_sys_var(chain); } void set_default(THD *thd, enum_var_type type); CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); }; -class sys_var_character_set_client :public sys_var_character_set -{ -public: - sys_var_character_set_client(const char *name_arg) : - sys_var_character_set(name_arg) {} - void set_default(THD *thd, enum_var_type type); - CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); -}; - -class sys_var_character_set_results :public sys_var_character_set -{ -public: - sys_var_character_set_results(const char *name_arg) : - sys_var_character_set(name_arg) - { nullable= 1; } - void set_default(THD *thd, enum_var_type type); - CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); -}; - -class sys_var_character_set_server :public sys_var_character_set -{ -public: - sys_var_character_set_server(const char *name_arg) : - sys_var_character_set(name_arg) {} - void set_default(THD *thd, enum_var_type type); - CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); -}; class sys_var_character_set_database :public sys_var_character_set { public: - sys_var_character_set_database(const char *name_arg) : - sys_var_character_set(name_arg) {} + sys_var_character_set_database(sys_var_chain *chain, const char *name_arg) : + sys_var_character_set(name_arg) + { chain_sys_var(chain); } void set_default(THD *thd, enum_var_type type); CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); }; -class sys_var_character_set_connection :public sys_var_character_set +class sys_var_collation_sv :public sys_var_collation { + CHARSET_INFO **global_default; + CHARSET_INFO *SV::*offset; public: - sys_var_character_set_connection(const char *name_arg) : - sys_var_character_set(name_arg) {} - void set_default(THD *thd, enum_var_type type); - CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); -}; - -class sys_var_collation_connection :public sys_var_collation -{ -public: - sys_var_collation_connection(const char *name_arg) :sys_var_collation(name_arg) {} - bool update(THD *thd, set_var *var); - void set_default(THD *thd, enum_var_type type); - byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); -}; - -class sys_var_collation_server :public sys_var_collation -{ -public: - sys_var_collation_server(const char *name_arg) :sys_var_collation(name_arg) {} - bool update(THD *thd, set_var *var); - void set_default(THD *thd, enum_var_type type); - byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); -}; - -class sys_var_collation_database :public sys_var_collation -{ -public: - sys_var_collation_database(const char *name_arg) :sys_var_collation(name_arg) {} + sys_var_collation_sv(sys_var_chain *chain, const char *name_arg, + CHARSET_INFO *SV::*offset_arg, + CHARSET_INFO **global_default_arg) + :sys_var_collation(name_arg), + offset(offset_arg), global_default(global_default_arg) + { + chain_sys_var(chain); + } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); @@ -719,9 +690,10 @@ class sys_var_key_cache_param :public sys_var protected: size_t offset; public: - sys_var_key_cache_param(const char *name_arg, size_t offset_arg) + sys_var_key_cache_param(sys_var_chain *chain, const char *name_arg, + size_t offset_arg) :sys_var(name_arg), offset(offset_arg) - {} + { chain_sys_var(chain); } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); bool check_default(enum_var_type type) { return 1; } bool is_struct() { return 1; } @@ -731,8 +703,9 @@ public: class sys_var_key_buffer_size :public sys_var_key_cache_param { public: - sys_var_key_buffer_size(const char *name_arg) - :sys_var_key_cache_param(name_arg, offsetof(KEY_CACHE, param_buff_size)) + sys_var_key_buffer_size(sys_var_chain *chain, const char *name_arg) + :sys_var_key_cache_param(chain, name_arg, + offsetof(KEY_CACHE, param_buff_size)) {} bool update(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_LONGLONG; } @@ -742,8 +715,8 @@ public: class sys_var_key_cache_long :public sys_var_key_cache_param { public: - sys_var_key_cache_long(const char *name_arg, size_t offset_arg) - :sys_var_key_cache_param(name_arg, offset_arg) + sys_var_key_cache_long(sys_var_chain *chain, const char *name_arg, size_t offset_arg) + :sys_var_key_cache_param(chain, name_arg, offset_arg) {} bool update(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_LONG; } @@ -755,12 +728,12 @@ class sys_var_thd_date_time_format :public sys_var_thd DATE_TIME_FORMAT *SV::*offset; timestamp_type date_time_type; public: - sys_var_thd_date_time_format(const char *name_arg, + sys_var_thd_date_time_format(sys_var_chain *chain, const char *name_arg, DATE_TIME_FORMAT *SV::*offset_arg, timestamp_type date_time_type_arg) :sys_var_thd(name_arg), offset(offset_arg), date_time_type(date_time_type_arg) - {} + { chain_sys_var(chain); } SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) { @@ -779,8 +752,9 @@ class sys_var_log_state :public sys_var_bool_ptr { uint log_type; public: - sys_var_log_state(const char *name_arg, my_bool *value_arg, uint log_type_arg) - :sys_var_bool_ptr(name_arg, value_arg), log_type(log_type_arg) {} + sys_var_log_state(sys_var_chain *chain, const char *name_arg, my_bool *value_arg, + uint log_type_arg) + :sys_var_bool_ptr(chain, name_arg, value_arg), log_type(log_type_arg) {} bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); }; @@ -791,10 +765,10 @@ class sys_var_log_output :public sys_var ulong *value; TYPELIB *enum_names; public: - sys_var_log_output(const char *name_arg, ulong *value_arg, + sys_var_log_output(sys_var_chain *chain, const char *name_arg, ulong *value_arg, TYPELIB *typelib, sys_after_update_func func) :sys_var(name_arg,func), value(value_arg), enum_names(typelib) - {} + { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { return check_set(thd, var, enum_names); @@ -815,12 +789,12 @@ public: enum_var_type var_type; SHOW_TYPE show_type_value; sys_value_ptr_func value_ptr_func; - sys_var_readonly(const char *name_arg, enum_var_type type, + sys_var_readonly(sys_var_chain *chain, const char *name_arg, enum_var_type type, SHOW_TYPE show_type_arg, sys_value_ptr_func value_ptr_func_arg) :sys_var(name_arg), var_type(type), show_type_value(show_type_arg), value_ptr_func(value_ptr_func_arg) - {} + { chain_sys_var(chain); } bool update(THD *thd, set_var *var) { return 1; } bool check_default(enum_var_type type) { return 1; } bool check_type(enum_var_type type) { return type != var_type; } @@ -834,19 +808,17 @@ public: }; -class sys_var_have_variable: public sys_var +class sys_var_have_option: public sys_var { - SHOW_COMP_OPTION *have_variable; - +protected: + virtual SHOW_COMP_OPTION get_option() = 0; public: - sys_var_have_variable(const char *variable_name, - SHOW_COMP_OPTION *have_variable_arg): - sys_var(variable_name), - have_variable(have_variable_arg) - { } + sys_var_have_option(sys_var_chain *chain, const char *variable_name): + sys_var(variable_name) + { chain_sys_var(chain); } byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { - return (byte*) show_comp_option_name[*have_variable]; + return (byte*) show_comp_option_name[get_option()]; } bool update(THD *thd, set_var *var) { return 1; } bool check_default(enum_var_type type) { return 1; } @@ -857,13 +829,47 @@ public: }; +class sys_var_have_variable: public sys_var_have_option +{ + SHOW_COMP_OPTION *have_variable; + +public: + sys_var_have_variable(sys_var_chain *chain, const char *variable_name, + SHOW_COMP_OPTION *have_variable_arg): + sys_var_have_option(chain, variable_name), + have_variable(have_variable_arg) + { } + SHOW_COMP_OPTION get_option() { return *have_variable; } +}; + + +class sys_var_have_plugin: public sys_var_have_option +{ + const char *plugin_name_str; + const uint plugin_name_len; + const int plugin_type; + +public: + sys_var_have_plugin(sys_var_chain *chain, const char *variable_name, + const char *plugin_name_str_arg, uint plugin_name_len_arg, + int plugin_type_arg): + sys_var_have_option(chain, variable_name), + plugin_name_str(plugin_name_str_arg), plugin_name_len(plugin_name_len_arg), + plugin_type(plugin_type_arg) + { } + /* the following method is declared in sql_plugin.cc */ + SHOW_COMP_OPTION get_option(); +}; + + class sys_var_thd_time_zone :public sys_var_thd { public: - sys_var_thd_time_zone(const char *name_arg): + sys_var_thd_time_zone(sys_var_chain *chain, const char *name_arg): sys_var_thd(name_arg) { no_support_one_shot= 0; + chain_sys_var(chain); } bool check(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_CHAR; } @@ -881,8 +887,9 @@ public: class sys_var_max_user_conn : public sys_var_thd { public: - sys_var_max_user_conn(const char *name_arg): - sys_var_thd(name_arg) {} + sys_var_max_user_conn(sys_var_chain *chain, const char *name_arg): + sys_var_thd(name_arg) + { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); bool check_default(enum_var_type type) @@ -898,8 +905,9 @@ class sys_var_trust_routine_creators :public sys_var_bool_ptr { /* We need a derived class only to have a warn_deprecated() */ public: - sys_var_trust_routine_creators(const char *name_arg, my_bool *value_arg) : - sys_var_bool_ptr(name_arg, value_arg) {}; + sys_var_trust_routine_creators(sys_var_chain *chain, const char *name_arg, + my_bool *value_arg) : + sys_var_bool_ptr(chain, name_arg, value_arg) {}; void warn_deprecated(THD *thd); void set_default(THD *thd, enum_var_type type); bool update(THD *thd, set_var *var); @@ -913,8 +921,9 @@ public: class sys_var_opt_readonly :public sys_var_bool_ptr { public: - sys_var_opt_readonly(const char *name_arg, my_bool *value_arg) : - sys_var_bool_ptr(name_arg, value_arg) {}; + sys_var_opt_readonly(sys_var_chain *chain, const char *name_arg, + my_bool *value_arg) : + sys_var_bool_ptr(chain, name_arg, value_arg) {}; ~sys_var_opt_readonly() {}; bool update(THD *thd, set_var *var); }; @@ -923,12 +932,13 @@ public: class sys_var_thd_lc_time_names :public sys_var_thd { public: - sys_var_thd_lc_time_names(const char *name_arg): - sys_var_thd(name_arg) + sys_var_thd_lc_time_names(sys_var_chain *chain, const char *name_arg): + sys_var_thd(name_arg) { #if MYSQL_VERSION_ID < 50000 no_support_one_shot= 0; #endif + chain_sys_var(chain); } bool check(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_CHAR; } @@ -947,8 +957,8 @@ class sys_var_event_scheduler :public sys_var_long_ptr { /* We need a derived class only to have a warn_deprecated() */ public: - sys_var_event_scheduler(const char *name_arg) : - sys_var_long_ptr(name_arg, NULL, NULL) {}; + sys_var_event_scheduler(sys_var_chain *chain, const char *name_arg) : + sys_var_long_ptr(chain, name_arg, NULL, NULL) {}; bool update(THD *thd, set_var *var); byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); SHOW_TYPE show_type() { return SHOW_CHAR; } @@ -964,8 +974,9 @@ extern void fix_binlog_format_after_update(THD *thd, enum_var_type type); class sys_var_thd_binlog_format :public sys_var_thd_enum { public: - sys_var_thd_binlog_format(const char *name_arg, ulong SV::*offset_arg) - :sys_var_thd_enum(name_arg, offset_arg, + sys_var_thd_binlog_format(sys_var_chain *chain, const char *name_arg, + ulong SV::*offset_arg) + :sys_var_thd_enum(chain, name_arg, offset_arg, &binlog_format_typelib , fix_binlog_format_after_update ) @@ -1003,7 +1014,7 @@ public: CHARSET_INFO *charset; ulong ulong_value; ulonglong ulonglong_value; - handlerton *hton; + plugin_ref plugin; DATE_TIME_FORMAT *date_time_format; Time_zone *time_zone; MY_LOCALE *locale_value; @@ -1132,9 +1143,13 @@ struct sys_var_with_base Prototypes for helper functions */ -void set_var_init(); +int set_var_init(); void set_var_free(); -sys_var *find_sys_var(const char *str, uint length=0); +int mysql_append_static_vars(const SHOW_VAR *show_vars, uint count); +SHOW_VAR* enumerate_sys_vars(THD *thd, bool sorted); +int mysql_add_sys_var_chain(sys_var *chain, struct my_option *long_options); +int mysql_del_sys_var_chain(sys_var *chain); +sys_var *find_sys_var(THD *thd, const char *str, uint length=0); int sql_set_variables(THD *thd, List *var_list); bool not_all_support_one_shot(List *var_list); void fix_delay_key_write(THD *thd, enum_var_type type); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 15d616bdd4f..131e7c66557 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1596,7 +1596,7 @@ void close_temporary_table(THD *thd, TABLE *table, void close_temporary(TABLE *table, bool free_share, bool delete_table) { - handlerton *table_type= table->s->db_type; + handlerton *table_type= table->s->db_type(); DBUG_ENTER("close_temporary"); free_io_cache(table); @@ -6186,7 +6186,7 @@ my_bool mysql_rm_tmp_tables(void) init_tmp_table_share(&share, "", 0, "", filePathCopy); if (!open_table_def(thd, &share, 0) && ((handler_file= get_new_handler(&share, thd->mem_root, - share.db_type)))) + share.db_type())))) { handler_file->delete_table(filePathCopy); delete handler_file; diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 8c0cb72e1f4..1f6a84462ae 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -2384,7 +2384,12 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used, tables_used->engine_data)) DBUG_RETURN(0); - if (tables_used->table->s->db_type->db_type == DB_TYPE_MRG_MYISAM) +#ifdef WITH_MYISAMMRG_STORAGE_ENGINE + /* + XXX FIXME: Some generic mechanism is required here instead of this + MYISAMMRG-specific implementation. + */ + if (tables_used->table->s->db_type()->db_type == DB_TYPE_MRG_MYISAM) { ha_myisammrg *handler = (ha_myisammrg *) tables_used->table->file; MYRG_INFO *file = handler->myrg_info(); @@ -2407,6 +2412,7 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used, DBUG_RETURN(0); } } +#endif } } DBUG_RETURN(n - counter); @@ -2983,7 +2989,7 @@ static TABLE_COUNTER_TYPE process_and_count_tables(TABLE_LIST *tables_used, DBUG_PRINT("qcache", ("table: %s db: %s type: %u", tables_used->table->s->table_name.str, tables_used->table->s->db.str, - tables_used->table->s->db_type->db_type)); + tables_used->table->s->db_type()->db_type)); if (tables_used->derived) { table_count--; @@ -3008,12 +3014,18 @@ static TABLE_COUNTER_TYPE process_and_count_tables(TABLE_LIST *tables_used, "other non-cacheable table(s)")); DBUG_RETURN(0); } - if (tables_used->table->s->db_type->db_type == DB_TYPE_MRG_MYISAM) +#ifdef WITH_MYISAMMRG_STORAGE_ENGINE + /* + XXX FIXME: Some generic mechanism is required here instead of this + MYISAMMRG-specific implementation. + */ + if (tables_used->table->s->db_type()->db_type == DB_TYPE_MRG_MYISAM) { ha_myisammrg *handler = (ha_myisammrg *)tables_used->table->file; MYRG_INFO *file = handler->myrg_info(); table_count+= (file->end_table - file->open_tables); } +#endif } } DBUG_RETURN(table_count); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 039fd71d670..eab6fea9558 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -167,15 +167,15 @@ Open_tables_state::Open_tables_state(ulong version_arg) reset_open_tables_state(); } -my_bool thd_in_lock_tables(const THD *thd) +int thd_in_lock_tables(const THD *thd) { - return thd->in_lock_tables; + return test(thd->in_lock_tables); } -my_bool thd_tablespace_op(const THD *thd) +int thd_tablespace_op(const THD *thd) { - return thd->tablespace_op; + return test(thd->tablespace_op); } @@ -191,6 +191,82 @@ void **thd_ha_data(const THD *thd, const struct handlerton *hton) return (void **) thd->ha_data + hton->slot; } +long long thd_test_options(const THD *thd, long long test_options) +{ + return thd->options & test_options; +} + +int thd_sql_command(const THD *thd) +{ + return (int) thd->lex->sql_command; +} + + +/* + Dumps a text description of a thread, its security context + (user, host) and the current query. + + SYNOPSIS + thd_security_context() + thd current thread context + buffer pointer to preferred result buffer + length length of buffer + max_query_len how many chars of query to copy (0 for all) + + RETURN VALUES + pointer to string +*/ +char *thd_security_context(THD *thd, char *buffer, int length, + int max_query_len) +{ + String str(buffer, length, &my_charset_latin1); + const Security_context *sctx= &thd->main_security_ctx; + char header[64]; + int len; + + len= my_snprintf(header, sizeof(header), + "MySQL thread id %lu, query id %lu", + thd->thread_id, (ulong) thd->query_id); + str.length(0); + str.append(header, len); + + if (sctx->host) + { + str.append(' '); + str.append(sctx->host); + } + + if (sctx->ip) + { + str.append(' '); + str.append(sctx->ip); + } + + if (sctx->user) + { + str.append(' '); + str.append(sctx->user); + } + + if (thd->proc_info) + { + str.append(' '); + str.append(thd->proc_info); + } + + if (thd->query) + { + if (max_query_len < 1) + len= thd->query_length; + else + len= min(thd->query_length, max_query_len); + str.append('\n'); + str.append(thd->query, len); + } + if (str.c_ptr_safe() == buffer) + return buffer; + return thd->strmake(str.ptr(), str.length()); +} /* Pass nominal parameters to Statement constructor only to ensure that @@ -320,6 +396,7 @@ void THD::init(void) { pthread_mutex_lock(&LOCK_global_system_variables); variables= global_system_variables; + plugin_thdvar_init(this, false); variables.time_format= date_time_format_copy((THD*) 0, variables.time_format); variables.date_format= date_time_format_copy((THD*) 0, @@ -465,6 +542,7 @@ THD::~THD() cleanup(); ha_close_connection(this); + plugin_thdvar_cleanup(this); DBUG_PRINT("info", ("freeing security context")); main_security_ctx.destroy(); @@ -1682,7 +1760,7 @@ Statement::Statement(enum enum_state state_arg, ulong id_arg, :Query_arena(&main_mem_root, state_arg), id(id_arg), mark_used_columns(MARK_COLUMNS_READ), - lex(&main_lex), + main_lex(), lex(&main_lex), query(0), query_length(0), cursor(0) diff --git a/sql/sql_class.h b/sql/sql_class.h index 1f5f7aedbb4..08b5c772c8a 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -180,6 +180,20 @@ class Time_zone; struct system_variables { + /* + How dynamically allocated system variables are handled: + + The global_system_variables and max_system_variables are "authoritative" + They both should have the same 'version' and 'size'. + When attempting to access a dynamic variable, if the session version + is out of date, then the session version is updated and realloced if + neccessary and bytes copied from global to make up for missing data. + */ + ulong dynamic_variables_version; + char* dynamic_variables_ptr; + uint dynamic_variables_head; /* largest valid variable offset */ + uint dynamic_variables_size; /* how many bytes are in use */ + ulonglong myisam_max_extra_sort_file_size; ulonglong myisam_max_sort_file_size; ulonglong max_heap_table_size; @@ -245,8 +259,6 @@ struct system_variables my_bool new_mode; my_bool query_cache_wlock_invalidate; my_bool engine_condition_pushdown; - my_bool innodb_table_locks; - my_bool innodb_support_xa; my_bool ndb_force_send; my_bool ndb_use_copying_alter_table; my_bool ndb_use_exact_count; @@ -256,7 +268,7 @@ struct system_variables my_bool old_alter_table; my_bool old_passwords; - handlerton *table_type; + plugin_ref table_plugin; /* Only charset part of these variables is sensible */ CHARSET_INFO *character_set_filesystem; diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 09ee4962235..41b4c1b8e31 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -966,6 +966,7 @@ bool login_connection(THD *thd) void end_connection(THD *thd) { NET *net= &thd->net; + plugin_thdvar_cleanup(thd); if (thd->user_connect) decrease_user_connections(thd->user_connect); if (net->error && net->vio != 0 && net->report_error) @@ -1003,6 +1004,8 @@ void prepare_new_connection_state(THD* thd) if (thd->client_capabilities & CLIENT_COMPRESS) thd->net.compress=1; // Use compression + plugin_thdvar_init(thd, true); + thd->version= refresh_version; thd->proc_info= 0; thd->command= COM_SLEEP; diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index ea8c0e2d83e..2ce1486e278 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -868,7 +868,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) /* If it is a temporary table, close and regenerate it */ if (!dont_send_ok && (table= find_temporary_table(thd, table_list))) { - handlerton *table_type= table->s->db_type; + handlerton *table_type= table->s->db_type(); TABLE_SHARE *share= table->s; if (!ha_check_storage_engine_flag(table_type, HTON_CAN_RECREATE)) goto trunc_by_del; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 6f4cdbba3dd..f63aaf2d0fc 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3232,7 +3232,7 @@ void select_create::abort() { table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); - handlerton *table_type=table->s->db_type; + handlerton *table_type=table->s->db_type(); if (!table->s->tmp_table) { ulong version= table->s->version; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index af2929b6268..1c78aada405 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -172,6 +172,7 @@ void lex_start(THD *thd, const uchar *buf, uint length) lex->spcont= NULL; lex->proc_list.first= 0; lex->escape_used= FALSE; + lex->query_tables= 0; lex->reset_query_tables_list(FALSE); lex->expr_allows_subselect= TRUE; @@ -211,6 +212,12 @@ void lex_end(LEX *lex) lex->yacc_yyss= 0; lex->yacc_yyvs= 0; } + + /* release used plugins */ + plugin_unlock_list(0, (plugin_ref*)lex->plugins.buffer, + lex->plugins.elements); + reset_dynamic(&lex->plugins); + DBUG_VOID_RETURN; } @@ -1673,6 +1680,17 @@ void st_select_lex::print_limit(THD *thd, String *str) void Query_tables_list::reset_query_tables_list(bool init) { + if (!init && query_tables) + { + TABLE_LIST *table= query_tables; + for (;;) + { + delete table->view; + if (query_tables_last == &table->next_global || + !(table= table->next_global)) + break; + } + } query_tables= 0; query_tables_last= &query_tables; query_tables_own_last= 0; @@ -1727,6 +1745,10 @@ st_lex::st_lex() :result(0), yacc_yyss(0), yacc_yyvs(0), sql_command(SQLCOM_END) { + my_init_dynamic_array2(&plugins, sizeof(plugin_ref), + plugins_static_buffer, + INITIAL_LEX_PLUGIN_LIST_SIZE, + INITIAL_LEX_PLUGIN_LIST_SIZE); reset_query_tables_list(TRUE); } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 821af3f946d..415745eb2aa 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -952,6 +952,11 @@ typedef struct st_lex : public Query_tables_list XID *xid; gptr yacc_yyss,yacc_yyvs; THD *thd; + + /* maintain a list of used plugins for this LEX */ + DYNAMIC_ARRAY plugins; + plugin_ref plugins_static_buffer[INITIAL_LEX_PLUGIN_LIST_SIZE]; + CHARSET_INFO *charset, *underscore_charset; /* store original leaf_tables for INSERT SELECT and PS/SP */ TABLE_LIST *leaf_tables_insert; @@ -1155,6 +1160,8 @@ typedef struct st_lex : public Query_tables_list virtual ~st_lex() { destroy_query_tables_list(); + plugin_unlock_list(NULL, (plugin_ref *)plugins.buffer, plugins.elements); + delete_dynamic(&plugins); } inline void uncacheable(uint8 cause) diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index dbac53ed5f6..cb16a5fbcfd 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -784,9 +784,9 @@ static bool handle_list_of_fields(List_iterator it, } else { - if (table->s->db_type->partition_flags && - (table->s->db_type->partition_flags() & HA_USE_AUTO_PARTITION) && - (table->s->db_type->partition_flags() & HA_CAN_PARTITION)) + if (table->s->db_type()->partition_flags && + (table->s->db_type()->partition_flags() & HA_USE_AUTO_PARTITION) && + (table->s->db_type()->partition_flags() & HA_CAN_PARTITION)) { /* This engine can handle automatic partitioning and there is no @@ -1664,8 +1664,8 @@ bool fix_partition_func(THD *thd, TABLE *table, goto end; if (unlikely(check_primary_key(table))) goto end; - if (unlikely((!(table->s->db_type->partition_flags && - (table->s->db_type->partition_flags() & HA_CAN_PARTITION_UNIQUE))) && + if (unlikely((!(table->s->db_type()->partition_flags && + (table->s->db_type()->partition_flags() & HA_CAN_PARTITION_UNIQUE))) && check_unique_keys(table))) goto end; if (unlikely(set_up_partition_bitmap(thd, part_info))) @@ -1872,7 +1872,7 @@ static int add_keyword_int(File fptr, const char *keyword, longlong num) static int add_engine(File fptr, handlerton *engine_type) { - const char *engine_str= hton2plugin[engine_type->slot]->name.str; + const char *engine_str= ha_resolve_storage_engine_name(engine_type); DBUG_PRINT("info", ("ENGINE: %s", engine_str)); int err= add_string(fptr, "ENGINE = "); return err + add_string(fptr, engine_str); @@ -2185,8 +2185,8 @@ bool partition_key_modified(TABLE *table, const MY_BITMAP *fields) if (!part_info) DBUG_RETURN(FALSE); - if (table->s->db_type->partition_flags && - (table->s->db_type->partition_flags() & HA_CAN_UPDATE_PARTITION_KEY)) + if (table->s->db_type()->partition_flags && + (table->s->db_type()->partition_flags() & HA_CAN_UPDATE_PARTITION_KEY)) DBUG_RETURN(FALSE); for (fld= part_info->full_part_field_array; *fld; fld++) if (bitmap_is_set(fields, (*fld)->field_index)) @@ -4201,8 +4201,8 @@ uint prep_alter_part_table(THD *thd, TABLE *table, ALTER_INFO *alter_info, alter_info->no_parts= curr_part_no - new_part_no; } } - if (table->s->db_type->alter_table_flags && - (!(flags= table->s->db_type->alter_table_flags(alter_info->flags)))) + if (table->s->db_type()->alter_table_flags && + (!(flags= table->s->db_type()->alter_table_flags(alter_info->flags)))) { my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0)); DBUG_RETURN(1); @@ -4948,7 +4948,7 @@ the generated partition syntax in a correct manner. create_info->db_type= table->part_info->default_engine_type; } DBUG_PRINT("info", ("New engine type: %s", - hton2plugin[create_info->db_type->slot]->name.str)); + ha_resolve_storage_engine_name(create_info->db_type))); thd->work_part_info= NULL; *partition_changed= TRUE; } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index e3e24c1f375..06f687e779f 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -15,11 +15,21 @@ #include "mysql_priv.h" #include +#include #define REPORT_TO_LOG 1 #define REPORT_TO_USER 2 +#ifdef DBUG_OFF +#define plugin_ref_to_int(A) A +#define plugin_int_to_ref(A) A +#else +#define plugin_ref_to_int(A) (A ? A[0] : NULL) +#define plugin_int_to_ref(A) &(A) +#endif + extern struct st_mysql_plugin *mysqld_builtins[]; +char *opt_plugin_load= NULL; char *opt_plugin_dir_ptr; char opt_plugin_dir[FN_REFLEN]; /* @@ -85,25 +95,207 @@ static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]= static DYNAMIC_ARRAY plugin_dl_array; static DYNAMIC_ARRAY plugin_array; static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM]; -static rw_lock_t THR_LOCK_plugin; +/* we are always manipulating ref count, so a rwlock is unneccessary */ +static pthread_mutex_t LOCK_plugin; static bool initialized= 0; +static bool reap_needed= false; static int plugin_array_version=0; + +/* + write-lock on LOCK_system_variables_hash is required before modifying + the following variables/structures +*/ +static MEM_ROOT plugin_mem_root; +static uint global_variables_dynamic_size= 0; +static HASH bookmark_hash; + + +/* + hidden part of opaque value passed to variable check functions. + Used to provide a object-like structure to non C++ consumers. +*/ +struct st_item_value_holder : public st_mysql_value +{ + Item *item; +}; + + +/* + stored in bookmark_hash, this structure is never removed from the + hash and is used to mark a single offset for a thd local variable + even if plugins have been uninstalled and reinstalled, repeatedly. + This structure is allocated from plugin_mem_root. +*/ +struct st_bookmark +{ + char *name; + uint name_len; + int offset; + uint version; +}; + + +/* + skeleton of a plugin variable - portion of structure common to all. +*/ +struct st_mysql_sys_var +{ + MYSQL_PLUGIN_VAR_HEADER; +}; + + +/* + sys_var class for access to all plugin variables visible to the user +*/ +class sys_var_pluginvar: public sys_var +{ +public: + struct st_plugin_int *plugin; + struct st_mysql_sys_var *plugin_var; + + static void *operator new(size_t size, MEM_ROOT *mem_root) + { return (void*) alloc_root(mem_root, (uint) size); } + static void operator delete(void *ptr_arg,size_t size) + { TRASH(ptr_arg, size); } + + sys_var_pluginvar(const char *name_arg, + struct st_plugin_int *plugin_arg, + struct st_mysql_sys_var *plugin_var_arg) + :sys_var(name_arg), plugin(plugin_arg), plugin_var(plugin_var_arg) {} + sys_var_pluginvar *cast_pluginvar() { return this; } + bool is_readonly() const { return plugin_var->flags & PLUGIN_VAR_READONLY; } + bool check_type(enum_var_type type) + { return !(plugin_var->flags & PLUGIN_VAR_THDLOCAL) && type != OPT_GLOBAL; } + bool check_update_type(Item_result type); + SHOW_TYPE show_type(); + byte* real_value_ptr(THD *thd, enum_var_type type); + TYPELIB* plugin_var_typelib(void); + byte* value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); + bool check(THD *thd, set_var *var); + void set_default(THD *thd, enum_var_type type); + bool update(THD *thd, set_var *var); +}; + + /* prototypes */ -my_bool plugin_register_builtin(struct st_mysql_plugin *plugin); -void plugin_load(void); +static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv); +static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, + const char *list); +static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, + int *argc, char **argv, my_bool default_enabled); +static bool register_builtin(struct st_mysql_plugin *plugin, + struct st_plugin_int *tmp, + struct st_plugin_int **ptr); +static void cleanup_variables(THD *thd, struct system_variables *vars, + bool free_memory); +static void plugin_opt_set_limits(struct my_option *options, + const struct st_mysql_sys_var *opt); +#define my_intern_plugin_lock(A,B) intern_plugin_lock(A,B CALLER_INFO) +#define my_intern_plugin_lock_ci(A,B) intern_plugin_lock(A,B ORIG_CALLER_INFO) +static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref plugin + CALLER_INFO_PROTO); +static void intern_plugin_unlock(LEX *lex, plugin_ref plugin); +static void reap_plugins(void); + + +/* declared in set_var.cc */ +extern sys_var *intern_find_sys_var(const char *str, uint length, bool no_error); + + +/**************************************************************************** + Value type thunks, allows the C world to play in the C++ world +****************************************************************************/ + +static int item_value_type(struct st_mysql_value *value) +{ + switch (((st_item_value_holder*)value)->item->result_type()) { + case INT_RESULT: + return MYSQL_VALUE_TYPE_INT; + case REAL_RESULT: + return MYSQL_VALUE_TYPE_REAL; + default: + return MYSQL_VALUE_TYPE_STRING; + } +} + +static const char *item_val_str(struct st_mysql_value *value, + char *buffer, int *length) +{ + String str(buffer, *length, system_charset_info), *res; + if (!(res= ((st_item_value_holder*)value)->item->val_str(&str))) + return NULL; + *length= res->length(); + if (res->c_ptr_quick() == buffer) + return buffer; + + /* + Lets be nice and create a temporary string since the + buffer was too small + */ + return current_thd->strmake(res->c_ptr_quick(), res->length()); +} + + +static int item_val_int(struct st_mysql_value *value, void *buf, int intsize) +{ + Item *item= ((st_item_value_holder*)value)->item; + switch (intsize) { + case 1: + *(char*)buf= item->val_int(); + break; + case 2: + *(short*)buf= item->val_int(); + break; + case 4: + *(int*)buf= item->val_int(); + break; + case 8: + *(longlong*)buf= item->val_int(); + break; + default: + return -1; + } + if (item->is_null()) + return 1; + return 0; +} + + +static int item_val_real(struct st_mysql_value *value, void *buf, int realsize) +{ + Item *item= ((st_item_value_holder*)value)->item; + switch (realsize) { + case 8: + *(double*)buf= item->val_real(); + break; + case 4: + *(float*)buf= item->val_real(); + break; + default: + return -1; + } + if (item->is_null()) + return 1; + return 0; +} + + +/**************************************************************************** + Plugin support code +****************************************************************************/ #ifdef HAVE_DLOPEN static struct st_plugin_dl *plugin_dl_find(const LEX_STRING *dl) { uint i; + struct st_plugin_dl *tmp; DBUG_ENTER("plugin_dl_find"); for (i= 0; i < plugin_dl_array.elements; i++) { - struct st_plugin_dl *tmp= dynamic_element(&plugin_dl_array, i, - struct st_plugin_dl *); + tmp= dynamic_element(&plugin_dl_array, i, struct st_plugin_dl *); if (tmp->ref_count && ! my_strnncoll(files_charset_info, (const uchar *)dl->str, dl->length, @@ -117,11 +309,11 @@ static struct st_plugin_dl *plugin_dl_find(const LEX_STRING *dl) static st_plugin_dl *plugin_dl_insert_or_reuse(struct st_plugin_dl *plugin_dl) { uint i; + struct st_plugin_dl *tmp; DBUG_ENTER("plugin_dl_insert_or_reuse"); for (i= 0; i < plugin_dl_array.elements; i++) { - struct st_plugin_dl *tmp= dynamic_element(&plugin_dl_array, i, - struct st_plugin_dl *); + tmp= dynamic_element(&plugin_dl_array, i, struct st_plugin_dl *); if (! tmp->ref_count) { memcpy(tmp, plugin_dl, sizeof(struct st_plugin_dl)); @@ -147,6 +339,7 @@ static inline void free_plugin_mem(struct st_plugin_dl *p) my_free((gptr)p->plugins, MYF(MY_ALLOW_ZERO_PTR)); } + static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report) { #ifdef HAVE_DLOPEN @@ -334,6 +527,9 @@ static void plugin_dl_del(const LEX_STRING *dl) #ifdef HAVE_DLOPEN uint i; DBUG_ENTER("plugin_dl_del"); + + safe_mutex_assert_owner(&LOCK_plugin); + for (i= 0; i < plugin_dl_array.elements; i++) { struct st_plugin_dl *tmp= dynamic_element(&plugin_dl_array, i, @@ -363,6 +559,9 @@ static struct st_plugin_int *plugin_find_internal(const LEX_STRING *name, int ty DBUG_ENTER("plugin_find_internal"); if (! initialized) DBUG_RETURN(0); + + safe_mutex_assert_owner(&LOCK_plugin); + if (type == MYSQL_ANY_PLUGIN) { for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++) @@ -380,33 +579,105 @@ static struct st_plugin_int *plugin_find_internal(const LEX_STRING *name, int ty } -my_bool plugin_is_ready(const LEX_STRING *name, int type) +static SHOW_COMP_OPTION plugin_status(const LEX_STRING *name, int type) { - my_bool rc= FALSE; + SHOW_COMP_OPTION rc= SHOW_OPTION_NO; struct st_plugin_int *plugin; DBUG_ENTER("plugin_is_ready"); - rw_rdlock(&THR_LOCK_plugin); - if ((plugin= plugin_find_internal(name, type)) && - plugin->state == PLUGIN_IS_READY) - rc= TRUE; - rw_unlock(&THR_LOCK_plugin); + pthread_mutex_lock(&LOCK_plugin); + if ((plugin= plugin_find_internal(name, type))) + { + rc= SHOW_OPTION_DISABLED; + if (plugin->state == PLUGIN_IS_READY) + rc= SHOW_OPTION_YES; + } + pthread_mutex_unlock(&LOCK_plugin); DBUG_RETURN(rc); } -struct st_plugin_int *plugin_lock(const LEX_STRING *name, int type) +bool plugin_is_ready(const LEX_STRING *name, int type) { - struct st_plugin_int *rc; - DBUG_ENTER("plugin_lock"); - rw_wrlock(&THR_LOCK_plugin); - if ((rc= plugin_find_internal(name, type))) + bool rc= FALSE; + if (plugin_status(name, type) == SHOW_OPTION_YES) + rc= TRUE; + return rc; +} + + +SHOW_COMP_OPTION sys_var_have_plugin::get_option() +{ + LEX_STRING plugin_name= { (char *) plugin_name_str, plugin_name_len }; + return plugin_status(&plugin_name, plugin_type); +} + + +static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc CALLER_INFO_PROTO) +{ + st_plugin_int *pi= plugin_ref_to_int(rc); + DBUG_ENTER("intern_plugin_lock"); + + safe_mutex_assert_owner(&LOCK_plugin); + + if (pi->state & (PLUGIN_IS_READY | PLUGIN_IS_UNINITIALIZED)) { - if (rc->state & (PLUGIN_IS_READY | PLUGIN_IS_UNINITIALIZED)) - rc->ref_count++; - else - rc= 0; + plugin_ref plugin; +#ifdef DBUG_OFF + /* built-in plugins don't need ref counting */ + if (!pi->plugin_dl) + DBUG_RETURN(pi); + + plugin= pi; +#else + if (!(plugin= (plugin_ref) my_malloc_ci(sizeof(pi), MYF(MY_WME)))) + DBUG_RETURN(NULL); + //if (0x4620a20L == (long) plugin) + if (0x4656b10L == (long) plugin) + { + DBUG_PRINT("debug",("trap")); + } + + *plugin= pi; +#endif + pi->ref_count++; + DBUG_PRINT("info",("thd: 0x%lx, plugin: \"%s\", ref_count: %d", + (long) current_thd, pi->name.str, pi->ref_count)); + + if (lex) + insert_dynamic(&lex->plugins, (gptr)&plugin); + DBUG_RETURN(plugin); } - rw_unlock(&THR_LOCK_plugin); + DBUG_RETURN(NULL); +} + + +plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO) +{ + LEX *lex= NULL; + plugin_ref rc; + DBUG_ENTER("plugin_lock"); + if (thd) + lex= !thd->lex ? &thd->main_lex : thd->lex; + pthread_mutex_lock(&LOCK_plugin); + rc= my_intern_plugin_lock_ci(lex, *ptr); + pthread_mutex_unlock(&LOCK_plugin); + DBUG_RETURN(rc); +} + + +plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type + CALLER_INFO_PROTO) +{ + LEX *lex= NULL; + plugin_ref rc= NULL; + st_plugin_int *plugin; + DBUG_ENTER("plugin_lock"); + if (thd) + lex= !thd->lex ? &thd->main_lex : thd->lex; + pthread_mutex_lock(&LOCK_plugin); + if ((plugin= plugin_find_internal(name, type))) + rc= my_intern_plugin_lock_ci(lex, plugin_int_to_ref(plugin)); + pthread_mutex_unlock(&LOCK_plugin); DBUG_RETURN(rc); } @@ -431,7 +702,14 @@ static st_plugin_int *plugin_insert_or_reuse(struct st_plugin_int *plugin) struct st_plugin_int *)); } -static my_bool plugin_add(const LEX_STRING *name, const LEX_STRING *dl, int report) + +/* + NOTE + Requires that a write-lock is held on LOCK_system_variables_hash +*/ +static bool plugin_add(MEM_ROOT *tmp_root, + const LEX_STRING *name, const LEX_STRING *dl, + int *argc, char **argv, int report) { struct st_plugin_int tmp; struct st_mysql_plugin *plugin; @@ -477,14 +755,26 @@ static my_bool plugin_add(const LEX_STRING *name, const LEX_STRING *dl, int repo tmp.name.length= name_len; tmp.ref_count= 0; tmp.state= PLUGIN_IS_UNINITIALIZED; - if (! (tmp_plugin_ptr= plugin_insert_or_reuse(&tmp))) - goto err; - plugin_array_version++; - if (my_hash_insert(&plugin_hash[plugin->type], (byte*)tmp_plugin_ptr)) + + if (!test_plugin_options(tmp_root, &tmp, argc, argv, true)) { - tmp_plugin_ptr->state= PLUGIN_IS_FREED; - goto err; + if ((tmp_plugin_ptr= plugin_insert_or_reuse(&tmp))) + { + plugin_array_version++; + if (!my_hash_insert(&plugin_hash[plugin->type], (byte*)tmp_plugin_ptr)) + { + init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096); + DBUG_RETURN(FALSE); + } + tmp_plugin_ptr->state= PLUGIN_IS_FREED; + goto err; + } + mysql_del_sys_var_chain(tmp.system_vars); + plugin_dl_del(dl); + DBUG_RETURN(TRUE); } + /* plugin was disabled */ + plugin_dl_del(dl); DBUG_RETURN(FALSE); } } @@ -498,8 +788,14 @@ err: } -void plugin_deinitialize(struct st_plugin_int *plugin) +static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) { + /* + we don't want to hold the LOCK_plugin mutex as it may cause + deinitialization to deadlock if plugins have worker threads + with plugin locks + */ + safe_mutex_assert_not_owner(&LOCK_plugin); if (plugin->plugin->status_vars) { @@ -539,16 +835,29 @@ void plugin_deinitialize(struct st_plugin_int *plugin) } } plugin->state= PLUGIN_IS_UNINITIALIZED; + + /* + We do the check here because NDB has a worker THD which doesn't + exit until NDB is shut down. + */ + if (ref_check && plugin->ref_count) + sql_print_error("Plugin '%s' has ref_count=%d after deinitialization.", + plugin->name.str, plugin->ref_count); } static void plugin_del(struct st_plugin_int *plugin) { DBUG_ENTER("plugin_del(plugin)"); + safe_mutex_assert_owner(&LOCK_plugin); hash_delete(&plugin_hash[plugin->plugin->type], (byte*)plugin); plugin_dl_del(&plugin->plugin_dl->dl); plugin->state= PLUGIN_IS_FREED; plugin_array_version++; + rw_wrlock(&LOCK_system_variables_hash); + mysql_del_sys_var_chain(plugin->system_vars); + rw_unlock(&LOCK_system_variables_hash); + free_root(&plugin->mem_root, MYF(0)); DBUG_VOID_RETURN; } @@ -565,18 +874,120 @@ static void plugin_del(const LEX_STRING *name) #endif -void plugin_unlock(struct st_plugin_int *plugin) +static void reap_plugins(void) { - DBUG_ENTER("plugin_unlock"); - rw_wrlock(&THR_LOCK_plugin); - DBUG_ASSERT(plugin && plugin->ref_count); - plugin->ref_count--; - if (plugin->state == PLUGIN_IS_DELETED && ! plugin->ref_count) + uint count, idx; + struct st_plugin_int *plugin, **reap, **list; + + safe_mutex_assert_owner(&LOCK_plugin); + + if (!reap_needed) + return; + + reap_needed= false; + count= plugin_array.elements; + reap= (struct st_plugin_int **)my_alloca(sizeof(plugin)*(count+1)); + *(reap++)= NULL; + + for (idx= 0; idx < count; idx++) { - plugin_deinitialize(plugin); - plugin_del(plugin); + plugin= dynamic_element(&plugin_array, idx, struct st_plugin_int *); + if (plugin->state == PLUGIN_IS_DELETED && !plugin->ref_count) + { + /* change the status flag to prevent reaping by another thread */ + plugin->state= PLUGIN_IS_DYING; + *(reap++)= plugin; + } } - rw_unlock(&THR_LOCK_plugin); + + pthread_mutex_unlock(&LOCK_plugin); + + list= reap; + while ((plugin= *(--list))) + plugin_deinitialize(plugin, true); + + pthread_mutex_lock(&LOCK_plugin); + + while ((plugin= *(--reap))) + plugin_del(plugin); + + my_afree(reap); +} + +static void intern_plugin_unlock(LEX *lex, plugin_ref plugin) +{ + int i; + st_plugin_int *pi; + DBUG_ENTER("intern_plugin_unlock"); + + safe_mutex_assert_owner(&LOCK_plugin); + + if (!plugin) + DBUG_VOID_RETURN; + + pi= plugin_ref_to_int(plugin); + +#ifdef DBUG_OFF + if (!pi->plugin_dl) + DBUG_VOID_RETURN; +#else + *(long *) plugin= -1; /* salt the ground, we're debugging */ + my_free((gptr) plugin, MYF(MY_WME)); +#endif + + DBUG_PRINT("info",("unlocking plugin, name= %s, ref_count= %d", + pi->name.str, pi->ref_count)); + if (lex) + { + /* remove one instance of this plugin from the use list */ + for (i= lex->plugins.elements - 1; i >= 0; i--) + if (plugin == *dynamic_element(&lex->plugins, i, plugin_ref*)) + { + delete_dynamic_element(&lex->plugins, i); + break; + } + DBUG_ASSERT(i >= 0); + } + + DBUG_ASSERT(pi->ref_count); + pi->ref_count--; + + if (pi->state == PLUGIN_IS_DELETED && !pi->ref_count) + reap_needed= true; + + DBUG_VOID_RETURN; +} + + +void plugin_unlock(THD *thd, plugin_ref plugin) +{ + LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex) : NULL; + DBUG_ENTER("plugin_unlock"); + if (!plugin) + DBUG_VOID_RETURN; +#ifdef DBUG_OFF + /* built-in plugins don't need ref counting */ + if (!plugin_dlib(plugin)) + DBUG_VOID_RETURN; +#endif + pthread_mutex_lock(&LOCK_plugin); + intern_plugin_unlock(lex, plugin); + reap_plugins(); + pthread_mutex_unlock(&LOCK_plugin); + DBUG_VOID_RETURN; +} + + +void plugin_unlock_list(THD *thd, plugin_ref *list, uint count) +{ + LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex) : NULL; + DBUG_ENTER("plugin_unlock_list"); + DBUG_ASSERT(list); + pthread_mutex_lock(&LOCK_plugin); + while (count--) + intern_plugin_unlock(lex, *list++); + reap_plugins(); + pthread_mutex_unlock(&LOCK_plugin); DBUG_VOID_RETURN; } @@ -585,6 +996,8 @@ static int plugin_initialize(struct st_plugin_int *plugin) { DBUG_ENTER("plugin_initialize"); + safe_mutex_assert_owner(&LOCK_plugin); + if (plugin_type_initialize[plugin->plugin->type]) { if ((*plugin_type_initialize[plugin->plugin->type])(plugin)) @@ -626,12 +1039,29 @@ static int plugin_initialize(struct st_plugin_int *plugin) add_status_vars(plugin->plugin->status_vars); // add_status_vars makes a copy #endif /* FIX_LATER */ } + + /* + set the plugin attribute of plugin's sys vars so they are pointing + to the active plugin + */ + if (plugin->system_vars) + { + sys_var_pluginvar *var= plugin->system_vars->cast_pluginvar(); + for (;;) + { + var->plugin= plugin; + if (!var->next) + break; + var= var->next->cast_pluginvar(); + } + } DBUG_RETURN(0); err: DBUG_RETURN(1); } + static byte *get_hash_key(const byte *buff, uint *length, my_bool not_used __attribute__((unused))) { @@ -641,6 +1071,15 @@ static byte *get_hash_key(const byte *buff, uint *length, } +static byte *get_bookmark_hash_key(const byte *buff, uint *length, + my_bool not_used __attribute__((unused))) +{ + struct st_bookmark *var= (st_bookmark *)buff; + *length= var->name_len + 1; + return (byte*) var->name; +} + + /* The logic is that we first load and initialize all compiled in plugins. From there we load up the dynamic types (assuming we have not been told to @@ -648,17 +1087,28 @@ static byte *get_hash_key(const byte *buff, uint *length, Finally we inializie everything, aka the dynamic that have yet to initialize. */ -int plugin_init(int skip_dynamic_loading) +int plugin_init(int *argc, char **argv, int flags) { uint i; + bool def_enabled, is_myisam; struct st_mysql_plugin **builtins; struct st_mysql_plugin *plugin; + struct st_plugin_int tmp, *plugin_ptr, **reap; + MEM_ROOT tmp_root; DBUG_ENTER("plugin_init"); if (initialized) DBUG_RETURN(0); - my_rwlock_init(&THR_LOCK_plugin, NULL); + init_alloc_root(&plugin_mem_root, 4096, 4096); + init_alloc_root(&tmp_root, 4096, 4096); + + if (hash_init(&bookmark_hash, &my_charset_bin, 16, 0, 0, + get_bookmark_hash_key, NULL, HASH_UNIQUE)) + goto err; + + + pthread_mutex_init(&LOCK_plugin, MY_MUTEX_INIT_FAST); if (my_init_dynamic_array(&plugin_dl_array, sizeof(struct st_plugin_dl),16,16) || @@ -669,10 +1119,14 @@ int plugin_init(int skip_dynamic_loading) for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++) { if (hash_init(&plugin_hash[i], system_charset_info, 16, 0, 0, - get_hash_key, NULL, 0)) + get_hash_key, NULL, HASH_UNIQUE)) goto err; } + pthread_mutex_lock(&LOCK_plugin); + + initialized= 1; + /* First we register builtin plugins */ @@ -680,83 +1134,179 @@ int plugin_init(int skip_dynamic_loading) { for (plugin= *builtins; plugin->info; plugin++) { -// if (!(strcmp(plugin->name, "MyISAM"))) + /* by default, only ndbcluster is disabled */ + def_enabled= + my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0; + bzero(&tmp, sizeof(tmp)); + tmp.plugin= plugin; + + free_root(&tmp_root, MYF(MY_MARK_BLOCKS_FREE)); + if (test_plugin_options(&tmp_root, &tmp, argc, argv, def_enabled)) + continue; + + if (register_builtin(plugin, &tmp, &plugin_ptr)) + goto err_unlock; + + /* only initialize MyISAM and CSV at this stage */ + if (!(is_myisam= + !my_strcasecmp(&my_charset_latin1, plugin->name, "MyISAM")) && + my_strcasecmp(&my_charset_latin1, plugin->name, "CSV")) + continue; + + if (plugin_initialize(plugin_ptr)) + goto err_unlock; + + /* + initialize the global default storage engine so that it may + not be null in any child thread. + */ + if (is_myisam) { - if (plugin_register_builtin(plugin)) - goto err; - struct st_plugin_int *tmp= dynamic_element(&plugin_array, - plugin_array.elements-1, - struct st_plugin_int *); - if (plugin_initialize(tmp)) - goto err; + DBUG_ASSERT(!global_system_variables.table_plugin); + global_system_variables.table_plugin= (plugin_ref) + my_malloc(sizeof(plugin_ptr), MYF(MY_WME | MY_FAE)); + global_system_variables.table_plugin[0]= plugin_ptr; + plugin_ptr->ref_count++; + DBUG_ASSERT(plugin_ptr->ref_count == 1); } } } + + /* should now be set to MyISAM storage engine */ + DBUG_ASSERT(global_system_variables.table_plugin); + + pthread_mutex_unlock(&LOCK_plugin); /* Register all dynamic plugins */ - if (!skip_dynamic_loading) - plugin_load(); + if (!(flags & PLUGIN_INIT_SKIP_DYNAMIC_LOADING)) + { + if (opt_plugin_load && + plugin_load_list(&tmp_root, argc, argv, opt_plugin_load)) + goto err; + if (!(flags & PLUGIN_INIT_SKIP_PLUGIN_TABLE)) + plugin_load(&tmp_root, argc, argv); + } - initialized= 1; + if (flags & PLUGIN_INIT_SKIP_INITIALIZATION) + goto end; /* Now we initialize all remaining plugins */ + pthread_mutex_lock(&LOCK_plugin); + reap= (st_plugin_int **) my_alloca((plugin_array.elements+1) * sizeof(void*)); + *(reap++)= NULL; + for (i= 0; i < plugin_array.elements; i++) { - struct st_plugin_int *tmp= dynamic_element(&plugin_array, i, - struct st_plugin_int *); - if (tmp->state == PLUGIN_IS_UNINITIALIZED) + plugin_ptr= dynamic_element(&plugin_array, i, struct st_plugin_int *); + if (plugin_ptr->state == PLUGIN_IS_UNINITIALIZED) { - if (plugin_initialize(tmp)) + if (plugin_initialize(plugin_ptr)) { - plugin_deinitialize(tmp); - plugin_del(tmp); + plugin_ptr->state= PLUGIN_IS_DYING; + *(reap++)= plugin_ptr; } } } + /* + Check if any plugins have to be reaped + */ + while ((plugin_ptr= *(--reap))) + { + pthread_mutex_unlock(&LOCK_plugin); + plugin_deinitialize(plugin_ptr, true); + pthread_mutex_lock(&LOCK_plugin); + plugin_del(plugin_ptr); + } + + pthread_mutex_unlock(&LOCK_plugin); + my_afree(reap); + +end: + free_root(&tmp_root, MYF(0)); DBUG_RETURN(0); +err_unlock: + pthread_mutex_unlock(&LOCK_plugin); err: + free_root(&tmp_root, MYF(0)); DBUG_RETURN(1); } -my_bool plugin_register_builtin(struct st_mysql_plugin *plugin) +static bool register_builtin(struct st_mysql_plugin *plugin, + struct st_plugin_int *tmp, + struct st_plugin_int **ptr) { - struct st_plugin_int tmp; DBUG_ENTER("plugin_register_builtin"); - tmp.plugin= plugin; - tmp.name.str= (char *)plugin->name; - tmp.name.length= strlen(plugin->name); - tmp.state= PLUGIN_IS_UNINITIALIZED; + tmp->plugin= plugin; + tmp->name.str= (char *)plugin->name; + tmp->name.length= strlen(plugin->name); + tmp->state= PLUGIN_IS_UNINITIALIZED; + tmp->ref_count= 0; + tmp->plugin_dl= 0; - /* Cannot be unloaded */ - tmp.ref_count= 1; - tmp.plugin_dl= 0; - - if (insert_dynamic(&plugin_array, (gptr)&tmp)) + if (insert_dynamic(&plugin_array, (gptr)tmp)) DBUG_RETURN(1); - if (my_hash_insert(&plugin_hash[plugin->type], - (byte*)dynamic_element(&plugin_array, - plugin_array.elements - 1, - struct st_plugin_int *))) + *ptr= dynamic_element(&plugin_array, plugin_array.elements - 1, + struct st_plugin_int *); + + if (my_hash_insert(&plugin_hash[plugin->type],(byte*) *ptr)) DBUG_RETURN(1); DBUG_RETURN(0); } -void plugin_load(void) +/* + Register a plugin at run time. (note, this doesn't initialize a plugin) + + SYNOPSIS + plugin_register_builtin() + thd current thread (used to store scratch data in mem_root) + plugin static plugin to install + + RETURN + false - plugin registered successfully +*/ +bool plugin_register_builtin(THD *thd, struct st_mysql_plugin *plugin) +{ + struct st_plugin_int tmp, *ptr; + bool result= true; + int dummy_argc= 0; + DBUG_ENTER("plugin_register_builtin"); + + bzero(&tmp, sizeof(tmp)); + tmp.plugin= plugin; + + rw_wrlock(&LOCK_system_variables_hash); + + if (test_plugin_options(thd->mem_root, &tmp, &dummy_argc, NULL, true)) + goto end; + + if ((result= register_builtin(plugin, &tmp, &ptr))) + mysql_del_sys_var_chain(tmp.system_vars); + +end: + rw_unlock(&LOCK_system_variables_hash); + + DBUG_RETURN(result);; +} + + +/* + called only by plugin_init() +*/ +static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) { TABLE_LIST tables; TABLE *table; READ_RECORD read_record_info; int error; - MEM_ROOT mem; THD *new_thd; DBUG_ENTER("plugin_load"); @@ -766,7 +1316,6 @@ void plugin_load(void) delete new_thd; DBUG_VOID_RETURN; } - init_sql_alloc(&mem, 1024, 0); new_thd->thread_stack= (char*) &tables; new_thd->store_globals(); new_thd->db= my_strdup("mysql", MYF(0)); @@ -788,13 +1337,14 @@ void plugin_load(void) { DBUG_PRINT("info", ("init plugin record")); String str_name, str_dl; - get_field(&mem, table->field[0], &str_name); - get_field(&mem, table->field[1], &str_dl); + get_field(tmp_root, table->field[0], &str_name); + get_field(tmp_root, table->field[1], &str_dl); LEX_STRING name= {(char *)str_name.ptr(), str_name.length()}; LEX_STRING dl= {(char *)str_dl.ptr(), str_dl.length()}; - if (plugin_add(&name, &dl, REPORT_TO_LOG)) + free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); + if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) sql_print_warning("Couldn't load plugin named '%s' with soname '%s'.", str_name.c_ptr(), str_dl.c_ptr()); } @@ -803,7 +1353,6 @@ void plugin_load(void) end_read_record(&read_record_info); new_thd->version--; // Force close to free memory end: - free_root(&mem, MYF(0)); close_thread_tables(new_thd); delete new_thd; /* Remember that we don't have a THD */ @@ -812,46 +1361,195 @@ end: } +/* + called only by plugin_init() +*/ +static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, + const char *list) +{ + char buffer[FN_REFLEN]; + LEX_STRING name= {buffer, 0}, dl= {NULL, 0}, *str= &name; + struct st_plugin_dl *plugin_dl; + struct st_mysql_plugin *plugin; + char *p= buffer; + DBUG_ENTER("plugin_load_list"); + while (list) + { + if (p == buffer + sizeof(buffer) - 1) + break; + switch ((*(p++)= *(list++))) { + case '\0': + list= NULL; /* terminate the loop */ + /* fall through */ +#ifndef __WIN__ + case ':': /* can't use this as delimiter as it may be drive letter */ +#endif + case ';': + name.str[name.length]= '\0'; + if (str != &dl) // load all plugins in named module + { + dl= name; + if ((plugin_dl= plugin_dl_add(&dl, REPORT_TO_LOG))) + { + for (plugin= plugin_dl->plugins; plugin->info; plugin++) + { + name.str= (char *) plugin->name; + name.length= strlen(name.str); + + free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); + if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + goto error; + } + plugin_dl_del(&dl); // reduce ref count + } + } + else + { + free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); + if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + goto error; + } + name.length= dl.length= 0; + dl.str= NULL; name.str= p= buffer; + str= &name; + continue; + case '=': + case '#': + if (str == &name) + { + str= &dl; + str->str= p; + continue; + } + default: + str->length++; + continue; + } + } + DBUG_RETURN(FALSE); +error: + sql_print_error("Couldn't load plugin named '%s' with soname '%s'.", + name.str, dl.str); + DBUG_RETURN(TRUE); +} + + void plugin_shutdown(void) { - uint i; + uint i, count= plugin_array.elements; + struct st_plugin_int **plugins, *plugin; + struct st_plugin_dl **dl; DBUG_ENTER("plugin_shutdown"); - - /* - We loop through all plugins and call deinit() if they have one. - */ - for (i= 0; i < plugin_array.elements; i++) + + if (initialized) { - struct st_plugin_int *tmp= dynamic_element(&plugin_array, i, - struct st_plugin_int *); - plugin_deinitialize(tmp); + pthread_mutex_lock(&LOCK_plugin); + + cleanup_variables(NULL, &global_system_variables, false); + cleanup_variables(NULL, &max_system_variables, false); + + reap_needed= true; + + /* + We want to shut down plugins in a reasonable order, this will + become important when we have plugins which depend upon each other. + Circular references cannot be reaped so they are forced afterwards. + TODO: Have an additional step here to notify all active plugins that + shutdown is requested to allow plugins to deinitialize in parallel. + */ + while (reap_needed && (count= plugin_array.elements)) + { + for (i= 0; i < count; i++) + { + plugin= dynamic_element(&plugin_array, i, struct st_plugin_int *); + if (plugin->state == PLUGIN_IS_READY) + { + plugin->state= PLUGIN_IS_DELETED; + reap_needed= true; + } + } + reap_plugins(); + } + + plugins= (struct st_plugin_int **) my_alloca(sizeof(void*) * (count+1)); + + /* + If we have any plugins which did not die cleanly, we force shutdown + */ + for (i= 0; i < count; i++) + { + plugins[i]= dynamic_element(&plugin_array, i, struct st_plugin_int *); + /* change the state to ensure no reaping races */ + if (plugins[i]->state == PLUGIN_IS_DELETED) + plugins[i]->state= PLUGIN_IS_DYING; + } + pthread_mutex_unlock(&LOCK_plugin); + + /* + We loop through all plugins and call deinit() if they have one. + */ + for (i= 0; i < count; i++) + if (!(plugins[i]->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_FREED))) + { + sql_print_information("Plugin '%s' will be forced to shutdown", + plugins[i]->name.str); + plugin_deinitialize(plugins[i], false); + } + + pthread_mutex_lock(&LOCK_plugin); + + /* + We defer checking ref_counts until after all plugins are deinitialized + as some may have worker threads holding on to plugin references. + */ + for (i= 0; i < count; i++) + if (plugins[i]->ref_count) + sql_print_error("Plugin '%s' has ref_count=%d after shutdown.", + plugins[i]->name.str, plugins[i]->ref_count); + + for (i= 0; i < count; i++) + if (plugins[i]->state & PLUGIN_IS_UNINITIALIZED) + plugin_del(plugins[i]); + + cleanup_variables(NULL, &global_system_variables, true); + cleanup_variables(NULL, &max_system_variables, true); + + initialized= 0; + pthread_mutex_unlock(&LOCK_plugin); + pthread_mutex_destroy(&LOCK_plugin); } + my_afree(plugins); + /* Dispose of the memory */ + for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++) hash_free(&plugin_hash[i]); delete_dynamic(&plugin_array); + + count= plugin_dl_array.elements; + dl= (struct st_plugin_dl **)my_alloca(sizeof(void*) * count); + for (i= 0; i < count; i++) + dl[i]= dynamic_element(&plugin_dl_array, i, struct st_plugin_dl *); for (i= 0; i < plugin_dl_array.elements; i++) - { - struct st_plugin_dl *tmp= dynamic_element(&plugin_dl_array, i, - struct st_plugin_dl *); - free_plugin_mem(tmp); - } + free_plugin_mem(dl[i]); + my_afree(dl); delete_dynamic(&plugin_dl_array); - if (initialized) - { - initialized= 0; - rwlock_destroy(&THR_LOCK_plugin); - } + + hash_free(&bookmark_hash); + free_root(&plugin_mem_root, MYF(0)); + + global_variables_dynamic_size= 0; + DBUG_VOID_RETURN; } -my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl) +bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl) { TABLE_LIST tables; TABLE *table; - int error; + int error, argc=0; struct st_plugin_int *tmp; DBUG_ENTER("mysql_install_plugin"); @@ -861,14 +1559,17 @@ my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING if (check_table_access(thd, INSERT_ACL, &tables, 0)) DBUG_RETURN(TRUE); - /* need to open before acquiring THR_LOCK_plugin or it will deadlock */ + /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table = open_ltable(thd, &tables, TL_WRITE))) DBUG_RETURN(TRUE); - rw_wrlock(&THR_LOCK_plugin); - if (plugin_add(name, dl, REPORT_TO_USER)) - goto err; - tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN); + pthread_mutex_lock(&LOCK_plugin); + rw_wrlock(&LOCK_system_variables_hash); + error= plugin_add(thd->mem_root, name, dl, &argc, NULL, REPORT_TO_USER); + rw_unlock(&LOCK_system_variables_hash); + + if (error || !(tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN))) + goto err; if (plugin_initialize(tmp)) { @@ -888,18 +1589,19 @@ my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING goto deinit; } - rw_unlock(&THR_LOCK_plugin); + pthread_mutex_unlock(&LOCK_plugin); DBUG_RETURN(FALSE); deinit: - plugin_deinitialize(tmp); - plugin_del(tmp); + tmp->state= PLUGIN_IS_DELETED; + reap_needed= true; + reap_plugins(); err: - rw_unlock(&THR_LOCK_plugin); + pthread_mutex_unlock(&LOCK_plugin); DBUG_RETURN(TRUE); } -my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) +bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) { TABLE *table; TABLE_LIST tables; @@ -910,11 +1612,11 @@ my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) tables.db= (char *)"mysql"; tables.table_name= tables.alias= (char *)"plugin"; - /* need to open before acquiring THR_LOCK_plugin or it will deadlock */ + /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table= open_ltable(thd, &tables, TL_WRITE))) DBUG_RETURN(TRUE); - rw_wrlock(&THR_LOCK_plugin); + pthread_mutex_lock(&LOCK_plugin); if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN))) { my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str); @@ -928,17 +1630,14 @@ my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) goto err; } + plugin->state= PLUGIN_IS_DELETED; if (plugin->ref_count) - { push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, "Plugin is busy and will be uninstalled on shutdown"); - plugin->state= PLUGIN_IS_DELETED; - } else - { - plugin_deinitialize(plugin); - plugin_del(plugin); - } + reap_needed= true; + reap_plugins(); + pthread_mutex_unlock(&LOCK_plugin); table->use_all_columns(); table->field[0]->store(name->str, name->length, system_charset_info); @@ -951,17 +1650,17 @@ my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) if ((error= table->file->ha_delete_row(table->record[0]))) { table->file->print_error(error, MYF(0)); - goto err; + DBUG_RETURN(TRUE); } } - rw_unlock(&THR_LOCK_plugin); DBUG_RETURN(FALSE); err: - rw_unlock(&THR_LOCK_plugin); + pthread_mutex_unlock(&LOCK_plugin); DBUG_RETURN(TRUE); } -my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, + +bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, int type, uint state_mask, void *arg) { uint idx, total; @@ -969,16 +1668,19 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, int version=plugin_array_version; DBUG_ENTER("plugin_foreach_with_mask"); + if (!initialized) + DBUG_RETURN(FALSE); + state_mask= ~state_mask; // do it only once - rw_rdlock(&THR_LOCK_plugin); + pthread_mutex_lock(&LOCK_plugin); total= type == MYSQL_ANY_PLUGIN ? plugin_array.elements : plugin_hash[type].records; /* Do the alloca out here in case we do have a working alloca: leaving the nested stack frame invalidates alloca allocation. */ - plugins=(struct st_plugin_int **)my_alloca(total*sizeof(*plugins)); + plugins=(struct st_plugin_int **)my_alloca(total*sizeof(plugin)); if (type == MYSQL_ANY_PLUGIN) { for (idx= 0; idx < total; idx++) @@ -996,20 +1698,20 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, plugins[idx]= !(plugin->state & state_mask) ? plugin : NULL; } } - rw_unlock(&THR_LOCK_plugin); + pthread_mutex_unlock(&LOCK_plugin); for (idx= 0; idx < total; idx++) { if (unlikely(version != plugin_array_version)) { - rw_rdlock(&THR_LOCK_plugin); + pthread_mutex_lock(&LOCK_plugin); for (uint i=idx; i < total; i++) if (plugins[i] && plugins[i]->state & state_mask) plugins[i]=0; - rw_unlock(&THR_LOCK_plugin); + pthread_mutex_unlock(&LOCK_plugin); } plugin= plugins[idx]; - if (plugin && func(thd, plugin, arg)) + if (plugin && func(thd, plugin_int_to_ref(plugin), arg)) goto err; } @@ -1020,3 +1722,1320 @@ err: DBUG_RETURN(TRUE); } + +/**************************************************************************** + Internal type declarations for variables support +****************************************************************************/ + +#undef MYSQL_SYSVAR_NAME +#define MYSQL_SYSVAR_NAME(name) name +#define PLUGIN_VAR_TYPEMASK 0x007f + +#define EXTRA_OPTIONS 3 /* options for: 'foo', 'plugin-foo' and NULL */ + +typedef DECLARE_MYSQL_SYSVAR_BASIC(sysvar_bool_t, my_bool); +typedef DECLARE_MYSQL_THDVAR_BASIC(thdvar_bool_t, my_bool); +typedef DECLARE_MYSQL_SYSVAR_BASIC(sysvar_str_t, char *); +typedef DECLARE_MYSQL_THDVAR_BASIC(thdvar_str_t, char *); + +typedef DECLARE_MYSQL_SYSVAR_TYPELIB(sysvar_typelib_t); +typedef DECLARE_MYSQL_THDVAR_TYPELIB(thdvar_typelib_t); + +typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_int_t, int); +typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_long_t, long); +typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_longlong_t, longlong); +typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_uint_t, uint); +typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_ulong_t, ulong); +typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_ulonglong_t, ulonglong); + +typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_int_t, int); +typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_long_t, long); +typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_longlong_t, longlong); +typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_uint_t, uint); +typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_ulong_t, ulong); +typedef DECLARE_MYSQL_THDVAR_SIMPLE(thdvar_ulonglong_t, ulonglong); + +#define SET_PLUGIN_VAR_RESOLVE(opt)\ + *(mysql_sys_var_ptr_p*)&((opt)->resolve)= mysql_sys_var_ptr +typedef byte *(*mysql_sys_var_ptr_p)(void* a_thd, int offset); + + +/**************************************************************************** + default variable data check and update functions +****************************************************************************/ + +static int check_func_bool(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + char buff[STRING_BUFFER_USUAL_SIZE]; + const char *strvalue= "NULL", *str; + int result, length; + ulonglong tmp; + + if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) + { + length= sizeof(buff); + if (!(str= value->val_str(value, buff, &length)) || + (result= find_type(&bool_typelib, str, length, 1)-1) < 0) + { + if (str) + strvalue= str; + goto err; + } + } + else + { + if (value->val_int(value, &tmp, sizeof(tmp)) < 0) + goto err; + if (tmp > 1) + { + llstr(tmp, buff); + strvalue= buff; + goto err; + } + result= (int) tmp; + } + *(int*)save= -result; + return 0; +err: + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->name, strvalue); + return 1; +} + + +static int check_func_int(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + ulonglong tmp; + struct my_option options; + value->val_int(value, &tmp, sizeof(tmp)); + plugin_opt_set_limits(&options, var); + *(int *)save= (int) getopt_ull_limit_value(tmp, &options); + return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && + (*(int *)save != (int) tmp); +} + + +static int check_func_long(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + ulonglong tmp; + struct my_option options; + value->val_int(value, &tmp, sizeof(tmp)); + plugin_opt_set_limits(&options, var); + *(long *)save= (long) getopt_ull_limit_value(tmp, &options); + return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && + (*(long *)save != (long) tmp); +} + + +static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + ulonglong tmp; + struct my_option options; + value->val_int(value, &tmp, sizeof(tmp)); + plugin_opt_set_limits(&options, var); + *(ulonglong *)save= getopt_ull_limit_value(tmp, &options); + return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && + (*(ulonglong *)save != tmp); +} + +static int check_func_str(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + char buff[STRING_BUFFER_USUAL_SIZE]; + const char *str; + int length; + + length= sizeof(buff); + if ((str= value->val_str(value, buff, &length))) + str= thd->strmake(str, length); + *(const char**)save= str; + return 0; +} + + +static int check_func_enum(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + char buff[STRING_BUFFER_USUAL_SIZE]; + const char *strvalue= "NULL", *str; + TYPELIB *typelib; + ulonglong tmp; + long result; + int length; + + if (var->flags & PLUGIN_VAR_THDLOCAL) + typelib= ((thdvar_typelib_t*) var)->typelib; + else + typelib= ((sysvar_typelib_t*) var)->typelib; + + if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) + { + length= sizeof(buff); + if (!(str= value->val_str(value, buff, &length))) + goto err; + if ((result= find_type(typelib, str, length, 1)-1) < 0) + { + strvalue= str; + goto err; + } + } + else + { + if (value->val_int(value, &tmp, sizeof(tmp))) + goto err; + if (tmp >= typelib->count) + { + llstr(tmp, buff); + strvalue= buff; + goto err; + } + result= (long) tmp; + } + *(long*)save= result; + return 0; +err: + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->name, strvalue); + return 1; +} + + +static int check_func_set(THD *thd, struct st_mysql_sys_var *var, + void *save, st_mysql_value *value) +{ + char buff[STRING_BUFFER_USUAL_SIZE], *error= 0; + const char *strvalue= "NULL", *str; + TYPELIB *typelib; + long result; + ulonglong tmp; + uint error_len; + bool not_used; + int length; + + if (var->flags & PLUGIN_VAR_THDLOCAL) + typelib= ((thdvar_typelib_t*) var)->typelib; + else + typelib= ((sysvar_typelib_t*)var)->typelib; + + if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) + { + length= sizeof(buff); + if (!(str= value->val_str(value, buff, &length))) + goto err; + result= find_set(typelib, str, length, NULL, + &error, &error_len, ¬_used); + if (error_len) + { + strmake(buff, error, min(sizeof(buff), error_len)); + strvalue= buff; + goto err; + } + } + else + { + if (value->val_int(value, &tmp, sizeof(tmp))) + goto err; + if (unlikely((tmp >= (ULL(1) << typelib->count)) && + (typelib->count < sizeof(long)*8))) + { + llstr(tmp, buff); + strvalue= buff; + goto err; + } + result= (long) tmp; + } + *(long*)save= result; + return 0; +err: + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->name, strvalue); + return 1; +} + + +static void update_func_bool(THD *thd, struct st_mysql_sys_var *var, + void *tgt, void *save) +{ + *(my_bool *) tgt= *(int *) save ? 1 : 0; +} + + +static void update_func_int(THD *thd, struct st_mysql_sys_var *var, + void *tgt, void *save) +{ + *(int *)tgt= *(int *) save; +} + + +static void update_func_long(THD *thd, struct st_mysql_sys_var *var, + void *tgt, void *save) +{ + *(long *)tgt= *(long *) save; +} + + +static void update_func_longlong(THD *thd, struct st_mysql_sys_var *var, + void *tgt, void *save) +{ + *(longlong *)tgt= *(ulonglong *) save; +} + + +static void update_func_str(THD *thd, struct st_mysql_sys_var *var, + void *tgt, void *save) +{ + char *old= *(char **) tgt; + *(char **)tgt= *(char **) save; + if (var->flags & PLUGIN_VAR_MEMALLOC) + { + *(char **)tgt= my_strdup(*(char **) save, MYF(0)); + my_free(old, MYF(0)); + } +} + + +/**************************************************************************** + System Variables support +****************************************************************************/ + + +sys_var *find_sys_var(THD *thd, const char *str, uint length) +{ + sys_var *var; + sys_var_pluginvar *pi= NULL; + plugin_ref plugin; + DBUG_ENTER("find_sys_var"); + + rw_rdlock(&LOCK_system_variables_hash); + if ((var= intern_find_sys_var(str, length, false)) && + (pi= var->cast_pluginvar())) + { + LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex ) : NULL; + pthread_mutex_lock(&LOCK_plugin); + if (!(plugin= my_intern_plugin_lock(lex, plugin_int_to_ref(pi->plugin)))) + var= NULL; /* failed to lock it, it must be uninstalling */ + else + if (!(plugin_state(plugin) & PLUGIN_IS_READY)) + { + /* initialization not completed */ + var= NULL; + intern_plugin_unlock(lex, plugin); + } + pthread_mutex_unlock(&LOCK_plugin); + } + rw_unlock(&LOCK_system_variables_hash); + + /* + If the variable exists but the plugin it is associated with is not ready + then the intern_plugin_lock did not raise an error, so we do it here. + */ + if (pi && !var) + my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), (char*) str); + DBUG_RETURN(var); +} + + +/* + called by register_var, construct_options and test_plugin_options. + Returns the 'bookmark' for the named variable. + LOCK_system_variables_hash should be at least read locked +*/ +static st_bookmark *find_bookmark(const char *plugin, const char *name, + int flags) +{ + st_bookmark *result= NULL; + uint namelen, length, pluginlen= 0; + char *varname, *p; + + if (!(flags & PLUGIN_VAR_THDLOCAL)) + return NULL; + + namelen= strlen(name); + if (plugin) + pluginlen= strlen(plugin) + 1; + length= namelen + pluginlen + 2; + varname= (char*) my_alloca(length); + + if (plugin) + { + strxmov(varname + 1, plugin, "_", name, NullS); + for (p= varname + 1; *p; p++) + if (*p == '-') + *p= '_'; + } + else + memcpy(varname + 1, name, namelen + 1); + + varname[0]= flags & PLUGIN_VAR_TYPEMASK; + + result= (st_bookmark*) hash_search(&bookmark_hash, + (const byte*) varname, length - 1); + + my_afree(varname); + return result; +} + + +/* + returns a bookmark for thd-local variables, creating if neccessary. + returns null for non thd-local variables. + Requires that a write lock is obtained on LOCK_system_variables_hash +*/ +static st_bookmark *register_var(const char *plugin, const char *name, + int flags) +{ + uint length= strlen(plugin) + strlen(name) + 3, size= 0, offset, new_size; + st_bookmark *result; + char *varname, *p; + + if (!(flags & PLUGIN_VAR_THDLOCAL)) + return NULL; + + switch (flags & PLUGIN_VAR_TYPEMASK) { + case PLUGIN_VAR_BOOL: + size= sizeof(my_bool); + break; + case PLUGIN_VAR_INT: + size= sizeof(int); + break; + case PLUGIN_VAR_LONG: + size= sizeof(long); + break; + case PLUGIN_VAR_LONGLONG: + size= sizeof(ulonglong); + break; + case PLUGIN_VAR_STR: + size= sizeof(char*); + break; + default: + DBUG_ASSERT(0); + return NULL; + }; + + varname= ((char*) my_alloca(length)); + strxmov(varname + 1, plugin, "_", name, NullS); + for (p= varname + 1; *p; p++) + if (*p == '-') + *p= '_'; + + if (!(result= find_bookmark(NULL, varname + 1, flags))) + { + result= (st_bookmark*) alloc_root(&plugin_mem_root, + sizeof(struct st_bookmark) + length); + varname[0]= flags & PLUGIN_VAR_TYPEMASK; + result->name= (char *) memcpy(&result[1], varname, length); + result->name_len= length - 2; + result->offset= -1; + + DBUG_ASSERT(size && !(size & (size-1))); /* must be power of 2 */ + + offset= global_system_variables.dynamic_variables_size; + offset= (offset + size - 1) & ~(size - 1); + result->offset= (int) offset; + + new_size= (offset + size + 63) & ~63; + + if (new_size > global_variables_dynamic_size) + { + global_system_variables.dynamic_variables_ptr= + my_realloc(global_system_variables.dynamic_variables_ptr, new_size, + MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); + max_system_variables.dynamic_variables_ptr= + my_realloc(max_system_variables.dynamic_variables_ptr, new_size, + MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); + global_variables_dynamic_size= new_size; + } + + global_system_variables.dynamic_variables_head= offset; + max_system_variables.dynamic_variables_head= offset; + global_system_variables.dynamic_variables_size= offset + size; + max_system_variables.dynamic_variables_size= offset + size; + global_system_variables.dynamic_variables_version++; + max_system_variables.dynamic_variables_version++; + + result->version= global_system_variables.dynamic_variables_version; + + /* this should succeed because we have already checked if a dup exists */ + if (my_hash_insert(&bookmark_hash, (byte*) result)) + { + fprintf(stderr, "failed to add placeholder to hash"); + DBUG_ASSERT(0); + } + } + my_afree(varname); + return result; +} + + +/* + returns a pointer to the memory which holds the thd-local variable or + a pointer to the global variable if thd==null. + If required, will sync with global variables if the requested variable + has not yet been allocated in the current thread. +*/ +static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) +{ + DBUG_ASSERT(offset >= 0); + DBUG_ASSERT((uint)offset <= global_system_variables.dynamic_variables_head); + + if (!thd) + return (byte*) global_system_variables.dynamic_variables_ptr + offset; + + /* + dynamic_variables_size points to the largest valid offset + */ + if (!thd->variables.dynamic_variables_ptr || + (uint)offset > thd->variables.dynamic_variables_head) + { + uint idx; + + rw_rdlock(&LOCK_system_variables_hash); + + thd->variables.dynamic_variables_ptr= + my_realloc(thd->variables.dynamic_variables_ptr, + global_variables_dynamic_size, + MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); + + if (global_lock) + pthread_mutex_lock(&LOCK_global_system_variables); + + safe_mutex_assert_owner(&LOCK_global_system_variables); + + memcpy(thd->variables.dynamic_variables_ptr + + thd->variables.dynamic_variables_size, + global_system_variables.dynamic_variables_ptr + + thd->variables.dynamic_variables_size, + global_system_variables.dynamic_variables_size - + thd->variables.dynamic_variables_size); + if (global_lock) + pthread_mutex_unlock(&LOCK_global_system_variables); + + /* + now we need to iterate through any newly copied 'defaults' + and if it is a string type with MEMALLOC flag, we need to strdup + */ + for (idx= 0; idx < bookmark_hash.records; idx++) + { + sys_var_pluginvar *pi; + sys_var *var; + st_bookmark *v= (st_bookmark*) hash_element(&bookmark_hash,idx); + + if (v->version <= thd->variables.dynamic_variables_version || + !(var= intern_find_sys_var(v->name + 1, v->name_len, true)) || + !(pi= var->cast_pluginvar()) || + v->name[0] != (pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) + continue; + + /* Here we do anything special that may be required of the data types */ + + if ((pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR && + pi->plugin_var->flags & PLUGIN_VAR_MEMALLOC) + { + char **pp; + if (global_lock) + pthread_mutex_lock(&LOCK_global_system_variables); + pp= (char**) (thd->variables.dynamic_variables_ptr + + *(int*)(pi->plugin_var + 1)); + if ((*pp= *(char**) (global_system_variables.dynamic_variables_ptr + + *(int*)(pi->plugin_var + 1)))) + *pp= my_strdup(*pp, MYF(MY_WME|MY_FAE)); + if (global_lock) + pthread_mutex_unlock(&LOCK_global_system_variables); + } + } + + thd->variables.dynamic_variables_version= + global_system_variables.dynamic_variables_version; + thd->variables.dynamic_variables_head= + global_system_variables.dynamic_variables_head; + thd->variables.dynamic_variables_size= + global_system_variables.dynamic_variables_size; + + rw_unlock(&LOCK_system_variables_hash); + } + return (byte*)thd->variables.dynamic_variables_ptr + offset; +} + +static byte *mysql_sys_var_ptr(void* a_thd, int offset) +{ + return intern_sys_var_ptr((THD *)a_thd, offset, true); +} + + +void plugin_thdvar_init(THD *thd, bool lock_locals) +{ + /* we are going to allocate these lazily */ + thd->variables.dynamic_variables_version= 0; + thd->variables.dynamic_variables_size= 0; + thd->variables.dynamic_variables_ptr= 0; + + if (lock_locals) + { + DBUG_ASSERT(!(thd->variables.table_plugin)); + thd->variables.table_plugin= + my_plugin_lock(NULL, &global_system_variables.table_plugin); + } + else + { + thd->variables.table_plugin= NULL; + } +} + +static void cleanup_variables(THD *thd, struct system_variables *vars, + bool free_memory) +{ + st_bookmark *v; + sys_var_pluginvar *pivar; + sys_var *var; + int flags; + uint idx; + + rw_rdlock(&LOCK_system_variables_hash); + for (idx= 0; idx < bookmark_hash.records; idx++) + { + v= (st_bookmark*) hash_element(&bookmark_hash, idx); + if (v->version > vars->dynamic_variables_version || + !(var= intern_find_sys_var(v->name + 1, v->name_len, true)) || + !(pivar= var->cast_pluginvar()) || + v->name[0] != (pivar->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) + continue; + + flags= pivar->plugin_var->flags; + + if ((flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR && + flags & PLUGIN_VAR_THDLOCAL && flags & PLUGIN_VAR_MEMALLOC) + { + char **ptr= (char**) pivar->real_value_ptr(thd, OPT_SESSION); + my_free(*ptr, MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); + *ptr= NULL; + } + } + rw_unlock(&LOCK_system_variables_hash); + + intern_plugin_unlock(NULL, vars->table_plugin); + vars->table_plugin= NULL; + + if (free_memory) + { + my_free(vars->dynamic_variables_ptr, MYF(MY_ALLOW_ZERO_PTR)); + vars->dynamic_variables_ptr= NULL; + vars->dynamic_variables_size= 0; + vars->dynamic_variables_version= 0; + } +} + + +void plugin_thdvar_cleanup(THD *thd) +{ + uint idx; + plugin_ref *list; + DBUG_ENTER("plugin_thdvar_cleanup"); + + pthread_mutex_lock(&LOCK_plugin); + + cleanup_variables(thd, &thd->variables, true); + + if ((idx= thd->main_lex.plugins.elements)) + { + list= ((plugin_ref*) thd->main_lex.plugins.buffer) + idx - 1; + DBUG_PRINT("info",("unlocking %d plugins", idx)); + while ((char*) list >= thd->main_lex.plugins.buffer) + intern_plugin_unlock(NULL, *list--); + } + + reap_plugins(); + pthread_mutex_unlock(&LOCK_plugin); + + reset_dynamic(&thd->main_lex.plugins); + + DBUG_VOID_RETURN; +} + + +bool sys_var_pluginvar::check_update_type(Item_result type) +{ + if (is_readonly()) + return 1; + switch (plugin_var->flags & PLUGIN_VAR_TYPEMASK) { + case PLUGIN_VAR_INT: + case PLUGIN_VAR_LONG: + case PLUGIN_VAR_LONGLONG: + return type != INT_RESULT; + case PLUGIN_VAR_STR: + return type != STRING_RESULT; + default: + return 0; + } +} + + +SHOW_TYPE sys_var_pluginvar::show_type() +{ + switch (plugin_var->flags & PLUGIN_VAR_TYPEMASK) { + case PLUGIN_VAR_BOOL: + return SHOW_MY_BOOL; + case PLUGIN_VAR_INT: + return SHOW_INT; + case PLUGIN_VAR_LONG: + return SHOW_LONG; + case PLUGIN_VAR_LONGLONG: + return SHOW_LONGLONG; + case PLUGIN_VAR_STR: + return SHOW_CHAR_PTR; + case PLUGIN_VAR_ENUM: + case PLUGIN_VAR_SET: + return SHOW_CHAR; + default: + DBUG_ASSERT(0); + return SHOW_UNDEF; + } +} + + +byte* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) +{ + DBUG_ASSERT(thd); + if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) + { + if (type == OPT_GLOBAL) + thd= NULL; + + return intern_sys_var_ptr(thd, *(int*) (plugin_var+1), false); + } + return *(byte**) (plugin_var+1); +} + + +TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) +{ + int type= plugin_var->flags & PLUGIN_VAR_TYPEMASK; + if (type == PLUGIN_VAR_ENUM || type == PLUGIN_VAR_SET) + { + if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) + return ((thdvar_typelib_t *)plugin_var)->typelib; + else + return ((sysvar_typelib_t *)plugin_var)->typelib; + } + return NULL; +} + + +byte* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type, + LEX_STRING *base) +{ + byte* result; + + result= real_value_ptr(thd, type); + + if ((plugin_var->flags && PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_ENUM) + result= (byte*) get_type(plugin_var_typelib(), *(ulong*)result); + else + if ((plugin_var->flags && PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_SET) + { + char buffer[STRING_BUFFER_USUAL_SIZE]; + String str(buffer, sizeof(buffer), system_charset_info); + TYPELIB *typelib= plugin_var_typelib(); + ulong mask= 1, value= *(ulong*) result; + uint i; + + str.length(0); + for (i= 0; i < typelib->count; i++, mask<<=1) + { + if (!(value & mask)) + continue; + str.append(typelib->type_names[i], typelib->type_lengths[i]); + str.append(','); + } + + result= (byte*) ""; + if (str.length()) + result= (byte*) thd->strmake(str.ptr(), str.length()-1); + } + return result; +} + + +bool sys_var_pluginvar::check(THD *thd, set_var *var) +{ + st_item_value_holder value; + DBUG_ASSERT(is_readonly() || plugin_var->check); + + value.value_type= item_value_type; + value.val_str= item_val_str; + value.val_int= item_val_int; + value.val_real= item_val_real; + value.item= var->value; + + return is_readonly() || + plugin_var->check(thd, plugin_var, &var->save_result, &value); +} + + +void sys_var_pluginvar::set_default(THD *thd, enum_var_type type) +{ + void *tgt, *src; + + DBUG_ASSERT(is_readonly() || plugin_var->update); + + if (is_readonly()) + return; + + tgt= real_value_ptr(thd, type); + src= ((void **) (plugin_var + 1) + 1); + + if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) + { + src= ((int*) (plugin_var + 1) + 1); + if (type != OPT_GLOBAL) + src= real_value_ptr(thd, OPT_GLOBAL); + } + + /* thd must equal current_thd if PLUGIN_VAR_THDLOCAL flag is set */ + DBUG_ASSERT(!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || + thd == current_thd); + + if (!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || type == OPT_GLOBAL) + { + pthread_mutex_lock(&LOCK_plugin); + plugin_var->update(thd, plugin_var, tgt, src); + pthread_mutex_unlock(&LOCK_plugin); + } + else + plugin_var->update(thd, plugin_var, tgt, src); +} + + +bool sys_var_pluginvar::update(THD *thd, set_var *var) +{ + void *tgt; + + DBUG_ASSERT(is_readonly() || plugin_var->update); + + /* thd must equal current_thd if PLUGIN_VAR_THDLOCAL flag is set */ + DBUG_ASSERT(!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || + thd == current_thd); + + if (is_readonly()) + return 1; + + pthread_mutex_lock(&LOCK_global_system_variables); + tgt= real_value_ptr(thd, var->type); + + if (!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || var->type == OPT_GLOBAL) + { + /* variable we are updating has global scope, so we unlock after updating */ + plugin_var->update(thd, plugin_var, tgt, &var->save_result); + pthread_mutex_unlock(&LOCK_global_system_variables); + } + else + { + pthread_mutex_unlock(&LOCK_global_system_variables); + plugin_var->update(thd, plugin_var, tgt, &var->save_result); + } + return 0; +} + + +#define OPTION_SET_LIMITS(type, options, opt) \ + options->var_type= type; \ + options->def_value= (opt)->def_val; \ + options->min_value= (opt)->min_val; \ + options->max_value= (opt)->max_val; \ + options->block_size= (opt)->blk_sz + + +static void plugin_opt_set_limits(struct my_option *options, + const struct st_mysql_sys_var *opt) +{ + switch (opt->flags & (PLUGIN_VAR_TYPEMASK | + PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL)) { + /* global system variables */ + case PLUGIN_VAR_INT: + OPTION_SET_LIMITS(GET_INT, options, (sysvar_int_t*) opt); + break; + case PLUGIN_VAR_INT | PLUGIN_VAR_UNSIGNED: + OPTION_SET_LIMITS(GET_UINT, options, (sysvar_uint_t*) opt); + break; + case PLUGIN_VAR_LONG: + OPTION_SET_LIMITS(GET_LONG, options, (sysvar_long_t*) opt); + break; + case PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED: + OPTION_SET_LIMITS(GET_ULONG, options, (sysvar_ulong_t*) opt); + break; + case PLUGIN_VAR_LONGLONG: + OPTION_SET_LIMITS(GET_LL, options, (sysvar_longlong_t*) opt); + break; + case PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED: + OPTION_SET_LIMITS(GET_ULL, options, (sysvar_ulonglong_t*) opt); + break; + case PLUGIN_VAR_ENUM: + options->var_type= GET_ENUM; + options->typelib= ((sysvar_typelib_t*) opt)->typelib; + options->def_value= *(ulong*) ((int*) (opt + 1) + 1); + options->min_value= options->block_size= 0; + options->max_value= options->typelib->count - 1; + break; + case PLUGIN_VAR_SET: + options->var_type= GET_SET; + options->typelib= ((sysvar_typelib_t*) opt)->typelib; + options->def_value= *(ulong*) ((int*) (opt + 1) + 1); + options->min_value= options->block_size= 0; + options->max_value= (ULL(1) << options->typelib->count) - 1; + break; + case PLUGIN_VAR_BOOL: + options->var_type= GET_BOOL; + options->def_value= *(my_bool*) ((void**)(opt + 1) + 1); + break; + case PLUGIN_VAR_STR: + options->var_type= GET_STR; + break; + /* threadlocal variables */ + case PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL: + OPTION_SET_LIMITS(GET_INT, options, (thdvar_int_t*) opt); + break; + case PLUGIN_VAR_INT | PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL: + OPTION_SET_LIMITS(GET_UINT, options, (thdvar_uint_t*) opt); + break; + case PLUGIN_VAR_LONG | PLUGIN_VAR_THDLOCAL: + OPTION_SET_LIMITS(GET_LONG, options, (thdvar_long_t*) opt); + break; + case PLUGIN_VAR_LONG | PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL: + OPTION_SET_LIMITS(GET_ULONG, options, (thdvar_ulong_t*) opt); + break; + case PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL: + OPTION_SET_LIMITS(GET_LL, options, (thdvar_longlong_t*) opt); + break; + case PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL: + OPTION_SET_LIMITS(GET_ULL, options, (thdvar_ulonglong_t*) opt); + break; + case PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL: + options->var_type= GET_ENUM; + options->typelib= ((thdvar_typelib_t*) opt)->typelib; + options->def_value= *(ulong*) ((int*) (opt + 1) + 1); + options->min_value= options->block_size= 0; + options->max_value= options->typelib->count - 1; + break; + case PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL: + options->var_type= GET_SET; + options->typelib= ((thdvar_typelib_t*) opt)->typelib; + options->def_value= *(ulong*) ((int*) (opt + 1) + 1); + options->min_value= options->block_size= 0; + options->max_value= (ULL(1) << options->typelib->count) - 1; + break; + case PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL: + options->var_type= GET_BOOL; + options->def_value= *(my_bool*) ((int*) (opt + 1) + 1); + break; + case PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL: + options->var_type= GET_STR; + break; + default: + DBUG_ASSERT(0); + } + options->arg_type= REQUIRED_ARG; + if (opt->flags & PLUGIN_VAR_NOCMDARG) + options->arg_type= NO_ARG; + if (opt->flags & PLUGIN_VAR_OPCMDARG) + options->arg_type= OPT_ARG; +} + + +static my_bool get_one_option(int optid __attribute__((unused)), + const struct my_option *opt, + char *argument) +{ + return 0; +} + + +static int construct_options(MEM_ROOT *mem_root, + struct st_plugin_int *tmp, + my_option *options, + my_bool **enabled, bool can_disable) +{ + const char *plugin_name= tmp->plugin->name; + uint namelen= strlen(plugin_name), optnamelen; + uint buffer_length= namelen * 4 + (can_disable ? 75 : 10); + char *name= (char*) alloc_root(mem_root, buffer_length) + 1; + char *optname, *p; + int index= 0, offset= 0; + st_mysql_sys_var *opt, **plugin_option; + st_bookmark *v; + DBUG_ENTER("construct_options"); + + /* support --skip-plugin-foo syntax */ + memcpy(name, plugin_name, namelen + 1); + my_casedn_str(&my_charset_latin1, name); + strxmov(name + namelen + 1, "plugin-", name, NullS); + + for (p= name + namelen*2 + 8; p > name; p--) + if (*p == '_') + *p= '-'; + + if (can_disable) + { + strxmov(name + namelen*2 + 10, "Enable ", plugin_name, " plugin. " + "Disable with --skip-plugin-", name," (will save memory).", NullS); + + options[0].comment= name + namelen*2 + 10; + } + + *((my_bool *)(name -1))= **enabled; + *enabled= (my_bool *)(name - 1); + + + options[1].name= (options[0].name= name) + namelen + 1; + options[0].id= options[1].id= 256; /* must be >255. dup id ok */ + options[0].var_type= options[1].var_type= GET_BOOL; + options[0].arg_type= options[1].arg_type= NO_ARG; + options[0].def_value= options[1].def_value= **enabled; + options[0].value= options[0].u_max_value= + options[1].value= options[1].u_max_value= (gptr*) (name - 1); + options+= 2; + + /* + Two passes as the 2nd pass will take pointer addresses for use + by my_getopt and register_var() in the first pass uses realloc + */ + + for (plugin_option= tmp->plugin->system_vars; + plugin_option && *plugin_option; plugin_option++, index++) + { + opt= *plugin_option; + if (!(opt->flags & PLUGIN_VAR_THDLOCAL)) + continue; + if (!(register_var(name, opt->name, opt->flags))) + continue; + switch (opt->flags & PLUGIN_VAR_TYPEMASK) { + case PLUGIN_VAR_BOOL: + SET_PLUGIN_VAR_RESOLVE((thdvar_bool_t *) opt); + break; + case PLUGIN_VAR_INT: + SET_PLUGIN_VAR_RESOLVE((thdvar_int_t *) opt); + break; + case PLUGIN_VAR_LONG: + SET_PLUGIN_VAR_RESOLVE((thdvar_long_t *) opt); + break; + case PLUGIN_VAR_LONGLONG: + SET_PLUGIN_VAR_RESOLVE((thdvar_longlong_t *) opt); + break; + case PLUGIN_VAR_STR: + SET_PLUGIN_VAR_RESOLVE((thdvar_str_t *) opt); + break; + case PLUGIN_VAR_ENUM: + case PLUGIN_VAR_SET: + SET_PLUGIN_VAR_RESOLVE((thdvar_typelib_t *) opt); + break; + default: + sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", + opt->flags, tmp->plugin->name); + DBUG_RETURN(-1); + }; + } + + for (plugin_option= tmp->plugin->system_vars; + plugin_option && *plugin_option; plugin_option++, index++) + { + switch ((opt= *plugin_option)->flags & PLUGIN_VAR_TYPEMASK) { + case PLUGIN_VAR_BOOL: + if (!opt->check) + opt->check= check_func_bool; + if (!opt->update) + opt->update= update_func_bool; + break; + case PLUGIN_VAR_INT: + if (!opt->check) + opt->check= check_func_int; + if (!opt->update) + opt->update= update_func_int; + break; + case PLUGIN_VAR_LONG: + if (!opt->check) + opt->check= check_func_long; + if (!opt->update) + opt->update= update_func_long; + break; + case PLUGIN_VAR_LONGLONG: + if (!opt->check) + opt->check= check_func_longlong; + if (!opt->update) + opt->update= update_func_longlong; + break; + case PLUGIN_VAR_STR: + if (!opt->check) + opt->check= check_func_str; + if (!opt->update) + { + opt->update= update_func_str; + if (!(opt->flags & PLUGIN_VAR_MEMALLOC)) + opt->flags |= PLUGIN_VAR_READONLY; + } + break; + case PLUGIN_VAR_ENUM: + if (!opt->check) + opt->check= check_func_enum; + if (!opt->update) + opt->update= update_func_long; + break; + case PLUGIN_VAR_SET: + if (!opt->check) + opt->check= check_func_set; + if (!opt->update) + opt->update= update_func_long; + break; + default: + sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", + opt->flags, tmp->plugin->name); + DBUG_RETURN(-1); + } + + if (opt->flags & PLUGIN_VAR_NOCMDOPT) + continue; + + if (!opt->name) + { + sql_print_error("Missing variable name in plugin '%s'.", + tmp->plugin->name); + DBUG_RETURN(-1); + } + + if (!(v= find_bookmark(name, opt->name, opt->flags))) + { + optnamelen= strlen(opt->name); + optname= (char*) alloc_root(mem_root, namelen + optnamelen + 2); + strxmov(optname, name, "-", opt->name, NullS); + optnamelen= namelen + optnamelen + 1; + } + else + optname= memdup_root(mem_root, v->name + 1, (optnamelen= v->name_len) + 1); + + /* convert '_' to '-' */ + for (p= optname; *p; p++) + if (*p == '_') + *p= '-'; + + options->name= optname; + options->comment= opt->comment; + options->app_type= (long) opt; + options->id= (options-1)->id + 1; + + if (opt->flags & PLUGIN_VAR_THDLOCAL) + *(int*)(opt + 1)= offset= v->offset; + + plugin_opt_set_limits(options, opt); + + if ((opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_ENUM && + (opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_SET) + { + if (opt->flags & PLUGIN_VAR_THDLOCAL) + options->value= options->u_max_value= (gptr*) + (global_system_variables.dynamic_variables_ptr + offset); + else + options->value= options->u_max_value= *(gptr**) (opt + 1); + } + + options[1]= options[0]; + options[1].name= p= (char*) alloc_root(mem_root, optnamelen + 8); + options[1].comment= NULL; /* hide this option */ + strxmov(p, "plugin-", optname, NullS); + + options+= 2; + } + + DBUG_RETURN(0); +} + + +static my_option *construct_help_options(MEM_ROOT *mem_root, + struct st_plugin_int *p) +{ + st_mysql_sys_var **opt; + my_option *opts; + my_bool dummy; + my_bool *dummy2= &dummy; + uint count= EXTRA_OPTIONS; + DBUG_ENTER("construct_help_options"); + + for (opt= p->plugin->system_vars; opt && *opt; opt++, count++); + + if (!(opts= (my_option*) alloc_root(mem_root, sizeof(my_option) * count))) + DBUG_RETURN(NULL); + + bzero(opts, sizeof(my_option) * count); + + if (construct_options(mem_root, p, opts, &dummy2, FALSE)) + DBUG_RETURN(NULL); + + DBUG_RETURN(opts); +} + + +/* + SYNOPSIS + test_plugin_options() + tmp_root temporary scratch space + plugin internal plugin structure + argc user supplied arguments + argv user supplied arguments + default_enabled default plugin enable status + RETURNS: + 0 SUCCESS - plugin should be enabled/loaded + NOTE: + Requires that a write-lock is held on LOCK_system_variables_hash +*/ +static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, + int *argc, char **argv, my_bool default_enabled) +{ + struct sys_var_chain chain= { NULL, NULL }; + my_bool enabled_saved= default_enabled, can_disable; + my_bool *enabled= &default_enabled; + MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ? + &tmp->mem_root : &plugin_mem_root; + st_mysql_sys_var **opt; + my_option *opts; + char *p, *varname; + int error; + st_mysql_sys_var *o; + sys_var *v; + struct st_bookmark *var; + uint len, count= EXTRA_OPTIONS; + DBUG_ENTER("test_plugin_options"); + DBUG_ASSERT(tmp->plugin && tmp->plugin->name); + + for (opt= tmp->plugin->system_vars; opt && *opt; opt++) + count+= 2; /* --{plugin}-{optname} and --plugin-{plugin}-{optname} */ + + can_disable= + my_strcasecmp(&my_charset_latin1, tmp->plugin->name, "MyISAM") && + my_strcasecmp(&my_charset_latin1, tmp->plugin->name, "MEMORY"); + + if (count > EXTRA_OPTIONS || (*argc > 1)) + { + if (!(opts= (my_option*) alloc_root(tmp_root, sizeof(my_option) * count))) + { + sql_print_error("Out of memory for plugin '%s'.", tmp->plugin->name); + DBUG_RETURN(-1); + } + bzero(opts, sizeof(my_option) * count); + + if (construct_options(tmp_root, tmp, opts, &enabled, can_disable)) + { + sql_print_error("Bad options for plugin '%s'.", tmp->plugin->name); + DBUG_RETURN(-1); + } + + error= handle_options(argc, &argv, opts, get_one_option); + (*argc)++; /* add back one for the program name */ + + if (error) + { + sql_print_error("Parsing options for plugin '%s' failed.", + tmp->plugin->name); + DBUG_RETURN(error); + } + } + + if (!*enabled && !can_disable) + { + sql_print_warning("Plugin '%s' cannot be disabled", tmp->plugin->name); + *enabled= TRUE; + } + + if (*enabled) + { + for (opt= tmp->plugin->system_vars; opt && *opt; opt++) + { + if (((o= *opt)->flags & PLUGIN_VAR_NOSYSVAR)) + continue; + + if ((var= find_bookmark(tmp->plugin->name, o->name, o->flags))) + v= new (mem_root) sys_var_pluginvar(var->name + 1, tmp, o); + else + { + len= strlen(tmp->plugin->name) + strlen(o->name) + 2; + varname= (char*) alloc_root(mem_root, len); + strxmov(varname, tmp->plugin->name, "-", o->name, NullS); + my_casedn_str(&my_charset_latin1, varname); + + for (p= varname; *p; p++) + if (*p == '-') + *p= '_'; + + v= new (mem_root) sys_var_pluginvar(varname, tmp, o); + } + DBUG_ASSERT(v); /* check that an object was actually constructed */ + + v->chain_sys_var(&chain); + } + if (chain.first) + { + chain.last->next = NULL; + if (mysql_add_sys_var_chain(chain.first, NULL)) + { + sql_print_error("Plugin '%s' has conflicting system variables", + tmp->plugin->name); + DBUG_RETURN(1); + } + tmp->system_vars= chain.first; + } + DBUG_RETURN(0); + } + + if (enabled_saved) + sql_print_information("Plugin '%s' disabled by command line option", + tmp->plugin->name); + DBUG_RETURN(1); +} + + +/**************************************************************************** + Help Verbose text with Plugin System Variables +****************************************************************************/ + +static int option_cmp(my_option *a, my_option *b) +{ + return my_strcasecmp(&my_charset_latin1, a->name, b->name); +} + + +void my_print_help_inc_plugins(my_option *main_options, uint size) +{ + DYNAMIC_ARRAY all_options; + struct st_plugin_int *p; + MEM_ROOT mem_root; + my_option *opt; + + init_alloc_root(&mem_root, 4096, 4096); + my_init_dynamic_array(&all_options, sizeof(my_option), size, size/4); + + if (initialized) + for (uint idx= 0; idx < plugin_array.elements; idx++) + { + p= dynamic_element(&plugin_array, idx, struct st_plugin_int *); + + if (!p->plugin->system_vars || + !(opt= construct_help_options(&mem_root, p))) + continue; + + /* Only options with a non-NULL comment are displayed in help text */ + for (;opt->id; opt++) + if (opt->comment) + insert_dynamic(&all_options, (gptr) opt); + } + + for (;main_options->id; main_options++) + insert_dynamic(&all_options, (gptr) main_options); + + sort_dynamic(&all_options, (qsort_cmp) option_cmp); + + /* main_options now points to the empty option terminator */ + insert_dynamic(&all_options, (gptr) main_options); + + my_print_help((my_option*) all_options.buffer); + my_print_variables((my_option*) all_options.buffer); + + delete_dynamic(&all_options); + free_root(&mem_root, MYF(0)); +} + diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index d86d9332a92..b3293f3ebda 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -16,6 +16,17 @@ #ifndef _sql_plugin_h #define _sql_plugin_h +class sys_var; + +/* + the following flags are valid for plugin_init() +*/ +#define PLUGIN_INIT_SKIP_DYNAMIC_LOADING 1 +#define PLUGIN_INIT_SKIP_PLUGIN_TABLE 2 +#define PLUGIN_INIT_SKIP_INITIALIZATION 4 + +#define INITIAL_LEX_PLUGIN_LIST_SIZE 16 + /* the following #define adds server-only members to enum_mysql_show_type, that is defined in plugin.h @@ -41,6 +52,7 @@ typedef struct st_mysql_show_var SHOW_VAR; #define PLUGIN_IS_DELETED 2 #define PLUGIN_IS_UNINITIALIZED 4 #define PLUGIN_IS_READY 8 +#define PLUGIN_IS_DYING 16 /* A handle for the dynamic library containing a plugin or plugins. */ @@ -63,25 +75,57 @@ struct st_plugin_int uint state; uint ref_count; /* number of threads using the plugin */ void *data; /* plugin type specific, e.g. handlerton */ + MEM_ROOT mem_root; /* memory for dynamic plugin structures */ + sys_var *system_vars; /* server variables for this plugin */ }; +#ifdef DBUG_OFF +typedef struct st_plugin_int *plugin_ref; +#define plugin_decl(pi) ((pi)->plugin) +#define plugin_dlib(pi) ((pi)->plugin_dl) +#define plugin_data(pi,cast) ((cast)((pi)->data)) +#define plugin_name(pi) (&((pi)->name)) +#define plugin_state(pi) ((pi)->state) +#else +typedef struct st_plugin_int **plugin_ref; +#define plugin_decl(pi) ((pi)[0]->plugin) +#define plugin_dlib(pi) ((pi)[0]->plugin_dl) +#define plugin_data(pi,cast) ((cast)((pi)[0]->data)) +#define plugin_name(pi) (&((pi)[0]->name)) +#define plugin_state(pi) ((pi)[0]->state) +#endif + typedef int (*plugin_type_init)(struct st_plugin_int *); +extern char *opt_plugin_load; extern char *opt_plugin_dir_ptr; extern char opt_plugin_dir[FN_REFLEN]; extern const LEX_STRING plugin_type_names[]; -extern int plugin_init(int); + +extern int plugin_init(int *argc, char **argv, int init_flags); extern void plugin_shutdown(void); -extern my_bool plugin_is_ready(const LEX_STRING *name, int type); -extern st_plugin_int *plugin_lock(const LEX_STRING *name, int type); -extern void plugin_unlock(struct st_plugin_int *plugin); -extern my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl); -extern my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name); +extern void my_print_help_inc_plugins(struct my_option *options, uint size); +extern bool plugin_is_ready(const LEX_STRING *name, int type); +#define my_plugin_lock_by_name(A,B,C) plugin_lock_by_name(A,B,C CALLER_INFO) +#define my_plugin_lock_by_name_ci(A,B,C) plugin_lock_by_name(A,B,C ORIG_CALLER_INFO) +#define my_plugin_lock(A,B) plugin_lock(A,B CALLER_INFO) +#define my_plugin_lock_ci(A,B) plugin_lock(A,B ORIG_CALLER_INFO) +extern plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO); +extern plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, + int type CALLER_INFO_PROTO); +extern void plugin_unlock(THD *thd, plugin_ref plugin); +extern void plugin_unlock_list(THD *thd, plugin_ref *list, uint count); +extern bool mysql_install_plugin(THD *thd, const LEX_STRING *name, + const LEX_STRING *dl); +extern bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name); +extern bool plugin_register_builtin(struct st_mysql_plugin *plugin); +extern void plugin_thdvar_init(THD *thd, bool lock_locals); +extern void plugin_thdvar_cleanup(THD *thd); typedef my_bool (plugin_foreach_func)(THD *thd, - st_plugin_int *plugin, + plugin_ref plugin, void *arg); #define plugin_foreach(A,B,C,D) plugin_foreach_with_mask(A,B,C,PLUGIN_IS_READY,D) -extern my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, - int type, uint state_mask, void *arg); +extern bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, + int type, uint state_mask, void *arg); #endif diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 17163fb1940..589381ca61f 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1596,6 +1596,149 @@ int log_loaded_block(IO_CACHE* file) return 0; } +/* + Replication System Variables +*/ + +class sys_var_slave_skip_counter :public sys_var +{ +public: + sys_var_slave_skip_counter(sys_var_chain *chain, const char *name_arg) + :sys_var(name_arg) + { chain_sys_var(chain); } + bool check(THD *thd, set_var *var); + bool update(THD *thd, set_var *var); + bool check_type(enum_var_type type) { return type != OPT_GLOBAL; } + /* + We can't retrieve the value of this, so we don't have to define + type() or value_ptr() + */ +}; + +class sys_var_sync_binlog_period :public sys_var_long_ptr +{ +public: + sys_var_sync_binlog_period(sys_var_chain *chain, const char *name_arg, + ulong *value_ptr) + :sys_var_long_ptr(chain, name_arg,value_ptr) {} + bool update(THD *thd, set_var *var); +}; + +static sys_var_chain vars = { NULL, NULL }; + +static sys_var_bool_ptr sys_relay_log_purge(&vars, "relay_log_purge", + &relay_log_purge); +static sys_var_long_ptr sys_slave_net_timeout(&vars, "slave_net_timeout", + &slave_net_timeout); +static sys_var_long_ptr sys_slave_trans_retries(&vars, "slave_transaction_retries", + &slave_trans_retries); +static sys_var_sync_binlog_period sys_sync_binlog_period(&vars, "sync_binlog", &sync_binlog_period); +static sys_var_slave_skip_counter sys_slave_skip_counter(&vars, "sql_slave_skip_counter"); + +static int show_slave_skip_errors(THD *thd, SHOW_VAR *var, char *buff); + + +static SHOW_VAR fixed_vars[]= { + {"log_slave_updates", (char*) &opt_log_slave_updates, SHOW_MY_BOOL}, + {"relay_log_space_limit", (char*) &relay_log_space_limit, SHOW_LONGLONG}, + {"slave_load_tmpdir", (char*) &slave_load_tmpdir, SHOW_CHAR_PTR}, + {"slave_skip_errors", (char*) &show_slave_skip_errors, SHOW_FUNC}, +}; + +static int show_slave_skip_errors(THD *thd, SHOW_VAR *var, char *buff) +{ + var->type=SHOW_CHAR; + var->value= buff; + if (!use_slave_mask || bitmap_is_clear_all(&slave_error_mask)) + { + var->value= const_cast("OFF"); + } + else if (bitmap_is_set_all(&slave_error_mask)) + { + var->value= const_cast("ALL"); + } + else + { + /* 10 is enough assuming errors are max 4 digits */ + int i; + var->value= buff; + for (i= 1; + i < MAX_SLAVE_ERROR && + (buff - var->value) < SHOW_VAR_FUNC_BUFF_SIZE; + i++) + { + if (bitmap_is_set(&slave_error_mask, i)) + { + buff= int10_to_str(i, buff, 10); + *buff++= ','; + } + } + if (var->value != buff) + buff--; // Remove last ',' + if (i < MAX_SLAVE_ERROR) + buff= strmov(buff, "..."); // Couldn't show all errors + *buff=0; + } + return 0; +} + +bool sys_var_slave_skip_counter::check(THD *thd, set_var *var) +{ + int result= 0; + pthread_mutex_lock(&LOCK_active_mi); + pthread_mutex_lock(&active_mi->rli.run_lock); + if (active_mi->rli.slave_running) + { + my_message(ER_SLAVE_MUST_STOP, ER(ER_SLAVE_MUST_STOP), MYF(0)); + result=1; + } + pthread_mutex_unlock(&active_mi->rli.run_lock); + pthread_mutex_unlock(&LOCK_active_mi); + var->save_result.ulong_value= (ulong) var->value->val_int(); + return result; +} + + +bool sys_var_slave_skip_counter::update(THD *thd, set_var *var) +{ + pthread_mutex_lock(&LOCK_active_mi); + pthread_mutex_lock(&active_mi->rli.run_lock); + /* + The following test should normally never be true as we test this + in the check function; To be safe against multiple + SQL_SLAVE_SKIP_COUNTER request, we do the check anyway + */ + if (!active_mi->rli.slave_running) + { + pthread_mutex_lock(&active_mi->rli.data_lock); + active_mi->rli.slave_skip_counter= var->save_result.ulong_value; + pthread_mutex_unlock(&active_mi->rli.data_lock); + } + pthread_mutex_unlock(&active_mi->rli.run_lock); + pthread_mutex_unlock(&LOCK_active_mi); + return 0; +} + + +bool sys_var_sync_binlog_period::update(THD *thd, set_var *var) +{ + sync_binlog_period= (ulong) var->save_result.ulonglong_value; + return 0; +} + +int init_replication_sys_vars() +{ + mysql_append_static_vars(fixed_vars, sizeof(fixed_vars) / sizeof(SHOW_VAR)); + + if (mysql_add_sys_var_chain(vars.first, my_long_options)) + { + /* should not happen */ + fprintf(stderr, "failed to initialize replication system variables"); + unireg_abort(1); + } + return 0; +} + #endif /* HAVE_REPLICATION */ diff --git a/sql/sql_repl.h b/sql/sql_repl.h index b106391245d..da50d47c60d 100644 --- a/sql/sql_repl.h +++ b/sql/sql_repl.h @@ -67,6 +67,7 @@ typedef struct st_load_file_info } LOAD_FILE_INFO; int log_loaded_block(IO_CACHE* file); +int init_replication_sys_vars(); #endif /* HAVE_REPLICATION */ diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 75b3f5ae981..47495cb5ec3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9458,12 +9458,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, share->fields= field_count; /* If result table is small; use a heap */ + /* future: storage engine selection can be made dynamic? */ if (blob_count || using_unique_constraint || (select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) == OPTION_BIG_TABLES || (select_options & TMP_TABLE_FORCE_MYISAM)) { + share->db_plugin= ha_lock_engine(0, myisam_hton); table->file= get_new_handler(share, &table->mem_root, - share->db_type= myisam_hton); + share->db_type()); if (group && (param->group_parts > table->file->max_key_parts() || param->group_length > table->file->max_key_length())) @@ -9471,8 +9473,9 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, } else { + share->db_plugin= ha_lock_engine(0, heap_hton); table->file= get_new_handler(share, &table->mem_root, - share->db_type= heap_hton); + share->db_type()); } if (!table->file) goto err; @@ -9633,7 +9636,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, if (thd->variables.tmp_table_size == ~ (ulonglong) 0) // No limit share->max_rows= ~(ha_rows) 0; else - share->max_rows= (ha_rows) (((share->db_type == heap_hton) ? + share->max_rows= (ha_rows) (((share->db_type() == heap_hton) ? min(thd->variables.tmp_table_size, thd->variables.max_heap_table_size) : thd->variables.tmp_table_size) / @@ -9781,7 +9784,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, if (thd->is_fatal_error) // If end of memory goto err; /* purecov: inspected */ share->db_record_offset= 1; - if (share->db_type == myisam_hton) + if (share->db_type() == myisam_hton) { if (create_myisam_tmp_table(table,param,select_options)) goto err; @@ -10088,6 +10091,8 @@ free_tmp_table(THD *thd, TABLE *entry) if (entry->temp_pool_slot != MY_BIT_NONE) bitmap_lock_clear_bit(&temp_pool, entry->temp_pool_slot); + plugin_unlock(0, entry->s->db_plugin); + free_root(&own_root, MYF(0)); /* the table is allocated in its own root */ thd->proc_info=save_proc_info; @@ -10107,7 +10112,7 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param, int write_err; DBUG_ENTER("create_myisam_from_heap"); - if (table->s->db_type != heap_hton || + if (table->s->db_type() != heap_hton || error != HA_ERR_RECORD_FILE_FULL) { table->file->print_error(error,MYF(0)); @@ -10116,9 +10121,9 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param, new_table= *table; share= *table->s; new_table.s= &share; - new_table.s->db_type= myisam_hton; + new_table.s->db_plugin= ha_lock_engine(thd, myisam_hton); if (!(new_table.file= get_new_handler(&share, &new_table.mem_root, - myisam_hton))) + new_table.s->db_type()))) DBUG_RETURN(1); // End of memory save_proc_info=thd->proc_info; @@ -10176,9 +10181,12 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param, (void) table->file->delete_table(table->s->table_name.str); delete table->file; table->file=0; + plugin_unlock(0, table->s->db_plugin); + share.db_plugin= my_plugin_lock(0, &share.db_plugin); new_table.s= table->s; // Keep old share *table= new_table; *table->s= share; + table->file->change_table_ptr(table, table->s); table->use_all_columns(); if (save_proc_info) @@ -12761,7 +12769,7 @@ remove_duplicates(JOIN *join, TABLE *entry,List &fields, Item *having) free_io_cache(entry); // Safety entry->file->info(HA_STATUS_VARIABLE); - if (entry->s->db_type == heap_hton || + if (entry->s->db_type() == heap_hton || (!entry->s->blob_fields && ((ALIGN_SIZE(reclength) + HASH_OVERHEAD) * entry->file->stats.records < thd->variables.sortbuff_size))) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 250d9d917eb..17f9c516971 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -77,24 +77,24 @@ append_algorithm(TABLE_LIST *table, String *buff); ** List all table types supported ***************************************************************************/ -static my_bool show_handlerton(THD *thd, st_plugin_int *plugin, +static my_bool show_handlerton(THD *thd, plugin_ref plugin, void *arg) { handlerton *default_type= (handlerton *) arg; Protocol *protocol= thd->protocol; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if (!(hton->flags & HTON_HIDDEN)) { protocol->prepare_for_resend(); - protocol->store(plugin->name.str, plugin->name.length, + protocol->store(plugin_name(plugin)->str, plugin_name(plugin)->length, system_charset_info); const char *option_name= show_comp_option_name[(int) hton->state]; if (hton->state == SHOW_OPTION_YES && default_type == hton) option_name= "DEFAULT"; protocol->store(option_name, system_charset_info); - protocol->store(plugin->plugin->descr, system_charset_info); + protocol->store(plugin_decl(plugin)->descr, system_charset_info); protocol->store(hton->commit ? "YES" : "NO", system_charset_info); protocol->store(hton->prepare ? "YES" : "NO", system_charset_info); protocol->store(hton->savepoint_set ? "YES" : "NO", system_charset_info); @@ -122,7 +122,7 @@ bool mysqld_show_storage_engines(THD *thd) DBUG_RETURN(TRUE); if (plugin_foreach(thd, show_handlerton, - MYSQL_STORAGE_ENGINE_PLUGIN, thd->variables.table_type)) + MYSQL_STORAGE_ENGINE_PLUGIN, ha_default_handlerton(thd))) DBUG_RETURN(TRUE); send_eof(thd); @@ -134,24 +134,26 @@ static int make_version_string(char *buf, int buf_length, uint version) return my_snprintf(buf, buf_length, "%d.%d", version>>8,version&0xff); } -static my_bool show_plugins(THD *thd, st_plugin_int *plugin, +static my_bool show_plugins(THD *thd, plugin_ref plugin, void *arg) { TABLE *table= (TABLE*) arg; - struct st_mysql_plugin *plug= plugin->plugin; + struct st_mysql_plugin *plug= plugin_decl(plugin); + struct st_plugin_dl *plugin_dl= plugin_dlib(plugin); CHARSET_INFO *cs= system_charset_info; char version_buf[20]; restore_record(table, s->default_values); - table->field[0]->store(plugin->name.str, plugin->name.length, cs); + table->field[0]->store(plugin_name(plugin)->str, + plugin_name(plugin)->length, cs); table->field[1]->store(version_buf, make_version_string(version_buf, sizeof(version_buf), plug->version), cs); - switch (plugin->state) { + switch (plugin_state(plugin)) { /* case PLUGIN_IS_FREED: does not happen */ case PLUGIN_IS_DELETED: table->field[2]->store(STRING_WITH_LEN("DELETED"), cs); @@ -173,14 +175,13 @@ static my_bool show_plugins(THD *thd, st_plugin_int *plugin, make_version_string(version_buf, sizeof(version_buf), *(uint *)plug->info), cs); - if (plugin->plugin_dl) + if (plugin_dl) { - table->field[5]->store(plugin->plugin_dl->dl.str, - plugin->plugin_dl->dl.length, cs); + table->field[5]->store(plugin_dl->dl.str, plugin_dl->dl.length, cs); table->field[5]->set_notnull(); table->field[6]->store(version_buf, make_version_string(version_buf, sizeof(version_buf), - plugin->plugin_dl->version), + plugin_dl->version), cs); table->field[6]->set_notnull(); } @@ -1236,9 +1237,9 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, store_key_options(thd, packet, table, key_info); if (key_info->parser) { + LEX_STRING *parser_name= plugin_name(key_info->parser); packet->append(STRING_WITH_LEN(" /*!50100 WITH PARSER ")); - append_identifier(thd, packet, key_info->parser->name.str, - key_info->parser->name.length); + append_identifier(thd, packet, parser_name->str, parser_name->length); packet->append(STRING_WITH_LEN(" */ ")); } } @@ -1933,6 +1934,18 @@ void init_status_vars() sort_dynamic(&all_status_vars, show_var_cmp); } +void reset_status_vars() +{ + SHOW_VAR *ptr= (SHOW_VAR*) all_status_vars.buffer; + SHOW_VAR *last= ptr + all_status_vars.elements; + for (; ptr < last; ptr++) + { + /* Note that SHOW_LONG_NOFLUSH variables are not reset */ + if (ptr->type == SHOW_LONG) + *(ulong*) ptr->value= 0; + } +} + /* catch-all cleanup function, cleans up everything no matter what @@ -2063,6 +2076,8 @@ static bool show_status_array(THD *thd, const char *wild, char *value=var->value; const char *pos, *end; // We assign a lot of const's + pthread_mutex_lock(&LOCK_global_system_variables); + if (show_type == SHOW_SYS) { show_type= ((sys_var*) value)->show_type(); @@ -2145,6 +2160,9 @@ static bool show_status_array(THD *thd, const char *wild, system_charset_info); table->field[1]->store(pos, (uint32) (end - pos), system_charset_info); table->field[1]->set_notnull(); + + pthread_mutex_unlock(&LOCK_global_system_variables); + if (schema_table_store_record(thd, table)) DBUG_RETURN(TRUE); } @@ -2455,13 +2473,13 @@ struct st_add_schema_table const char *wild; }; -static my_bool add_schema_table(THD *thd, st_plugin_int *plugin, +static my_bool add_schema_table(THD *thd, plugin_ref plugin, void* p_data) { st_add_schema_table *data= (st_add_schema_table *)p_data; List *file_list= data->files; const char *wild= data->wild; - ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)plugin->data; + ST_SCHEMA_TABLE *schema_table= plugin_data(plugin, ST_SCHEMA_TABLE *); DBUG_ENTER("add_schema_table"); if (schema_table->hidden) @@ -2995,7 +3013,7 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables, ha_row_type[(uint) share->row_type], NullS); #ifdef WITH_PARTITION_STORAGE_ENGINE - if (show_table->s->db_type == partition_hton && + if (show_table->s->db_type() == partition_hton && show_table->part_info != NULL && show_table->part_info->no_parts > 0) ptr= strmov(ptr, " partitioned"); @@ -3270,19 +3288,20 @@ int fill_schema_charsets(THD *thd, TABLE_LIST *tables, COND *cond) } -static my_bool iter_schema_engines(THD *thd, st_plugin_int *plugin, +static my_bool iter_schema_engines(THD *thd, plugin_ref plugin, void *ptable) { TABLE *table= (TABLE *) ptable; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); const char *wild= thd->lex->wild ? thd->lex->wild->ptr() : NullS; CHARSET_INFO *scs= system_charset_info; DBUG_ENTER("iter_schema_engines"); if (!(hton->flags & HTON_HIDDEN)) { + LEX_STRING *name= plugin_name(plugin); if (!(wild && wild[0] && - wild_case_compare(scs, plugin->name.str,wild))) + wild_case_compare(scs, name->str,wild))) { LEX_STRING state[2]= {{ C_STRING_WITH_LEN("ENABLED") }, { C_STRING_WITH_LEN("DISABLED") }}; @@ -3291,11 +3310,11 @@ static my_bool iter_schema_engines(THD *thd, st_plugin_int *plugin, LEX_STRING *tmp; restore_record(table, s->default_values); - table->field[0]->store(plugin->name.str, plugin->name.length, scs); + table->field[0]->store(name->str, name->length, scs); tmp= &state[test(hton->state)]; table->field[1]->store(tmp->str, tmp->length, scs); - table->field[2]->store(plugin->plugin->descr, - strlen(plugin->plugin->descr), scs); + table->field[2]->store(plugin_decl(plugin)->descr, + strlen(plugin_decl(plugin)->descr), scs); tmp= &yesno[test(hton->commit)]; table->field[3]->store(tmp->str, tmp->length, scs); tmp= &yesno[test(hton->prepare)]; @@ -4464,10 +4483,10 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond) int res= 0; LEX *lex= thd->lex; const char *wild= lex->wild ? lex->wild->ptr() : NullS; - pthread_mutex_lock(&LOCK_global_system_variables); - res= show_status_array(thd, wild, init_vars, + rw_rdlock(&LOCK_system_variables_hash); + res= show_status_array(thd, wild, enumerate_sys_vars(thd, TRUE), lex->option_type, 0, "", tables->table, 0); - pthread_mutex_unlock(&LOCK_global_system_variables); + rw_unlock(&LOCK_system_variables_hash); DBUG_RETURN(res); } @@ -4583,12 +4602,12 @@ struct schema_table_ref 0 table not found 1 found the schema table */ -static my_bool find_schema_table_in_plugin(THD *thd, st_plugin_int *plugin, +static my_bool find_schema_table_in_plugin(THD *thd, plugin_ref plugin, void* p_table) { schema_table_ref *p_schema_table= (schema_table_ref *)p_table; const char* table_name= p_schema_table->table_name; - ST_SCHEMA_TABLE *schema_table= (ST_SCHEMA_TABLE *)plugin->data; + ST_SCHEMA_TABLE *schema_table= plugin_data(plugin, ST_SCHEMA_TABLE *); DBUG_ENTER("find_schema_table_in_plugin"); if (!my_strcasecmp(system_charset_info, @@ -5125,12 +5144,12 @@ struct run_hton_fill_schema_files_args COND *cond; }; -static my_bool run_hton_fill_schema_files(THD *thd, st_plugin_int *plugin, +static my_bool run_hton_fill_schema_files(THD *thd, plugin_ref plugin, void *arg) { struct run_hton_fill_schema_files_args *args= (run_hton_fill_schema_files_args *) arg; - handlerton *hton= (handlerton *)plugin->data; + handlerton *hton= plugin_data(plugin, handlerton *); if(hton->fill_files_table && hton->state == SHOW_OPTION_YES) hton->fill_files_table(hton, thd, args->tables, args->cond); return false; @@ -5296,10 +5315,10 @@ int fill_schema_global_variables(THD *thd, TABLE_LIST *tables, COND *cond) int res= 0; DBUG_ENTER("fill_schema_global_variables"); - pthread_mutex_lock(&LOCK_global_system_variables); - res= show_status_array(thd, "", init_vars, OPT_GLOBAL, + rw_rdlock(&LOCK_system_variables_hash); + res= show_status_array(thd, "", enumerate_sys_vars(thd, FALSE), OPT_GLOBAL, NULL, "", tables->table, 1); - pthread_mutex_unlock(&LOCK_global_system_variables); + rw_unlock(&LOCK_system_variables_hash); DBUG_RETURN(res); } @@ -5309,10 +5328,10 @@ int fill_schema_session_variables(THD *thd, TABLE_LIST *tables, COND *cond) int res= 0; DBUG_ENTER("fill_schema_session_variables"); - pthread_mutex_lock(&LOCK_global_system_variables); - res= show_status_array(thd, "", init_vars, OPT_SESSION, + rw_rdlock(&LOCK_system_variables_hash); + res= show_status_array(thd, "", enumerate_sys_vars(thd, FALSE), OPT_SESSION, NULL, "", tables->table, 1); - pthread_mutex_unlock(&LOCK_global_system_variables); + rw_unlock(&LOCK_system_variables_hash); DBUG_RETURN(res); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 36f0acd8f67..5998423790b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -662,16 +662,14 @@ static int execute_ddl_log_action(THD *thd, DDL_LOG_ENTRY *ddl_log_entry) frm_action= TRUE; else { - TABLE_SHARE dummy; - - hton= ha_resolve_by_name(thd, &handler_name); - if (!hton) + plugin_ref plugin= ha_resolve_by_name(thd, &handler_name); + if (!plugin) { my_error(ER_ILLEGAL_HA, MYF(0), ddl_log_entry->handler_name); goto error; } - bzero(&dummy, sizeof(TABLE_SHARE)); - file= get_new_handler(&dummy, &mem_root, hton); + hton= plugin_data(plugin, handlerton*); + file= get_new_handler((TABLE_SHARE*)0, &mem_root, hton); if (!file) { mem_alloc_error(sizeof(handler)); @@ -1635,7 +1633,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, TABLE_SHARE *share; table->db_type= NULL; if ((share= get_cached_table_share(table->db, table->table_name))) - table->db_type= share->db_type; + table->db_type= share->db_type(); /* Disable drop of enabled log tables */ if (share && share->log_table && @@ -5031,7 +5029,7 @@ static uint compare_tables(TABLE *table, List *create_list, See BUG#6236. */ if (table->s->fields != create_list->elements || - table->s->db_type != create_info->db_type || + table->s->db_type() != create_info->db_type || table->s->tmp_table || create_info->used_fields & HA_CREATE_USED_ENGINE || create_info->used_fields & HA_CREATE_USED_CHARSET || @@ -5490,7 +5488,7 @@ view_err: new_name= table_name; } - old_db_type= table->s->db_type; + old_db_type= table->s->db_type(); if (!create_info->db_type) { #ifdef WITH_PARTITION_STORAGE_ENGINE @@ -6002,7 +6000,7 @@ view_err: } if (thd->variables.old_alter_table - || (table->s->db_type != create_info->db_type) + || (table->s->db_type() != create_info->db_type) #ifdef WITH_PARTITION_STORAGE_ENGINE || partition_changed #endif @@ -6040,8 +6038,8 @@ view_err: uint *idx_p; uint *idx_end_p; - if (table->s->db_type->alter_table_flags) - alter_flags= table->s->db_type->alter_table_flags(alter_info->flags); + if (table->s->db_type()->alter_table_flags) + alter_flags= table->s->db_type()->alter_table_flags(alter_info->flags); DBUG_PRINT("info", ("alter_flags: %lu", alter_flags)); /* Check dropped indexes. */ for (idx_p= index_drop_buffer, idx_end_p= idx_p + index_drop_count; @@ -7066,7 +7064,7 @@ static bool check_engine(THD *thd, const char *table_name, if (create_info->used_fields & HA_CREATE_USED_ENGINE) { my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), - hton2plugin[(*new_engine)->slot]->name.str, "TEMPORARY"); + ha_resolve_storage_engine_name(*new_engine), "TEMPORARY"); *new_engine= 0; return TRUE; } diff --git a/sql/sql_tablespace.cc b/sql/sql_tablespace.cc index 84391a54642..b4a03a370ba 100644 --- a/sql/sql_tablespace.cc +++ b/sql/sql_tablespace.cc @@ -34,7 +34,7 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info) push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_WARN_USING_OTHER_HANDLER, ER(ER_WARN_USING_OTHER_HANDLER), - hton2plugin[hton->slot]->name.str, + ha_resolve_storage_engine_name(hton), ts_info->tablespace_name ? ts_info->tablespace_name : ts_info->logfile_group_name); } @@ -63,7 +63,7 @@ int mysql_alter_tablespace(THD *thd, st_alter_tablespace *ts_info) push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_ILLEGAL_HA_CREATE_OPTION, ER(ER_ILLEGAL_HA_CREATE_OPTION), - hton2plugin[hton->slot]->name.str, + ha_resolve_storage_engine_name(hton), "TABLESPACE or LOGFILE GROUP"); } if (mysql_bin_log.is_open()) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 9c062407921..b9eb9d9ffc9 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1043,7 +1043,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type interval_time_st -%type storage_engines +%type storage_engines known_storage_engine %type row_types @@ -1447,14 +1447,26 @@ create: lex->change=NullS; bzero((char*) &lex->create_info,sizeof(lex->create_info)); lex->create_info.options=$2 | $4; - lex->create_info.db_type= lex->thd->variables.table_type; + lex->create_info.db_type= ha_default_handlerton(thd); lex->create_info.default_table_charset= NULL; lex->name.str= 0; lex->name.length= 0; lex->like_name= 0; } create2 - { Lex->current_select= &Lex->select_lex; } + { + LEX *lex= YYTHD->lex; + lex->current_select= &lex->select_lex; + if (!lex->create_info.db_type) + { + lex->create_info.db_type= ha_default_handlerton(YYTHD); + push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WARN_USING_OTHER_HANDLER, + ER(ER_WARN_USING_OTHER_HANDLER), + ha_resolve_storage_engine_name(lex->create_info.db_type), + $5->table.str); + } + } | CREATE opt_unique_or_fulltext INDEX_SYM ident key_alg ON table_ident { @@ -3365,7 +3377,7 @@ opt_ts_comment: }; opt_ts_engine: - opt_storage ENGINE_SYM opt_equal storage_engines + opt_storage ENGINE_SYM opt_equal known_storage_engine { LEX *lex= Lex; if (lex->alter_tablespace_info->storage_engine != NULL) @@ -3533,6 +3545,13 @@ partitioning: { #ifdef WITH_PARTITION_STORAGE_ENGINE LEX *lex= Lex; + LEX_STRING partition_name={C_STRING_WITH_LEN("partition")}; + if (!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN)) + { + my_error(ER_FEATURE_DISABLED, MYF(0), + "partitioning", "--with-partition"); + YYABORT; + } lex->part_info= new partition_info(); if (!lex->part_info) { @@ -4046,7 +4065,7 @@ opt_part_option_list: opt_part_option: TABLESPACE opt_equal ident_or_text { Lex->part_info->curr_part_elem->tablespace_name= $3.str; } - | opt_storage ENGINE_SYM opt_equal storage_engines + | opt_storage ENGINE_SYM opt_equal known_storage_engine { LEX *lex= Lex; lex->part_info->curr_part_elem->engine_type= $4; @@ -4251,21 +4270,43 @@ default_collation: storage_engines: ident_or_text { - $$ = ha_resolve_by_name(YYTHD, &$1); - if ($$ == NULL) + LEX *lex= YYTHD->lex; + plugin_ref plugin; + + if ((plugin= ha_resolve_by_name(YYTHD, &$1))) + $$= plugin_data(plugin, handlerton*); + else if (YYTHD->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) { my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str); YYABORT; } else + if (lex->sql_command == SQLCOM_ALTER_TABLE) { - push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_ERROR, - ER_UNKNOWN_STORAGE_ENGINE, - ER(ER_UNKNOWN_STORAGE_ENGINE), $1.str); + TABLE_LIST *table= (TABLE_LIST *) lex->select_lex.table_list.first; + $$= ha_default_handlerton(YYTHD); + push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WARN_USING_OTHER_HANDLER, + ER(ER_WARN_USING_OTHER_HANDLER), + ha_resolve_storage_engine_name($$), + table->table_name); } }; +known_storage_engine: + ident_or_text + { + plugin_ref plugin; + if ((plugin= ha_resolve_by_name(YYTHD, &$1))) + $$= plugin_data(plugin, handlerton*); + else + { + my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str); + YYABORT; + } + }; + row_types: DEFAULT { $$= ROW_TYPE_DEFAULT; } | FIXED_SYM { $$= ROW_TYPE_FIXED; } @@ -8452,7 +8493,7 @@ show_param: if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS)) YYABORT; } - | ENGINE_SYM storage_engines + | ENGINE_SYM known_storage_engine { Lex->create_info.db_type= $2; } show_engine_param | ENGINE_SYM ALL @@ -10095,7 +10136,7 @@ sys_option_value: LEX *lex=Lex; lex->option_type= $1; lex->var_list.push_back(new set_var(lex->option_type, - find_sys_var("tx_isolation"), + find_sys_var(YYTHD, "tx_isolation"), &null_lex_str, new Item_int((int32) $5))); } @@ -10184,7 +10225,7 @@ internal_variable_name: if (!spc || !(spv = spc->find_variable(&$1))) { /* Not an SP local variable */ - sys_var *tmp=find_sys_var($1.str, $1.length); + sys_var *tmp=find_sys_var(YYTHD, $1.str, $1.length); if (!tmp) YYABORT; $$.var= tmp; @@ -10246,7 +10287,7 @@ internal_variable_name: } else { - sys_var *tmp=find_sys_var($3.str, $3.length); + sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length); if (!tmp) YYABORT; if (!tmp->is_struct()) @@ -10257,7 +10298,7 @@ internal_variable_name: } | DEFAULT '.' ident { - sys_var *tmp=find_sys_var($3.str, $3.length); + sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length); if (!tmp) YYABORT; if (!tmp->is_struct()) diff --git a/sql/structs.h b/sql/structs.h index 377d337dcfa..3c08b5a3de1 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -83,7 +83,11 @@ typedef struct st_key { */ union { +#ifdef DBUG_OFF struct st_plugin_int *parser; /* Fulltext [pre]parser */ +#else + struct st_plugin_int **parser; /* Fulltext [pre]parser */ +#endif LEX_STRING *parser_name; /* Fulltext [pre]parser name */ }; KEY_PART_INFO *key_part; diff --git a/sql/table.cc b/sql/table.cc index ed3cac85214..08acaa0304f 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -238,6 +238,9 @@ void free_table_share(TABLE_SHARE *share) pthread_cond_destroy(&share->cond); } hash_free(&share->name_hash); + + plugin_unlock(NULL, share->db_plugin); + share->db_plugin= NULL; /* We must copy mem_root from share because share is allocated through it */ memcpy((char*) &mem_root, (char*) &share->mem_root, sizeof(mem_root)); @@ -422,6 +425,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, Field **field_ptr, *reg_field; const char **interval_array; enum legacy_db_type legacy_db_type; + handlerton *hton; my_bitmap_map *bitmaps; DBUG_ENTER("open_binary_frm"); @@ -452,7 +456,11 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, DBUG_PRINT("info", ("default_part_db_type = %u", head[61])); #endif legacy_db_type= (enum legacy_db_type) (uint) *(head+3); - share->db_type= ha_checktype(thd, legacy_db_type, 0, 0); + if ((hton= ha_checktype(thd, legacy_db_type, 0, 0)) != share->db_type()) + { + plugin_unlock(NULL, share->db_plugin); + share->db_plugin= ha_lock_engine(NULL, hton); + } share->db_create_options= db_create_options= uint2korr(head+30); share->db_options_in_use= share->db_create_options; share->mysql_version= uint4korr(head+51); @@ -611,24 +619,38 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, { uint str_db_type_length= uint2korr(next_chunk); LEX_STRING name= { next_chunk + 2, str_db_type_length }; - handlerton *tmp_db_type= ha_resolve_by_name(thd, &name); - if (tmp_db_type != NULL) + plugin_ref tmp_plugin= ha_resolve_by_name(thd, &name); + if (tmp_plugin != NULL) { - share->db_type= tmp_db_type; + /* + tmp_plugin is locked with a local lock. + we unlock the old value of share->db_plugin before + replacing it with a globally locked version of tmp_plugin + */ + plugin_unlock(NULL, share->db_plugin); + share->db_plugin= my_plugin_lock(NULL, &tmp_plugin); DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)", str_db_type_length, next_chunk + 2, - ha_legacy_type(share->db_type))); + ha_legacy_type(share->db_type()))); } #ifdef WITH_PARTITION_STORAGE_ENGINE else { - if (!strncmp(next_chunk + 2, "partition", str_db_type_length)) + LEX_STRING pname= { C_STRING_WITH_LEN( "partition" ) }; + if (str_db_type_length == pname.length && + !strncmp(next_chunk + 2, pname.str, pname.length)) { - /* Use partition handler */ - share->db_type= partition_hton; + /* + Use partition handler + tmp_plugin is locked with a local lock. + we unlock the old value of share->db_plugin before + replacing it with a globally locked version of tmp_plugin + */ + plugin_unlock(NULL, share->db_plugin); + share->db_plugin= ha_lock_engine(NULL, partition_hton); DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)", str_db_type_length, next_chunk + 2, - ha_legacy_type(share->db_type))); + ha_legacy_type(share->db_type()))); } } #endif @@ -694,7 +716,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, } parser_name.str= next_chunk; parser_name.length= strlen(next_chunk); - keyinfo->parser= plugin_lock(&parser_name, MYSQL_FTPARSER_PLUGIN); + keyinfo->parser= my_plugin_lock_by_name(NULL, &parser_name, + MYSQL_FTPARSER_PLUGIN); if (! keyinfo->parser) { my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), parser_name.str); @@ -810,7 +833,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, /* Allocate handler */ if (!(handler_file= get_new_handler(share, thd->mem_root, - share->db_type))) + share->db_type()))) goto err; record= (char*) share->default_values-1; /* Fieldstart = 1 */ @@ -1344,7 +1367,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, /* Allocate handler */ if (!(outparam->file= get_new_handler(share, &outparam->mem_root, - share->db_type))) + share->db_type()))) goto err; error= 4; @@ -1628,7 +1651,7 @@ int closefrm(register TABLE *table, bool free_share) { if (key_info->flags & HA_USES_PARSER) { - plugin_unlock(key_info->parser); + plugin_unlock(NULL, key_info->parser); key_info->flags= 0; } } @@ -1839,10 +1862,10 @@ void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg) handler *file= 0; const char *datext= ""; - if (share->db_type != NULL) + if (share->db_type() != NULL) { if ((file= get_new_handler(share, current_thd->mem_root, - share->db_type))) + share->db_type()))) { if (!(datext= *file->bas_ext())) datext= ""; diff --git a/sql/table.h b/sql/table.h index fc2f25f3aa8..6dba46a535e 100644 --- a/sql/table.h +++ b/sql/table.h @@ -172,7 +172,12 @@ typedef struct st_table_share ulong timestamp_offset; /* Set to offset+1 of record */ ulong reclength; /* Recordlength */ - handlerton *db_type; /* table_type for handler */ + plugin_ref db_plugin; /* storage engine plugin */ + inline handlerton *db_type() const /* table_type for handler */ + { + // DBUG_ASSERT(db_plugin); + return db_plugin ? plugin_data(db_plugin, handlerton*) : NULL; + } enum row_type row_type; /* How rows are stored */ enum tmp_table_type tmp_table; diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 14ffe5da984..f5e8d92adb6 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1777,7 +1777,7 @@ int ha_federated::write_row(byte *buf) values_string.length(0); insert_string.length(0); insert_field_value_string.length(0); - statistic_increment(table->in_use->status_var.ha_write_count, &LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); @@ -2244,8 +2244,7 @@ int ha_federated::index_read_idx_with_result_set(byte *buf, uint index, *result= 0; // In case of errors index_string.length(0); sql_query.length(0); - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); sql_query.append(share->select_query); @@ -2359,8 +2358,7 @@ int ha_federated::read_range_next() int ha_federated::index_next(byte *buf) { DBUG_ENTER("ha_federated::index_next"); - statistic_increment(table->in_use->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); DBUG_RETURN(read_next(buf, stored_result)); } @@ -2561,8 +2559,7 @@ int ha_federated::rnd_pos(byte *buf, byte *pos) { int result; DBUG_ENTER("ha_federated::rnd_pos"); - statistic_increment(table->in_use->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); if (table->s->primary_key != MAX_KEY) { /* We have a primary key, so use index_read_idx to find row */ diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index cf11c9923eb..1d9a586f025 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -181,7 +181,7 @@ void ha_heap::update_key_stats() int ha_heap::write_row(byte * buf) { int res; - statistic_increment(table->in_use->status_var.ha_write_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); if (table->next_number_field && buf == table->record[0]) @@ -205,7 +205,7 @@ int ha_heap::write_row(byte * buf) int ha_heap::update_row(const byte * old_data, byte * new_data) { int res; - statistic_increment(table->in_use->status_var.ha_update_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_update_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); res= heap_update(file,old_data,new_data); @@ -224,7 +224,7 @@ int ha_heap::update_row(const byte * old_data, byte * new_data) int ha_heap::delete_row(const byte * buf) { int res; - statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_delete_count); res= heap_delete(file,buf); if (!res && table->s->tmp_table == NO_TMP_TABLE && ++records_changed*HEAP_STATS_UPDATE_THRESHOLD > file->s->records) @@ -242,8 +242,7 @@ int ha_heap::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error = heap_rkey(file,buf,active_index, key, key_len, find_flag); table->status = error ? STATUS_NOT_FOUND : 0; return error; @@ -252,8 +251,7 @@ int ha_heap::index_read(byte * buf, const byte * key, uint key_len, int ha_heap::index_read_last(byte *buf, const byte *key, uint key_len) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error= heap_rkey(file, buf, active_index, key, key_len, HA_READ_PREFIX_LAST); table->status= error ? STATUS_NOT_FOUND : 0; @@ -263,8 +261,7 @@ int ha_heap::index_read_last(byte *buf, const byte *key, uint key_len) int ha_heap::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error = heap_rkey(file, buf, index, key, key_len, find_flag); table->status = error ? STATUS_NOT_FOUND : 0; return error; @@ -273,8 +270,7 @@ int ha_heap::index_read_idx(byte * buf, uint index, const byte * key, int ha_heap::index_next(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); int error=heap_rnext(file,buf); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -283,8 +279,7 @@ int ha_heap::index_next(byte * buf) int ha_heap::index_prev(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); int error=heap_rprev(file,buf); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -293,8 +288,7 @@ int ha_heap::index_prev(byte * buf) int ha_heap::index_first(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); int error=heap_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -303,8 +297,7 @@ int ha_heap::index_first(byte * buf) int ha_heap::index_last(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_last_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); int error=heap_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -317,8 +310,7 @@ int ha_heap::rnd_init(bool scan) int ha_heap::rnd_next(byte *buf) { - statistic_increment(table->in_use->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); int error=heap_scan(file, buf); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -328,8 +320,7 @@ int ha_heap::rnd_pos(byte * buf, byte *pos) { int error; HEAP_PTR heap_position; - statistic_increment(table->in_use->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); memcpy_fixed((char*) &heap_position, pos, sizeof(HEAP_PTR)); error=heap_rrnd(file, buf, heap_position); table->status=error ? STATUS_NOT_FOUND: 0; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 14e93cca66f..5c079ca2c65 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -214,6 +214,17 @@ static handler *innobase_create_handler(handlerton *hton, static const char innobase_hton_name[]= "InnoDB"; + +static MYSQL_THDVAR_BOOL(support_xa, PLUGIN_VAR_OPCMDARG, + "Enable InnoDB support for the XA two-phase commit", + /* check_func */ NULL, /* update_func */ NULL, + /* default */ TRUE); + +static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG, + "Enable InnoDB locking in LOCK TABLES", + /* check_func */ NULL, /* update_func */ NULL, + /* default */ TRUE); + static handler *innobase_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root) @@ -396,7 +407,7 @@ innobase_release_temporary_latches( return 0; } - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = *(trx_t**) thd_ha_data(thd, hton); if (trx) { innobase_release_stat_resources(trx); @@ -576,78 +587,12 @@ innobase_mysql_print_thd( uint max_query_len) /* in: max query length to print, or 0 to use the default max length */ { - const THD* thd; - const Security_context *sctx; - const char* s; - - thd = (const THD*) input_thd; - /* We probably want to have original user as part of debug output. */ - sctx = &thd->main_security_ctx; - - - fprintf(f, "MySQL thread id %lu, query id %lu", - thd->thread_id, (ulong) thd->query_id); - if (sctx->host) { - putc(' ', f); - fputs(sctx->host, f); - } - - if (sctx->ip) { - putc(' ', f); - fputs(sctx->ip, f); - } - - if (sctx->user) { - putc(' ', f); - fputs(sctx->user, f); - } - - if ((s = thd->proc_info)) { - putc(' ', f); - fputs(s, f); - } - - if ((s = thd->query)) { - /* 3100 is chosen because currently 3000 is the maximum - max_query_len we ever give this. */ - char buf[3100]; - uint len; - - /* If buf is too small, we dynamically allocate storage - in this. */ - char* dyn_str = NULL; - - /* Points to buf or dyn_str. */ - char* str = buf; - - if (max_query_len == 0) { - /* ADDITIONAL SAFETY: the default is to print at - most 300 chars to reduce the probability of a - seg fault if there is a race in - thd->query_length in MySQL; after May 14, 2004 - probably no race any more, but better be - safe */ - max_query_len = 300; - } - - len = min(thd->query_length, max_query_len); - - if (len > (sizeof(buf) - 1)) { - dyn_str = my_malloc(len + 1, MYF(0)); - str = dyn_str; - } - - /* Use strmake to reduce the timeframe for a race, - compared to fwrite() */ - len = (uint) (strmake(str, s, len) - str); - putc('\n', f); - fwrite(str, 1, len, f); - - if (dyn_str) { - my_free(dyn_str, MYF(0)); - } - } + THD* thd; + char buffer[1024]; + thd = (THD*) input_thd; + fputs(thd_security_context(thd, buffer, sizeof(buffer), + max_query_len), f); putc('\n', f); } @@ -860,7 +805,7 @@ check_trx_exists( ut_ad(thd == current_thd); - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = *(trx_t**) thd_ha_data(thd, hton); if (trx == NULL) { DBUG_ASSERT(thd != NULL); @@ -872,9 +817,9 @@ check_trx_exists( /* Update the info whether we should skip XA steps that eat CPU time */ - trx->support_xa = (ibool)(thd->variables.innodb_support_xa); + trx->support_xa = THDVAR(thd, support_xa); - thd->ha_data[hton->slot] = trx; + *(trx_t**) thd_ha_data(thd, hton) = trx; } else { if (trx->magic_n != TRX_MAGIC_N) { mem_analyze_corruption(trx); @@ -883,13 +828,13 @@ check_trx_exists( } } - if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) { + if (thd_test_options(thd, OPTION_NO_FOREIGN_KEY_CHECKS)) { trx->check_foreigns = FALSE; } else { trx->check_foreigns = TRUE; } - if (thd->options & OPTION_RELAXED_UNIQUE_CHECKS) { + if (thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS)) { trx->check_unique_secondary = FALSE; } else { trx->check_unique_secondary = TRUE; @@ -977,7 +922,7 @@ innobase_register_trx_and_stmt( innobase_register_stmt(hton, thd); - if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { + if (thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { /* No autocommit mode, register for a transaction */ trans_register_ha(thd, TRUE, hton); @@ -1069,14 +1014,15 @@ innobase_query_caching_of_table_permitted( ut_a(full_name_len < 999); - if (thd->variables.tx_isolation == ISO_SERIALIZABLE) { + trx = check_trx_exists(legacy_innodb_hton, thd); + + if (trx->isolation_level == TRX_ISO_SERIALIZABLE) { /* In the SERIALIZABLE mode we add LOCK IN SHARE MODE to every plain SELECT if AUTOCOMMIT is not on. */ return((my_bool)FALSE); } - trx = check_trx_exists(legacy_innodb_hton, thd); if (trx->has_search_latch) { ut_print_timestamp(stderr); sql_print_error("The calling thread is holding the adaptive " @@ -1090,7 +1036,7 @@ innobase_query_caching_of_table_permitted( innobase_release_stat_resources(trx); - if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { + if (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { is_autocommit = TRUE; } else { @@ -1344,7 +1290,7 @@ innobase_init(void *p) handlerton *innobase_hton= (handlerton *)p; legacy_innodb_hton= innobase_hton; - innobase_hton->state=have_innodb; + innobase_hton->state= SHOW_OPTION_YES; innobase_hton->db_type= DB_TYPE_INNODB; innobase_hton->savepoint_offset=sizeof(trx_named_savept_t); innobase_hton->close_connection=innobase_close_connection; @@ -1369,8 +1315,13 @@ innobase_init(void *p) innobase_hton->flags=HTON_NO_FLAGS; innobase_hton->release_temporary_latches=innobase_release_temporary_latches; - if (have_innodb != SHOW_OPTION_YES) - DBUG_RETURN(0); // nothing else to do +#ifdef HAVE_LARGE_PAGES + if (my_use_large_pages) + { + innobase_use_large_pages= 1; + innobase_large_page_size= opt_large_page_size; + } +#endif ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR); @@ -1611,7 +1562,6 @@ innobase_init(void *p) DBUG_RETURN(FALSE); error: - have_innodb= SHOW_OPTION_DISABLED; // If we couldn't use handler DBUG_RETURN(TRUE); } @@ -1754,7 +1704,7 @@ innobase_commit( trx = check_trx_exists(hton, thd); /* Update the info whether we should skip XA steps that eat CPU time */ - trx->support_xa = (ibool)(thd->variables.innodb_support_xa); + trx->support_xa = THDVAR(thd, support_xa); /* Release a possible FIFO ticket and search latch. Since we will reserve the kernel mutex, we have to release the search system latch @@ -1786,7 +1736,7 @@ innobase_commit( " trx->conc_state != TRX_NOT_STARTED"); } if (all - || (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) { + || (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { /* We were instructed to commit the whole transaction, or this is an SQL statement end and autocommit is on */ @@ -1948,7 +1898,7 @@ innobase_commit_complete( { trx_t* trx; - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = *(trx_t**) thd_ha_data(thd, hton); if (trx && trx->active_trans) { @@ -1987,7 +1937,7 @@ innobase_rollback( trx = check_trx_exists(hton, thd); /* Update the info whether we should skip XA steps that eat CPU time */ - trx->support_xa = (ibool)(thd->variables.innodb_support_xa); + trx->support_xa = THDVAR(thd, support_xa); /* Release a possible FIFO ticket and search latch. Since we will reserve the kernel mutex, we have to release the search system latch @@ -2004,7 +1954,7 @@ innobase_rollback( } if (all - || (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) { + || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { error = trx_rollback_for_mysql(trx); trx->active_trans = 0; @@ -2136,7 +2086,7 @@ innobase_savepoint( (unless we are in sub-statement), so SQL layer ensures that this method is never called in such situation. */ - DBUG_ASSERT(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) || + DBUG_ASSERT(thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) || thd->in_sub_stmt); trx = check_trx_exists(hton, thd); @@ -2172,7 +2122,7 @@ innobase_close_connection( { trx_t* trx; - trx = (trx_t*)thd->ha_data[hton->slot]; + trx = *(trx_t**) thd_ha_data(thd, hton); ut_a(trx); @@ -2361,7 +2311,7 @@ ha_innobase::open( DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); } - if (ib_table->ibd_file_missing && !thd->tablespace_op) { + if (ib_table->ibd_file_missing && !thd_tablespace_op(thd)) { ut_print_timestamp(stderr); sql_print_error("MySQL is trying to open a table handle but " "the .ibd file for\ntable %s does not exist.\n" @@ -3270,11 +3220,11 @@ ha_innobase::write_row( DBUG_ENTER("ha_innobase::write_row"); if (prebuilt->trx != - (trx_t*) current_thd->ha_data[ht->slot]) { + *(trx_t**) ha_data()) { sql_print_error("The transaction object for the table handle is at " "%p, but for the current thread it is at %p", prebuilt->trx, - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); fputs("InnoDB: Dump of 200 bytes around prebuilt: ", stderr); ut_print_buf(stderr, ((const byte*)prebuilt) - 100, 200); @@ -3282,22 +3232,21 @@ ha_innobase::write_row( "InnoDB: Dump of 200 bytes around transaction.all: ", stderr); ut_print_buf(stderr, - ((byte*)(&(current_thd->ha_data[ht->slot]))) - 100, + ((byte*)(*(trx_t**) ha_data())) - 100, 200); putc('\n', stderr); ut_error; } - statistic_increment(current_thd->status_var.ha_write_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); - if ((user_thd->lex->sql_command == SQLCOM_ALTER_TABLE - || user_thd->lex->sql_command == SQLCOM_OPTIMIZE - || user_thd->lex->sql_command == SQLCOM_CREATE_INDEX - || user_thd->lex->sql_command == SQLCOM_DROP_INDEX) + if ((ha_sql_command() == SQLCOM_ALTER_TABLE + || ha_sql_command() == SQLCOM_OPTIMIZE + || ha_sql_command() == SQLCOM_CREATE_INDEX + || ha_sql_command() == SQLCOM_DROP_INDEX) && num_write_row >= 10000) { /* ALTER TABLE is COMMITted at every 10000 copied rows. The IX table lock for the original table has to be re-issued. @@ -3456,10 +3405,11 @@ no_commit: performing those statements. */ if (error == DB_DUPLICATE_KEY && auto_inc_used - && (user_thd->lex->sql_command == SQLCOM_REPLACE - || user_thd->lex->sql_command == SQLCOM_REPLACE_SELECT - || (user_thd->lex->sql_command == SQLCOM_LOAD - && user_thd->lex->duplicates == DUP_REPLACE))) { + && (ha_sql_command() == SQLCOM_REPLACE + || ha_sql_command() == SQLCOM_REPLACE_SELECT + || (ha_sql_command() == SQLCOM_LOAD + && prebuilt->trx->allow_duplicates + && prebuilt->trx->replace_duplicates))) { auto_inc = table->next_number_field->val_int(); @@ -3659,7 +3609,7 @@ ha_innobase::update_row( DBUG_ENTER("ha_innobase::update_row"); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); @@ -3720,7 +3670,7 @@ ha_innobase::delete_row( DBUG_ENTER("ha_innobase::delete_row"); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); if (last_query_id != user_thd->query_id) { prebuilt->sql_stat_start = TRUE; @@ -3818,7 +3768,7 @@ ha_innobase::try_semi_consistent_read(bool yes) row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); /* Row read type is set to semi consistent read if this was requested by the MySQL and either innodb_locks_unsafe_for_binlog @@ -3985,10 +3935,9 @@ ha_innobase::index_read( DBUG_ENTER("index_read"); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); - statistic_increment(current_thd->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); if (last_query_id != user_thd->query_id) { prebuilt->sql_stat_start = TRUE; @@ -4094,13 +4043,12 @@ ha_innobase::change_active_index( { row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; KEY* key=0; - statistic_increment(current_thd->status_var.ha_read_key_count, - &LOCK_status); DBUG_ENTER("change_active_index"); + ha_statistic_increment(&SSV::ha_read_key_count); ut_ad(user_thd == current_thd); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); active_index = keynr; @@ -4190,7 +4138,7 @@ ha_innobase::general_fetch( DBUG_ENTER("general_fetch"); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); innodb_srv_conc_enter_innodb(prebuilt->trx); @@ -4229,8 +4177,7 @@ ha_innobase::index_next( mysql_byte* buf) /* in/out: buffer for next row in MySQL format */ { - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); return(general_fetch(buf, ROW_SEL_NEXT, 0)); } @@ -4247,8 +4194,7 @@ ha_innobase::index_next_same( const mysql_byte* key, /* in: key value */ uint keylen) /* in: key value length */ { - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); return(general_fetch(buf, ROW_SEL_NEXT, last_match_mode)); } @@ -4265,8 +4211,7 @@ ha_innobase::index_prev( mysql_byte* buf) /* in/out: buffer for previous row in MySQL format */ { - statistic_increment(current_thd->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); return(general_fetch(buf, ROW_SEL_PREV, 0)); } @@ -4285,8 +4230,7 @@ ha_innobase::index_first( int error; DBUG_ENTER("index_first"); - statistic_increment(current_thd->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); error = index_read(buf, NULL, 0, HA_READ_AFTER_KEY); @@ -4312,8 +4256,7 @@ ha_innobase::index_last( int error; DBUG_ENTER("index_last"); - statistic_increment(current_thd->status_var.ha_read_last_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); error = index_read(buf, NULL, 0, HA_READ_BEFORE_KEY); @@ -4385,8 +4328,7 @@ ha_innobase::rnd_next( int error; DBUG_ENTER("rnd_next"); - statistic_increment(current_thd->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); if (start_of_scan) { error = index_first(buf); @@ -4422,11 +4364,10 @@ ha_innobase::rnd_pos( DBUG_ENTER("rnd_pos"); DBUG_DUMP("key", (char*) pos, ref_length); - statistic_increment(current_thd->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4476,7 +4417,7 @@ ha_innobase::position( uint len; ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4815,11 +4756,11 @@ ha_innobase::create( trx->mysql_thd = thd; trx->mysql_query_str = &((*thd).query); - if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) { + if (thd_test_options(thd, OPTION_NO_FOREIGN_KEY_CHECKS)) { trx->check_foreigns = FALSE; } - if (thd->options & OPTION_RELAXED_UNIQUE_CHECKS) { + if (thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS)) { trx->check_unique_secondary = FALSE; } @@ -4976,7 +4917,7 @@ ha_innobase::discard_or_import_tablespace( ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); dict_table = prebuilt->table; trx = prebuilt->trx; @@ -5006,7 +4947,7 @@ ha_innobase::delete_all_rows(void) DBUG_ENTER("ha_innobase::delete_all_rows"); - if (thd->lex->sql_command != SQLCOM_TRUNCATE) { + if (ha_sql_command() != SQLCOM_TRUNCATE) { fallback: /* We only handle TRUNCATE TABLE t as a special case. DELETE FROM t will have to use ha_innobase::delete_row(). */ @@ -5074,11 +5015,11 @@ ha_innobase::delete_table( trx->mysql_thd = current_thd; trx->mysql_query_str = &((*current_thd).query); - if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) { + if (thd_test_options(thd, OPTION_NO_FOREIGN_KEY_CHECKS)) { trx->check_foreigns = FALSE; } - if (thd->options & OPTION_RELAXED_UNIQUE_CHECKS) { + if (thd_test_options(thd, OPTION_RELAXED_UNIQUE_CHECKS)) { trx->check_unique_secondary = FALSE; } @@ -5094,7 +5035,7 @@ ha_innobase::delete_table( /* Drop the table in InnoDB */ error = row_drop_table_for_mysql(norm_name, trx, - thd->lex->sql_command == SQLCOM_DROP_DB); + thd_sql_command(thd) == SQLCOM_DROP_DB); /* Flush the log to reduce probability that the .frm files and the InnoDB data dictionary get out-of-sync if the user runs @@ -5166,7 +5107,7 @@ innobase_drop_database( trx->mysql_thd = current_thd; trx->mysql_query_str = &((*current_thd).query); - if (current_thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) { + if (thd_test_options(current_thd, OPTION_NO_FOREIGN_KEY_CHECKS)) { trx->check_foreigns = FALSE; } @@ -5235,7 +5176,7 @@ ha_innobase::rename_table( trx->mysql_thd = current_thd; trx->mysql_query_str = &((*current_thd).query); - if (current_thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) { + if (thd_test_options(current_thd, OPTION_NO_FOREIGN_KEY_CHECKS)) { trx->check_foreigns = FALSE; } @@ -5305,7 +5246,7 @@ ha_innobase::records_in_range( DBUG_ENTER("records_in_range"); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); prebuilt->trx->op_info = (char*)"estimating records in index range"; @@ -5741,7 +5682,7 @@ ha_innobase::check( ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); if (prebuilt->mysql_template == NULL) { /* Build the template; we will use a dummy template @@ -6043,7 +5984,7 @@ ha_innobase::can_switch_engines(void) DBUG_ENTER("ha_innobase::can_switch_engines"); ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + *(trx_t**) ha_data()); prebuilt->trx->op_info = "determining if there are foreign key constraints"; @@ -6128,6 +6069,19 @@ ha_innobase::extra( case HA_EXTRA_KEYREAD_PRESERVE_FIELDS: prebuilt->keep_other_fields_on_keyread = 1; break; + case HA_EXTRA_IGNORE_DUP_KEY: + prebuilt->trx->allow_duplicates= TRUE; + break; + case HA_EXTRA_WRITE_CAN_REPLACE: + prebuilt->trx->replace_duplicates= TRUE; + break; + case HA_EXTRA_WRITE_CANNOT_REPLACE: + prebuilt->trx->replace_duplicates= FALSE; + break; + case HA_EXTRA_NO_IGNORE_DUP_KEY: + prebuilt->trx->allow_duplicates= FALSE; + prebuilt->trx->replace_duplicates= FALSE; + break; default:/* Do nothing */ ; } @@ -6156,7 +6110,7 @@ on that table. MySQL-5.0 also calls this before each statement in an execution of a stored procedure. To make the execution more deterministic for binlogging, MySQL-5.0 locks all tables involved in a stored procedure with full explicit table -locks (thd->in_lock_tables is true in ::store_lock()) before executing the +locks (thd_in_lock_tables() is true in ::store_lock()) before executing the procedure. */ int @@ -6196,7 +6150,7 @@ ha_innobase::start_stmt( prebuilt->select_lock_type = LOCK_X; } else { if (trx->isolation_level != TRX_ISO_SERIALIZABLE - && thd->lex->sql_command == SQLCOM_SELECT + && ha_sql_command() == SQLCOM_SELECT && lock_type == TL_READ) { /* For other than temporary tables, we obtain @@ -6309,8 +6263,8 @@ ha_innobase::external_lock( if (trx->isolation_level == TRX_ISO_SERIALIZABLE && prebuilt->select_lock_type == LOCK_NONE - && (thd->options - & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { + && thd_test_options(thd, + OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { /* To get serializable execution, we let InnoDB conceptually add 'LOCK IN SHARE MODE' to all SELECTs @@ -6331,16 +6285,16 @@ ha_innobase::external_lock( VERY easily deadlocks. We do not set InnoDB table locks if user has not explicitly - requested a table lock. Note that thd->in_lock_tables + requested a table lock. Note that thd_in_lock_tables() can be TRUE on some cases e.g. at the start of a stored procedure call (SQLCOM_CALL). */ if (prebuilt->select_lock_type != LOCK_NONE) { - if (thd->in_lock_tables && - thd->lex->sql_command == SQLCOM_LOCK_TABLES && - thd->variables.innodb_table_locks && - (thd->options & OPTION_NOT_AUTOCOMMIT)) { + if (thd_in_lock_tables(thd) && + ha_sql_command() == SQLCOM_LOCK_TABLES && + THDVAR(thd, table_locks) && + thd_test_options(thd, OPTION_NOT_AUTOCOMMIT)) { ulint error = row_lock_table_for_mysql( prebuilt, NULL, 0); @@ -6377,7 +6331,7 @@ ha_innobase::external_lock( innobase_release_stat_resources(trx); - if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { + if (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { if (trx->active_trans != 0) { innobase_commit(ht, thd, TRUE); } @@ -6419,7 +6373,7 @@ ha_innobase::transactional_table_lock( update_thd(thd); - if (prebuilt->table->ibd_file_missing && !current_thd->tablespace_op) { + if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(current_thd)) { ut_print_timestamp(stderr); fprintf(stderr, " InnoDB error:\n" "MySQL is trying to use a table handle but the .ibd file for\n" @@ -6464,7 +6418,7 @@ ha_innobase::transactional_table_lock( trx->active_trans = 1; } - if (thd->in_lock_tables && thd->variables.innodb_table_locks) { + if (thd_in_lock_tables(thd) && THDVAR(thd, table_locks)) { ulint error = DB_SUCCESS; error = row_lock_table_for_mysql(prebuilt, NULL, 0); @@ -6474,7 +6428,7 @@ ha_innobase::transactional_table_lock( DBUG_RETURN((int) error); } - if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { + if (thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) { /* Store the current undo_no of the transaction so that we know where to roll back if we have @@ -6520,10 +6474,6 @@ innodb_show_status( DBUG_ENTER("innodb_show_status"); - if (have_innodb != SHOW_OPTION_YES) { - DBUG_RETURN(FALSE); - } - trx = check_trx_exists(hton, thd); innobase_release_stat_resources(trx); @@ -6814,21 +6764,20 @@ ha_innobase::store_lock( if (lock_type != TL_IGNORE && trx->n_mysql_tables_in_use == 0) { trx->isolation_level = innobase_map_isolation_level( - (enum_tx_isolation) - thd->variables.tx_isolation); + ha_tx_isolation()); } - if (thd->lex->sql_command == SQLCOM_DROP_TABLE) { + if (ha_sql_command() == SQLCOM_DROP_TABLE) { /* MySQL calls this function in DROP TABLE though this table handle may belong to another thd that is running a query. Let us in that case skip any changes to the prebuilt struct. */ - } else if ((lock_type == TL_READ && thd->in_lock_tables) || - (lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) || + } else if ((thd_in_lock_tables(thd) && + (lock_type == TL_READ || lock_type == TL_READ_HIGH_PRIORITY)) || lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_NO_INSERT || - (thd->lex->sql_command != SQLCOM_SELECT + (ha_sql_command() != SQLCOM_SELECT && lock_type != TL_IGNORE)) { /* The OR cases above are in this order: @@ -6857,9 +6806,9 @@ ha_innobase::store_lock( || isolation_level == TRX_ISO_READ_COMMITTED) && isolation_level != TRX_ISO_SERIALIZABLE && (lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) - && (thd->lex->sql_command == SQLCOM_INSERT_SELECT - || thd->lex->sql_command == SQLCOM_UPDATE - || thd->lex->sql_command == SQLCOM_CREATE_TABLE)) { + && (ha_sql_command() == SQLCOM_INSERT_SELECT + || ha_sql_command() == SQLCOM_UPDATE + || ha_sql_command() == SQLCOM_CREATE_TABLE)) { /* If we either have innobase_locks_unsafe_for_binlog option set or this session is using READ COMMITTED @@ -6872,7 +6821,7 @@ ha_innobase::store_lock( prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; - } else if (thd->lex->sql_command == SQLCOM_CHECKSUM) { + } else if (ha_sql_command() == SQLCOM_CHECKSUM) { /* Use consistent read for checksum table */ prebuilt->select_lock_type = LOCK_NONE; @@ -6902,7 +6851,7 @@ ha_innobase::store_lock( (if it does not use a consistent read). */ if (lock_type == TL_READ - && thd->lex->sql_command == SQLCOM_LOCK_TABLES) { + && ha_sql_command() == SQLCOM_LOCK_TABLES) { /* We come here if MySQL is processing LOCK TABLES ... READ LOCAL. MyISAM under that table lock type reads the table as it was at the time the lock was @@ -6929,11 +6878,11 @@ ha_innobase::store_lock( if ((lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE) - && !(thd->in_lock_tables - && thd->lex->sql_command == SQLCOM_LOCK_TABLES) - && !thd->tablespace_op - && thd->lex->sql_command != SQLCOM_TRUNCATE - && thd->lex->sql_command != SQLCOM_OPTIMIZE + && !(thd_in_lock_tables(thd) + && ha_sql_command() == SQLCOM_LOCK_TABLES) + && !thd_tablespace_op(thd) + && ha_sql_command() != SQLCOM_TRUNCATE + && ha_sql_command() != SQLCOM_OPTIMIZE #ifdef __WIN__ /* For alter table on win32 for succesful operation @@ -6942,10 +6891,10 @@ ha_innobase::store_lock( TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes race condition when several clients do alter table simultaneously (bug #17264). This fix avoids the problem. */ - && thd->lex->sql_command != SQLCOM_ALTER_TABLE + && ha_sql_command() != SQLCOM_ALTER_TABLE #endif - && thd->lex->sql_command != SQLCOM_CREATE_TABLE) { + && ha_sql_command() != SQLCOM_CREATE_TABLE) { lock_type = TL_WRITE_ALLOW_WRITE; } @@ -6958,10 +6907,10 @@ ha_innobase::store_lock( We especially allow concurrent inserts if MySQL is at the start of a stored procedure call (SQLCOM_CALL) - (MySQL does have thd->in_lock_tables TRUE there). */ + (MySQL does have thd_in_lock_tables() TRUE there). */ if (lock_type == TL_READ_NO_INSERT - && thd->lex->sql_command != SQLCOM_LOCK_TABLES) { + && ha_sql_command() != SQLCOM_LOCK_TABLES) { lock_type = TL_READ; } @@ -7379,6 +7328,7 @@ innobase_query_is_update(void) /*==========================*/ { THD* thd = current_thd; + trx_t* trx; if (!thd) { /* InnoDB's internal threads may run InnoDB stored procedures @@ -7388,17 +7338,9 @@ innobase_query_is_update(void) return(FALSE); } - switch (thd->lex->sql_command) { - case SQLCOM_REPLACE: - case SQLCOM_REPLACE_SELECT: - return(TRUE); - case SQLCOM_LOAD: - return(thd->lex->duplicates == DUP_REPLACE); - case SQLCOM_INSERT: - return(thd->lex->duplicates == DUP_UPDATE); - default: - return(FALSE); - } + trx = check_trx_exists(legacy_innodb_hton, thd); + + return(trx->allow_duplicates); } /*********************************************************************** @@ -7417,8 +7359,8 @@ innobase_xa_prepare( int error = 0; trx_t* trx = check_trx_exists(hton, thd); - if (thd->lex->sql_command != SQLCOM_XA_PREPARE && - (all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) + if (thd_sql_command(thd) != SQLCOM_XA_PREPARE && + (all || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { /* For ibbackup to work the order of transactions in binlog @@ -7444,7 +7386,7 @@ innobase_xa_prepare( trx->active_trans = 2; } - if (!thd->variables.innodb_support_xa) { + if (!THDVAR(thd, support_xa)) { return(0); } @@ -7464,7 +7406,7 @@ innobase_xa_prepare( } if (all - || (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) { + || (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { /* We were instructed to prepare the whole transaction, or this is an SQL statement end and autocommit is on */ @@ -7654,6 +7596,213 @@ SHOW_VAR innodb_status_variables_export[]= { struct st_mysql_storage_engine innobase_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; +/* plugin options */ +static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "Enable InnoDB checksums validation (enabled by default). " + "Disable with --skip-innodb-checksums.", + NULL, NULL, TRUE); + +static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, + PLUGIN_VAR_READONLY, + "The common part for InnoDB table spaces.", + NULL, NULL, NULL); + +static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "Enable InnoDB doublewrite buffer (enabled by default). " + "Disable with --skip-innodb-doublewrite.", + NULL, NULL, TRUE); + +static MYSQL_SYSVAR_ULONG(fast_shutdown, innobase_fast_shutdown, + PLUGIN_VAR_OPCMDARG, + "Speeds up the shutdown process of the InnoDB storage engine. Possible " + "values are 0, 1 (faster)" + /* + NetWare can't close unclosed files, can't automatically kill remaining + threads, etc, so on this OS we disable the crash-like InnoDB shutdown. + */ +#ifndef __NETWARE__ + " or 2 (fastest - crash-like)" +#endif + ".", + NULL, NULL, 1, 0, IF_NETWARE(1,2), 0); + +static MYSQL_SYSVAR_BOOL(file_per_table, innobase_file_per_table, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "Stores each InnoDB table to an .ibd file in the database dir.", + NULL, NULL, FALSE); + +static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, + PLUGIN_VAR_OPCMDARG, + "Set to 0 (write and flush once per second), 1 (write and flush at each commit)\ + or 2 (write at commit, flush once per second).", + NULL, NULL, 1, 0, 2, 0); + +static MYSQL_SYSVAR_STR(flush_method, innobase_unix_file_flush_method, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "With which method to flush data.", NULL, NULL, NULL); + +static MYSQL_SYSVAR_BOOL(locks_unsafe_for_binlog, innobase_locks_unsafe_for_binlog, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "Force InnoDB to not use next-key locking, to use only row-level locking.", + NULL, NULL, FALSE); + +static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Where full logs should be archived.", NULL, NULL, NULL); + +static MYSQL_SYSVAR_BOOL(log_archive, innobase_log_archive, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, + "Set to 1 if you want to have logs archived.", NULL, NULL, FALSE); + +static MYSQL_SYSVAR_STR(log_group_home_dir, innobase_log_group_home_dir, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Path to InnoDB log files.", NULL, NULL, NULL); + +static MYSQL_SYSVAR_ULONG(max_dirty_pages_pct, srv_max_buf_pool_modified_pct, + PLUGIN_VAR_RQCMDARG, + "Percentage of dirty pages allowed in bufferpool.", + NULL, NULL, 90, 0, 100, 0); + +static MYSQL_SYSVAR_ULONG(max_purge_lag, srv_max_purge_lag, + PLUGIN_VAR_RQCMDARG, + "Desired maximum length of the purge queue (0 = no limit)", + NULL, NULL, 0, 0, ~0L, 0); + +static MYSQL_SYSVAR_BOOL(rollback_on_timeout, innobase_rollback_on_timeout, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, + "Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)", + NULL, NULL, FALSE); + +static MYSQL_SYSVAR_BOOL(status_file, innobase_create_status_file, + PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_NOSYSVAR, + "Enable SHOW INNODB STATUS output in the innodb_status. file", + NULL, NULL, FALSE); + +static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.", + NULL, NULL, 1*1024*1024L, 512*1024L, ~0L, 1024); + +static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment, + PLUGIN_VAR_RQCMDARG, + "Data file autoextend increment in megabytes", + NULL, NULL, 8L, 1L, 1000L, 0); + +static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", + NULL, NULL, 8*1024*1024L, 1024*1024L, LONGLONG_MAX, 1024*1024L); + +static MYSQL_SYSVAR_ULONG(commit_concurrency, srv_commit_concurrency, + PLUGIN_VAR_RQCMDARG, + "Helps in performance tuning in heavily concurrent environments.", + NULL, NULL, 0, 0, 1000, 0); + +static MYSQL_SYSVAR_ULONG(concurrency_tickets, srv_n_free_tickets_to_enter, + PLUGIN_VAR_RQCMDARG, + "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket", + NULL, NULL, 500L, 1L, ~0L, 0); + +static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Number of file I/O threads in InnoDB.", + NULL, NULL, 4, 4, 64, 0); + +static MYSQL_SYSVAR_LONG(force_recovery, innobase_force_recovery, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Helps to save your data in case the disk image of the database becomes corrupt.", + NULL, NULL, 0, 0, 6, 0); + +static MYSQL_SYSVAR_LONG(lock_wait_timeout, innobase_lock_wait_timeout, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back.", + NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0); + +static MYSQL_SYSVAR_LONG(log_buffer_size, innobase_log_buffer_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "The size of the buffer which InnoDB uses to write log to the log files on disk.", + NULL, NULL, 1024*1024L, 256*1024L, ~0L, 1024); + +static MYSQL_SYSVAR_LONGLONG(log_file_size, innobase_log_file_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Size of each log file in a log group.", + NULL, NULL, 5*1024*1024L, 1*1024*1024L, LONGLONG_MAX, 1024*1024L); + +static MYSQL_SYSVAR_LONG(log_files_in_group, innobase_log_files_in_group, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Number of log files in the log group. InnoDB writes to the files in a circular fashion. Value 3 is recommended here.", + NULL, NULL, 2, 2, 100, 0); + +static MYSQL_SYSVAR_LONG(mirrored_log_groups, innobase_mirrored_log_groups, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Number of identical copies of log groups we keep for the database. Currently this should be set to 1.", + NULL, NULL, 1, 1, 10, 0); + +static MYSQL_SYSVAR_LONG(open_files, innobase_open_files, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "How many files at the maximum InnoDB keeps open at the same time.", + NULL, NULL, 300L, 10L, ~0L, 0); + +static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds, + PLUGIN_VAR_RQCMDARG, + "Count of spin-loop rounds in InnoDB mutexes", + NULL, NULL, 20L, 0L, ~0L, 0); + +static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, + PLUGIN_VAR_RQCMDARG, + "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.", + NULL, NULL, 8, 0, 1000, 0); + +static MYSQL_SYSVAR_ULONG(thread_sleep_delay, srv_thread_sleep_delay, + PLUGIN_VAR_RQCMDARG, + "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep", + NULL, NULL, 10000L, 0L, ~0L, 0); + +static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Path to individual files and their sizes.", + NULL, NULL, NULL); + +static struct st_mysql_sys_var* innobase_system_variables[]= { + MYSQL_SYSVAR(additional_mem_pool_size), + MYSQL_SYSVAR(autoextend_increment), + MYSQL_SYSVAR(buffer_pool_size), + MYSQL_SYSVAR(checksums), + MYSQL_SYSVAR(commit_concurrency), + MYSQL_SYSVAR(concurrency_tickets), + MYSQL_SYSVAR(data_file_path), + MYSQL_SYSVAR(data_home_dir), + MYSQL_SYSVAR(doublewrite), + MYSQL_SYSVAR(fast_shutdown), + MYSQL_SYSVAR(file_io_threads), + MYSQL_SYSVAR(file_per_table), + MYSQL_SYSVAR(flush_log_at_trx_commit), + MYSQL_SYSVAR(flush_method), + MYSQL_SYSVAR(force_recovery), + MYSQL_SYSVAR(locks_unsafe_for_binlog), + MYSQL_SYSVAR(lock_wait_timeout), + MYSQL_SYSVAR(log_arch_dir), + MYSQL_SYSVAR(log_archive), + MYSQL_SYSVAR(log_buffer_size), + MYSQL_SYSVAR(log_file_size), + MYSQL_SYSVAR(log_files_in_group), + MYSQL_SYSVAR(log_group_home_dir), + MYSQL_SYSVAR(max_dirty_pages_pct), + MYSQL_SYSVAR(max_purge_lag), + MYSQL_SYSVAR(mirrored_log_groups), + MYSQL_SYSVAR(open_files), + MYSQL_SYSVAR(rollback_on_timeout), + MYSQL_SYSVAR(status_file), + MYSQL_SYSVAR(support_xa), + MYSQL_SYSVAR(sync_spin_loops), + MYSQL_SYSVAR(table_locks), + MYSQL_SYSVAR(thread_concurrency), + MYSQL_SYSVAR(thread_sleep_delay), + NULL +}; + mysql_declare_plugin(innobase) { MYSQL_STORAGE_ENGINE_PLUGIN, @@ -7666,8 +7815,8 @@ mysql_declare_plugin(innobase) NULL, /* Plugin Deinit */ 0x0100 /* 1.0 */, innodb_status_variables_export,/* status variables */ - NULL, /* system variables */ - NULL /* config options */ + innobase_system_variables, /* system variables */ + NULL /* reserved */ } mysql_declare_plugin_end; diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 8232699c7f9..c68c826f6a8 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -501,6 +501,14 @@ struct trx_struct{ ulint mysql_process_no;/* since in Linux, 'top' reports process id's and not thread id's, we store the process number too */ + ibool allow_duplicates;/* normally FALSE, but if the user + wants to update duplicate rows, + (in table inserts, for example) we + set this TRUE */ + ibool replace_duplicates;/* normally FALSE, but if the user + wants to replace duplicate rows, + (in table inserts, for example) we + set this TRUE */ /*------------------------------*/ ulint n_mysql_tables_in_use; /* number of Innobase tables used in the processing of the current diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 06ec5c4b44e..25f42c6b2ed 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -633,10 +633,10 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) for (i= 0; i < table->s->keys; i++) { - struct st_plugin_int *parser= table->key_info[i].parser; + plugin_ref parser= table->key_info[i].parser; if (table->key_info[i].flags & HA_USES_PARSER) file->s->keyinfo[i].parser= - (struct st_mysql_ftparser *)parser->plugin->info; + (struct st_mysql_ftparser *)plugin_decl(parser)->info; table->key_info[i].block_size= file->s->keyinfo[i].block_length; } return (0); @@ -651,7 +651,7 @@ int ha_myisam::close(void) int ha_myisam::write_row(byte * buf) { - statistic_increment(table->in_use->status_var.ha_write_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); /* If we have a timestamp column, update it to the current time */ if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) @@ -1509,7 +1509,7 @@ bool ha_myisam::is_crashed() const int ha_myisam::update_row(const byte * old_data, byte * new_data) { - statistic_increment(table->in_use->status_var.ha_update_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_update_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); return mi_update(file,old_data,new_data); @@ -1517,7 +1517,7 @@ int ha_myisam::update_row(const byte * old_data, byte * new_data) int ha_myisam::delete_row(const byte * buf) { - statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_delete_count); return mi_delete(file,buf); } @@ -1525,8 +1525,7 @@ int ha_myisam::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error=mi_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1535,8 +1534,7 @@ int ha_myisam::index_read(byte * buf, const byte * key, int ha_myisam::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error=mi_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1546,8 +1544,7 @@ int ha_myisam::index_read_last(byte * buf, const byte * key, uint key_len) { DBUG_ENTER("ha_myisam::index_read_last"); DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error=mi_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; DBUG_RETURN(error); @@ -1556,8 +1553,7 @@ int ha_myisam::index_read_last(byte * buf, const byte * key, uint key_len) int ha_myisam::index_next(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); int error=mi_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1566,8 +1562,7 @@ int ha_myisam::index_next(byte * buf) int ha_myisam::index_prev(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); int error=mi_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1576,8 +1571,7 @@ int ha_myisam::index_prev(byte * buf) int ha_myisam::index_first(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); int error=mi_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1586,8 +1580,7 @@ int ha_myisam::index_first(byte * buf) int ha_myisam::index_last(byte * buf) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_last_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); int error=mi_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1598,8 +1591,7 @@ int ha_myisam::index_next_same(byte * buf, uint length __attribute__((unused))) { DBUG_ASSERT(inited==INDEX); - statistic_increment(table->in_use->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); int error=mi_rnext_same(file,buf); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1615,8 +1607,7 @@ int ha_myisam::rnd_init(bool scan) int ha_myisam::rnd_next(byte *buf) { - statistic_increment(table->in_use->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); int error=mi_scan(file, buf); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -1629,8 +1620,7 @@ int ha_myisam::restart_rnd_next(byte *buf, byte *pos) int ha_myisam::rnd_pos(byte * buf, byte *pos) { - statistic_increment(table->in_use->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); int error=mi_rrnd(file, buf, my_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; return error; diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 4392a456f60..8ab3f843637 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -148,7 +148,7 @@ int ha_myisammrg::close(void) int ha_myisammrg::write_row(byte * buf) { - statistic_increment(table->in_use->status_var.ha_write_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (file->merge_insert_method == MERGE_INSERT_DISABLED || !file->tables) return (HA_ERR_TABLE_READONLY); @@ -166,7 +166,7 @@ int ha_myisammrg::write_row(byte * buf) int ha_myisammrg::update_row(const byte * old_data, byte * new_data) { - statistic_increment(table->in_use->status_var.ha_update_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_update_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); return myrg_update(file,old_data,new_data); @@ -174,15 +174,14 @@ int ha_myisammrg::update_row(const byte * old_data, byte * new_data) int ha_myisammrg::delete_row(const byte * buf) { - statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status); + ha_statistic_increment(&SSV::ha_delete_count); return myrg_delete(file,buf); } int ha_myisammrg::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error=myrg_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -191,8 +190,7 @@ int ha_myisammrg::index_read(byte * buf, const byte * key, int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error=myrg_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -200,8 +198,7 @@ int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, int ha_myisammrg::index_read_last(byte * buf, const byte * key, uint key_len) { - statistic_increment(table->in_use->status_var.ha_read_key_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); int error=myrg_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; @@ -210,8 +207,7 @@ int ha_myisammrg::index_read_last(byte * buf, const byte * key, uint key_len) int ha_myisammrg::index_next(byte * buf) { - statistic_increment(table->in_use->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); int error=myrg_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -219,8 +215,7 @@ int ha_myisammrg::index_next(byte * buf) int ha_myisammrg::index_prev(byte * buf) { - statistic_increment(table->in_use->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); int error=myrg_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -228,8 +223,7 @@ int ha_myisammrg::index_prev(byte * buf) int ha_myisammrg::index_first(byte * buf) { - statistic_increment(table->in_use->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); int error=myrg_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -237,8 +231,7 @@ int ha_myisammrg::index_first(byte * buf) int ha_myisammrg::index_last(byte * buf) { - statistic_increment(table->in_use->status_var.ha_read_last_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); int error=myrg_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -248,8 +241,7 @@ int ha_myisammrg::index_next_same(byte * buf, const byte *key __attribute__((unused)), uint length __attribute__((unused))) { - statistic_increment(table->in_use->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); int error=myrg_rnext_same(file,buf); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -264,8 +256,7 @@ int ha_myisammrg::rnd_init(bool scan) int ha_myisammrg::rnd_next(byte *buf) { - statistic_increment(table->in_use->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); int error=myrg_rrnd(file, buf, HA_OFFSET_ERROR); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -274,8 +265,7 @@ int ha_myisammrg::rnd_next(byte *buf) int ha_myisammrg::rnd_pos(byte * buf, byte *pos) { - statistic_increment(table->in_use->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); int error=myrg_rrnd(file, buf, my_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; return error; @@ -609,7 +599,6 @@ static int myisammrg_init(void *p) myisammrg_hton= (handlerton *)p; - myisammrg_hton->state= SHOW_OPTION_YES; myisammrg_hton->db_type= DB_TYPE_MRG_MYISAM; myisammrg_hton->create= myisammrg_create_handler; myisammrg_hton->panic= myisammrg_panic; From 1d75566cd2de84478183e798a3abfd81023c429c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Mar 2007 18:08:35 +0000 Subject: [PATCH 003/137] BUG#26675 Add ndb_connectstring in "show global variables". sql/ha_ndbcluster.h: Extern opt_ndb_constrbuf array from mysqld sql/set_var.cc: Add ndb_connectstring to sys variable --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ sql/ha_ndbcluster.h | 1 + sql/set_var.cc | 4 +++ 4 files changed, 78 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index 274dc53e547..aae922c7ec6 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -40,6 +40,7 @@ class NdbBlob; // connectstring to cluster if given by mysqld extern const char *ndbcluster_connectstring; extern ulong ndb_cache_check_time; +extern char opt_ndb_constrbuf[]; typedef enum ndb_index_type { UNDEFINED_INDEX = 0, diff --git a/sql/set_var.cc b/sql/set_var.cc index 9b02a192fe5..05164fe28e1 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -476,6 +476,8 @@ sys_var_thd_bool sys_ndb_use_transactions("ndb_use_transactions", &SV::ndb_use_transactions); sys_var_long_ptr sys_ndb_cache_check_time("ndb_cache_check_time", &ndb_cache_check_time); +sys_var_const_str +sys_ndb_connectstring("ndb_connectstring", opt_ndb_constrbuf); #endif /* Time/date/datetime formats */ @@ -787,6 +789,7 @@ sys_var *sys_variables[]= #ifdef HAVE_NDBCLUSTER_DB &sys_ndb_autoincrement_prefetch_sz, &sys_ndb_cache_check_time, + &sys_ndb_connectstring, &sys_ndb_force_send, &sys_ndb_use_exact_count, &sys_ndb_use_transactions, @@ -988,6 +991,7 @@ struct show_var_st init_vars[]= { {sys_ndb_use_exact_count.name,(char*) &sys_ndb_use_exact_count, SHOW_SYS}, {sys_ndb_use_transactions.name,(char*) &sys_ndb_use_transactions, SHOW_SYS}, {sys_ndb_cache_check_time.name,(char*) &sys_ndb_cache_check_time, SHOW_SYS}, + {sys_ndb_connectstring.name,(char*) &sys_ndb_connectstring, SHOW_SYS}, #endif {sys_net_buffer_length.name,(char*) &sys_net_buffer_length, SHOW_SYS}, {sys_net_read_timeout.name, (char*) &sys_net_read_timeout, SHOW_SYS}, From eac12b6587c53d34f0241c404fb0ce8c5ee0da93 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 10:14:46 -0700 Subject: [PATCH 004/137] WL#2936 "Server variables for plugins" Post review fixes. client/mysql.cc: wl2936 "Plugin server variables" post review fixes compile fix. app_type is now a void* and it isn't actually used here. include/my_getopt.h: wl2936 "Plugin server variables" post review fixes make app_type into a void*. This also required changes to client/mysql.cc and storage/ndb/src/mgmsrv/InitConfigFileParser.cpp in order to compile. include/my_global.h: wl2936 "Plugin server variables" post-review fixes declare compile_time_assert() macro. (provided by serg) include/mysql/plugin.h: wl2936 "Plugin server variables" post review fixes Add comments mysys/array.c: wl2936 "Plugin server variables" post review fixes mysys/typelib.c: wl2936 "Plugin server variables" post review fixes find_typeset() should not alter string sql/set_var.cc: wl2936 "Plugin server variables" post review fixes remove unnecessary code. sql/sql_class.cc: wl2936 "Plugin server variables" post review fixes explicitly declare export style for functions. sql/sql_lex.cc: wl2936 "Plugin server variables" post review fixes enforce that lex::plugins_static_buffer is declared immediately after lex::plugins. sql/sql_plugin.cc: wl2936 "Plugin Server variables" post review fixes sys_var_pluginvar does not need st_plugin_int at construction. remove debug code which was accidentially committed. add comments. fix mutex lock order. sql/sql_plugin.h: wl2936 "Plugin server variables" post review fixes add comment and macro to compare plugin_refs sql/table.cc: wl2936 "plugin server variables" post review fixes remove unneccessary unlock and variable. add checks for legacy type validity storage/ndb/src/mgmsrv/InitConfigFileParser.cpp: wl2936 "plugin server variables" post review fixes fix compile failure now that my_option::app_type is a void* --- client/mysql.cc | 2 +- include/my_getopt.h | 2 +- include/my_global.h | 8 ++ include/mysql/plugin.h | 38 +++++++++ mysys/array.c | 3 +- mysys/typelib.c | 17 ++-- sql/set_var.cc | 1 - sql/sql_class.cc | 12 +++ sql/sql_lex.cc | 3 + sql/sql_plugin.cc | 79 ++++++++++++------- sql/sql_plugin.h | 7 ++ sql/table.cc | 26 ++++-- .../ndb/src/mgmsrv/InitConfigFileParser.cpp | 27 ++----- 13 files changed, 156 insertions(+), 69 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 0f0b221813a..581f13adabb 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -743,7 +743,7 @@ static struct my_option my_long_options[] = "Number of seconds before connection timeout.", (gptr*) &opt_connect_timeout, (gptr*) &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 3600*12, 0, - 0, 1}, + 0, 0}, {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "Max packet length to send to, or receive from server", (gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0, GET_ULONG, diff --git a/include/my_getopt.h b/include/my_getopt.h index fd523e08d7f..a14507847be 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -54,7 +54,7 @@ struct my_option longlong max_value; /* Max allowed value */ longlong sub_size; /* Subtract this from given value */ long block_size; /* Value should be a mult. of this */ - long app_type; /* To be used by an application */ + void *app_type; /* To be used by an application */ }; typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * ); diff --git a/include/my_global.h b/include/my_global.h index e25752b8ed8..f0a89105f88 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -458,6 +458,14 @@ C_MODE_END */ #include +/* an assert that works at compile-time. only for constant expression */ +#define compile_time_assert(X) \ + do \ + { \ + char compile_time_assert[(X) ? 1 : -1] \ + __attribute__ ((unused)); \ + } while(0) + /* Go around some bugs in different OS and compilers */ #if defined (HPUX11) && defined(_LARGEFILE_SOURCE) #define _LARGEFILE64_SOURCE diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 6c75ca75a54..200b23cc93d 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -122,9 +122,43 @@ typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *) struct st_mysql_sys_var; struct st_mysql_value; +/* + SYNOPSIS + (*mysql_var_check_func)() + thd thread handle + var dynamic variable being altered + save pointer to temporary storage + value user provided value + RETURN + 0 user provided value is OK and the update func may be called. + any other value indicates error. + + This function should parse the user provided value and store in the + provided temporary storage any data as required by the update func. + There is sufficient space in the temporary storage to store a double. + Note that the update func may not be called if any other error occurs + so any memory allocated should be thread-local so that it may be freed + automatically at the end of the statement. +*/ + typedef int (*mysql_var_check_func)(MYSQL_THD thd, struct st_mysql_sys_var *var, void *save, struct st_mysql_value *value); + +/* + SYNOPSIS + (*mysql_var_update_func)() + thd thread handle + var dynamic variable being altered + var_ptr pointer to dynamic variable + save pointer to temporary storage + RETURN + NONE + + This function should use the validated value stored in the temporary store + and persist it in the provided pointer to the dynamic variable. + For example, strings may require memory to be allocated. +*/ typedef void (*mysql_var_update_func)(MYSQL_THD thd, struct st_mysql_sys_var *var, void *var_ptr, void *save); @@ -582,6 +616,10 @@ struct st_mysql_information_schema st_mysql_value struct for reading values from mysqld. Used by server variables framework to parse user-provided values. Will be used for arguments when implementing UDFs. + + Note that val_str() returns a string in temporary memory + that will be freed at the end of statement. Copy the string + if you need it to persist. */ #define MYSQL_VALUE_TYPE_STRING 0 diff --git a/mysys/array.c b/mysys/array.c index dd715452fec..a8c400f48cc 100644 --- a/mysys/array.c +++ b/mysys/array.c @@ -57,9 +57,10 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, } if (!init_alloc) + { init_alloc=alloc_increment; - else init_buffer= 0; + } array->elements=0; array->max_element=init_alloc; array->alloc_increment=alloc_increment; diff --git a/mysys/typelib.c b/mysys/typelib.c index 5013423799c..8ed3f7c46e2 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -20,6 +20,8 @@ #include +static const char field_separator=','; + /* Search after a string in a list of strings. Endspace in x is not compared. @@ -31,6 +33,7 @@ If & 1 accept only whole names If & 2 don't expand if half field If & 4 allow #number# as type + If & 8 use ',' as string terminator NOTES If part, uniq field is found and full_name == 0 then x is expanded @@ -60,16 +63,18 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name) for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) { for (i=x ; - *i && my_toupper(&my_charset_latin1,*i) == + *i && (!(full_name & 8) || *i != field_separator) && + my_toupper(&my_charset_latin1,*i) == my_toupper(&my_charset_latin1,*j) ; i++, j++) ; if (! *j) { while (*i == ' ') i++; /* skip_end_space */ - if (! *i) + if (! *i || ((full_name & 8) && *i == field_separator)) DBUG_RETURN(pos+1); } - if (! *i && (!*j || !(full_name & 1))) + if ((!*i && (!(full_name & 8) || *i != field_separator)) && + (!*j || !(full_name & 1))) { find++; findpos=pos; @@ -120,8 +125,6 @@ const char *get_type(TYPELIB *typelib, uint nr) } -static const char field_separator=','; - /* Create an integer value to represent the supplied comma-seperated string where each string in the TYPELIB denotes a bit position. @@ -157,9 +160,7 @@ my_ulonglong find_typeset(my_string x, TYPELIB *lib, int *err) (*err)++; i= x; while (*x && *x != field_separator) x++; - if (*x) - *x++= 0; - if ((find= find_type(i, lib, 2) - 1) < 0) + if ((find= find_type(i, lib, 2 | 8) - 1) < 0) DBUG_RETURN(0); result|= (ULL(1) << find); } diff --git a/sql/set_var.cc b/sql/set_var.cc index 8a51a0f2e62..7b27902571b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -2838,7 +2838,6 @@ int set_var_init() error: fprintf(stderr, "failed to initialize system variables"); - pthread_mutex_unlock(&LOCK_global_system_variables); DBUG_RETURN(1); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index eab6fea9558..86fa694dc88 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -167,18 +167,25 @@ Open_tables_state::Open_tables_state(ulong version_arg) reset_open_tables_state(); } +/* + The following functions form part of the C plugin API +*/ + +extern "C" int thd_in_lock_tables(const THD *thd) { return test(thd->in_lock_tables); } +extern "C" int thd_tablespace_op(const THD *thd) { return test(thd->tablespace_op); } +extern "C" const char *thd_proc_info(THD *thd, const char *info) { const char *old_info= thd->proc_info; @@ -186,16 +193,19 @@ const char *thd_proc_info(THD *thd, const char *info) return old_info; } +extern "C" void **thd_ha_data(const THD *thd, const struct handlerton *hton) { return (void **) thd->ha_data + hton->slot; } +extern "C" long long thd_test_options(const THD *thd, long long test_options) { return thd->options & test_options; } +extern "C" int thd_sql_command(const THD *thd) { return (int) thd->lex->sql_command; @@ -216,6 +226,7 @@ int thd_sql_command(const THD *thd) RETURN VALUES pointer to string */ +extern "C" char *thd_security_context(THD *thd, char *buffer, int length, int max_query_len) { @@ -268,6 +279,7 @@ char *thd_security_context(THD *thd, char *buffer, int length, return thd->strmake(str.ptr(), str.length()); } + /* Pass nominal parameters to Statement constructor only to ensure that the destructor works OK in case of error. The main_mem_root will be diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 1c78aada405..0734b9eb26a 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1745,6 +1745,9 @@ st_lex::st_lex() :result(0), yacc_yyss(0), yacc_yyvs(0), sql_command(SQLCOM_END) { + /* Check that plugins_static_buffer is declared immediately after plugins */ + compile_time_assert((&plugins + 1) == (DYNAMIC_ARRAY*)plugins_static_buffer); + my_init_dynamic_array2(&plugins, sizeof(plugin_ref), plugins_static_buffer, INITIAL_LEX_PLUGIN_LIST_SIZE, diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 06f687e779f..af73a42dab1 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -161,9 +161,8 @@ public: { TRASH(ptr_arg, size); } sys_var_pluginvar(const char *name_arg, - struct st_plugin_int *plugin_arg, struct st_mysql_sys_var *plugin_var_arg) - :sys_var(name_arg), plugin(plugin_arg), plugin_var(plugin_var_arg) {} + :sys_var(name_arg), plugin_var(plugin_var_arg) {} sys_var_pluginvar *cast_pluginvar() { return this; } bool is_readonly() const { return plugin_var->flags & PLUGIN_VAR_READONLY; } bool check_type(enum_var_type type) @@ -631,11 +630,6 @@ static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc CALLER_INFO_PROTO) #else if (!(plugin= (plugin_ref) my_malloc_ci(sizeof(pi), MYF(MY_WME)))) DBUG_RETURN(NULL); - //if (0x4620a20L == (long) plugin) - if (0x4656b10L == (long) plugin) - { - DBUG_PRINT("debug",("trap")); - } *plugin= pi; #endif @@ -656,6 +650,10 @@ plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO) LEX *lex= NULL; plugin_ref rc; DBUG_ENTER("plugin_lock"); + /* + thd->lex may point to a nested LEX or a stored procedure LEX. + main_lex is tightly coupled to the thread. + */ if (thd) lex= !thd->lex ? &thd->main_lex : thd->lex; pthread_mutex_lock(&LOCK_plugin); @@ -767,11 +765,9 @@ static bool plugin_add(MEM_ROOT *tmp_root, DBUG_RETURN(FALSE); } tmp_plugin_ptr->state= PLUGIN_IS_FREED; - goto err; } mysql_del_sys_var_chain(tmp.system_vars); - plugin_dl_del(dl); - DBUG_RETURN(TRUE); + goto err; } /* plugin was disabled */ plugin_dl_del(dl); @@ -939,7 +935,11 @@ static void intern_plugin_unlock(LEX *lex, plugin_ref plugin) pi->name.str, pi->ref_count)); if (lex) { - /* remove one instance of this plugin from the use list */ + /* + Remove one instance of this plugin from the use list. + We are searching backwards so that plugins locked last + could be unlocked faster - optimizing for LIFO semantics. + */ for (i= lex->plugins.elements - 1; i >= 0; i--) if (plugin == *dynamic_element(&lex->plugins, i, plugin_ref*)) { @@ -1283,6 +1283,7 @@ bool plugin_register_builtin(THD *thd, struct st_mysql_plugin *plugin) bzero(&tmp, sizeof(tmp)); tmp.plugin= plugin; + pthread_mutex_lock(&LOCK_plugin); rw_wrlock(&LOCK_system_variables_hash); if (test_plugin_options(thd->mem_root, &tmp, &dummy_argc, NULL, true)) @@ -1293,6 +1294,7 @@ bool plugin_register_builtin(THD *thd, struct st_mysql_plugin *plugin) end: rw_unlock(&LOCK_system_variables_hash); + pthread_mutex_unlock(&LOCK_plugin); DBUG_RETURN(result);; } @@ -1445,6 +1447,11 @@ void plugin_shutdown(void) { pthread_mutex_lock(&LOCK_plugin); + /* + release any plugin references held but don't yet free + memory for dynamic variables as some plugins may still + want to reference their global variables. + */ cleanup_variables(NULL, &global_system_variables, false); cleanup_variables(NULL, &max_system_variables, false); @@ -1470,6 +1477,9 @@ void plugin_shutdown(void) } reap_plugins(); } + + if (count > 0) + sql_print_warning("Forcing shutdown of %d plugins", count); plugins= (struct st_plugin_int **) my_alloca(sizeof(void*) * (count+1)); @@ -1496,7 +1506,6 @@ void plugin_shutdown(void) plugin_deinitialize(plugins[i], false); } - pthread_mutex_lock(&LOCK_plugin); /* We defer checking ref_counts until after all plugins are deinitialized @@ -1511,15 +1520,24 @@ void plugin_shutdown(void) if (plugins[i]->state & PLUGIN_IS_UNINITIALIZED) plugin_del(plugins[i]); + /* + Now we can deallocate all memory. + */ +#if defined(SAFE_MUTEX) && !defined(DBUG_OFF) + /* neccessary to avoid safe_mutex_assert_owner() trap */ + pthread_mutex_lock(&LOCK_plugin); +#endif cleanup_variables(NULL, &global_system_variables, true); cleanup_variables(NULL, &max_system_variables, true); +#if defined(SAFE_MUTEX) && !defined(DBUG_OFF) + pthread_mutex_unlock(&LOCK_plugin); +#endif initialized= 0; - pthread_mutex_unlock(&LOCK_plugin); pthread_mutex_destroy(&LOCK_plugin); + my_afree(plugins); } - my_afree(plugins); /* Dispose of the memory */ @@ -2007,12 +2025,13 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) plugin_ref plugin; DBUG_ENTER("find_sys_var"); + pthread_mutex_lock(&LOCK_plugin); rw_rdlock(&LOCK_system_variables_hash); if ((var= intern_find_sys_var(str, length, false)) && (pi= var->cast_pluginvar())) { + rw_unlock(&LOCK_system_variables_hash); LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex ) : NULL; - pthread_mutex_lock(&LOCK_plugin); if (!(plugin= my_intern_plugin_lock(lex, plugin_int_to_ref(pi->plugin)))) var= NULL; /* failed to lock it, it must be uninstalling */ else @@ -2022,9 +2041,10 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) var= NULL; intern_plugin_unlock(lex, plugin); } - pthread_mutex_unlock(&LOCK_plugin); } - rw_unlock(&LOCK_system_variables_hash); + else + rw_unlock(&LOCK_system_variables_hash); + pthread_mutex_unlock(&LOCK_plugin); /* If the variable exists but the plugin it is associated with is not ready @@ -2183,7 +2203,7 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) return (byte*) global_system_variables.dynamic_variables_ptr + offset; /* - dynamic_variables_size points to the largest valid offset + dynamic_variables_head points to the largest valid offset */ if (!thd->variables.dynamic_variables_ptr || (uint)offset > thd->variables.dynamic_variables_head) @@ -2208,8 +2228,6 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) thd->variables.dynamic_variables_size, global_system_variables.dynamic_variables_size - thd->variables.dynamic_variables_size); - if (global_lock) - pthread_mutex_unlock(&LOCK_global_system_variables); /* now we need to iterate through any newly copied 'defaults' @@ -2232,19 +2250,17 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) if ((pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR && pi->plugin_var->flags & PLUGIN_VAR_MEMALLOC) { - char **pp; - if (global_lock) - pthread_mutex_lock(&LOCK_global_system_variables); - pp= (char**) (thd->variables.dynamic_variables_ptr + + char **pp= (char**) (thd->variables.dynamic_variables_ptr + *(int*)(pi->plugin_var + 1)); if ((*pp= *(char**) (global_system_variables.dynamic_variables_ptr + *(int*)(pi->plugin_var + 1)))) *pp= my_strdup(*pp, MYF(MY_WME|MY_FAE)); - if (global_lock) - pthread_mutex_unlock(&LOCK_global_system_variables); } } + if (global_lock) + pthread_mutex_unlock(&LOCK_global_system_variables); + thd->variables.dynamic_variables_version= global_system_variables.dynamic_variables_version; thd->variables.dynamic_variables_head= @@ -2817,7 +2833,7 @@ static int construct_options(MEM_ROOT *mem_root, options->name= optname; options->comment= opt->comment; - options->app_type= (long) opt; + options->app_type= opt; options->id= (options-1)->id + 1; if (opt->flags & PLUGIN_VAR_THDLOCAL) @@ -2950,7 +2966,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, continue; if ((var= find_bookmark(tmp->plugin->name, o->name, o->flags))) - v= new (mem_root) sys_var_pluginvar(var->name + 1, tmp, o); + v= new (mem_root) sys_var_pluginvar(var->name + 1, o); else { len= strlen(tmp->plugin->name) + strlen(o->name) + 2; @@ -2962,10 +2978,15 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, if (*p == '-') *p= '_'; - v= new (mem_root) sys_var_pluginvar(varname, tmp, o); + v= new (mem_root) sys_var_pluginvar(varname, o); } DBUG_ASSERT(v); /* check that an object was actually constructed */ + /* + Add to the chain of variables. + Done like this for easier debugging so that the + pointer to v is not lost on optimized builds. + */ v->chain_sys_var(&chain); } if (chain.first) diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index b3293f3ebda..17208f41b38 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -79,6 +79,11 @@ struct st_plugin_int sys_var *system_vars; /* server variables for this plugin */ }; + +/* + See intern_plugin_lock() for the explanation for the + conditionally defined plugin_ref type +*/ #ifdef DBUG_OFF typedef struct st_plugin_int *plugin_ref; #define plugin_decl(pi) ((pi)->plugin) @@ -86,6 +91,7 @@ typedef struct st_plugin_int *plugin_ref; #define plugin_data(pi,cast) ((cast)((pi)->data)) #define plugin_name(pi) (&((pi)->name)) #define plugin_state(pi) ((pi)->state) +#define plugin_equals(p1,p2) ((p1) == (p2)) #else typedef struct st_plugin_int **plugin_ref; #define plugin_decl(pi) ((pi)[0]->plugin) @@ -93,6 +99,7 @@ typedef struct st_plugin_int **plugin_ref; #define plugin_data(pi,cast) ((cast)((pi)[0]->data)) #define plugin_name(pi) (&((pi)[0]->name)) #define plugin_state(pi) ((pi)[0]->state) +#define plugin_equals(p1,p2) ((p1) && (p2) && (p1)[0] == (p2)[0]) #endif typedef int (*plugin_type_init)(struct st_plugin_int *); diff --git a/sql/table.cc b/sql/table.cc index 08acaa0304f..2267898e383 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -425,7 +425,6 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, Field **field_ptr, *reg_field; const char **interval_array; enum legacy_db_type legacy_db_type; - handlerton *hton; my_bitmap_map *bitmaps; DBUG_ENTER("open_binary_frm"); @@ -456,11 +455,15 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, DBUG_PRINT("info", ("default_part_db_type = %u", head[61])); #endif legacy_db_type= (enum legacy_db_type) (uint) *(head+3); - if ((hton= ha_checktype(thd, legacy_db_type, 0, 0)) != share->db_type()) - { - plugin_unlock(NULL, share->db_plugin); - share->db_plugin= ha_lock_engine(NULL, hton); - } + DBUG_ASSERT(share->db_plugin == NULL); + /* + if the storage engine is dynamic, no point in resolving it by its + dynamically allocated legacy_db_type. We will resolve it later by name. + */ + if (legacy_db_type > DB_TYPE_UNKNOWN && + legacy_db_type < DB_TYPE_FIRST_DYNAMIC) + share->db_plugin= ha_lock_engine(NULL, + ha_checktype(thd, legacy_db_type, 0, 0)); share->db_create_options= db_create_options= uint2korr(head+30); share->db_options_in_use= share->db_create_options; share->mysql_version= uint4korr(head+51); @@ -620,8 +623,17 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, uint str_db_type_length= uint2korr(next_chunk); LEX_STRING name= { next_chunk + 2, str_db_type_length }; plugin_ref tmp_plugin= ha_resolve_by_name(thd, &name); - if (tmp_plugin != NULL) + if (tmp_plugin != NULL && !plugin_equals(tmp_plugin, share->db_plugin)) { + if (legacy_db_type > DB_TYPE_UNKNOWN && + legacy_db_type < DB_TYPE_FIRST_DYNAMIC && + legacy_db_type != ha_legacy_type( + plugin_data(tmp_plugin, handlerton *))) + { + /* bad file, legacy_db_type did not match the name */ + my_free(buff, MYF(0)); + goto err; + } /* tmp_plugin is locked with a local lock. we unlock the old value of share->db_plugin before diff --git a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp index b63d4d8bc17..603fea4a6da 100644 --- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp +++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp @@ -612,10 +612,11 @@ static my_bool parse_mycnf_opt(int, const struct my_option * opt, char * value) { + long *app_type= (long*) &opt->app_type; if(opt->comment) - ((struct my_option *)opt)->app_type++; + (*app_type)++; else - ((struct my_option *)opt)->app_type = order++; + *app_type = order++; return 0; } @@ -948,22 +949,6 @@ end: template class Vector; -#if 0 -struct my_option -{ - const char *name; /* Name of the option */ - int id; /* unique id or short option */ - const char *comment; /* option comment, for autom. --help */ - gptr *value; /* The variable value */ - gptr *u_max_value; /* The user def. max variable value */ - const char **str_values; /* Pointer to possible values */ - ulong var_type; - enum get_opt_arg_type arg_type; - longlong def_value; /* Default value */ - longlong min_value; /* Min allowed value */ - longlong max_value; /* Max allowed value */ - longlong sub_size; /* Subtract this from given value */ - long block_size; /* Value should be a mult. of this */ - int app_type; /* To be used by an application */ -}; -#endif +/* + See include/my_getopt.h for the declaration of struct my_option +*/ From 212ba963f2a160df9ac5be747a5c32741f81803a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 21:29:16 -0700 Subject: [PATCH 005/137] WL#2936 "Plugin Server Variables" Post review cleanups. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit include/mysql/plugin.h: WL2936 post review clean up fix macros to ensure correct type declarations sql/ha_partition.cc: WL2936 post review clean up add in missing my_afree() sql/handler.cc: WL2936 post review clean up remove stray semicolon sql/sql_plugin.cc: WL2936 post review clean up fixup comments and debug code storage/innobase/handler/ha_innodb.cc: WL2936 Include some of Marko Mäkelä's patches storage/innobase/handler/ha_innodb.h: WL2936 Include some of Marko Mäkelä's patches --- include/mysql/plugin.h | 10 ++- sql/ha_partition.cc | 8 +- sql/handler.cc | 2 +- sql/sql_plugin.cc | 18 +++-- storage/innobase/handler/ha_innodb.cc | 112 ++++++++++++++------------ storage/innobase/handler/ha_innodb.h | 12 --- 6 files changed, 86 insertions(+), 76 deletions(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 200b23cc93d..ef4392a485c 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -193,13 +193,14 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, #define DECLARE_MYSQL_SYSVAR_BASIC(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ - type *value, def_val; \ + type *value; type def_val; \ } MYSQL_SYSVAR_NAME(name) #define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ - type *value, def_val, min_val,\ - max_val, blk_sz; \ + type *value; type def_val; \ + type min_val; type max_val; \ + type blk_sz; \ } MYSQL_SYSVAR_NAME(name) #define DECLARE_MYSQL_SYSVAR_TYPELIB(name) struct { \ @@ -221,7 +222,8 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, #define DECLARE_MYSQL_THDVAR_SIMPLE(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ int offset; \ - type def_val, min_val, max_val, blk_sz; \ + type def_val; type min_val; \ + type max_val; type blk_sz; \ DECLARE_THDVAR_FUNC(type); \ } MYSQL_SYSVAR_NAME(name) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d8fd3b5f934..d37fcea339b 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -2173,7 +2173,7 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root) address_tot_name_len= file_buffer + 12 + 4 * tot_partition_words; tot_name_words= (uint4korr(address_tot_name_len) + 3) / 4; if (len_words != (tot_partition_words + tot_name_words + 4)) - goto err2; + goto err3; name_buffer_ptr= file_buffer + 16 + 4 * tot_partition_words; VOID(my_close(file, MYF(0))); m_file_buffer= file_buffer; // Will be freed in clear_handler_file() @@ -2181,10 +2181,12 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root) if (!(m_engine_array= (plugin_ref*) my_malloc(m_tot_parts * sizeof(plugin_ref), MYF(MY_WME)))) - goto err2; + goto err3; for (i= 0; i < m_tot_parts; i++) m_engine_array[i]= ha_lock_engine(NULL, engine_array[i]); + + my_afree((gptr) engine_array); if (!m_file && create_handlers(mem_root)) { @@ -2193,6 +2195,8 @@ bool ha_partition::get_from_handler_file(const char *name, MEM_ROOT *mem_root) } DBUG_RETURN(FALSE); +err3: + my_afree((gptr) engine_array); err2: my_free(file_buffer, MYF(0)); err1: diff --git a/sql/handler.cc b/sql/handler.cc index bb7c39be262..f548dc32b7e 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -165,7 +165,7 @@ plugin_ref ha_lock_engine(THD *thd, handlerton *hton) { st_plugin_int **plugin= hton2plugin + hton->slot; -#ifdef DBUG_OFF; +#ifdef DBUG_OFF return my_plugin_lock(thd, plugin); #else return my_plugin_lock(thd, &plugin); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index af73a42dab1..a2006d2e072 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -628,6 +628,11 @@ static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc CALLER_INFO_PROTO) plugin= pi; #else + /* + For debugging, we do an additional malloc which allows the + memory manager and/or valgrind to track locked references and + double unlocks to aid resolving reference counting.problems. + */ if (!(plugin= (plugin_ref) my_malloc_ci(sizeof(pi), MYF(MY_WME)))) DBUG_RETURN(NULL); @@ -927,7 +932,6 @@ static void intern_plugin_unlock(LEX *lex, plugin_ref plugin) if (!pi->plugin_dl) DBUG_VOID_RETURN; #else - *(long *) plugin= -1; /* salt the ground, we're debugging */ my_free((gptr) plugin, MYF(MY_WME)); #endif @@ -1085,7 +1089,7 @@ static byte *get_bookmark_hash_key(const byte *buff, uint *length, From there we load up the dynamic types (assuming we have not been told to skip this part). - Finally we inializie everything, aka the dynamic that have yet to initialize. + Finally we initialize everything, aka the dynamic that have yet to initialize. */ int plugin_init(int *argc, char **argv, int flags) { @@ -1240,7 +1244,7 @@ static bool register_builtin(struct st_mysql_plugin *plugin, struct st_plugin_int *tmp, struct st_plugin_int **ptr) { - DBUG_ENTER("plugin_register_builtin"); + DBUG_ENTER("register_builtin"); tmp->plugin= plugin; tmp->name.str= (char *)plugin->name; @@ -1262,8 +1266,10 @@ static bool register_builtin(struct st_mysql_plugin *plugin, } +#ifdef NOT_USED_YET /* Register a plugin at run time. (note, this doesn't initialize a plugin) + Will be useful for embedded applications. SYNOPSIS plugin_register_builtin() @@ -1298,6 +1304,7 @@ end: DBUG_RETURN(result);; } +#endif /* NOT_USED_YET */ /* @@ -1523,15 +1530,12 @@ void plugin_shutdown(void) /* Now we can deallocate all memory. */ -#if defined(SAFE_MUTEX) && !defined(DBUG_OFF) + /* neccessary to avoid safe_mutex_assert_owner() trap */ pthread_mutex_lock(&LOCK_plugin); -#endif cleanup_variables(NULL, &global_system_variables, true); cleanup_variables(NULL, &max_system_variables, true); -#if defined(SAFE_MUTEX) && !defined(DBUG_OFF) pthread_mutex_unlock(&LOCK_plugin); -#endif initialized= 0; pthread_mutex_destroy(&LOCK_plugin); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 5c079ca2c65..16066a5ca40 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -142,7 +142,6 @@ extern "C" { #define HA_INNOBASE_ROWS_IN_TABLE 10000 /* to get optimization right */ #define HA_INNOBASE_RANGE_COUNT 100 -ulong innobase_large_page_size = 0; /* The default values for the following, type long or longlong, start-up parameters are declared in mysqld.cc: */ @@ -169,18 +168,27 @@ char* innobase_unix_file_flush_method = NULL; /* Below we have boolean-valued start-up parameters, and their default values */ +static ulong innobase_fast_shutdown = 1; +#ifdef UNIV_LOG_ARCHIVE +static my_bool innobase_log_archive = FALSE;/* unused */ +#endif /* UNIG_LOG_ARCHIVE */ +static my_bool innobase_use_doublewrite = TRUE; +static my_bool innobase_use_checksums = TRUE; -my_bool innobase_use_large_pages = FALSE; -my_bool innobase_use_native_aio = FALSE; +static my_bool innobase_file_per_table = FALSE; +static my_bool innobase_locks_unsafe_for_binlog = FALSE; +static my_bool innobase_rollback_on_timeout = FALSE; +static my_bool innobase_create_status_file = FALSE; -static char *internal_innobase_data_file_path = NULL; +static +char* internal_innobase_data_file_path = NULL; /* The following counter is used to convey information to InnoDB about server activity: in selects it is not sensible to call @@ -188,6 +196,7 @@ srv_active_wake_master_thread after each fetch or search, we only do it every INNOBASE_WAKE_INTERVAL'th step. */ #define INNOBASE_WAKE_INTERVAL 32 +static ulong innobase_active_counter = 0; static HASH innobase_open_tables; @@ -241,6 +250,7 @@ innobase_commit_low( /*================*/ trx_t* trx); /* in: transaction handle */ +static SHOW_VAR innodb_status_variables[]= { {"buffer_pool_pages_data", (char*) &export_vars.innodb_buffer_pool_pages_data, SHOW_LONG}, @@ -1315,14 +1325,6 @@ innobase_init(void *p) innobase_hton->flags=HTON_NO_FLAGS; innobase_hton->release_temporary_latches=innobase_release_temporary_latches; -#ifdef HAVE_LARGE_PAGES - if (my_use_large_pages) - { - innobase_use_large_pages= 1; - innobase_large_page_size= opt_large_page_size; - } -#endif - ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR); #ifdef UNIV_DEBUG @@ -1504,8 +1506,10 @@ innobase_init(void *p) srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; srv_use_checksums = (ibool) innobase_use_checksums; - os_use_large_pages = (ibool) innobase_use_large_pages; - os_large_page_size = (ulint) innobase_large_page_size; +#ifdef HAVE_LARGE_PAGES + if ((os_use_large_pages = (ibool) my_use_large_pages)) + os_large_page_size = (ulint) opt_large_page_size; +#endif row_rollback_on_timeout = (ibool) innobase_rollback_on_timeout; @@ -4947,29 +4951,29 @@ ha_innobase::delete_all_rows(void) DBUG_ENTER("ha_innobase::delete_all_rows"); - if (ha_sql_command() != SQLCOM_TRUNCATE) { - fallback: - /* We only handle TRUNCATE TABLE t as a special case. - DELETE FROM t will have to use ha_innobase::delete_row(). */ - DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND); - } - /* Get the transaction associated with the current thd, or create one if not yet created, and update prebuilt->trx */ update_thd(thd); - /* Truncate the table in InnoDB */ + if (ha_sql_command() == SQLCOM_TRUNCATE) { + /* Truncate the table in InnoDB */ - error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx); - if (error == DB_ERROR) { - /* Cannot truncate; resort to ha_innobase::delete_row() */ - goto fallback; + error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx); + if (error == DB_ERROR) { + /* Cannot truncate; resort to ha_innobase::delete_row() */ + goto fallback; + } + + error = convert_error_code_to_mysql(error, NULL); + + DBUG_RETURN(error); } - error = convert_error_code_to_mysql(error, NULL); - - DBUG_RETURN(error); +fallback: + /* We only handle TRUNCATE TABLE t as a special case. + DELETE FROM t will have to use ha_innobase::delete_row(). */ + DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND); } /********************************************************************* @@ -6767,17 +6771,21 @@ ha_innobase::store_lock( ha_tx_isolation()); } - if (ha_sql_command() == SQLCOM_DROP_TABLE) { + DBUG_ASSERT(thd == ha_thd()); + const bool in_lock_tables = thd_in_lock_tables(thd); + const uint sql_command = ha_sql_command(); + + if (sql_command == SQLCOM_DROP_TABLE) { /* MySQL calls this function in DROP TABLE though this table handle may belong to another thd that is running a query. Let us in that case skip any changes to the prebuilt struct. */ - } else if ((thd_in_lock_tables(thd) && + } else if ((in_lock_tables && (lock_type == TL_READ || lock_type == TL_READ_HIGH_PRIORITY)) || lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_NO_INSERT || - (ha_sql_command() != SQLCOM_SELECT + (sql_command != SQLCOM_SELECT && lock_type != TL_IGNORE)) { /* The OR cases above are in this order: @@ -6806,9 +6814,9 @@ ha_innobase::store_lock( || isolation_level == TRX_ISO_READ_COMMITTED) && isolation_level != TRX_ISO_SERIALIZABLE && (lock_type == TL_READ || lock_type == TL_READ_NO_INSERT) - && (ha_sql_command() == SQLCOM_INSERT_SELECT - || ha_sql_command() == SQLCOM_UPDATE - || ha_sql_command() == SQLCOM_CREATE_TABLE)) { + && (sql_command == SQLCOM_INSERT_SELECT + || sql_command == SQLCOM_UPDATE + || sql_command == SQLCOM_CREATE_TABLE)) { /* If we either have innobase_locks_unsafe_for_binlog option set or this session is using READ COMMITTED @@ -6821,7 +6829,7 @@ ha_innobase::store_lock( prebuilt->select_lock_type = LOCK_NONE; prebuilt->stored_select_lock_type = LOCK_NONE; - } else if (ha_sql_command() == SQLCOM_CHECKSUM) { + } else if (sql_command == SQLCOM_CHECKSUM) { /* Use consistent read for checksum table */ prebuilt->select_lock_type = LOCK_NONE; @@ -6851,7 +6859,7 @@ ha_innobase::store_lock( (if it does not use a consistent read). */ if (lock_type == TL_READ - && ha_sql_command() == SQLCOM_LOCK_TABLES) { + && sql_command == SQLCOM_LOCK_TABLES) { /* We come here if MySQL is processing LOCK TABLES ... READ LOCAL. MyISAM under that table lock type reads the table as it was at the time the lock was @@ -6878,23 +6886,23 @@ ha_innobase::store_lock( if ((lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE) - && !(thd_in_lock_tables(thd) - && ha_sql_command() == SQLCOM_LOCK_TABLES) + && !(in_lock_tables + && sql_command == SQLCOM_LOCK_TABLES) && !thd_tablespace_op(thd) - && ha_sql_command() != SQLCOM_TRUNCATE - && ha_sql_command() != SQLCOM_OPTIMIZE + && sql_command != SQLCOM_TRUNCATE + && sql_command != SQLCOM_OPTIMIZE #ifdef __WIN__ - /* For alter table on win32 for succesful operation - completion it is used TL_WRITE(=10) lock instead of - TL_WRITE_ALLOW_READ(=6), however here in innodb handler - TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes - race condition when several clients do alter table - simultaneously (bug #17264). This fix avoids the problem. */ - && ha_sql_command() != SQLCOM_ALTER_TABLE + /* For alter table on win32 for succesful operation + completion it is used TL_WRITE(=10) lock instead of + TL_WRITE_ALLOW_READ(=6), however here in innodb handler + TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes + race condition when several clients do alter table + simultaneously (bug #17264). This fix avoids the problem. */ + && sql_command != SQLCOM_ALTER_TABLE #endif - && ha_sql_command() != SQLCOM_CREATE_TABLE) { + && sql_command != SQLCOM_CREATE_TABLE) { lock_type = TL_WRITE_ALLOW_WRITE; } @@ -6910,7 +6918,7 @@ ha_innobase::store_lock( (MySQL does have thd_in_lock_tables() TRUE there). */ if (lock_type == TL_READ_NO_INSERT - && ha_sql_command() != SQLCOM_LOCK_TABLES) { + && sql_command != SQLCOM_LOCK_TABLES) { lock_type = TL_READ; } @@ -7652,9 +7660,11 @@ static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "Where full logs should be archived.", NULL, NULL, NULL); +#ifdef UNIV_LOG_ARCHIVE static MYSQL_SYSVAR_BOOL(log_archive, innobase_log_archive, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, "Set to 1 if you want to have logs archived.", NULL, NULL, FALSE); +#endif /* UNIV_LOG_ARCHIVE */ static MYSQL_SYSVAR_STR(log_group_home_dir, innobase_log_group_home_dir, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, @@ -7784,7 +7794,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(locks_unsafe_for_binlog), MYSQL_SYSVAR(lock_wait_timeout), MYSQL_SYSVAR(log_arch_dir), +#ifdef UNIV_LOG_ARCHIVE MYSQL_SYSVAR(log_archive), +#endif /* UNIV_LOG_ARCHIVE */ MYSQL_SYSVAR(log_buffer_size), MYSQL_SYSVAR(log_file_size), MYSQL_SYSVAR(log_files_in_group), diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index bc19f6fbf93..75cccae0e92 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -202,9 +202,6 @@ class ha_innobase: public handler uint table_changes); }; -extern SHOW_VAR innodb_status_variables[]; -extern ulong innobase_fast_shutdown; -extern ulong innobase_large_page_size; extern long innobase_mirrored_log_groups, innobase_log_files_in_group; extern longlong innobase_buffer_pool_size, innobase_log_file_size; extern long innobase_log_buffer_size; @@ -216,15 +213,6 @@ extern long innobase_open_files; extern char *innobase_data_home_dir, *innobase_data_file_path; extern char *innobase_log_group_home_dir, *innobase_log_arch_dir; extern char *innobase_unix_file_flush_method; -/* The following variables have to be my_bool for SHOW VARIABLES to work */ -extern my_bool innobase_log_archive, - innobase_use_doublewrite, - innobase_use_checksums, - innobase_use_large_pages, - innobase_use_native_aio, - innobase_file_per_table, innobase_locks_unsafe_for_binlog, - innobase_rollback_on_timeout, - innobase_create_status_file; extern "C" { extern ulong srv_max_buf_pool_modified_pct; extern ulong srv_max_purge_lag; From 1e6bd48ccbd725c298453cf6c7645b430529fe43 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 11:38:58 -0700 Subject: [PATCH 006/137] WL#2936 "Plugin Server Variables" Post review cleanups. sql/mysql_priv.h: WL2936 move where sql_plugin.h is included earlier so that plugin_ref declaration is available to sql/structs.h sql/sql_class.cc: WL2936 cleanup remove lock_locals argument for plugin_thdvar_init() sql/sql_connect.cc: WL2936 cleanup redundant call to plugin_thdvar_init() sql/sql_plugin.cc: WL2936 cleanup remove lock_locals argument for plugin_thdvar_init() renamed st_bookmark member from 'name' to 'key'. split cleanup_variables() and remove free_memory argument. sql/sql_plugin.h: WL2936 cleanup remove lock_locals argument for plugin_thdvar_init() sql/structs.h: WL2936 cleanup remove ugly conditional compilation, use plugin_ref --- sql/mysql_priv.h | 2 +- sql/sql_class.cc | 3 +- sql/sql_connect.cc | 2 - sql/sql_plugin.cc | 107 +++++++++++++++++++++++++-------------------- sql/sql_plugin.h | 2 +- sql/structs.h | 6 +-- 6 files changed, 64 insertions(+), 58 deletions(-) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 4968fde7f64..0dfeb696882 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -38,6 +38,7 @@ #include #include "sql_bitmap.h" #include "sql_array.h" +#include "sql_plugin.h" #include "scheduler.h" /* TODO convert all these three maps to Bitmap classes */ @@ -560,7 +561,6 @@ typedef my_bool (*qc_engine_callback)(THD *thd, char *table_key, #include "sql_list.h" #include "sql_map.h" #include "my_decimal.h" -#include "sql_plugin.h" #include "handler.h" #include "parse_file.h" #include "table.h" diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 86fa694dc88..9fba5b92ba5 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -408,7 +408,8 @@ void THD::init(void) { pthread_mutex_lock(&LOCK_global_system_variables); variables= global_system_variables; - plugin_thdvar_init(this, false); + variables.table_plugin= NULL; + plugin_thdvar_init(this); variables.time_format= date_time_format_copy((THD*) 0, variables.time_format); variables.date_format= date_time_format_copy((THD*) 0, diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 41b4c1b8e31..3ed32c28c7e 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1004,8 +1004,6 @@ void prepare_new_connection_state(THD* thd) if (thd->client_capabilities & CLIENT_COMPRESS) thd->net.compress=1; // Use compression - plugin_thdvar_init(thd, true); - thd->version= refresh_version; thd->proc_info= 0; thd->command= COM_SLEEP; diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index a2006d2e072..6da247ee153 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -127,13 +127,18 @@ struct st_item_value_holder : public st_mysql_value hash and is used to mark a single offset for a thd local variable even if plugins have been uninstalled and reinstalled, repeatedly. This structure is allocated from plugin_mem_root. + + The key format is as follows: + 1 byte - variable type code + name_len bytes - variable name + '\0' - end of key */ struct st_bookmark { - char *name; uint name_len; int offset; uint version; + char key[0]; }; @@ -187,8 +192,8 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, static bool register_builtin(struct st_mysql_plugin *plugin, struct st_plugin_int *tmp, struct st_plugin_int **ptr); -static void cleanup_variables(THD *thd, struct system_variables *vars, - bool free_memory); +static void unlock_variables(THD *thd, struct system_variables *vars); +static void cleanup_variables(THD *thd, struct system_variables *vars); static void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt); #define my_intern_plugin_lock(A,B) intern_plugin_lock(A,B CALLER_INFO) @@ -789,7 +794,8 @@ err: } -static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) +static void plugin_deinitialize(struct st_plugin_int *plugin, + bool ref_check= TRUE) { /* we don't want to hold the LOCK_plugin mutex as it may cause @@ -905,7 +911,7 @@ static void reap_plugins(void) list= reap; while ((plugin= *(--list))) - plugin_deinitialize(plugin, true); + plugin_deinitialize(plugin); pthread_mutex_lock(&LOCK_plugin); @@ -1080,7 +1086,7 @@ static byte *get_bookmark_hash_key(const byte *buff, uint *length, { struct st_bookmark *var= (st_bookmark *)buff; *length= var->name_len + 1; - return (byte*) var->name; + return (byte*) var->key; } @@ -1220,7 +1226,7 @@ int plugin_init(int *argc, char **argv, int flags) while ((plugin_ptr= *(--reap))) { pthread_mutex_unlock(&LOCK_plugin); - plugin_deinitialize(plugin_ptr, true); + plugin_deinitialize(plugin_ptr); pthread_mutex_lock(&LOCK_plugin); plugin_del(plugin_ptr); } @@ -1454,14 +1460,6 @@ void plugin_shutdown(void) { pthread_mutex_lock(&LOCK_plugin); - /* - release any plugin references held but don't yet free - memory for dynamic variables as some plugins may still - want to reference their global variables. - */ - cleanup_variables(NULL, &global_system_variables, false); - cleanup_variables(NULL, &max_system_variables, false); - reap_needed= true; /* @@ -1473,6 +1471,7 @@ void plugin_shutdown(void) */ while (reap_needed && (count= plugin_array.elements)) { + reap_plugins(); for (i= 0; i < count; i++) { plugin= dynamic_element(&plugin_array, i, struct st_plugin_int *); @@ -1482,7 +1481,14 @@ void plugin_shutdown(void) reap_needed= true; } } - reap_plugins(); + if (!reap_needed) + { + /* + release any plugin references held. + */ + unlock_variables(NULL, &global_system_variables); + unlock_variables(NULL, &max_system_variables); + } } if (count > 0) @@ -1510,6 +1516,10 @@ void plugin_shutdown(void) { sql_print_information("Plugin '%s' will be forced to shutdown", plugins[i]->name.str); + /* + We are forcing deinit on plugins so we don't want to do a ref_count + check until we have processed all the plugins. + */ plugin_deinitialize(plugins[i], false); } @@ -1533,8 +1543,8 @@ void plugin_shutdown(void) /* neccessary to avoid safe_mutex_assert_owner() trap */ pthread_mutex_lock(&LOCK_plugin); - cleanup_variables(NULL, &global_system_variables, true); - cleanup_variables(NULL, &max_system_variables, true); + cleanup_variables(NULL, &global_system_variables); + cleanup_variables(NULL, &max_system_variables); pthread_mutex_unlock(&LOCK_plugin); initialized= 0; @@ -2148,7 +2158,7 @@ static st_bookmark *register_var(const char *plugin, const char *name, result= (st_bookmark*) alloc_root(&plugin_mem_root, sizeof(struct st_bookmark) + length); varname[0]= flags & PLUGIN_VAR_TYPEMASK; - result->name= (char *) memcpy(&result[1], varname, length); + memcpy(result->key, varname, length); result->name_len= length - 2; result->offset= -1; @@ -2244,9 +2254,9 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) st_bookmark *v= (st_bookmark*) hash_element(&bookmark_hash,idx); if (v->version <= thd->variables.dynamic_variables_version || - !(var= intern_find_sys_var(v->name + 1, v->name_len, true)) || + !(var= intern_find_sys_var(v->key + 1, v->name_len, true)) || !(pi= var->cast_pluginvar()) || - v->name[0] != (pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) + v->key[0] != (pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) continue; /* Here we do anything special that may be required of the data types */ @@ -2283,27 +2293,33 @@ static byte *mysql_sys_var_ptr(void* a_thd, int offset) } -void plugin_thdvar_init(THD *thd, bool lock_locals) +void plugin_thdvar_init(THD *thd) { /* we are going to allocate these lazily */ thd->variables.dynamic_variables_version= 0; thd->variables.dynamic_variables_size= 0; thd->variables.dynamic_variables_ptr= 0; - if (lock_locals) - { - DBUG_ASSERT(!(thd->variables.table_plugin)); - thd->variables.table_plugin= + DBUG_ASSERT(!(thd->variables.table_plugin)); + thd->variables.table_plugin= my_plugin_lock(NULL, &global_system_variables.table_plugin); - } - else - { - thd->variables.table_plugin= NULL; - } } -static void cleanup_variables(THD *thd, struct system_variables *vars, - bool free_memory) + +/* + Unlocks all system variables which hold a reference +*/ +static void unlock_variables(THD *thd, struct system_variables *vars) +{ + intern_plugin_unlock(NULL, vars->table_plugin); + vars->table_plugin= NULL; +} + + +/* + Frees memory used by system variables +*/ +static void cleanup_variables(THD *thd, struct system_variables *vars) { st_bookmark *v; sys_var_pluginvar *pivar; @@ -2316,9 +2332,9 @@ static void cleanup_variables(THD *thd, struct system_variables *vars, { v= (st_bookmark*) hash_element(&bookmark_hash, idx); if (v->version > vars->dynamic_variables_version || - !(var= intern_find_sys_var(v->name + 1, v->name_len, true)) || + !(var= intern_find_sys_var(v->key + 1, v->name_len, true)) || !(pivar= var->cast_pluginvar()) || - v->name[0] != (pivar->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) + v->key[0] != (pivar->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) continue; flags= pivar->plugin_var->flags; @@ -2333,16 +2349,10 @@ static void cleanup_variables(THD *thd, struct system_variables *vars, } rw_unlock(&LOCK_system_variables_hash); - intern_plugin_unlock(NULL, vars->table_plugin); - vars->table_plugin= NULL; - - if (free_memory) - { - my_free(vars->dynamic_variables_ptr, MYF(MY_ALLOW_ZERO_PTR)); - vars->dynamic_variables_ptr= NULL; - vars->dynamic_variables_size= 0; - vars->dynamic_variables_version= 0; - } + my_free(vars->dynamic_variables_ptr, MYF(MY_ALLOW_ZERO_PTR)); + vars->dynamic_variables_ptr= NULL; + vars->dynamic_variables_size= 0; + vars->dynamic_variables_version= 0; } @@ -2354,7 +2364,8 @@ void plugin_thdvar_cleanup(THD *thd) pthread_mutex_lock(&LOCK_plugin); - cleanup_variables(thd, &thd->variables, true); + unlock_variables(thd, &thd->variables); + cleanup_variables(thd, &thd->variables); if ((idx= thd->main_lex.plugins.elements)) { @@ -2828,7 +2839,7 @@ static int construct_options(MEM_ROOT *mem_root, optnamelen= namelen + optnamelen + 1; } else - optname= memdup_root(mem_root, v->name + 1, (optnamelen= v->name_len) + 1); + optname= memdup_root(mem_root, v->key + 1, (optnamelen= v->name_len) + 1); /* convert '_' to '-' */ for (p= optname; *p; p++) @@ -2970,7 +2981,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, continue; if ((var= find_bookmark(tmp->plugin->name, o->name, o->flags))) - v= new (mem_root) sys_var_pluginvar(var->name + 1, o); + v= new (mem_root) sys_var_pluginvar(var->key + 1, o); else { len= strlen(tmp->plugin->name) + strlen(o->name) + 2; diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h index 17208f41b38..70ce21a64da 100644 --- a/sql/sql_plugin.h +++ b/sql/sql_plugin.h @@ -126,7 +126,7 @@ extern bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl); extern bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name); extern bool plugin_register_builtin(struct st_mysql_plugin *plugin); -extern void plugin_thdvar_init(THD *thd, bool lock_locals); +extern void plugin_thdvar_init(THD *thd); extern void plugin_thdvar_cleanup(THD *thd); typedef my_bool (plugin_foreach_func)(THD *thd, diff --git a/sql/structs.h b/sql/structs.h index 3c08b5a3de1..f55a9757011 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -83,11 +83,7 @@ typedef struct st_key { */ union { -#ifdef DBUG_OFF - struct st_plugin_int *parser; /* Fulltext [pre]parser */ -#else - struct st_plugin_int **parser; /* Fulltext [pre]parser */ -#endif + plugin_ref parser; /* Fulltext [pre]parser */ LEX_STRING *parser_name; /* Fulltext [pre]parser name */ }; KEY_PART_INFO *key_part; From 68d74c0a3085ac05aa9333abc63feae23797fce3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 16:33:21 +0800 Subject: [PATCH 007/137] BUG#19710 Cluster replication to partition table fails on DELETE FROM statement update rpl_ndb_innodb2ndb and rpl_ndb_myisam2ndb testcase's option and result mysql-test/t/disabled.def: recover test case 'rpl_ndb_innodb2ndb' and 'rpl_ndb_myisam2ndb' mysql-test/t/rpl_ndb_innodb2ndb-slave.opt: add "--new=ture" option to mysqld, that means "Use very new possible 'unsafe' functions" mysql-test/t/rpl_ndb_myisam2ndb-slave.opt: add "--new=ture" option to mysqld, that means "Use very new possible 'unsafe' functions" mysql-test/r/rpl_ndb_innodb2ndb.result: get the test result by 'mysql-test-run.pl --record rpl_ndb_innodb2ndb' mysql-test/r/rpl_ndb_myisam2ndb.result: get the test result by 'mysql-test-run.pl --record rpl_ndb_myisam2ndb' --- mysql-test/r/rpl_ndb_innodb2ndb.result | 855 ++++++++++++++++++++++ mysql-test/r/rpl_ndb_myisam2ndb.result | 855 ++++++++++++++++++++++ mysql-test/t/disabled.def | 2 - mysql-test/t/rpl_ndb_innodb2ndb-slave.opt | 2 +- mysql-test/t/rpl_ndb_myisam2ndb-slave.opt | 2 +- 5 files changed, 1712 insertions(+), 4 deletions(-) create mode 100644 mysql-test/r/rpl_ndb_innodb2ndb.result create mode 100644 mysql-test/r/rpl_ndb_myisam2ndb.result diff --git a/mysql-test/r/rpl_ndb_innodb2ndb.result b/mysql-test/r/rpl_ndb_innodb2ndb.result new file mode 100644 index 00000000000..cf4c67f063b --- /dev/null +++ b/mysql-test/r/rpl_ndb_innodb2ndb.result @@ -0,0 +1,855 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SET storage_engine=innodb; +--- Doing pre test cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 1 Basic testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE,PRIMARY KEY(id)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly -- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 1 Basic testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 2 partition RANGE testing -- +--- Do setup -- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +--- Show table on slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 2 partition RANGE testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 3 partition LIST testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +--- Test 3 Alter to add partition --- +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(id); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 3 partition LIST testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 4 partition HASH testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY HASH( YEAR(t) ) +PARTITIONS 4; +--- show that tables have been created correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 4 partition HASH testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 5 partition by key testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE,PRIMARY KEY(id)) +PARTITION BY KEY() +PARTITIONS 4; +--- Show that tables on master are ndbcluster tables --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Show that tables on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Make sure that our tables on slave are still right type --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 5 key partition testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_myisam2ndb.result b/mysql-test/r/rpl_ndb_myisam2ndb.result new file mode 100644 index 00000000000..35fc778a693 --- /dev/null +++ b/mysql-test/r/rpl_ndb_myisam2ndb.result @@ -0,0 +1,855 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SET storage_engine=myisam; +--- Doing pre test cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 1 Basic testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE,PRIMARY KEY(id)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly -- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 1 Basic testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 2 partition RANGE testing -- +--- Do setup -- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY RANGE (YEAR(t)) +(PARTITION p0 VALUES LESS THAN (1901), +PARTITION p1 VALUES LESS THAN (1946), +PARTITION p2 VALUES LESS THAN (1966), +PARTITION p3 VALUES LESS THAN (1986), +PARTITION p4 VALUES LESS THAN (2005), +PARTITION p5 VALUES LESS THAN MAXVALUE); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +--- Show table on slave -- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 2 partition RANGE testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; +--- Start test 3 partition LIST testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY LIST(id) +(PARTITION p0 VALUES IN (2, 4), +PARTITION p1 VALUES IN (42, 142)); +--- Test 3 Alter to add partition --- +ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); +--- Show table on master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +--- Show table on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(id); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 3 partition LIST testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 4 partition HASH testing --- +--- Do setup --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE) +PARTITION BY HASH( YEAR(t) ) +PARTITIONS 4; +--- show that tables have been created correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 ADD PRIMARY KEY(t,id); +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`t`,`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 4 partition HASH testing --- +--- Do Cleanup -- +DROP TABLE IF EXISTS t1; +--- Start test 5 partition by key testing --- +--- Create Table Section --- +CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), +bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, +f FLOAT DEFAULT 0, total BIGINT UNSIGNED, +y YEAR, t DATE,PRIMARY KEY(id)) +PARTITION BY KEY() +PARTITIONS 4; +--- Show that tables on master are ndbcluster tables --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Show that tables on slave --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned DEFAULT NULL, + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Make sure that our tables on slave are still right type --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` varchar(255) DEFAULT NULL, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- Check that simple Alter statements are replicated correctly --- +ALTER TABLE t1 MODIFY vc TEXT; +--- Show the new improved table on the master --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Make sure that our tables on slave are still same engine --- +--- and that the alter statements replicated correctly --- +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL, + `b1` bit(8) DEFAULT NULL, + `vc` text, + `bc` char(255) DEFAULT NULL, + `d` decimal(10,4) DEFAULT '0.0000', + `f` float DEFAULT '0', + `total` bigint(20) unsigned NOT NULL DEFAULT '0', + `y` year(4) DEFAULT NULL, + `t` date DEFAULT NULL, + PRIMARY KEY (`id`,`total`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ +--- Perform basic operation on master --- +--- and ensure replicated correctly --- +"--- Insert into t1 --" as ""; +--- Select from t1 on master --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Select from t1 on slave --- +select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; +id hex(b1) vc bc d f total y t +2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 +4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 +42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 +142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 +412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 +--- Update t1 on master -- +UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; +--- Check the update on master --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Check Update on slave --- +SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; +id hex(b1) vc bc d f total y t +412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +--- Remove a record from t1 on master --- +DELETE FROM t1 WHERE id = 42; +--- Show current count on master for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +--- Show current count on slave for t1 --- +SELECT COUNT(*) FROM t1; +COUNT(*) +4 +DELETE FROM t1; +--- End test 5 key partition testing --- +--- Do Cleanup --- +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 913fe8e62ee..43569b2bf1e 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -24,8 +24,6 @@ rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not r rpl_ndb_2myisam : BUG#19227 Seems to pass currently rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked -rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement -rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly rpl_multi_engine : BUG#22583 2006-09-23 lars synchronization : Bug#24529 Test 'synchronization' fails on Mac pushbuild; Also on Linux 64 bit. diff --git a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt index 7f9eb96dff1..50d37bb6d1d 100644 --- a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt +++ b/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt @@ -1 +1 @@ ---default-storage-engine=ndbcluster +--default-storage-engine=ndbcluster --new=true diff --git a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt index 701dddb075b..50d37bb6d1d 100644 --- a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt +++ b/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt @@ -1 +1 @@ ---default-storage-engine=ndbcluster +--default-storage-engine=ndbcluster --new=true From bf2aaad97d0ff65a4a79f9012b4443d4d6dbd6e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Apr 2007 19:23:02 +0200 Subject: [PATCH 008/137] wl#2936 - fixing problems include/mysql/plugin.h: warning. no int/realsize mysys/my_getopt.c: combination of prefixes (e.g. --loose-skip-) didn't work sql/event_queue.cc: warning sql/handler.cc: assert sql/handler.h: comment sql/item_create.cc: warnings sql/log.cc: warnings sql/mysqld.cc: wl#2936 - fixing problems (memory leak in load_defaults, garbage in opt_[slow_]logname sql/partition_element.h: warnings sql/rpl_utility.h: warnings sql/set_var.cc: comment sql/set_var.h: warnings sql/sql_class.cc: warnings sql/sql_parse.cc: warnings sql/sql_plugin.cc: wl#2936 - fixing problems: portability, coding style, reporting of spurious errors, crashes, incorrect help output storage/example/ha_example.cc: comment storage/innobase/handler/ha_innodb.cc: wl#2936 - fixing problems (crash) --- include/mysql/plugin.h | 8 +- mysql-test/mysql-test-run.pl | 14 +- mysql-test/r/flush2.result | 2 + mysql-test/r/im_utils.result | 8 +- mysys/my_getopt.c | 16 +- sql/event_queue.cc | 2 +- sql/handler.cc | 1 + sql/handler.h | 4 + sql/item_create.cc | 382 +++++++++++++------------- sql/log.cc | 4 +- sql/mysqld.cc | 35 +-- sql/partition_element.h | 4 +- sql/rpl_utility.h | 2 +- sql/set_var.cc | 2 - sql/set_var.h | 6 +- sql/sql_class.cc | 16 +- sql/sql_parse.cc | 62 ++--- sql/sql_plugin.cc | 159 +++++------ storage/example/ha_example.cc | 5 + storage/innobase/handler/ha_innodb.cc | 2 +- 20 files changed, 369 insertions(+), 365 deletions(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index ef4392a485c..d15302dc256 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -632,8 +632,8 @@ struct st_mysql_value { int (*value_type)(struct st_mysql_value *); const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length); - int (*val_real)(struct st_mysql_value *, void *realbuf, int realsize); - int (*val_int)(struct st_mysql_value *, void *intbuf, int intsize); + int (*val_real)(struct st_mysql_value *, double *realbuf); + int (*val_int)(struct st_mysql_value *, long long *intbuf); }; @@ -651,8 +651,8 @@ long long thd_test_options(const MYSQL_THD thd, long long test_options); int thd_sql_command(const MYSQL_THD thd); const char *thd_proc_info(MYSQL_THD thd, const char *info); void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton); -char *thd_security_context(MYSQL_THD thd, char *buffer, int length, - int max_query_len); +char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length, + unsigned int max_query_len); #ifdef __cplusplus diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 33836837d53..aabd15838e2 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2930,8 +2930,8 @@ sub install_db ($$) { mtr_add_arg($args, "--skip-grant-tables"); mtr_add_arg($args, "--basedir=%s", $path_my_basedir); mtr_add_arg($args, "--datadir=%s", $data_dir); - mtr_add_arg($args, "--skip-innodb"); - mtr_add_arg($args, "--skip-ndbcluster"); + mtr_add_arg($args, "--loose-skip-innodb"); + mtr_add_arg($args, "--loose-skip-ndbcluster"); mtr_add_arg($args, "--tmpdir=."); mtr_add_arg($args, "--core-file"); @@ -3037,8 +3037,8 @@ character-sets-dir = $path_charsetsdir basedir = $path_my_basedir server_id = $server_id skip-stack-trace -skip-innodb -skip-ndbcluster +loose-skip-innodb +loose-skip-ndbcluster EOF ; if ( $mysql_version_id < 50100 ) @@ -3676,7 +3676,7 @@ sub mysqld_arguments ($$$$$) { if ( $opt_skip_ndbcluster || !$cluster->{'pid'}) { - mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); + mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix); } else { @@ -3731,7 +3731,7 @@ sub mysqld_arguments ($$$$$) { $slave->[$idx]->{'port'}); mtr_add_arg($args, "%s--report-user=root", $prefix); mtr_add_arg($args, "%s--skip-innodb", $prefix); - mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); + mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix); mtr_add_arg($args, "%s--skip-slave-start", $prefix); # Directory where slaves find the dumps generated by "load data" @@ -3767,7 +3767,7 @@ sub mysqld_arguments ($$$$$) { $slave->[$idx]->{'cluster'} == -1 || !$clusters->[$slave->[$idx]->{'cluster'}]->{'pid'} ) { - mtr_add_arg($args, "%s--skip-ndbcluster", $prefix); + mtr_add_arg($args, "%s--loose-skip-ndbcluster", $prefix); } else { diff --git a/mysql-test/r/flush2.result b/mysql-test/r/flush2.result index 8257fa05b41..25969a72ef5 100644 --- a/mysql-test/r/flush2.result +++ b/mysql-test/r/flush2.result @@ -5,6 +5,7 @@ Variable_name Value log ON log_bin OFF log_bin_trust_function_creators ON +log_bin_trust_routine_creators ON log_error log_output TABLE log_queries_not_using_indexes OFF @@ -17,6 +18,7 @@ Variable_name Value log ON log_bin OFF log_bin_trust_function_creators ON +log_bin_trust_routine_creators ON log_error log_output TABLE log_queries_not_using_indexes OFF diff --git a/mysql-test/r/im_utils.result b/mysql-test/r/im_utils.result index b2885030637..df67a2eb960 100644 --- a/mysql-test/r/im_utils.result +++ b/mysql-test/r/im_utils.result @@ -20,8 +20,8 @@ character-sets-dir VALUE basedir VALUE server_id VALUE skip-stack-trace VALUE -skip-plugin-innodb VALUE -skip-plugin-ndbcluster VALUE +loose-skip-innodb VALUE +loose-skip-ndbcluster VALUE log-output VALUE SHOW INSTANCE OPTIONS mysqld2; option_name value @@ -38,8 +38,8 @@ character-sets-dir VALUE basedir VALUE server_id VALUE skip-stack-trace VALUE -skip-plugin-innodb VALUE -skip-plugin-ndbcluster VALUE +loose-skip-innodb VALUE +loose-skip-ndbcluster VALUE nonguarded VALUE log-output VALUE START INSTANCE mysqld2; diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index f893cf89b5c..4573d27555a 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -97,18 +97,18 @@ void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint, getopt_get_addr= func_addr; } -int handle_options(int *argc, char ***argv, +int handle_options(int *argc, char ***argv, const struct my_option *longopts, my_get_one_option get_one_option) { - uint opt_found, argvpos= 0, length, i; + uint opt_found, argvpos= 0, length; my_bool end_of_options= 0, must_be_var, set_maximum_value, option_is_loose; char **pos, **pos_end, *optend, *prev_found, *opt_str, key_name[FN_REFLEN]; const struct my_option *optp; gptr *value; - int error; + int error, i; LINT_INIT(opt_found); (*argc)--; /* Skip the program name */ @@ -224,12 +224,11 @@ int handle_options(int *argc, char ***argv, /* We were called with a special prefix, we can reuse opt_found */ - opt_str+= (special_opt_prefix_lengths[i] + 1); + opt_str+= special_opt_prefix_lengths[i] + 1; + length-= special_opt_prefix_lengths[i] + 1; if (i == OPT_LOOSE) option_is_loose= 1; - if ((opt_found= findopt(opt_str, length - - (special_opt_prefix_lengths[i] + 1), - &optp, &prev_found))) + if ((opt_found= findopt(opt_str, length, &optp, &prev_found))) { if (opt_found > 1) { @@ -253,7 +252,7 @@ int handle_options(int *argc, char ***argv, break; case OPT_ENABLE: optend= (optend && *optend == '0' && !(*(optend + 1))) ? - disabled_my_option : (char*) "1"; + disabled_my_option : (char*) "1"; break; case OPT_MAXIMUM: set_maximum_value= 1; @@ -262,6 +261,7 @@ int handle_options(int *argc, char ***argv, } break; /* break from the inner loop, main loop continues */ } + i= -1; /* restart the loop */ } } } diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 068abbe3408..38ba212bef3 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -79,7 +79,7 @@ event_queue_element_compare_q(void *vptr, byte* a, byte *b) */ Event_queue::Event_queue() - :mutex_last_unlocked_at_line(0), mutex_last_locked_at_line(0), + :mutex_last_locked_at_line(0), mutex_last_unlocked_at_line(0), mutex_last_attempted_lock_at_line(0), mutex_queue_data_locked(FALSE), mutex_queue_data_attempting_lock(FALSE) { diff --git a/sql/handler.cc b/sql/handler.cc index f548dc32b7e..b4fc7db3809 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1508,6 +1508,7 @@ void **handler::ha_data(void) const THD *handler::ha_thd(void) const { + DBUG_ASSERT(!table || !table->in_use || table->in_use == current_thd); return (table && table->in_use) ? table->in_use : current_thd; } diff --git a/sql/handler.h b/sql/handler.h index fbdd48fcc6d..076fffe142e 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1516,6 +1516,10 @@ public: /* lock_count() can be more than one if the table is a MERGE */ virtual uint lock_count(void) const { return 1; } + /* + NOTE that one can NOT rely on table->in_use in store_lock(). It may + refer to a different thread if called from mysql_lock_abort_for_thread(). + */ virtual THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type)=0; diff --git a/sql/item_create.cc b/sql/item_create.cc index ff5825ef389..f4990a8abdf 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -4684,197 +4684,197 @@ struct Native_func_registry static Native_func_registry func_array[] = { - { C_STRING_WITH_LEN("ABS"), BUILDER(Create_func_abs)}, - { C_STRING_WITH_LEN("ACOS"), BUILDER(Create_func_acos)}, - { C_STRING_WITH_LEN("ADDTIME"), BUILDER(Create_func_addtime)}, - { C_STRING_WITH_LEN("AES_DECRYPT"), BUILDER(Create_func_aes_decrypt)}, - { C_STRING_WITH_LEN("AES_ENCRYPT"), BUILDER(Create_func_aes_encrypt)}, - { C_STRING_WITH_LEN("AREA"), GEOM_BUILDER(Create_func_area)}, - { C_STRING_WITH_LEN("ASBINARY"), GEOM_BUILDER(Create_func_as_wkb)}, - { C_STRING_WITH_LEN("ASIN"), BUILDER(Create_func_asin)}, - { C_STRING_WITH_LEN("ASTEXT"), GEOM_BUILDER(Create_func_as_wkt)}, - { C_STRING_WITH_LEN("ASWKB"), GEOM_BUILDER(Create_func_as_wkb)}, - { C_STRING_WITH_LEN("ASWKT"), GEOM_BUILDER(Create_func_as_wkt)}, - { C_STRING_WITH_LEN("ATAN"), BUILDER(Create_func_atan)}, - { C_STRING_WITH_LEN("ATAN2"), BUILDER(Create_func_atan)}, - { C_STRING_WITH_LEN("BENCHMARK"), BUILDER(Create_func_benchmark)}, - { C_STRING_WITH_LEN("BIN"), BUILDER(Create_func_bin)}, - { C_STRING_WITH_LEN("BIT_COUNT"), BUILDER(Create_func_bit_count)}, - { C_STRING_WITH_LEN("BIT_LENGTH"), BUILDER(Create_func_bit_length)}, - { C_STRING_WITH_LEN("CEIL"), BUILDER(Create_func_ceiling)}, - { C_STRING_WITH_LEN("CEILING"), BUILDER(Create_func_ceiling)}, - { C_STRING_WITH_LEN("CENTROID"), GEOM_BUILDER(Create_func_centroid)}, - { C_STRING_WITH_LEN("CHARACTER_LENGTH"), BUILDER(Create_func_char_length)}, - { C_STRING_WITH_LEN("CHAR_LENGTH"), BUILDER(Create_func_char_length)}, - { C_STRING_WITH_LEN("COERCIBILITY"), BUILDER(Create_func_coercibility)}, - { C_STRING_WITH_LEN("COMPRESS"), BUILDER(Create_func_compress)}, - { C_STRING_WITH_LEN("CONCAT"), BUILDER(Create_func_concat)}, - { C_STRING_WITH_LEN("CONCAT_WS"), BUILDER(Create_func_concat_ws)}, - { C_STRING_WITH_LEN("CONNECTION_ID"), BUILDER(Create_func_connection_id)}, - { C_STRING_WITH_LEN("CONV"), BUILDER(Create_func_conv)}, - { C_STRING_WITH_LEN("CONVERT_TZ"), BUILDER(Create_func_convert_tz)}, - { C_STRING_WITH_LEN("COS"), BUILDER(Create_func_cos)}, - { C_STRING_WITH_LEN("COT"), BUILDER(Create_func_cot)}, - { C_STRING_WITH_LEN("CRC32"), BUILDER(Create_func_crc32)}, - { C_STRING_WITH_LEN("CROSSES"), GEOM_BUILDER(Create_func_crosses)}, - { C_STRING_WITH_LEN("DATEDIFF"), BUILDER(Create_func_datediff)}, - { C_STRING_WITH_LEN("DATE_FORMAT"), BUILDER(Create_func_date_format)}, - { C_STRING_WITH_LEN("DAYNAME"), BUILDER(Create_func_dayname)}, - { C_STRING_WITH_LEN("DAYOFMONTH"), BUILDER(Create_func_dayofmonth)}, - { C_STRING_WITH_LEN("DAYOFWEEK"), BUILDER(Create_func_dayofweek)}, - { C_STRING_WITH_LEN("DAYOFYEAR"), BUILDER(Create_func_dayofyear)}, - { C_STRING_WITH_LEN("DECODE"), BUILDER(Create_func_decode)}, - { C_STRING_WITH_LEN("DEGREES"), BUILDER(Create_func_degrees)}, - { C_STRING_WITH_LEN("DES_DECRYPT"), BUILDER(Create_func_des_decrypt)}, - { C_STRING_WITH_LEN("DES_ENCRYPT"), BUILDER(Create_func_des_encrypt)}, - { C_STRING_WITH_LEN("DIMENSION"), GEOM_BUILDER(Create_func_dimension)}, - { C_STRING_WITH_LEN("DISJOINT"), GEOM_BUILDER(Create_func_disjoint)}, - { C_STRING_WITH_LEN("ELT"), BUILDER(Create_func_elt)}, - { C_STRING_WITH_LEN("ENCODE"), BUILDER(Create_func_encode)}, - { C_STRING_WITH_LEN("ENCRYPT"), BUILDER(Create_func_encrypt)}, - { C_STRING_WITH_LEN("ENDPOINT"), GEOM_BUILDER(Create_func_endpoint)}, - { C_STRING_WITH_LEN("ENVELOPE"), GEOM_BUILDER(Create_func_envelope)}, - { C_STRING_WITH_LEN("EQUALS"), GEOM_BUILDER(Create_func_equals)}, - { C_STRING_WITH_LEN("EXP"), BUILDER(Create_func_exp)}, - { C_STRING_WITH_LEN("EXPORT_SET"), BUILDER(Create_func_export_set)}, - { C_STRING_WITH_LEN("EXTERIORRING"), GEOM_BUILDER(Create_func_exteriorring)}, - { C_STRING_WITH_LEN("EXTRACTVALUE"), BUILDER(Create_func_xml_extractvalue)}, - { C_STRING_WITH_LEN("FIELD"), BUILDER(Create_func_field)}, - { C_STRING_WITH_LEN("FIND_IN_SET"), BUILDER(Create_func_find_in_set)}, - { C_STRING_WITH_LEN("FLOOR"), BUILDER(Create_func_floor)}, - { C_STRING_WITH_LEN("FORMAT"), BUILDER(Create_func_format)}, - { C_STRING_WITH_LEN("FOUND_ROWS"), BUILDER(Create_func_found_rows)}, - { C_STRING_WITH_LEN("FROM_DAYS"), BUILDER(Create_func_from_days)}, - { C_STRING_WITH_LEN("FROM_UNIXTIME"), BUILDER(Create_func_from_unixtime)}, - { C_STRING_WITH_LEN("GEOMCOLLFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("GEOMCOLLFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("GEOMETRYCOLLECTIONFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("GEOMETRYCOLLECTIONFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("GEOMETRYFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("GEOMETRYFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("GEOMETRYN"), GEOM_BUILDER(Create_func_geometryn)}, - { C_STRING_WITH_LEN("GEOMETRYTYPE"), GEOM_BUILDER(Create_func_geometry_type)}, - { C_STRING_WITH_LEN("GEOMFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("GEOMFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("GET_LOCK"), BUILDER(Create_func_get_lock)}, - { C_STRING_WITH_LEN("GLENGTH"), GEOM_BUILDER(Create_func_glength)}, - { C_STRING_WITH_LEN("GREATEST"), BUILDER(Create_func_greatest)}, - { C_STRING_WITH_LEN("HEX"), BUILDER(Create_func_hex)}, - { C_STRING_WITH_LEN("IFNULL"), BUILDER(Create_func_ifnull)}, - { C_STRING_WITH_LEN("INET_ATON"), BUILDER(Create_func_inet_aton)}, - { C_STRING_WITH_LEN("INET_NTOA"), BUILDER(Create_func_inet_ntoa)}, - { C_STRING_WITH_LEN("INSTR"), BUILDER(Create_func_instr)}, - { C_STRING_WITH_LEN("INTERIORRINGN"), GEOM_BUILDER(Create_func_interiorringn)}, - { C_STRING_WITH_LEN("INTERSECTS"), GEOM_BUILDER(Create_func_intersects)}, - { C_STRING_WITH_LEN("ISCLOSED"), GEOM_BUILDER(Create_func_isclosed)}, - { C_STRING_WITH_LEN("ISEMPTY"), GEOM_BUILDER(Create_func_isempty)}, - { C_STRING_WITH_LEN("ISNULL"), BUILDER(Create_func_isnull)}, - { C_STRING_WITH_LEN("ISSIMPLE"), GEOM_BUILDER(Create_func_issimple)}, - { C_STRING_WITH_LEN("IS_FREE_LOCK"), BUILDER(Create_func_is_free_lock)}, - { C_STRING_WITH_LEN("IS_USED_LOCK"), BUILDER(Create_func_is_used_lock)}, - { C_STRING_WITH_LEN("LAST_DAY"), BUILDER(Create_func_last_day)}, - { C_STRING_WITH_LEN("LAST_INSERT_ID"), BUILDER(Create_func_last_insert_id)}, - { C_STRING_WITH_LEN("LCASE"), BUILDER(Create_func_lcase)}, - { C_STRING_WITH_LEN("LEAST"), BUILDER(Create_func_least)}, - { C_STRING_WITH_LEN("LENGTH"), BUILDER(Create_func_length)}, - { C_STRING_WITH_LEN("LINEFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("LINEFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("LINESTRINGFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("LINESTRINGFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("LN"), BUILDER(Create_func_ln)}, - { C_STRING_WITH_LEN("LOAD_FILE"), BUILDER(Create_func_load_file)}, - { C_STRING_WITH_LEN("LOCATE"), BUILDER(Create_func_locate)}, - { C_STRING_WITH_LEN("LOG"), BUILDER(Create_func_log)}, - { C_STRING_WITH_LEN("LOG10"), BUILDER(Create_func_log10)}, - { C_STRING_WITH_LEN("LOG2"), BUILDER(Create_func_log2)}, - { C_STRING_WITH_LEN("LOWER"), BUILDER(Create_func_lcase)}, - { C_STRING_WITH_LEN("LPAD"), BUILDER(Create_func_lpad)}, - { C_STRING_WITH_LEN("LTRIM"), BUILDER(Create_func_ltrim)}, - { C_STRING_WITH_LEN("MAKEDATE"), BUILDER(Create_func_makedate)}, - { C_STRING_WITH_LEN("MAKETIME"), BUILDER(Create_func_maketime)}, - { C_STRING_WITH_LEN("MAKE_SET"), BUILDER(Create_func_make_set)}, - { C_STRING_WITH_LEN("MASTER_POS_WAIT"), BUILDER(Create_func_master_pos_wait)}, - { C_STRING_WITH_LEN("MBRCONTAINS"), GEOM_BUILDER(Create_func_contains)}, - { C_STRING_WITH_LEN("MD5"), BUILDER(Create_func_md5)}, - { C_STRING_WITH_LEN("MLINEFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("MLINEFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("MONTHNAME"), BUILDER(Create_func_monthname)}, - { C_STRING_WITH_LEN("MPOINTFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("MPOINTFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("MPOLYFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("MPOLYFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("MULTILINESTRINGFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("MULTILINESTRINGFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("MULTIPOINTFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("MULTIPOINTFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("MULTIPOLYGONFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("MULTIPOLYGONFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("NAME_CONST"), BUILDER(Create_func_name_const)}, - { C_STRING_WITH_LEN("NULLIF"), BUILDER(Create_func_nullif)}, - { C_STRING_WITH_LEN("NUMGEOMETRIES"), GEOM_BUILDER(Create_func_numgeometries)}, - { C_STRING_WITH_LEN("NUMINTERIORRINGS"), GEOM_BUILDER(Create_func_numinteriorring)}, - { C_STRING_WITH_LEN("NUMPOINTS"), GEOM_BUILDER(Create_func_numpoints)}, - { C_STRING_WITH_LEN("OCT"), BUILDER(Create_func_oct)}, - { C_STRING_WITH_LEN("OCTET_LENGTH"), BUILDER(Create_func_length)}, - { C_STRING_WITH_LEN("ORD"), BUILDER(Create_func_ord)}, - { C_STRING_WITH_LEN("OVERLAPS"), GEOM_BUILDER(Create_func_overlaps)}, - { C_STRING_WITH_LEN("PERIOD_ADD"), BUILDER(Create_func_period_add)}, - { C_STRING_WITH_LEN("PERIOD_DIFF"), BUILDER(Create_func_period_diff)}, - { C_STRING_WITH_LEN("PI"), BUILDER(Create_func_pi)}, - { C_STRING_WITH_LEN("POINTFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("POINTFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("POINTN"), GEOM_BUILDER(Create_func_pointn)}, - { C_STRING_WITH_LEN("POLYFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("POLYFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("POLYGONFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, - { C_STRING_WITH_LEN("POLYGONFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, - { C_STRING_WITH_LEN("POW"), BUILDER(Create_func_pow)}, - { C_STRING_WITH_LEN("POWER"), BUILDER(Create_func_pow)}, - { C_STRING_WITH_LEN("QUOTE"), BUILDER(Create_func_quote)}, - { C_STRING_WITH_LEN("RADIANS"), BUILDER(Create_func_radians)}, - { C_STRING_WITH_LEN("RAND"), BUILDER(Create_func_rand)}, - { C_STRING_WITH_LEN("RELEASE_LOCK"), BUILDER(Create_func_release_lock)}, - { C_STRING_WITH_LEN("REVERSE"), BUILDER(Create_func_reverse)}, - { C_STRING_WITH_LEN("ROUND"), BUILDER(Create_func_round)}, - { C_STRING_WITH_LEN("ROW_COUNT"), BUILDER(Create_func_row_count)}, - { C_STRING_WITH_LEN("RPAD"), BUILDER(Create_func_rpad)}, - { C_STRING_WITH_LEN("RTRIM"), BUILDER(Create_func_rtrim)}, - { C_STRING_WITH_LEN("SEC_TO_TIME"), BUILDER(Create_func_sec_to_time)}, - { C_STRING_WITH_LEN("SHA"), BUILDER(Create_func_sha)}, - { C_STRING_WITH_LEN("SHA1"), BUILDER(Create_func_sha)}, - { C_STRING_WITH_LEN("SIGN"), BUILDER(Create_func_sign)}, - { C_STRING_WITH_LEN("SIN"), BUILDER(Create_func_sin)}, - { C_STRING_WITH_LEN("SLEEP"), BUILDER(Create_func_sleep)}, - { C_STRING_WITH_LEN("SOUNDEX"), BUILDER(Create_func_soundex)}, - { C_STRING_WITH_LEN("SPACE"), BUILDER(Create_func_space)}, - { C_STRING_WITH_LEN("SQRT"), BUILDER(Create_func_sqrt)}, - { C_STRING_WITH_LEN("SRID"), GEOM_BUILDER(Create_func_srid)}, - { C_STRING_WITH_LEN("STARTPOINT"), GEOM_BUILDER(Create_func_startpoint)}, - { C_STRING_WITH_LEN("STRCMP"), BUILDER(Create_func_strcmp)}, - { C_STRING_WITH_LEN("STR_TO_DATE"), BUILDER(Create_func_str_to_date)}, - { C_STRING_WITH_LEN("SUBSTRING_INDEX"), BUILDER(Create_func_substr_index)}, - { C_STRING_WITH_LEN("SUBTIME"), BUILDER(Create_func_subtime)}, - { C_STRING_WITH_LEN("TAN"), BUILDER(Create_func_tan)}, - { C_STRING_WITH_LEN("TIMEDIFF"), BUILDER(Create_func_timediff)}, - { C_STRING_WITH_LEN("TIME_FORMAT"), BUILDER(Create_func_time_format)}, - { C_STRING_WITH_LEN("TIME_TO_SEC"), BUILDER(Create_func_time_to_sec)}, - { C_STRING_WITH_LEN("TOUCHES"), GEOM_BUILDER(Create_func_touches)}, - { C_STRING_WITH_LEN("TO_DAYS"), BUILDER(Create_func_to_days)}, - { C_STRING_WITH_LEN("UCASE"), BUILDER(Create_func_ucase)}, - { C_STRING_WITH_LEN("UNCOMPRESS"), BUILDER(Create_func_uncompress)}, - { C_STRING_WITH_LEN("UNCOMPRESSED_LENGTH"), BUILDER(Create_func_uncompressed_length)}, - { C_STRING_WITH_LEN("UNHEX"), BUILDER(Create_func_unhex)}, - { C_STRING_WITH_LEN("UNIX_TIMESTAMP"), BUILDER(Create_func_unix_timestamp)}, - { C_STRING_WITH_LEN("UPDATEXML"), BUILDER(Create_func_xml_update)}, - { C_STRING_WITH_LEN("UPPER"), BUILDER(Create_func_ucase)}, - { C_STRING_WITH_LEN("UUID"), BUILDER(Create_func_uuid)}, - { C_STRING_WITH_LEN("VERSION"), BUILDER(Create_func_version)}, - { C_STRING_WITH_LEN("WEEKDAY"), BUILDER(Create_func_weekday)}, - { C_STRING_WITH_LEN("WEEKOFYEAR"), BUILDER(Create_func_weekofyear)}, - { C_STRING_WITH_LEN("WITHIN"), GEOM_BUILDER(Create_func_within)}, - { C_STRING_WITH_LEN("X"), GEOM_BUILDER(Create_func_x)}, - { C_STRING_WITH_LEN("Y"), GEOM_BUILDER(Create_func_y)}, - { C_STRING_WITH_LEN("YEARWEEK"), BUILDER(Create_func_year_week)}, + { { STRING_WITH_LEN("ABS") }, BUILDER(Create_func_abs)}, + { { STRING_WITH_LEN("ACOS") }, BUILDER(Create_func_acos)}, + { { STRING_WITH_LEN("ADDTIME") }, BUILDER(Create_func_addtime)}, + { { STRING_WITH_LEN("AES_DECRYPT") }, BUILDER(Create_func_aes_decrypt)}, + { { STRING_WITH_LEN("AES_ENCRYPT") }, BUILDER(Create_func_aes_encrypt)}, + { { STRING_WITH_LEN("AREA") }, GEOM_BUILDER(Create_func_area)}, + { { STRING_WITH_LEN("ASBINARY") }, GEOM_BUILDER(Create_func_as_wkb)}, + { { STRING_WITH_LEN("ASIN") }, BUILDER(Create_func_asin)}, + { { STRING_WITH_LEN("ASTEXT") }, GEOM_BUILDER(Create_func_as_wkt)}, + { { STRING_WITH_LEN("ASWKB") }, GEOM_BUILDER(Create_func_as_wkb)}, + { { STRING_WITH_LEN("ASWKT") }, GEOM_BUILDER(Create_func_as_wkt)}, + { { STRING_WITH_LEN("ATAN") }, BUILDER(Create_func_atan)}, + { { STRING_WITH_LEN("ATAN2") }, BUILDER(Create_func_atan)}, + { { STRING_WITH_LEN("BENCHMARK") }, BUILDER(Create_func_benchmark)}, + { { STRING_WITH_LEN("BIN") }, BUILDER(Create_func_bin)}, + { { STRING_WITH_LEN("BIT_COUNT") }, BUILDER(Create_func_bit_count)}, + { { STRING_WITH_LEN("BIT_LENGTH") }, BUILDER(Create_func_bit_length)}, + { { STRING_WITH_LEN("CEIL") }, BUILDER(Create_func_ceiling)}, + { { STRING_WITH_LEN("CEILING") }, BUILDER(Create_func_ceiling)}, + { { STRING_WITH_LEN("CENTROID") }, GEOM_BUILDER(Create_func_centroid)}, + { { STRING_WITH_LEN("CHARACTER_LENGTH") }, BUILDER(Create_func_char_length)}, + { { STRING_WITH_LEN("CHAR_LENGTH") }, BUILDER(Create_func_char_length)}, + { { STRING_WITH_LEN("COERCIBILITY") }, BUILDER(Create_func_coercibility)}, + { { STRING_WITH_LEN("COMPRESS") }, BUILDER(Create_func_compress)}, + { { STRING_WITH_LEN("CONCAT") }, BUILDER(Create_func_concat)}, + { { STRING_WITH_LEN("CONCAT_WS") }, BUILDER(Create_func_concat_ws)}, + { { STRING_WITH_LEN("CONNECTION_ID") }, BUILDER(Create_func_connection_id)}, + { { STRING_WITH_LEN("CONV") }, BUILDER(Create_func_conv)}, + { { STRING_WITH_LEN("CONVERT_TZ") }, BUILDER(Create_func_convert_tz)}, + { { STRING_WITH_LEN("COS") }, BUILDER(Create_func_cos)}, + { { STRING_WITH_LEN("COT") }, BUILDER(Create_func_cot)}, + { { STRING_WITH_LEN("CRC32") }, BUILDER(Create_func_crc32)}, + { { STRING_WITH_LEN("CROSSES") }, GEOM_BUILDER(Create_func_crosses)}, + { { STRING_WITH_LEN("DATEDIFF") }, BUILDER(Create_func_datediff)}, + { { STRING_WITH_LEN("DATE_FORMAT") }, BUILDER(Create_func_date_format)}, + { { STRING_WITH_LEN("DAYNAME") }, BUILDER(Create_func_dayname)}, + { { STRING_WITH_LEN("DAYOFMONTH") }, BUILDER(Create_func_dayofmonth)}, + { { STRING_WITH_LEN("DAYOFWEEK") }, BUILDER(Create_func_dayofweek)}, + { { STRING_WITH_LEN("DAYOFYEAR") }, BUILDER(Create_func_dayofyear)}, + { { STRING_WITH_LEN("DECODE") }, BUILDER(Create_func_decode)}, + { { STRING_WITH_LEN("DEGREES") }, BUILDER(Create_func_degrees)}, + { { STRING_WITH_LEN("DES_DECRYPT") }, BUILDER(Create_func_des_decrypt)}, + { { STRING_WITH_LEN("DES_ENCRYPT") }, BUILDER(Create_func_des_encrypt)}, + { { STRING_WITH_LEN("DIMENSION") }, GEOM_BUILDER(Create_func_dimension)}, + { { STRING_WITH_LEN("DISJOINT") }, GEOM_BUILDER(Create_func_disjoint)}, + { { STRING_WITH_LEN("ELT") }, BUILDER(Create_func_elt)}, + { { STRING_WITH_LEN("ENCODE") }, BUILDER(Create_func_encode)}, + { { STRING_WITH_LEN("ENCRYPT") }, BUILDER(Create_func_encrypt)}, + { { STRING_WITH_LEN("ENDPOINT") }, GEOM_BUILDER(Create_func_endpoint)}, + { { STRING_WITH_LEN("ENVELOPE") }, GEOM_BUILDER(Create_func_envelope)}, + { { STRING_WITH_LEN("EQUALS") }, GEOM_BUILDER(Create_func_equals)}, + { { STRING_WITH_LEN("EXP") }, BUILDER(Create_func_exp)}, + { { STRING_WITH_LEN("EXPORT_SET") }, BUILDER(Create_func_export_set)}, + { { STRING_WITH_LEN("EXTERIORRING") }, GEOM_BUILDER(Create_func_exteriorring)}, + { { STRING_WITH_LEN("EXTRACTVALUE") }, BUILDER(Create_func_xml_extractvalue)}, + { { STRING_WITH_LEN("FIELD") }, BUILDER(Create_func_field)}, + { { STRING_WITH_LEN("FIND_IN_SET") }, BUILDER(Create_func_find_in_set)}, + { { STRING_WITH_LEN("FLOOR") }, BUILDER(Create_func_floor)}, + { { STRING_WITH_LEN("FORMAT") }, BUILDER(Create_func_format)}, + { { STRING_WITH_LEN("FOUND_ROWS") }, BUILDER(Create_func_found_rows)}, + { { STRING_WITH_LEN("FROM_DAYS") }, BUILDER(Create_func_from_days)}, + { { STRING_WITH_LEN("FROM_UNIXTIME") }, BUILDER(Create_func_from_unixtime)}, + { { STRING_WITH_LEN("GEOMCOLLFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("GEOMCOLLFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("GEOMETRYCOLLECTIONFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("GEOMETRYCOLLECTIONFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("GEOMETRYFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("GEOMETRYFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("GEOMETRYN") }, GEOM_BUILDER(Create_func_geometryn)}, + { { STRING_WITH_LEN("GEOMETRYTYPE") }, GEOM_BUILDER(Create_func_geometry_type)}, + { { STRING_WITH_LEN("GEOMFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("GEOMFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("GET_LOCK") }, BUILDER(Create_func_get_lock)}, + { { STRING_WITH_LEN("GLENGTH") }, GEOM_BUILDER(Create_func_glength)}, + { { STRING_WITH_LEN("GREATEST") }, BUILDER(Create_func_greatest)}, + { { STRING_WITH_LEN("HEX") }, BUILDER(Create_func_hex)}, + { { STRING_WITH_LEN("IFNULL") }, BUILDER(Create_func_ifnull)}, + { { STRING_WITH_LEN("INET_ATON") }, BUILDER(Create_func_inet_aton)}, + { { STRING_WITH_LEN("INET_NTOA") }, BUILDER(Create_func_inet_ntoa)}, + { { STRING_WITH_LEN("INSTR") }, BUILDER(Create_func_instr)}, + { { STRING_WITH_LEN("INTERIORRINGN") }, GEOM_BUILDER(Create_func_interiorringn)}, + { { STRING_WITH_LEN("INTERSECTS") }, GEOM_BUILDER(Create_func_intersects)}, + { { STRING_WITH_LEN("ISCLOSED") }, GEOM_BUILDER(Create_func_isclosed)}, + { { STRING_WITH_LEN("ISEMPTY") }, GEOM_BUILDER(Create_func_isempty)}, + { { STRING_WITH_LEN("ISNULL") }, BUILDER(Create_func_isnull)}, + { { STRING_WITH_LEN("ISSIMPLE") }, GEOM_BUILDER(Create_func_issimple)}, + { { STRING_WITH_LEN("IS_FREE_LOCK") }, BUILDER(Create_func_is_free_lock)}, + { { STRING_WITH_LEN("IS_USED_LOCK") }, BUILDER(Create_func_is_used_lock)}, + { { STRING_WITH_LEN("LAST_DAY") }, BUILDER(Create_func_last_day)}, + { { STRING_WITH_LEN("LAST_INSERT_ID") }, BUILDER(Create_func_last_insert_id)}, + { { STRING_WITH_LEN("LCASE") }, BUILDER(Create_func_lcase)}, + { { STRING_WITH_LEN("LEAST") }, BUILDER(Create_func_least)}, + { { STRING_WITH_LEN("LENGTH") }, BUILDER(Create_func_length)}, + { { STRING_WITH_LEN("LINEFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("LINEFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("LINESTRINGFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("LINESTRINGFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("LN") }, BUILDER(Create_func_ln)}, + { { STRING_WITH_LEN("LOAD_FILE") }, BUILDER(Create_func_load_file)}, + { { STRING_WITH_LEN("LOCATE") }, BUILDER(Create_func_locate)}, + { { STRING_WITH_LEN("LOG") }, BUILDER(Create_func_log)}, + { { STRING_WITH_LEN("LOG10") }, BUILDER(Create_func_log10)}, + { { STRING_WITH_LEN("LOG2") }, BUILDER(Create_func_log2)}, + { { STRING_WITH_LEN("LOWER") }, BUILDER(Create_func_lcase)}, + { { STRING_WITH_LEN("LPAD") }, BUILDER(Create_func_lpad)}, + { { STRING_WITH_LEN("LTRIM") }, BUILDER(Create_func_ltrim)}, + { { STRING_WITH_LEN("MAKEDATE") }, BUILDER(Create_func_makedate)}, + { { STRING_WITH_LEN("MAKETIME") }, BUILDER(Create_func_maketime)}, + { { STRING_WITH_LEN("MAKE_SET") }, BUILDER(Create_func_make_set)}, + { { STRING_WITH_LEN("MASTER_POS_WAIT") }, BUILDER(Create_func_master_pos_wait)}, + { { STRING_WITH_LEN("MBRCONTAINS") }, GEOM_BUILDER(Create_func_contains)}, + { { STRING_WITH_LEN("MD5") }, BUILDER(Create_func_md5)}, + { { STRING_WITH_LEN("MLINEFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("MLINEFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("MONTHNAME") }, BUILDER(Create_func_monthname)}, + { { STRING_WITH_LEN("MPOINTFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("MPOINTFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("MPOLYFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("MPOLYFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("MULTILINESTRINGFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("MULTILINESTRINGFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("MULTIPOINTFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("MULTIPOINTFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("MULTIPOLYGONFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("MULTIPOLYGONFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("NAME_CONST") }, BUILDER(Create_func_name_const)}, + { { STRING_WITH_LEN("NULLIF") }, BUILDER(Create_func_nullif)}, + { { STRING_WITH_LEN("NUMGEOMETRIES") }, GEOM_BUILDER(Create_func_numgeometries)}, + { { STRING_WITH_LEN("NUMINTERIORRINGS") }, GEOM_BUILDER(Create_func_numinteriorring)}, + { { STRING_WITH_LEN("NUMPOINTS") }, GEOM_BUILDER(Create_func_numpoints)}, + { { STRING_WITH_LEN("OCT") }, BUILDER(Create_func_oct)}, + { { STRING_WITH_LEN("OCTET_LENGTH") }, BUILDER(Create_func_length)}, + { { STRING_WITH_LEN("ORD") }, BUILDER(Create_func_ord)}, + { { STRING_WITH_LEN("OVERLAPS") }, GEOM_BUILDER(Create_func_overlaps)}, + { { STRING_WITH_LEN("PERIOD_ADD") }, BUILDER(Create_func_period_add)}, + { { STRING_WITH_LEN("PERIOD_DIFF") }, BUILDER(Create_func_period_diff)}, + { { STRING_WITH_LEN("PI") }, BUILDER(Create_func_pi)}, + { { STRING_WITH_LEN("POINTFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("POINTFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("POINTN") }, GEOM_BUILDER(Create_func_pointn)}, + { { STRING_WITH_LEN("POLYFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("POLYFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("POLYGONFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, + { { STRING_WITH_LEN("POLYGONFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, + { { STRING_WITH_LEN("POW") }, BUILDER(Create_func_pow)}, + { { STRING_WITH_LEN("POWER") }, BUILDER(Create_func_pow)}, + { { STRING_WITH_LEN("QUOTE") }, BUILDER(Create_func_quote)}, + { { STRING_WITH_LEN("RADIANS") }, BUILDER(Create_func_radians)}, + { { STRING_WITH_LEN("RAND") }, BUILDER(Create_func_rand)}, + { { STRING_WITH_LEN("RELEASE_LOCK") }, BUILDER(Create_func_release_lock)}, + { { STRING_WITH_LEN("REVERSE") }, BUILDER(Create_func_reverse)}, + { { STRING_WITH_LEN("ROUND") }, BUILDER(Create_func_round)}, + { { STRING_WITH_LEN("ROW_COUNT") }, BUILDER(Create_func_row_count)}, + { { STRING_WITH_LEN("RPAD") }, BUILDER(Create_func_rpad)}, + { { STRING_WITH_LEN("RTRIM") }, BUILDER(Create_func_rtrim)}, + { { STRING_WITH_LEN("SEC_TO_TIME") }, BUILDER(Create_func_sec_to_time)}, + { { STRING_WITH_LEN("SHA") }, BUILDER(Create_func_sha)}, + { { STRING_WITH_LEN("SHA1") }, BUILDER(Create_func_sha)}, + { { STRING_WITH_LEN("SIGN") }, BUILDER(Create_func_sign)}, + { { STRING_WITH_LEN("SIN") }, BUILDER(Create_func_sin)}, + { { STRING_WITH_LEN("SLEEP") }, BUILDER(Create_func_sleep)}, + { { STRING_WITH_LEN("SOUNDEX") }, BUILDER(Create_func_soundex)}, + { { STRING_WITH_LEN("SPACE") }, BUILDER(Create_func_space)}, + { { STRING_WITH_LEN("SQRT") }, BUILDER(Create_func_sqrt)}, + { { STRING_WITH_LEN("SRID") }, GEOM_BUILDER(Create_func_srid)}, + { { STRING_WITH_LEN("STARTPOINT") }, GEOM_BUILDER(Create_func_startpoint)}, + { { STRING_WITH_LEN("STRCMP") }, BUILDER(Create_func_strcmp)}, + { { STRING_WITH_LEN("STR_TO_DATE") }, BUILDER(Create_func_str_to_date)}, + { { STRING_WITH_LEN("SUBSTRING_INDEX") }, BUILDER(Create_func_substr_index)}, + { { STRING_WITH_LEN("SUBTIME") }, BUILDER(Create_func_subtime)}, + { { STRING_WITH_LEN("TAN") }, BUILDER(Create_func_tan)}, + { { STRING_WITH_LEN("TIMEDIFF") }, BUILDER(Create_func_timediff)}, + { { STRING_WITH_LEN("TIME_FORMAT") }, BUILDER(Create_func_time_format)}, + { { STRING_WITH_LEN("TIME_TO_SEC") }, BUILDER(Create_func_time_to_sec)}, + { { STRING_WITH_LEN("TOUCHES") }, GEOM_BUILDER(Create_func_touches)}, + { { STRING_WITH_LEN("TO_DAYS") }, BUILDER(Create_func_to_days)}, + { { STRING_WITH_LEN("UCASE") }, BUILDER(Create_func_ucase)}, + { { STRING_WITH_LEN("UNCOMPRESS") }, BUILDER(Create_func_uncompress)}, + { { STRING_WITH_LEN("UNCOMPRESSED_LENGTH") }, BUILDER(Create_func_uncompressed_length)}, + { { STRING_WITH_LEN("UNHEX") }, BUILDER(Create_func_unhex)}, + { { STRING_WITH_LEN("UNIX_TIMESTAMP") }, BUILDER(Create_func_unix_timestamp)}, + { { STRING_WITH_LEN("UPDATEXML") }, BUILDER(Create_func_xml_update)}, + { { STRING_WITH_LEN("UPPER") }, BUILDER(Create_func_ucase)}, + { { STRING_WITH_LEN("UUID") }, BUILDER(Create_func_uuid)}, + { { STRING_WITH_LEN("VERSION") }, BUILDER(Create_func_version)}, + { { STRING_WITH_LEN("WEEKDAY") }, BUILDER(Create_func_weekday)}, + { { STRING_WITH_LEN("WEEKOFYEAR") }, BUILDER(Create_func_weekofyear)}, + { { STRING_WITH_LEN("WITHIN") }, GEOM_BUILDER(Create_func_within)}, + { { STRING_WITH_LEN("X") }, GEOM_BUILDER(Create_func_x)}, + { { STRING_WITH_LEN("Y") }, GEOM_BUILDER(Create_func_y)}, + { { STRING_WITH_LEN("YEARWEEK") }, BUILDER(Create_func_year_week)}, { {0, 0}, NULL} }; diff --git a/sql/log.cc b/sql/log.cc index 59fa08a4217..36199499dc4 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1914,8 +1914,8 @@ shutdown the MySQL server and restart it.", name, errno); } MYSQL_LOG::MYSQL_LOG() - : name(0), log_type(LOG_UNKNOWN), log_state(LOG_CLOSED), write_error(FALSE), - inited(FALSE) + : name(0), write_error(FALSE), inited(FALSE), log_type(LOG_UNKNOWN), + log_state(LOG_CLOSED) { /* We don't want to initialize LOCK_Log here as such initialization depends on diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c1ba05e24bd..8c9ac865292 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2651,7 +2651,7 @@ static bool init_global_datetime_format(timestamp_type format_type, static int init_common_variables(const char *conf_file_name, int argc, char **argv, const char **groups) { - char buff[FN_REFLEN]; + char buff[FN_REFLEN], *s; umask(((~my_umask) & 0666)); my_decimal_set_zero(&decimal_zero); // set decimal_zero constant; tzset(); // Set tzname @@ -2857,15 +2857,13 @@ static int init_common_variables(const char *conf_file_name, int argc, "--log-slow-queries option, log tables are used. " "To enable logging to files use the --log-output option."); - if (!opt_logname) - opt_logname= make_default_log_name(buff, ".log"); - sys_var_general_log_path.value= my_strdup(opt_logname, MYF(0)); - sys_var_general_log_path.value_length= strlen(opt_logname); + s= opt_logname ? opt_logname : make_default_log_name(buff, ".log"); + sys_var_general_log_path.value= my_strdup(s, MYF(0)); + sys_var_general_log_path.value_length= strlen(s); - if (!opt_slow_logname) - opt_slow_logname= make_default_log_name(buff, "-slow.log"); - sys_var_slow_log_path.value= my_strdup(opt_slow_logname, MYF(0)); - sys_var_slow_log_path.value_length= strlen(opt_slow_logname); + s= opt_slow_logname ? opt_slow_logname : make_default_log_name(buff, "-slow.log"); + sys_var_slow_log_path.value= my_strdup(s, MYF(0)); + sys_var_slow_log_path.value_length= strlen(s); if (use_temp_pool && bitmap_init(&temp_pool,0,1024,1)) return 1; @@ -3280,7 +3278,7 @@ server."); using_update_log=1; } - if (plugin_init(&defaults_argc, defaults_argv, + if (plugin_init(&defaults_argc, defaults_argv, (opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) | (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0))) { @@ -3295,25 +3293,28 @@ server."); if (defaults_argc > 1) { int ho_error; - struct my_option no_opts[] = + char **tmp_argv= defaults_argv; + struct my_option no_opts[]= { {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; /* We need to eat any 'loose' arguments first before we conclude - that there are unprocessed options + that there are unprocessed options. + But we need to preserve defaults_argv pointer intact for + free_defaults() to work. Thus we use a copy here. */ my_getopt_skip_unknown= 0; - - if ((ho_error= handle_options(&defaults_argc, &defaults_argv, no_opts, + + if ((ho_error= handle_options(&defaults_argc, &tmp_argv, no_opts, get_one_option))) unireg_abort(ho_error); - + if (defaults_argc) { fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n" - "Use --verbose --help to get a list of available options\n", - my_progname, *defaults_argv); + "Use --verbose --help to get a list of available options\n", + my_progname, *tmp_argv); unireg_abort(1); } } diff --git a/sql/partition_element.h b/sql/partition_element.h index c056d40b85b..905bc38165b 100644 --- a/sql/partition_element.h +++ b/sql/partition_element.h @@ -84,9 +84,9 @@ public: partition_element(partition_element *part_elem) : part_max_rows(part_elem->part_max_rows), part_min_rows(part_elem->part_min_rows), - partition_name(NULL), + range_value(0), partition_name(NULL), tablespace_name(part_elem->tablespace_name), - range_value(0), part_comment(part_elem->part_comment), + part_comment(part_elem->part_comment), data_file_name(part_elem->data_file_name), index_file_name(part_elem->index_file_name), engine_type(part_elem->engine_type), diff --git a/sql/rpl_utility.h b/sql/rpl_utility.h index 34cebf93ddb..9c4c4890942 100644 --- a/sql/rpl_utility.h +++ b/sql/rpl_utility.h @@ -64,7 +64,7 @@ public: size Number of elements in array 'types' */ table_def(field_type *types, my_size_t size) - : m_type(types), m_size(size) + : m_size(size), m_type(types) { } diff --git a/sql/set_var.cc b/sql/set_var.cc index 7b27902571b..cab023441a0 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -27,8 +27,6 @@ of it in the my_option structure list in mysqld.cc - Don't forget to initialize new fields in global_system_variables and max_system_variables! - - If the variable should show up in 'show variables' add it to the - init_vars[] struct in this file NOTES: - Be careful with var->save_result: sys_var::check() only updates diff --git a/sql/set_var.h b/sql/set_var.h index 2813a756b8e..dedd0d35716 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -641,12 +641,12 @@ public: class sys_var_character_set_sv :public sys_var_character_set { - CHARSET_INFO **global_default; CHARSET_INFO *SV::*offset; + CHARSET_INFO **global_default; public: sys_var_character_set_sv(sys_var_chain *chain, const char *name_arg, CHARSET_INFO *SV::*offset_arg, - CHARSET_INFO **global_default_arg, + CHARSET_INFO **global_default_arg, bool is_nullable= 0) : sys_var_character_set(name_arg, is_nullable), offset(offset_arg), global_default(global_default_arg) @@ -668,8 +668,8 @@ public: class sys_var_collation_sv :public sys_var_collation { - CHARSET_INFO **global_default; CHARSET_INFO *SV::*offset; + CHARSET_INFO **global_default; public: sys_var_collation_sv(sys_var_chain *chain, const char *name_arg, CHARSET_INFO *SV::*offset_arg, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9fba5b92ba5..20d12a4bd62 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -227,8 +227,8 @@ int thd_sql_command(const THD *thd) pointer to string */ extern "C" -char *thd_security_context(THD *thd, char *buffer, int length, - int max_query_len) +char *thd_security_context(THD *thd, char *buffer, unsigned int length, + unsigned int max_query_len) { String str(buffer, length, &my_charset_latin1); const Security_context *sctx= &thd->main_security_ctx; @@ -293,13 +293,16 @@ THD::THD() user_time(0), in_sub_stmt(0), binlog_table_maps(0), global_read_lock(0), is_fatal_error(0), - rand_used(0), time_zone_used(0), arg_of_last_insert_id_function(FALSE), first_successful_insert_id_in_prev_stmt(0), first_successful_insert_id_in_prev_stmt_for_binlog(0), first_successful_insert_id_in_cur_stmt(0), - in_lock_tables(0), bootstrap(0), derived_tables_processing(FALSE), + rand_used(0), + time_zone_used(0), + in_lock_tables(0), stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE), + bootstrap(0), + derived_tables_processing(FALSE), spcont(NULL) { ulong tmp; @@ -1765,15 +1768,16 @@ void Query_arena::cleanup_stmt() } /* - Statement functions + Statement functions */ Statement::Statement(enum enum_state state_arg, ulong id_arg, ulong alloc_block_size, ulong prealloc_size) :Query_arena(&main_mem_root, state_arg), + main_lex(), id(id_arg), mark_used_columns(MARK_COLUMNS_READ), - main_lex(), lex(&main_lex), + lex(&main_lex), query(0), query_length(0), cursor(0) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index ce7f34e3a06..f33e7ffec1f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -43,37 +43,37 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables); const char *any_db="*any*"; // Special symbol for check_access const LEX_STRING command_name[]={ - C_STRING_WITH_LEN("Sleep"), - C_STRING_WITH_LEN("Quit"), - C_STRING_WITH_LEN("Init DB"), - C_STRING_WITH_LEN("Query"), - C_STRING_WITH_LEN("Field List"), - C_STRING_WITH_LEN("Create DB"), - C_STRING_WITH_LEN("Drop DB"), - C_STRING_WITH_LEN("Refresh"), - C_STRING_WITH_LEN("Shutdown"), - C_STRING_WITH_LEN("Statistics"), - C_STRING_WITH_LEN("Processlist"), - C_STRING_WITH_LEN("Connect"), - C_STRING_WITH_LEN("Kill"), - C_STRING_WITH_LEN("Debug"), - C_STRING_WITH_LEN("Ping"), - C_STRING_WITH_LEN("Time"), - C_STRING_WITH_LEN("Delayed insert"), - C_STRING_WITH_LEN("Change user"), - C_STRING_WITH_LEN("Binlog Dump"), - C_STRING_WITH_LEN("Table Dump"), - C_STRING_WITH_LEN("Connect Out"), - C_STRING_WITH_LEN("Register Slave"), - C_STRING_WITH_LEN("Prepare"), - C_STRING_WITH_LEN("Execute"), - C_STRING_WITH_LEN("Long Data"), - C_STRING_WITH_LEN("Close stmt"), - C_STRING_WITH_LEN("Reset stmt"), - C_STRING_WITH_LEN("Set option"), - C_STRING_WITH_LEN("Fetch"), - C_STRING_WITH_LEN("Daemon"), - C_STRING_WITH_LEN("Error") // Last command number + { STRING_WITH_LEN("Sleep") }, + { STRING_WITH_LEN("Quit") }, + { STRING_WITH_LEN("Init DB") }, + { STRING_WITH_LEN("Query") }, + { STRING_WITH_LEN("Field List") }, + { STRING_WITH_LEN("Create DB") }, + { STRING_WITH_LEN("Drop DB") }, + { STRING_WITH_LEN("Refresh") }, + { STRING_WITH_LEN("Shutdown") }, + { STRING_WITH_LEN("Statistics") }, + { STRING_WITH_LEN("Processlist") }, + { STRING_WITH_LEN("Connect") }, + { STRING_WITH_LEN("Kill") }, + { STRING_WITH_LEN("Debug") }, + { STRING_WITH_LEN("Ping") }, + { STRING_WITH_LEN("Time") }, + { STRING_WITH_LEN("Delayed insert") }, + { STRING_WITH_LEN("Change user") }, + { STRING_WITH_LEN("Binlog Dump") }, + { STRING_WITH_LEN("Table Dump") }, + { STRING_WITH_LEN("Connect Out") }, + { STRING_WITH_LEN("Register Slave") }, + { STRING_WITH_LEN("Prepare") }, + { STRING_WITH_LEN("Execute") }, + { STRING_WITH_LEN("Long Data") }, + { STRING_WITH_LEN("Close stmt") }, + { STRING_WITH_LEN("Reset stmt") }, + { STRING_WITH_LEN("Set option") }, + { STRING_WITH_LEN("Fetch") }, + { STRING_WITH_LEN("Daemon") }, + { STRING_WITH_LEN("Error") } // Last command number }; const char *xa_state_names[]={ diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 6da247ee153..df826e4cdd6 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -138,7 +138,7 @@ struct st_bookmark uint name_len; int offset; uint version; - char key[0]; + char key[1]; }; @@ -187,11 +187,10 @@ public: static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv); static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, const char *list); -static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, - int *argc, char **argv, my_bool default_enabled); -static bool register_builtin(struct st_mysql_plugin *plugin, - struct st_plugin_int *tmp, - struct st_plugin_int **ptr); +static int test_plugin_options(MEM_ROOT *, struct st_plugin_int *, + int *, char **, my_bool); +static bool register_builtin(struct st_mysql_plugin *, struct st_plugin_int *, + struct st_plugin_int **); static void unlock_variables(THD *thd, struct system_variables *vars); static void cleanup_variables(THD *thd, struct system_variables *vars); static void plugin_opt_set_limits(struct my_option *options, @@ -242,44 +241,20 @@ static const char *item_val_str(struct st_mysql_value *value, } -static int item_val_int(struct st_mysql_value *value, void *buf, int intsize) +static int item_val_int(struct st_mysql_value *value, long long *buf) { Item *item= ((st_item_value_holder*)value)->item; - switch (intsize) { - case 1: - *(char*)buf= item->val_int(); - break; - case 2: - *(short*)buf= item->val_int(); - break; - case 4: - *(int*)buf= item->val_int(); - break; - case 8: - *(longlong*)buf= item->val_int(); - break; - default: - return -1; - } + *buf= item->val_int(); if (item->is_null()) return 1; return 0; } -static int item_val_real(struct st_mysql_value *value, void *buf, int realsize) +static int item_val_real(struct st_mysql_value *value, double *buf) { Item *item= ((st_item_value_holder*)value)->item; - switch (realsize) { - case 8: - *(double*)buf= item->val_real(); - break; - case 4: - *(float*)buf= item->val_real(); - break; - default: - return -1; - } + *buf= item->val_real(); if (item->is_null()) return 1; return 0; @@ -794,8 +769,7 @@ err: } -static void plugin_deinitialize(struct st_plugin_int *plugin, - bool ref_check= TRUE) +static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) { /* we don't want to hold the LOCK_plugin mutex as it may cause @@ -911,7 +885,7 @@ static void reap_plugins(void) list= reap; while ((plugin= *(--list))) - plugin_deinitialize(plugin); + plugin_deinitialize(plugin, true); pthread_mutex_lock(&LOCK_plugin); @@ -1149,6 +1123,8 @@ int plugin_init(int *argc, char **argv, int flags) my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0; bzero(&tmp, sizeof(tmp)); tmp.plugin= plugin; + tmp.name.str= (char *)plugin->name; + tmp.name.length= strlen(plugin->name); free_root(&tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (test_plugin_options(&tmp_root, &tmp, argc, argv, def_enabled)) @@ -1226,7 +1202,7 @@ int plugin_init(int *argc, char **argv, int flags) while ((plugin_ptr= *(--reap))) { pthread_mutex_unlock(&LOCK_plugin); - plugin_deinitialize(plugin_ptr); + plugin_deinitialize(plugin_ptr, true); pthread_mutex_lock(&LOCK_plugin); plugin_del(plugin_ptr); } @@ -1252,9 +1228,6 @@ static bool register_builtin(struct st_mysql_plugin *plugin, { DBUG_ENTER("register_builtin"); - tmp->plugin= plugin; - tmp->name.str= (char *)plugin->name; - tmp->name.length= strlen(plugin->name); tmp->state= PLUGIN_IS_UNINITIALIZED; tmp->ref_count= 0; tmp->plugin_dl= 0; @@ -1294,6 +1267,8 @@ bool plugin_register_builtin(THD *thd, struct st_mysql_plugin *plugin) bzero(&tmp, sizeof(tmp)); tmp.plugin= plugin; + tmp.name.str= (char *)plugin->name; + tmp.name.length= strlen(plugin->name); pthread_mutex_lock(&LOCK_plugin); rw_wrlock(&LOCK_system_variables_hash); @@ -1451,7 +1426,7 @@ error: void plugin_shutdown(void) { - uint i, count= plugin_array.elements; + uint i, count= plugin_array.elements, free_slots; struct st_plugin_int **plugins, *plugin; struct st_plugin_dl **dl; DBUG_ENTER("plugin_shutdown"); @@ -1472,13 +1447,18 @@ void plugin_shutdown(void) while (reap_needed && (count= plugin_array.elements)) { reap_plugins(); - for (i= 0; i < count; i++) + for (i= free_slots= 0; i < count; i++) { plugin= dynamic_element(&plugin_array, i, struct st_plugin_int *); - if (plugin->state == PLUGIN_IS_READY) - { + switch (plugin->state) { + case PLUGIN_IS_READY: plugin->state= PLUGIN_IS_DELETED; reap_needed= true; + break; + case PLUGIN_IS_FREED: + case PLUGIN_IS_UNINITIALIZED: + free_slots++; + break; } } if (!reap_needed) @@ -1491,8 +1471,8 @@ void plugin_shutdown(void) } } - if (count > 0) - sql_print_warning("Forcing shutdown of %d plugins", count); + if (count > free_slots) + sql_print_warning("Forcing shutdown of %d plugins", count - free_slots); plugins= (struct st_plugin_int **) my_alloca(sizeof(void*) * (count+1)); @@ -1523,26 +1503,30 @@ void plugin_shutdown(void) plugin_deinitialize(plugins[i], false); } + /* + It's perfectly safe not to lock LOCK_plugin, as there're no + concurrent threads anymore. But some functions called from here + use safe_mutex_assert_owner(), so we lock the mutex to satisfy it + */ + pthread_mutex_lock(&LOCK_plugin); /* We defer checking ref_counts until after all plugins are deinitialized as some may have worker threads holding on to plugin references. */ for (i= 0; i < count; i++) + { if (plugins[i]->ref_count) sql_print_error("Plugin '%s' has ref_count=%d after shutdown.", plugins[i]->name.str, plugins[i]->ref_count); - - for (i= 0; i < count; i++) if (plugins[i]->state & PLUGIN_IS_UNINITIALIZED) plugin_del(plugins[i]); + } /* Now we can deallocate all memory. */ - /* neccessary to avoid safe_mutex_assert_owner() trap */ - pthread_mutex_lock(&LOCK_plugin); cleanup_variables(NULL, &global_system_variables); cleanup_variables(NULL, &max_system_variables); pthread_mutex_unlock(&LOCK_plugin); @@ -1802,7 +1786,7 @@ static int check_func_bool(THD *thd, struct st_mysql_sys_var *var, char buff[STRING_BUFFER_USUAL_SIZE]; const char *strvalue= "NULL", *str; int result, length; - ulonglong tmp; + long long tmp; if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) { @@ -1817,7 +1801,7 @@ static int check_func_bool(THD *thd, struct st_mysql_sys_var *var, } else { - if (value->val_int(value, &tmp, sizeof(tmp)) < 0) + if (value->val_int(value, &tmp) < 0) goto err; if (tmp > 1) { @@ -1838,9 +1822,9 @@ err: static int check_func_int(THD *thd, struct st_mysql_sys_var *var, void *save, st_mysql_value *value) { - ulonglong tmp; + long long tmp; struct my_option options; - value->val_int(value, &tmp, sizeof(tmp)); + value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); *(int *)save= (int) getopt_ull_limit_value(tmp, &options); return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && @@ -1851,9 +1835,9 @@ static int check_func_int(THD *thd, struct st_mysql_sys_var *var, static int check_func_long(THD *thd, struct st_mysql_sys_var *var, void *save, st_mysql_value *value) { - ulonglong tmp; + long long tmp; struct my_option options; - value->val_int(value, &tmp, sizeof(tmp)); + value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); *(long *)save= (long) getopt_ull_limit_value(tmp, &options); return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && @@ -1864,13 +1848,13 @@ static int check_func_long(THD *thd, struct st_mysql_sys_var *var, static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var, void *save, st_mysql_value *value) { - ulonglong tmp; + long long tmp; struct my_option options; - value->val_int(value, &tmp, sizeof(tmp)); + value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); *(ulonglong *)save= getopt_ull_limit_value(tmp, &options); return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && - (*(ulonglong *)save != tmp); + (*(long long *)save != tmp); } static int check_func_str(THD *thd, struct st_mysql_sys_var *var, @@ -1894,7 +1878,7 @@ static int check_func_enum(THD *thd, struct st_mysql_sys_var *var, char buff[STRING_BUFFER_USUAL_SIZE]; const char *strvalue= "NULL", *str; TYPELIB *typelib; - ulonglong tmp; + long long tmp; long result; int length; @@ -1916,7 +1900,7 @@ static int check_func_enum(THD *thd, struct st_mysql_sys_var *var, } else { - if (value->val_int(value, &tmp, sizeof(tmp))) + if (value->val_int(value, &tmp)) goto err; if (tmp >= typelib->count) { @@ -1967,7 +1951,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var, } else { - if (value->val_int(value, &tmp, sizeof(tmp))) + if (value->val_int(value, (long long *)&tmp)) goto err; if (unlikely((tmp >= (ULL(1) << typelib->count)) && (typelib->count < sizeof(long)*8))) @@ -2156,7 +2140,7 @@ static st_bookmark *register_var(const char *plugin, const char *name, if (!(result= find_bookmark(NULL, varname + 1, flags))) { result= (st_bookmark*) alloc_root(&plugin_mem_root, - sizeof(struct st_bookmark) + length); + sizeof(struct st_bookmark) + length-1); varname[0]= flags & PLUGIN_VAR_TYPEMASK; memcpy(result->key, varname, length); result->name_len= length - 2; @@ -2349,6 +2333,8 @@ static void cleanup_variables(THD *thd, struct system_variables *vars) } rw_unlock(&LOCK_system_variables_hash); + DBUG_ASSERT(vars->table_plugin == NULL); + my_free(vars->dynamic_variables_ptr, MYF(MY_ALLOW_ZERO_PTR)); vars->dynamic_variables_ptr= NULL; vars->dynamic_variables_size= 0; @@ -2680,10 +2666,9 @@ static my_bool get_one_option(int optid __attribute__((unused)), } -static int construct_options(MEM_ROOT *mem_root, - struct st_plugin_int *tmp, - my_option *options, - my_bool **enabled, bool can_disable) +static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, + my_option *options, my_bool **enabled, + bool can_disable) { const char *plugin_name= tmp->plugin->name; uint namelen= strlen(plugin_name), optnamelen; @@ -2707,7 +2692,7 @@ static int construct_options(MEM_ROOT *mem_root, if (can_disable) { strxmov(name + namelen*2 + 10, "Enable ", plugin_name, " plugin. " - "Disable with --skip-plugin-", name," (will save memory).", NullS); + "Disable with --skip-", name," (will save memory).", NullS); options[0].comment= name + namelen*2 + 10; } @@ -2868,7 +2853,7 @@ static int construct_options(MEM_ROOT *mem_root, options[1]= options[0]; options[1].name= p= (char*) alloc_root(mem_root, optnamelen + 8); - options[1].comment= NULL; /* hide this option */ + options[1].comment= 0; // hidden strxmov(p, "plugin-", optname, NullS); options+= 2; @@ -2883,19 +2868,23 @@ static my_option *construct_help_options(MEM_ROOT *mem_root, { st_mysql_sys_var **opt; my_option *opts; - my_bool dummy; + my_bool dummy, can_disable; my_bool *dummy2= &dummy; uint count= EXTRA_OPTIONS; DBUG_ENTER("construct_help_options"); - for (opt= p->plugin->system_vars; opt && *opt; opt++, count++); + for (opt= p->plugin->system_vars; opt && *opt; opt++, count+= 2); if (!(opts= (my_option*) alloc_root(mem_root, sizeof(my_option) * count))) DBUG_RETURN(NULL); bzero(opts, sizeof(my_option) * count); - if (construct_options(mem_root, p, opts, &dummy2, FALSE)) + can_disable= + my_strcasecmp(&my_charset_latin1, p->name.str, "MyISAM") && + my_strcasecmp(&my_charset_latin1, p->name.str, "MEMORY"); + + if (construct_options(mem_root, p, opts, &dummy2, can_disable)) DBUG_RETURN(NULL); DBUG_RETURN(opts); @@ -2932,27 +2921,27 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, struct st_bookmark *var; uint len, count= EXTRA_OPTIONS; DBUG_ENTER("test_plugin_options"); - DBUG_ASSERT(tmp->plugin && tmp->plugin->name); + DBUG_ASSERT(tmp->plugin && tmp->name.str); for (opt= tmp->plugin->system_vars; opt && *opt; opt++) count+= 2; /* --{plugin}-{optname} and --plugin-{plugin}-{optname} */ can_disable= - my_strcasecmp(&my_charset_latin1, tmp->plugin->name, "MyISAM") && - my_strcasecmp(&my_charset_latin1, tmp->plugin->name, "MEMORY"); + my_strcasecmp(&my_charset_latin1, tmp->name.str, "MyISAM") && + my_strcasecmp(&my_charset_latin1, tmp->name.str, "MEMORY"); if (count > EXTRA_OPTIONS || (*argc > 1)) { if (!(opts= (my_option*) alloc_root(tmp_root, sizeof(my_option) * count))) { - sql_print_error("Out of memory for plugin '%s'.", tmp->plugin->name); + sql_print_error("Out of memory for plugin '%s'.", tmp->name.str); DBUG_RETURN(-1); } bzero(opts, sizeof(my_option) * count); if (construct_options(tmp_root, tmp, opts, &enabled, can_disable)) { - sql_print_error("Bad options for plugin '%s'.", tmp->plugin->name); + sql_print_error("Bad options for plugin '%s'.", tmp->name.str); DBUG_RETURN(-1); } @@ -2962,14 +2951,14 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, if (error) { sql_print_error("Parsing options for plugin '%s' failed.", - tmp->plugin->name); + tmp->name.str); DBUG_RETURN(error); } } if (!*enabled && !can_disable) { - sql_print_warning("Plugin '%s' cannot be disabled", tmp->plugin->name); + sql_print_warning("Plugin '%s' cannot be disabled", tmp->name.str); *enabled= TRUE; } @@ -2980,13 +2969,13 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, if (((o= *opt)->flags & PLUGIN_VAR_NOSYSVAR)) continue; - if ((var= find_bookmark(tmp->plugin->name, o->name, o->flags))) + if ((var= find_bookmark(tmp->name.str, o->name, o->flags))) v= new (mem_root) sys_var_pluginvar(var->key + 1, o); else { - len= strlen(tmp->plugin->name) + strlen(o->name) + 2; + len= tmp->name.length + strlen(o->name) + 2; varname= (char*) alloc_root(mem_root, len); - strxmov(varname, tmp->plugin->name, "-", o->name, NullS); + strxmov(varname, tmp->name.str, "-", o->name, NullS); my_casedn_str(&my_charset_latin1, varname); for (p= varname; *p; p++) @@ -3010,7 +2999,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, if (mysql_add_sys_var_chain(chain.first, NULL)) { sql_print_error("Plugin '%s' has conflicting system variables", - tmp->plugin->name); + tmp->name.str); DBUG_RETURN(1); } tmp->system_vars= chain.first; @@ -3020,7 +3009,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, if (enabled_saved) sql_print_information("Plugin '%s' disabled by command line option", - tmp->plugin->name); + tmp->name.str); DBUG_RETURN(1); } diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index bde6c41d777..8f3d9fca7b7 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -717,6 +717,11 @@ int ha_example::external_lock(THD *thd, int lock_type) Called from lock.cc by get_lock_data(). + @note + In this method one should NEVER rely on table->in_use, it may, in fact, + refer to a different thread! (this happens if get_lock_data() is called + from mysql_lock_abort_for_thread() function) + @see get_lock_data() in lock.cc */ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 16066a5ca40..b4b6ad2842a 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6771,7 +6771,7 @@ ha_innobase::store_lock( ha_tx_isolation()); } - DBUG_ASSERT(thd == ha_thd()); + DBUG_ASSERT(thd == current_thd); const bool in_lock_tables = thd_in_lock_tables(thd); const uint sql_command = ha_sql_command(); From 18f02e0aeb39f9ef25c9b0cfd126c5694ba21996 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Apr 2007 19:24:46 +0200 Subject: [PATCH 009/137] sql/sql_plugin.cc remove endspaces and tabs sql/sql_plugin.cc: remove endspaces and tabs --- sql/sql_plugin.cc | 256 +++++++++++++++++++++++----------------------- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index df826e4cdd6..a2c3c2060e7 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -33,7 +33,7 @@ char *opt_plugin_load= NULL; char *opt_plugin_dir_ptr; char opt_plugin_dir[FN_REFLEN]; /* - When you ad a new plugin type, add both a string and make sure that the + When you ad a new plugin type, add both a string and make sure that the init and deinit array are correctly updated. */ const LEX_STRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]= @@ -49,10 +49,10 @@ extern int initialize_schema_table(st_plugin_int *plugin); extern int finalize_schema_table(st_plugin_int *plugin); /* - The number of elements in both plugin_type_initialize and + The number of elements in both plugin_type_initialize and plugin_type_deinitialize should equal to the number of plugins defined. -*/ +*/ plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]= { 0,ha_initialize_handlerton,0,0,initialize_schema_table @@ -124,10 +124,10 @@ struct st_item_value_holder : public st_mysql_value /* stored in bookmark_hash, this structure is never removed from the - hash and is used to mark a single offset for a thd local variable + hash and is used to mark a single offset for a thd local variable even if plugins have been uninstalled and reinstalled, repeatedly. This structure is allocated from plugin_mem_root. - + The key format is as follows: 1 byte - variable type code name_len bytes - variable name @@ -219,11 +219,11 @@ static int item_value_type(struct st_mysql_value *value) case REAL_RESULT: return MYSQL_VALUE_TYPE_REAL; default: - return MYSQL_VALUE_TYPE_STRING; + return MYSQL_VALUE_TYPE_STRING; } } -static const char *item_val_str(struct st_mysql_value *value, +static const char *item_val_str(struct st_mysql_value *value, char *buffer, int *length) { String str(buffer, *length, system_charset_info), *res; @@ -232,9 +232,9 @@ static const char *item_val_str(struct st_mysql_value *value, *length= res->length(); if (res->c_ptr_quick() == buffer) return buffer; - + /* - Lets be nice and create a temporary string since the + Lets be nice and create a temporary string since the buffer was too small */ return current_thd->strmake(res->c_ptr_quick(), res->length()); @@ -595,9 +595,9 @@ static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc CALLER_INFO_PROTO) { st_plugin_int *pi= plugin_ref_to_int(rc); DBUG_ENTER("intern_plugin_lock"); - + safe_mutex_assert_owner(&LOCK_plugin); - + if (pi->state & (PLUGIN_IS_READY | PLUGIN_IS_UNINITIALIZED)) { plugin_ref plugin; @@ -691,7 +691,7 @@ static st_plugin_int *plugin_insert_or_reuse(struct st_plugin_int *plugin) Requires that a write-lock is held on LOCK_system_variables_hash */ static bool plugin_add(MEM_ROOT *tmp_root, - const LEX_STRING *name, const LEX_STRING *dl, + const LEX_STRING *name, const LEX_STRING *dl, int *argc, char **argv, int report) { struct st_plugin_int tmp; @@ -738,7 +738,7 @@ static bool plugin_add(MEM_ROOT *tmp_root, tmp.name.length= name_len; tmp.ref_count= 0; tmp.state= PLUGIN_IS_UNINITIALIZED; - + if (!test_plugin_options(tmp_root, &tmp, argc, argv, true)) { if ((tmp_plugin_ptr= plugin_insert_or_reuse(&tmp))) @@ -776,7 +776,7 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) deinitialization to deadlock if plugins have worker threads with plugin locks */ - safe_mutex_assert_not_owner(&LOCK_plugin); + safe_mutex_assert_not_owner(&LOCK_plugin); if (plugin->plugin->status_vars) { @@ -804,7 +804,7 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check) { sql_print_error("Plugin '%s' of type %s failed deinitialization", plugin->name.str, plugin_type_names[plugin->plugin->type].str); - } + } } else if (plugin->plugin->deinit) { @@ -859,17 +859,17 @@ static void reap_plugins(void) { uint count, idx; struct st_plugin_int *plugin, **reap, **list; - + safe_mutex_assert_owner(&LOCK_plugin); if (!reap_needed) return; - + reap_needed= false; count= plugin_array.elements; reap= (struct st_plugin_int **)my_alloca(sizeof(plugin)*(count+1)); *(reap++)= NULL; - + for (idx= 0; idx < count; idx++) { plugin= dynamic_element(&plugin_array, idx, struct st_plugin_int *); @@ -880,18 +880,18 @@ static void reap_plugins(void) *(reap++)= plugin; } } - + pthread_mutex_unlock(&LOCK_plugin); list= reap; while ((plugin= *(--list))) plugin_deinitialize(plugin, true); - + pthread_mutex_lock(&LOCK_plugin); - + while ((plugin= *(--reap))) plugin_del(plugin); - + my_afree(reap); } @@ -930,7 +930,7 @@ static void intern_plugin_unlock(LEX *lex, plugin_ref plugin) delete_dynamic_element(&lex->plugins, i); break; } - DBUG_ASSERT(i >= 0); + DBUG_ASSERT(i >= 0); } DBUG_ASSERT(pi->ref_count); @@ -980,7 +980,7 @@ static int plugin_initialize(struct st_plugin_int *plugin) { DBUG_ENTER("plugin_initialize"); - safe_mutex_assert_owner(&LOCK_plugin); + safe_mutex_assert_owner(&LOCK_plugin); if (plugin_type_initialize[plugin->plugin->type]) { @@ -1023,7 +1023,7 @@ static int plugin_initialize(struct st_plugin_int *plugin) add_status_vars(plugin->plugin->status_vars); // add_status_vars makes a copy #endif /* FIX_LATER */ } - + /* set the plugin attribute of plugin's sys vars so they are pointing to the active plugin @@ -1090,7 +1090,7 @@ int plugin_init(int *argc, char **argv, int flags) if (hash_init(&bookmark_hash, &my_charset_bin, 16, 0, 0, get_bookmark_hash_key, NULL, HASH_UNIQUE)) goto err; - + pthread_mutex_init(&LOCK_plugin, MY_MUTEX_INIT_FAST); @@ -1119,7 +1119,7 @@ int plugin_init(int *argc, char **argv, int flags) for (plugin= *builtins; plugin->info; plugin++) { /* by default, only ndbcluster is disabled */ - def_enabled= + def_enabled= my_strcasecmp(&my_charset_latin1, plugin->name, "NDBCLUSTER") != 0; bzero(&tmp, sizeof(tmp)); tmp.plugin= plugin; @@ -1129,12 +1129,12 @@ int plugin_init(int *argc, char **argv, int flags) free_root(&tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (test_plugin_options(&tmp_root, &tmp, argc, argv, def_enabled)) continue; - + if (register_builtin(plugin, &tmp, &plugin_ptr)) goto err_unlock; /* only initialize MyISAM and CSV at this stage */ - if (!(is_myisam= + if (!(is_myisam= !my_strcasecmp(&my_charset_latin1, plugin->name, "MyISAM")) && my_strcasecmp(&my_charset_latin1, plugin->name, "CSV")) continue; @@ -1143,7 +1143,7 @@ int plugin_init(int *argc, char **argv, int flags) goto err_unlock; /* - initialize the global default storage engine so that it may + initialize the global default storage engine so that it may not be null in any child thread. */ if (is_myisam) @@ -1157,10 +1157,10 @@ int plugin_init(int *argc, char **argv, int flags) } } } - + /* should now be set to MyISAM storage engine */ DBUG_ASSERT(global_system_variables.table_plugin); - + pthread_mutex_unlock(&LOCK_plugin); /* Register all dynamic plugins */ @@ -1198,7 +1198,7 @@ int plugin_init(int *argc, char **argv, int flags) /* Check if any plugins have to be reaped - */ + */ while ((plugin_ptr= *(--reap))) { pthread_mutex_unlock(&LOCK_plugin); @@ -1222,7 +1222,7 @@ err: } -static bool register_builtin(struct st_mysql_plugin *plugin, +static bool register_builtin(struct st_mysql_plugin *plugin, struct st_plugin_int *tmp, struct st_plugin_int **ptr) { @@ -1329,7 +1329,7 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) String str_name, str_dl; get_field(tmp_root, table->field[0], &str_name); get_field(tmp_root, table->field[1], &str_dl); - + LEX_STRING name= {(char *)str_name.ptr(), str_name.length()}; LEX_STRING dl= {(char *)str_dl.ptr(), str_dl.length()}; @@ -1385,7 +1385,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, { name.str= (char *) plugin->name; name.length= strlen(name.str); - + free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) goto error; @@ -1430,13 +1430,13 @@ void plugin_shutdown(void) struct st_plugin_int **plugins, *plugin; struct st_plugin_dl **dl; DBUG_ENTER("plugin_shutdown"); - + if (initialized) { pthread_mutex_lock(&LOCK_plugin); reap_needed= true; - + /* We want to shut down plugins in a reasonable order, this will become important when we have plugins which depend upon each other. @@ -1473,7 +1473,7 @@ void plugin_shutdown(void) if (count > free_slots) sql_print_warning("Forcing shutdown of %d plugins", count - free_slots); - + plugins= (struct st_plugin_int **) my_alloca(sizeof(void*) * (count+1)); /* @@ -1487,14 +1487,14 @@ void plugin_shutdown(void) plugins[i]->state= PLUGIN_IS_DYING; } pthread_mutex_unlock(&LOCK_plugin); - + /* We loop through all plugins and call deinit() if they have one. */ for (i= 0; i < count; i++) if (!(plugins[i]->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_FREED))) { - sql_print_information("Plugin '%s' will be forced to shutdown", + sql_print_information("Plugin '%s' will be forced to shutdown", plugins[i]->name.str); /* We are forcing deinit on plugins so we don't want to do a ref_count @@ -1509,7 +1509,7 @@ void plugin_shutdown(void) use safe_mutex_assert_owner(), so we lock the mutex to satisfy it */ pthread_mutex_lock(&LOCK_plugin); - + /* We defer checking ref_counts until after all plugins are deinitialized as some may have worker threads holding on to plugin references. @@ -1538,7 +1538,7 @@ void plugin_shutdown(void) } /* Dispose of the memory */ - + for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++) hash_free(&plugin_hash[i]); delete_dynamic(&plugin_array); @@ -1551,10 +1551,10 @@ void plugin_shutdown(void) free_plugin_mem(dl[i]); my_afree(dl); delete_dynamic(&plugin_dl_array); - + hash_free(&bookmark_hash); free_root(&plugin_mem_root, MYF(0)); - + global_variables_dynamic_size= 0; DBUG_VOID_RETURN; @@ -1585,7 +1585,7 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl rw_unlock(&LOCK_system_variables_hash); if (error || !(tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN))) - goto err; + goto err; if (plugin_initialize(tmp)) { @@ -1690,11 +1690,11 @@ bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, state_mask= ~state_mask; // do it only once pthread_mutex_lock(&LOCK_plugin); - total= type == MYSQL_ANY_PLUGIN ? plugin_array.elements + total= type == MYSQL_ANY_PLUGIN ? plugin_array.elements : plugin_hash[type].records; /* Do the alloca out here in case we do have a working alloca: - leaving the nested stack frame invalidates alloca allocation. + leaving the nested stack frame invalidates alloca allocation. */ plugins=(struct st_plugin_int **)my_alloca(total*sizeof(plugin)); if (type == MYSQL_ANY_PLUGIN) @@ -1787,7 +1787,7 @@ static int check_func_bool(THD *thd, struct st_mysql_sys_var *var, const char *strvalue= "NULL", *str; int result, length; long long tmp; - + if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) { length= sizeof(buff); @@ -1827,7 +1827,7 @@ static int check_func_int(THD *thd, struct st_mysql_sys_var *var, value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); *(int *)save= (int) getopt_ull_limit_value(tmp, &options); - return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && + return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && (*(int *)save != (int) tmp); } @@ -1840,7 +1840,7 @@ static int check_func_long(THD *thd, struct st_mysql_sys_var *var, value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); *(long *)save= (long) getopt_ull_limit_value(tmp, &options); - return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && + return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && (*(long *)save != (long) tmp); } @@ -1853,7 +1853,7 @@ static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var, value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); *(ulonglong *)save= getopt_ull_limit_value(tmp, &options); - return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && + return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && (*(long long *)save != tmp); } @@ -1863,7 +1863,7 @@ static int check_func_str(THD *thd, struct st_mysql_sys_var *var, char buff[STRING_BUFFER_USUAL_SIZE]; const char *str; int length; - + length= sizeof(buff); if ((str= value->val_str(value, buff, &length))) str= thd->strmake(str, length); @@ -1881,12 +1881,12 @@ static int check_func_enum(THD *thd, struct st_mysql_sys_var *var, long long tmp; long result; int length; - + if (var->flags & PLUGIN_VAR_THDLOCAL) typelib= ((thdvar_typelib_t*) var)->typelib; else typelib= ((sysvar_typelib_t*) var)->typelib; - + if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) { length= sizeof(buff); @@ -1929,7 +1929,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var, uint error_len; bool not_used; int length; - + if (var->flags & PLUGIN_VAR_THDLOCAL) typelib= ((thdvar_typelib_t*) var)->typelib; else @@ -2022,7 +2022,7 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) sys_var_pluginvar *pi= NULL; plugin_ref plugin; DBUG_ENTER("find_sys_var"); - + pthread_mutex_lock(&LOCK_plugin); rw_rdlock(&LOCK_system_variables_hash); if ((var= intern_find_sys_var(str, length, false)) && @@ -2043,7 +2043,7 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) else rw_unlock(&LOCK_system_variables_hash); pthread_mutex_unlock(&LOCK_plugin); - + /* If the variable exists but the plugin it is associated with is not ready then the intern_plugin_lock did not raise an error, so we do it here. @@ -2065,29 +2065,29 @@ static st_bookmark *find_bookmark(const char *plugin, const char *name, st_bookmark *result= NULL; uint namelen, length, pluginlen= 0; char *varname, *p; - + if (!(flags & PLUGIN_VAR_THDLOCAL)) return NULL; - + namelen= strlen(name); if (plugin) pluginlen= strlen(plugin) + 1; length= namelen + pluginlen + 2; varname= (char*) my_alloca(length); - + if (plugin) { strxmov(varname + 1, plugin, "_", name, NullS); for (p= varname + 1; *p; p++) if (*p == '-') - *p= '_'; + *p= '_'; } else memcpy(varname + 1, name, namelen + 1); varname[0]= flags & PLUGIN_VAR_TYPEMASK; - - result= (st_bookmark*) hash_search(&bookmark_hash, + + result= (st_bookmark*) hash_search(&bookmark_hash, (const byte*) varname, length - 1); my_afree(varname); @@ -2109,7 +2109,7 @@ static st_bookmark *register_var(const char *plugin, const char *name, if (!(flags & PLUGIN_VAR_THDLOCAL)) return NULL; - + switch (flags & PLUGIN_VAR_TYPEMASK) { case PLUGIN_VAR_BOOL: size= sizeof(my_bool); @@ -2139,19 +2139,19 @@ static st_bookmark *register_var(const char *plugin, const char *name, if (!(result= find_bookmark(NULL, varname + 1, flags))) { - result= (st_bookmark*) alloc_root(&plugin_mem_root, + result= (st_bookmark*) alloc_root(&plugin_mem_root, sizeof(struct st_bookmark) + length-1); varname[0]= flags & PLUGIN_VAR_TYPEMASK; memcpy(result->key, varname, length); result->name_len= length - 2; result->offset= -1; - + DBUG_ASSERT(size && !(size & (size-1))); /* must be power of 2 */ offset= global_system_variables.dynamic_variables_size; offset= (offset + size - 1) & ~(size - 1); result->offset= (int) offset; - + new_size= (offset + size + 63) & ~63; if (new_size > global_variables_dynamic_size) @@ -2164,14 +2164,14 @@ static st_bookmark *register_var(const char *plugin, const char *name, MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); global_variables_dynamic_size= new_size; } - + global_system_variables.dynamic_variables_head= offset; max_system_variables.dynamic_variables_head= offset; global_system_variables.dynamic_variables_size= offset + size; max_system_variables.dynamic_variables_size= offset + size; global_system_variables.dynamic_variables_version++; max_system_variables.dynamic_variables_version++; - + result->version= global_system_variables.dynamic_variables_version; /* this should succeed because we have already checked if a dup exists */ @@ -2196,10 +2196,10 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) { DBUG_ASSERT(offset >= 0); DBUG_ASSERT((uint)offset <= global_system_variables.dynamic_variables_head); - + if (!thd) return (byte*) global_system_variables.dynamic_variables_ptr + offset; - + /* dynamic_variables_head points to the largest valid offset */ @@ -2207,9 +2207,9 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) (uint)offset > thd->variables.dynamic_variables_head) { uint idx; - + rw_rdlock(&LOCK_system_variables_hash); - + thd->variables.dynamic_variables_ptr= my_realloc(thd->variables.dynamic_variables_ptr, global_variables_dynamic_size, @@ -2220,7 +2220,7 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) safe_mutex_assert_owner(&LOCK_global_system_variables); - memcpy(thd->variables.dynamic_variables_ptr + + memcpy(thd->variables.dynamic_variables_ptr + thd->variables.dynamic_variables_size, global_system_variables.dynamic_variables_ptr + thd->variables.dynamic_variables_size, @@ -2236,7 +2236,7 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) sys_var_pluginvar *pi; sys_var *var; st_bookmark *v= (st_bookmark*) hash_element(&bookmark_hash,idx); - + if (v->version <= thd->variables.dynamic_variables_version || !(var= intern_find_sys_var(v->key + 1, v->name_len, true)) || !(pi= var->cast_pluginvar()) || @@ -2244,26 +2244,26 @@ static byte *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) continue; /* Here we do anything special that may be required of the data types */ - + if ((pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR && pi->plugin_var->flags & PLUGIN_VAR_MEMALLOC) { - char **pp= (char**) (thd->variables.dynamic_variables_ptr + - *(int*)(pi->plugin_var + 1)); - if ((*pp= *(char**) (global_system_variables.dynamic_variables_ptr + + char **pp= (char**) (thd->variables.dynamic_variables_ptr + + *(int*)(pi->plugin_var + 1)); + if ((*pp= *(char**) (global_system_variables.dynamic_variables_ptr + *(int*)(pi->plugin_var + 1)))) *pp= my_strdup(*pp, MYF(MY_WME|MY_FAE)); } - } + } if (global_lock) pthread_mutex_unlock(&LOCK_global_system_variables); - thd->variables.dynamic_variables_version= + thd->variables.dynamic_variables_version= global_system_variables.dynamic_variables_version; - thd->variables.dynamic_variables_head= + thd->variables.dynamic_variables_head= global_system_variables.dynamic_variables_head; - thd->variables.dynamic_variables_size= + thd->variables.dynamic_variables_size= global_system_variables.dynamic_variables_size; rw_unlock(&LOCK_system_variables_hash); @@ -2285,7 +2285,7 @@ void plugin_thdvar_init(THD *thd) thd->variables.dynamic_variables_ptr= 0; DBUG_ASSERT(!(thd->variables.table_plugin)); - thd->variables.table_plugin= + thd->variables.table_plugin= my_plugin_lock(NULL, &global_system_variables.table_plugin); } @@ -2317,12 +2317,12 @@ static void cleanup_variables(THD *thd, struct system_variables *vars) v= (st_bookmark*) hash_element(&bookmark_hash, idx); if (v->version > vars->dynamic_variables_version || !(var= intern_find_sys_var(v->key + 1, v->name_len, true)) || - !(pivar= var->cast_pluginvar()) || + !(pivar= var->cast_pluginvar()) || v->key[0] != (pivar->plugin_var->flags & PLUGIN_VAR_TYPEMASK)) continue; flags= pivar->plugin_var->flags; - + if ((flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR && flags & PLUGIN_VAR_THDLOCAL && flags & PLUGIN_VAR_MEMALLOC) { @@ -2330,9 +2330,9 @@ static void cleanup_variables(THD *thd, struct system_variables *vars) my_free(*ptr, MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); *ptr= NULL; } - } + } rw_unlock(&LOCK_system_variables_hash); - + DBUG_ASSERT(vars->table_plugin == NULL); my_free(vars->dynamic_variables_ptr, MYF(MY_ALLOW_ZERO_PTR)); @@ -2385,7 +2385,7 @@ bool sys_var_pluginvar::check_update_type(Item_result type) return 0; } } - + SHOW_TYPE sys_var_pluginvar::show_type() { @@ -2408,21 +2408,21 @@ SHOW_TYPE sys_var_pluginvar::show_type() return SHOW_UNDEF; } } - + byte* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) -{ +{ DBUG_ASSERT(thd); if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) { if (type == OPT_GLOBAL) thd= NULL; - + return intern_sys_var_ptr(thd, *(int*) (plugin_var+1), false); } return *(byte**) (plugin_var+1); } - + TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) { @@ -2436,7 +2436,7 @@ TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) } return NULL; } - + byte* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) @@ -2477,13 +2477,13 @@ bool sys_var_pluginvar::check(THD *thd, set_var *var) { st_item_value_holder value; DBUG_ASSERT(is_readonly() || plugin_var->check); - + value.value_type= item_value_type; value.val_str= item_val_str; value.val_int= item_val_int; value.val_real= item_val_real; value.item= var->value; - + return is_readonly() || plugin_var->check(thd, plugin_var, &var->save_result, &value); } @@ -2509,7 +2509,7 @@ void sys_var_pluginvar::set_default(THD *thd, enum_var_type type) } /* thd must equal current_thd if PLUGIN_VAR_THDLOCAL flag is set */ - DBUG_ASSERT(!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || + DBUG_ASSERT(!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || thd == current_thd); if (!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || type == OPT_GLOBAL) @@ -2521,7 +2521,7 @@ void sys_var_pluginvar::set_default(THD *thd, enum_var_type type) else plugin_var->update(thd, plugin_var, tgt, src); } - + bool sys_var_pluginvar::update(THD *thd, set_var *var) { @@ -2530,7 +2530,7 @@ bool sys_var_pluginvar::update(THD *thd, set_var *var) DBUG_ASSERT(is_readonly() || plugin_var->update); /* thd must equal current_thd if PLUGIN_VAR_THDLOCAL flag is set */ - DBUG_ASSERT(!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || + DBUG_ASSERT(!(plugin_var->flags & PLUGIN_VAR_THDLOCAL) || thd == current_thd); if (is_readonly()) @@ -2565,7 +2565,7 @@ bool sys_var_pluginvar::update(THD *thd, set_var *var) static void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt) { - switch (opt->flags & (PLUGIN_VAR_TYPEMASK | + switch (opt->flags & (PLUGIN_VAR_TYPEMASK | PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL)) { /* global system variables */ case PLUGIN_VAR_INT: @@ -2654,7 +2654,7 @@ static void plugin_opt_set_limits(struct my_option *options, if (opt->flags & PLUGIN_VAR_NOCMDARG) options->arg_type= NO_ARG; if (opt->flags & PLUGIN_VAR_OPCMDARG) - options->arg_type= OPT_ARG; + options->arg_type= OPT_ARG; } @@ -2679,16 +2679,16 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, st_mysql_sys_var *opt, **plugin_option; st_bookmark *v; DBUG_ENTER("construct_options"); - + /* support --skip-plugin-foo syntax */ memcpy(name, plugin_name, namelen + 1); my_casedn_str(&my_charset_latin1, name); strxmov(name + namelen + 1, "plugin-", name, NullS); - + for (p= name + namelen*2 + 8; p > name; p--) if (*p == '_') *p= '-'; - + if (can_disable) { strxmov(name + namelen*2 + 10, "Enable ", plugin_name, " plugin. " @@ -2699,8 +2699,8 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, *((my_bool *)(name -1))= **enabled; *enabled= (my_bool *)(name - 1); - - + + options[1].name= (options[0].name= name) + namelen + 1; options[0].id= options[1].id= 256; /* must be >255. dup id ok */ options[0].var_type= options[1].var_type= GET_BOOL; @@ -2715,10 +2715,10 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, by my_getopt and register_var() in the first pass uses realloc */ - for (plugin_option= tmp->plugin->system_vars; + for (plugin_option= tmp->plugin->system_vars; plugin_option && *plugin_option; plugin_option++, index++) { - opt= *plugin_option; + opt= *plugin_option; if (!(opt->flags & PLUGIN_VAR_THDLOCAL)) continue; if (!(register_var(name, opt->name, opt->flags))) @@ -2750,7 +2750,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, }; } - for (plugin_option= tmp->plugin->system_vars; + for (plugin_option= tmp->plugin->system_vars; plugin_option && *plugin_option; plugin_option++, index++) { switch ((opt= *plugin_option)->flags & PLUGIN_VAR_TYPEMASK) { @@ -2805,7 +2805,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, opt->flags, tmp->plugin->name); DBUG_RETURN(-1); } - + if (opt->flags & PLUGIN_VAR_NOCMDOPT) continue; @@ -2835,12 +2835,12 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, options->comment= opt->comment; options->app_type= opt; options->id= (options-1)->id + 1; - + if (opt->flags & PLUGIN_VAR_THDLOCAL) *(int*)(opt + 1)= offset= v->offset; plugin_opt_set_limits(options, opt); - + if ((opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_ENUM && (opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_SET) { @@ -2910,7 +2910,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, struct sys_var_chain chain= { NULL, NULL }; my_bool enabled_saved= default_enabled, can_disable; my_bool *enabled= &default_enabled; - MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ? + MEM_ROOT *mem_root= alloc_root_inited(&tmp->mem_root) ? &tmp->mem_root : &plugin_mem_root; st_mysql_sys_var **opt; my_option *opts; @@ -2929,16 +2929,16 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, can_disable= my_strcasecmp(&my_charset_latin1, tmp->name.str, "MyISAM") && my_strcasecmp(&my_charset_latin1, tmp->name.str, "MEMORY"); - + if (count > EXTRA_OPTIONS || (*argc > 1)) - { + { if (!(opts= (my_option*) alloc_root(tmp_root, sizeof(my_option) * count))) { sql_print_error("Out of memory for plugin '%s'.", tmp->name.str); DBUG_RETURN(-1); } bzero(opts, sizeof(my_option) * count); - + if (construct_options(tmp_root, tmp, opts, &enabled, can_disable)) { sql_print_error("Bad options for plugin '%s'.", tmp->name.str); @@ -2947,10 +2947,10 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, error= handle_options(argc, &argv, opts, get_one_option); (*argc)++; /* add back one for the program name */ - + if (error) { - sql_print_error("Parsing options for plugin '%s' failed.", + sql_print_error("Parsing options for plugin '%s' failed.", tmp->name.str); DBUG_RETURN(error); } @@ -2963,12 +2963,12 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, } if (*enabled) - { + { for (opt= tmp->plugin->system_vars; opt && *opt; opt++) { if (((o= *opt)->flags & PLUGIN_VAR_NOSYSVAR)) continue; - + if ((var= find_bookmark(tmp->name.str, o->name, o->flags))) v= new (mem_root) sys_var_pluginvar(var->key + 1, o); else @@ -2988,7 +2988,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, /* Add to the chain of variables. - Done like this for easier debugging so that the + Done like this for easier debugging so that the pointer to v is not lost on optimized builds. */ v->chain_sys_var(&chain); @@ -3000,7 +3000,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp, { sql_print_error("Plugin '%s' has conflicting system variables", tmp->name.str); - DBUG_RETURN(1); + DBUG_RETURN(1); } tmp->system_vars= chain.first; } @@ -3033,7 +3033,7 @@ void my_print_help_inc_plugins(my_option *main_options, uint size) init_alloc_root(&mem_root, 4096, 4096); my_init_dynamic_array(&all_options, sizeof(my_option), size, size/4); - + if (initialized) for (uint idx= 0; idx < plugin_array.elements; idx++) { @@ -3048,15 +3048,15 @@ void my_print_help_inc_plugins(my_option *main_options, uint size) if (opt->comment) insert_dynamic(&all_options, (gptr) opt); } - + for (;main_options->id; main_options++) insert_dynamic(&all_options, (gptr) main_options); - + sort_dynamic(&all_options, (qsort_cmp) option_cmp); - + /* main_options now points to the empty option terminator */ insert_dynamic(&all_options, (gptr) main_options); - + my_print_help((my_option*) all_options.buffer); my_print_variables((my_option*) all_options.buffer); From add378761542ade65340b9477ed298e9a1677b10 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 15 Apr 2007 15:47:27 +0200 Subject: [PATCH 010/137] more wl#2936 fixes: removed implicit ha_thd() calls (too error-prone), fixed an assert crash include/mysql/plugin.h: more wl#2936 fixes: no implicit ha_thd() calls mysql-test/mysql-test-run.pl: don't load system-wide plugins mysql-test/r/partition_innodb.result: fix the test mysql-test/t/partition_innodb.test: fix the test sql/handler.cc: more wl#2936 fixes: no implicit ha_thd() calls sql/handler.h: more wl#2936 fixes: no implicit ha_thd() calls sql/sql_class.cc: more wl#2936 fixes: no implicit ha_thd() calls sql/sql_plugin.cc: more wl#2936 fixes: assert crash storage/innobase/handler/ha_innodb.cc: more wl#2936 fixes: no implicit ha_thd() calls --- include/mysql/plugin.h | 1 + mysql-test/mysql-test-run.pl | 7 +++- mysql-test/r/partition_innodb.result | 5 ++- mysql-test/t/partition_innodb.test | 1 - sql/handler.cc | 14 +------ sql/handler.h | 4 +- sql/sql_class.cc | 16 +++++--- sql/sql_plugin.cc | 10 ++++- storage/innobase/handler/ha_innodb.cc | 55 ++++++++++++++------------- 9 files changed, 60 insertions(+), 53 deletions(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index d15302dc256..751ce516a39 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -651,6 +651,7 @@ long long thd_test_options(const MYSQL_THD thd, long long test_options); int thd_sql_command(const MYSQL_THD thd); const char *thd_proc_info(MYSQL_THD thd, const char *info); void **thd_ha_data(const MYSQL_THD thd, const struct handlerton *hton); +int thd_tx_isolation(const MYSQL_THD thd); char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length, unsigned int max_query_len); diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index aabd15838e2..fbd1ed4df5b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1330,10 +1330,13 @@ sub collect_mysqld_features () { my $found_variable_list_start= 0; # - # Execute "mysqld --no-defaults --help --verbose" to get a + # Execute "mysqld --help --verbose" to get a list # of all features and settings # - my $list= `$exe_mysqld --no-defaults --verbose --help`; + # --no-defaults and --skip-grant-tables are to avoid loading + # system-wide configs and plugins + # + my $list= `$exe_mysqld --no-defaults --skip-grant-tables --verbose --help`; foreach my $line (split('\n', $list)) { diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 799f1b2c76f..96eee40b9f6 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -66,10 +66,11 @@ engine = innodb partition by list (a) (partition p0 values in (0)); alter table t1 engine = x; -ERROR 42000: Unknown table engine 'x' +Warnings: +Warning 1266 Using storage engine MyISAM for table 't1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = MyISAM) */ drop table t1; diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 9f8792c924f..782e204742f 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -71,7 +71,6 @@ engine = innodb partition by list (a) (partition p0 values in (0)); ---error ER_UNKNOWN_STORAGE_ENGINE alter table t1 engine = x; show create table t1; drop table t1; diff --git a/sql/handler.cc b/sql/handler.cc index b4fc7db3809..583f23b5a93 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1491,19 +1491,9 @@ void handler::ha_statistic_increment(ulong SSV::*offset) const statistic_increment(table->in_use->status_var.*offset, &LOCK_status); } -enum enum_tx_isolation handler::ha_tx_isolation(void) const +void **handler::ha_data(THD *thd) const { - return (enum_tx_isolation) ha_thd()->variables.tx_isolation; -} - -uint handler::ha_sql_command(void) const -{ - return (uint) ha_thd()->lex->sql_command; -} - -void **handler::ha_data(void) const -{ - return (void **) ha_thd()->ha_data + ht->slot; + return (void **) thd->ha_data + ht->slot; } THD *handler::ha_thd(void) const diff --git a/sql/handler.h b/sql/handler.h index 076fffe142e..39751f53b15 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -898,9 +898,7 @@ class handler :public Sql_alloc virtual ulonglong table_flags(void) const =0; void ha_statistic_increment(ulong SSV::*offset) const; - enum enum_tx_isolation ha_tx_isolation(void) const; - uint ha_sql_command(void) const; - void **ha_data(void) const; + void **ha_data(THD *) const; THD *ha_thd(void) const; ha_rows estimation_rows_to_insert; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 20d12a4bd62..170deccea92 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -211,18 +211,24 @@ int thd_sql_command(const THD *thd) return (int) thd->lex->sql_command; } +extern "C" +int thd_tx_isolation(const THD *thd) +{ + return (int) thd->variables.tx_isolation; +} + /* Dumps a text description of a thread, its security context (user, host) and the current query. - + SYNOPSIS thd_security_context() thd current thread context buffer pointer to preferred result buffer length length of buffer max_query_len how many chars of query to copy (0 for all) - + RETURN VALUES pointer to string */ @@ -234,13 +240,13 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length, const Security_context *sctx= &thd->main_security_ctx; char header[64]; int len; - - len= my_snprintf(header, sizeof(header), + + len= my_snprintf(header, sizeof(header), "MySQL thread id %lu, query id %lu", thd->thread_id, (ulong) thd->query_id); str.length(0); str.append(header, len); - + if (sctx->host) { str.append(' '); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index a2c3c2060e7..a72725fae8c 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1323,6 +1323,13 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) table= tables.table; init_read_record(&read_record_info, new_thd, table, NULL, 1, 0); table->use_all_columns(); + /* + there're no other threads running yet, so we don't need a mutex. + but plugin_add() before is designed to work in multi-threaded + environment, and it uses safe_mutex_assert_owner(), so we lock + the mutex here to satisfy the assert + */ + pthread_mutex_lock(&LOCK_plugin); while (!(error= read_record_info.read_record(&read_record_info))) { DBUG_PRINT("info", ("init plugin record")); @@ -1333,11 +1340,12 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv) LEX_STRING name= {(char *)str_name.ptr(), str_name.length()}; LEX_STRING dl= {(char *)str_dl.ptr(), str_dl.length()}; - free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) sql_print_warning("Couldn't load plugin named '%s' with soname '%s'.", str_name.c_ptr(), str_dl.c_ptr()); + free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); } + pthread_mutex_unlock(&LOCK_plugin); if (error > 0) sql_print_error(ER(ER_GET_ERRNO), my_errno); end_read_record(&read_record_info); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index b4b6ad2842a..018051ed8b1 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3220,15 +3220,16 @@ ha_innobase::write_row( longlong auto_inc; longlong dummy; ibool auto_inc_used= FALSE; + THD *thd= ha_thd(); DBUG_ENTER("ha_innobase::write_row"); if (prebuilt->trx != - *(trx_t**) ha_data()) { + *(trx_t**) ha_data(thd)) { sql_print_error("The transaction object for the table handle is at " "%p, but for the current thread it is at %p", prebuilt->trx, - *(trx_t**) ha_data()); + *(trx_t**) ha_data(thd)); fputs("InnoDB: Dump of 200 bytes around prebuilt: ", stderr); ut_print_buf(stderr, ((const byte*)prebuilt) - 100, 200); @@ -3236,7 +3237,7 @@ ha_innobase::write_row( "InnoDB: Dump of 200 bytes around transaction.all: ", stderr); ut_print_buf(stderr, - ((byte*)(*(trx_t**) ha_data())) - 100, + ((byte*)(*(trx_t**) ha_data(thd))) - 100, 200); putc('\n', stderr); ut_error; @@ -3247,10 +3248,10 @@ ha_innobase::write_row( if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); - if ((ha_sql_command() == SQLCOM_ALTER_TABLE - || ha_sql_command() == SQLCOM_OPTIMIZE - || ha_sql_command() == SQLCOM_CREATE_INDEX - || ha_sql_command() == SQLCOM_DROP_INDEX) + if ((thd_sql_command(thd) == SQLCOM_ALTER_TABLE + || thd_sql_command(thd) == SQLCOM_OPTIMIZE + || thd_sql_command(thd) == SQLCOM_CREATE_INDEX + || thd_sql_command(thd) == SQLCOM_DROP_INDEX) && num_write_row >= 10000) { /* ALTER TABLE is COMMITted at every 10000 copied rows. The IX table lock for the original table has to be re-issued. @@ -3409,9 +3410,9 @@ no_commit: performing those statements. */ if (error == DB_DUPLICATE_KEY && auto_inc_used - && (ha_sql_command() == SQLCOM_REPLACE - || ha_sql_command() == SQLCOM_REPLACE_SELECT - || (ha_sql_command() == SQLCOM_LOAD + && (thd_sql_command(thd) == SQLCOM_REPLACE + || thd_sql_command(thd) == SQLCOM_REPLACE_SELECT + || (thd_sql_command(thd) == SQLCOM_LOAD && prebuilt->trx->allow_duplicates && prebuilt->trx->replace_duplicates))) { @@ -3613,7 +3614,7 @@ ha_innobase::update_row( DBUG_ENTER("ha_innobase::update_row"); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); @@ -3674,7 +3675,7 @@ ha_innobase::delete_row( DBUG_ENTER("ha_innobase::delete_row"); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); if (last_query_id != user_thd->query_id) { prebuilt->sql_stat_start = TRUE; @@ -3772,7 +3773,7 @@ ha_innobase::try_semi_consistent_read(bool yes) row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); /* Row read type is set to semi consistent read if this was requested by the MySQL and either innodb_locks_unsafe_for_binlog @@ -3939,7 +3940,7 @@ ha_innobase::index_read( DBUG_ENTER("index_read"); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); ha_statistic_increment(&SSV::ha_read_key_count); @@ -4052,7 +4053,7 @@ ha_innobase::change_active_index( ut_ad(user_thd == current_thd); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); active_index = keynr; @@ -4142,7 +4143,7 @@ ha_innobase::general_fetch( DBUG_ENTER("general_fetch"); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); innodb_srv_conc_enter_innodb(prebuilt->trx); @@ -4371,7 +4372,7 @@ ha_innobase::rnd_pos( ha_statistic_increment(&SSV::ha_read_rnd_count); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4421,7 +4422,7 @@ ha_innobase::position( uint len; ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4921,7 +4922,7 @@ ha_innobase::discard_or_import_tablespace( ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); dict_table = prebuilt->table; trx = prebuilt->trx; @@ -4956,7 +4957,7 @@ ha_innobase::delete_all_rows(void) update_thd(thd); - if (ha_sql_command() == SQLCOM_TRUNCATE) { + if (thd_sql_command(thd) == SQLCOM_TRUNCATE) { /* Truncate the table in InnoDB */ error = row_truncate_table_for_mysql(prebuilt->table, prebuilt->trx); @@ -5250,7 +5251,7 @@ ha_innobase::records_in_range( DBUG_ENTER("records_in_range"); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); prebuilt->trx->op_info = (char*)"estimating records in index range"; @@ -5686,7 +5687,7 @@ ha_innobase::check( ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); if (prebuilt->mysql_template == NULL) { /* Build the template; we will use a dummy template @@ -5988,7 +5989,7 @@ ha_innobase::can_switch_engines(void) DBUG_ENTER("ha_innobase::can_switch_engines"); ut_a(prebuilt->trx == - *(trx_t**) ha_data()); + *(trx_t**) ha_data(ha_thd())); prebuilt->trx->op_info = "determining if there are foreign key constraints"; @@ -6154,7 +6155,7 @@ ha_innobase::start_stmt( prebuilt->select_lock_type = LOCK_X; } else { if (trx->isolation_level != TRX_ISO_SERIALIZABLE - && ha_sql_command() == SQLCOM_SELECT + && thd_sql_command(thd) == SQLCOM_SELECT && lock_type == TL_READ) { /* For other than temporary tables, we obtain @@ -6296,7 +6297,7 @@ ha_innobase::external_lock( if (prebuilt->select_lock_type != LOCK_NONE) { if (thd_in_lock_tables(thd) && - ha_sql_command() == SQLCOM_LOCK_TABLES && + thd_sql_command(thd) == SQLCOM_LOCK_TABLES && THDVAR(thd, table_locks) && thd_test_options(thd, OPTION_NOT_AUTOCOMMIT)) { @@ -6768,12 +6769,12 @@ ha_innobase::store_lock( if (lock_type != TL_IGNORE && trx->n_mysql_tables_in_use == 0) { trx->isolation_level = innobase_map_isolation_level( - ha_tx_isolation()); + (enum_tx_isolation)thd_tx_isolation(thd)); } DBUG_ASSERT(thd == current_thd); const bool in_lock_tables = thd_in_lock_tables(thd); - const uint sql_command = ha_sql_command(); + const uint sql_command = thd_sql_command(thd); if (sql_command == SQLCOM_DROP_TABLE) { From 44271d49a0cb213ea854db41ea017126803e65f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Apr 2007 15:15:47 +0800 Subject: [PATCH 011/137] BUG#18676 In order to coincide with 5.0 mysqld error code after bug#18676, Map the 4009 ndb error code to 157 mysql error code mysql-test/r/ndb_autodiscover.result: changes ndbd error code 4009 to mysqld error code 157 when no cluster connection sql/ha_ndbcluster.cc: define return codes to ndbcluster_table_exists_in_engine to something useful sql/handler.cc: define return codes to ha_table_exists_in_engine to something useful sql/sql_plugin.cc: Add a comment sql/sql_table.cc: clearly define what happens on create table if exists/not exists/not connected to engine storage/ndb/src/ndbapi/ndberror.c: map 4009 ndb error code to 157 mysqld error code --- mysql-test/r/ndb_autodiscover.result | 2 +- sql/ha_ndbcluster.cc | 6 +++--- sql/handler.cc | 31 ++++++++++++++++------------ sql/sql_plugin.cc | 1 + sql/sql_table.cc | 24 ++++++++++++++------- storage/ndb/src/ndbapi/ndberror.c | 2 +- 6 files changed, 41 insertions(+), 25 deletions(-) diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result index cb85c4ac873..487f52f6427 100644 --- a/mysql-test/r/ndb_autodiscover.result +++ b/mysql-test/r/ndb_autodiscover.result @@ -382,7 +382,7 @@ create table t1 (a int primary key) engine=ndb; select * from t1; a select * from t1; -ERROR HY000: Can't lock file (errno: 4009) +ERROR HY000: Can't lock file (errno: 157) use test; drop database test_only_ndb_tables; CREATE TABLE t9 ( diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 4db35cd7377..af12ad7554a 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6244,9 +6244,9 @@ int ndbcluster_table_exists_in_engine(handlerton *hton, THD* thd, if (my_strcasecmp(system_charset_info, elmt.name, name)) continue; DBUG_PRINT("info", ("Found table")); - DBUG_RETURN(1); + DBUG_RETURN(HA_ERR_TABLE_EXIST); } - DBUG_RETURN(0); + DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); } @@ -6608,7 +6608,7 @@ int ndbcluster_find_files(handlerton *hton, THD *thd, DBUG_PRINT("info", ("%s existed on disk", name)); // The .ndb file exists on disk, but it's not in list of tables in ndb // Verify that handler agrees table is gone. - if (ndbcluster_table_exists_in_engine(hton, thd, db, file_name) == 0) + if (ndbcluster_table_exists_in_engine(hton, thd, db, file_name) == HA_ERR_NO_SUCH_TABLE) { DBUG_PRINT("info", ("NDB says %s does not exists", file_name)); it.remove(); diff --git a/sql/handler.cc b/sql/handler.cc index 23c3103493e..e129c677251 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2860,20 +2860,21 @@ ha_find_files(THD *thd,const char *db,const char *path, DBUG_RETURN(error); } - -/** @brief +/* Ask handler if the table exists in engine RETURN - 0 Table does not exist - 1 Table exists - # Error code + HA_ERR_NO_SUCH_TABLE Table does not exist + HA_ERR_TABLE_EXIST Table exists + # Error code + + */ -*/ struct st_table_exists_in_engine_args { const char *db; const char *name; + int err; }; static my_bool table_exists_in_engine_handlerton(THD *thd, st_plugin_int *plugin, @@ -2882,23 +2883,27 @@ static my_bool table_exists_in_engine_handlerton(THD *thd, st_plugin_int *plugin st_table_exists_in_engine_args *vargs= (st_table_exists_in_engine_args *)arg; handlerton *hton= (handlerton *)plugin->data; + int err= HA_ERR_NO_SUCH_TABLE; + if (hton->state == SHOW_OPTION_YES && hton->table_exists_in_engine) - if ((hton->table_exists_in_engine(hton, thd, vargs->db, vargs->name)) == 1) - return TRUE; + err = hton->table_exists_in_engine(hton, thd, vargs->db, vargs->name); + + vargs->err = err; + if (vargs->err == HA_ERR_TABLE_EXIST) + return TRUE; return FALSE; } int ha_table_exists_in_engine(THD* thd, const char* db, const char* name) { - int error= 0; DBUG_ENTER("ha_table_exists_in_engine"); DBUG_PRINT("enter", ("db: %s, name: %s", db, name)); - st_table_exists_in_engine_args args= {db, name}; - error= plugin_foreach(thd, table_exists_in_engine_handlerton, + st_table_exists_in_engine_args args= {db, name, HA_ERR_NO_SUCH_TABLE}; + plugin_foreach(thd, table_exists_in_engine_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &args); - DBUG_PRINT("exit", ("error: %d", error)); - DBUG_RETURN(error); + DBUG_PRINT("exit", ("error: %d", args.err)); + DBUG_RETURN(args.err); } #ifdef HAVE_NDB_BINLOG diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index e3e24c1f375..32f89f155bb 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1009,6 +1009,7 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, rw_unlock(&THR_LOCK_plugin); } plugin= plugins[idx]; + /* It will stop iterating on first engine error when "func" returns TRUE */ if (plugin && func(thd, plugin, arg)) goto err; } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index fc401e93d9c..2e2269b8829 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3481,15 +3481,25 @@ bool mysql_create_table_internal(THD *thd, { bool create_if_not_exists = create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS; - - if (ha_table_exists_in_engine(thd, db, table_name)) + int retcode = ha_table_exists_in_engine(thd, db, table_name); + DBUG_PRINT("info", ("exists_in_engine: %u",retcode)); + switch (retcode) { - DBUG_PRINT("info", ("Table with same name already existed in handler")); + case HA_ERR_NO_SUCH_TABLE: + /* Normal case, no table exists. we can go and create it */ + break; + case HA_ERR_TABLE_EXIST: + DBUG_PRINT("info", ("Table existed in handler")); - if (create_if_not_exists) - goto warn; - my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); - goto unlock_and_end; + if (create_if_not_exists) + goto warn; + my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); + goto unlock_and_end; + break; + default: + DBUG_PRINT("info", ("error: %u from storage engine", retcode)); + my_error(retcode, MYF(0),table_name); + goto unlock_and_end; } } diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index b21b64156c8..8b14234c4be 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -151,7 +151,7 @@ ErrorBundle ErrorCodes[] = { */ { 4007, DMEC, UR, "Send to ndbd node failed" }, { 4008, DMEC, UR, "Receive from NDB failed" }, - { 4009, DMEC, UR, "Cluster Failure" }, + { 4009, HA_ERR_NO_CONNECTION, UR, "Cluster Failure" }, { 4012, DMEC, UR, "Request ndbd time-out, maybe due to high load or communication problems"}, { 4013, DMEC, UR, "Request timed out in waiting for node failure"}, From dcef028f713d84135013d6b9edd7c007818ad3fc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Apr 2007 18:16:17 +0200 Subject: [PATCH 012/137] wl#2936 post-merge fixes client/mysqltest.c: warnings extra/comp_err.c: warnings sql/event_queue.cc: warnings sql/handler.h: warnings sql/opt_range.cc: warnings sql/opt_range.h: warnings sql/rpl_mi.cc: warnings sql/sql_class.cc: wl#2936 post-merge fixes, warnings --- client/mysqltest.c | 46 ++++++++++++--------------- extra/comp_err.c | 2 +- mysql-test/r/partition_innodb.result | 1 + sql/event_queue.cc | 4 +-- sql/ha_partition.cc | 3 +- sql/handler.h | 5 +-- sql/opt_range.cc | 9 +++--- sql/opt_range.h | 4 +-- sql/rpl_mi.cc | 4 +-- sql/set_var.cc | 22 +++++++------ sql/set_var.h | 5 +-- sql/sql_class.cc | 7 ++-- sql/sql_plugin.cc | 26 ++++++--------- sql/sql_table.cc | 5 ++- sql/sql_yacc.yy | 23 ++++++-------- storage/innobase/handler/ha_innodb.cc | 2 +- 16 files changed, 79 insertions(+), 89 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index e4eb06953e2..9657f4a6699 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1525,7 +1525,7 @@ void do_source(struct st_command *command) { static DYNAMIC_STRING ds_filename; const struct command_arg source_args[] = { - "filename", ARG_STRING, TRUE, &ds_filename, "File to source" + { "filename", ARG_STRING, TRUE, &ds_filename, "File to source" } }; DBUG_ENTER("do_source"); @@ -1911,7 +1911,7 @@ void do_remove_file(struct st_command *command) int error; static DYNAMIC_STRING ds_filename; const struct command_arg rm_args[] = { - "filename", ARG_STRING, TRUE, &ds_filename, "File to delete" + { "filename", ARG_STRING, TRUE, &ds_filename, "File to delete" } }; DBUG_ENTER("do_remove_file"); @@ -1945,8 +1945,8 @@ void do_copy_file(struct st_command *command) static DYNAMIC_STRING ds_from_file; static DYNAMIC_STRING ds_to_file; const struct command_arg copy_file_args[] = { - "from_file", ARG_STRING, TRUE, &ds_from_file, "Filename to copy from", - "to_file", ARG_STRING, TRUE, &ds_to_file, "Filename to copy to" + { "from_file", ARG_STRING, TRUE, &ds_from_file, "Filename to copy from" }, + { "to_file", ARG_STRING, TRUE, &ds_to_file, "Filename to copy to" } }; DBUG_ENTER("do_copy_file"); @@ -1982,8 +1982,8 @@ void do_chmod_file(struct st_command *command) static DYNAMIC_STRING ds_mode; static DYNAMIC_STRING ds_file; const struct command_arg chmod_file_args[] = { - "mode", ARG_STRING, TRUE, &ds_mode, "Mode of file", - "file", ARG_STRING, TRUE, &ds_file, "Filename of file to modify" + { "mode", ARG_STRING, TRUE, &ds_mode, "Mode of file" }, + { "file", ARG_STRING, TRUE, &ds_file, "Filename of file to modify" } }; DBUG_ENTER("do_chmod_file"); @@ -2020,7 +2020,7 @@ void do_file_exist(struct st_command *command) int error; static DYNAMIC_STRING ds_filename; const struct command_arg file_exist_args[] = { - "filename", ARG_STRING, TRUE, &ds_filename, "File to check if it exist" + { "filename", ARG_STRING, TRUE, &ds_filename, "File to check if it exist" } }; DBUG_ENTER("do_file_exist"); @@ -2102,8 +2102,8 @@ void do_write_file_command(struct st_command *command, my_bool append) static DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_delimiter; const struct command_arg write_file_args[] = { - "filename", ARG_STRING, TRUE, &ds_filename, "File to write to", - "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until" + { "filename", ARG_STRING, TRUE, &ds_filename, "File to write to" }, + { "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until" } }; DBUG_ENTER("do_write_file"); @@ -2211,7 +2211,7 @@ void do_cat_file(struct st_command *command) char buff[512]; static DYNAMIC_STRING ds_filename; const struct command_arg cat_file_args[] = { - "filename", ARG_STRING, TRUE, &ds_filename, "File to read from" + { "filename", ARG_STRING, TRUE, &ds_filename, "File to read from" } }; DBUG_ENTER("do_cat_file"); @@ -2275,8 +2275,8 @@ void do_diff_files(struct st_command *command) static DYNAMIC_STRING ds_filename; static DYNAMIC_STRING ds_filename2; const struct command_arg diff_file_args[] = { - "file1", ARG_STRING, TRUE, &ds_filename, "First file to diff", - "file2", ARG_STRING, TRUE, &ds_filename2, "Second file to diff" + { "file1", ARG_STRING, TRUE, &ds_filename, "First file to diff" }, + { "file2", ARG_STRING, TRUE, &ds_filename2, "Second file to diff" } }; DBUG_ENTER("do_diff_files"); @@ -2352,7 +2352,7 @@ void do_perl(struct st_command *command) static DYNAMIC_STRING ds_script; static DYNAMIC_STRING ds_delimiter; const struct command_arg perl_args[] = { - "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until" + { "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until" } }; DBUG_ENTER("do_perl"); @@ -3427,18 +3427,14 @@ void do_connect(struct st_command *command) static DYNAMIC_STRING ds_sock; static DYNAMIC_STRING ds_options; const struct command_arg connect_args[] = { - "connection name", ARG_STRING, TRUE, &ds_connection_name, - "Name of the connection", - "host", ARG_STRING, TRUE, &ds_host, "Host to connect to", - "user", ARG_STRING, FALSE, &ds_user, "User to connect as", - "passsword", ARG_STRING, FALSE, &ds_password, - "Password used when connecting", - "database", ARG_STRING, FALSE, &ds_database, - "Dtabase to select after connect", - "port", ARG_STRING, FALSE, &ds_port, "Port to connect to", - "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with", - "options", ARG_STRING, FALSE, &ds_options, - "Options to use while connecting" + { "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" }, + { "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" }, + { "user", ARG_STRING, FALSE, &ds_user, "User to connect as" }, + { "passsword", ARG_STRING, FALSE, &ds_password, "Password used when connecting" }, + { "database", ARG_STRING, FALSE, &ds_database, "Database to select after connect" }, + { "port", ARG_STRING, FALSE, &ds_port, "Port to connect to" }, + { "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with" }, + { "options", ARG_STRING, FALSE, &ds_options, "Options to use while connecting" } }; DBUG_ENTER("do_connect"); diff --git a/extra/comp_err.c b/extra/comp_err.c index 3f7664405ad..71009039bb4 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -241,7 +241,7 @@ static int create_header_files(struct errors *error_head) /* generating sql_state.h file */ if (tmp_error->sql_code1[0] || tmp_error->sql_code2[0]) fprintf(sql_statef, - "%-40s,\"%s\", \"%s\",\n", tmp_error->er_name, + "{ %-40s,\"%s\", \"%s\" },\n", tmp_error->er_name, tmp_error->sql_code1, tmp_error->sql_code2); /*generating er_name file */ fprintf(er_namef, "{ \"%s\", %d },\n", tmp_error->er_name, diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index a9e43653506..8282cfc212a 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -55,6 +55,7 @@ engine = x partition by key (a); Warnings: Warning 1286 Unknown table engine 'x' +Warning 1266 Using storage engine MyISAM for table 't1' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 92622bcc2c2..efa4b95a9ea 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -73,8 +73,8 @@ Event_queue::Event_queue() :mutex_last_locked_at_line(0), mutex_last_unlocked_at_line(0), mutex_last_attempted_lock_at_line(0), mutex_queue_data_locked(FALSE), - mutex_queue_data_attempting_lock(FALSE), - next_activation_at(0) + next_activation_at(0), + mutex_queue_data_attempting_lock(FALSE) { mutex_last_unlocked_in_func= mutex_last_locked_in_func= mutex_last_attempted_lock_in_func= ""; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 762c11ed6b2..a79803e6e83 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -2340,7 +2340,8 @@ err_handler: handler *ha_partition::clone(MEM_ROOT *mem_root) { - handler *new_handler= get_new_handler(table->s, mem_root, table->s->db_type); + handler *new_handler= get_new_handler(table->s, mem_root, + table->s->db_type()); ((ha_partition*)new_handler)->m_part_info= m_part_info; ((ha_partition*)new_handler)->is_clone= TRUE; if (new_handler && !new_handler->ha_open(table, diff --git a/sql/handler.h b/sql/handler.h index a940841170b..052c245b801 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -968,11 +968,12 @@ public: Discrete_interval auto_inc_interval_for_cur_row; handler(handlerton *ht_arg, TABLE_SHARE *share_arg) - :table_share(share_arg), estimation_rows_to_insert(0), ht(ht_arg), + :table_share(share_arg), table(0), + estimation_rows_to_insert(0), ht(ht_arg), ref(0), key_used_on_scan(MAX_KEY), active_index(MAX_KEY), ref_length(sizeof(my_off_t)), ft_handler(0), inited(NONE), implicit_emptied(0), - pushed_cond(NULL), next_insert_id(0), insert_id_for_cur_row(0) + pushed_cond(0), next_insert_id(0), insert_id_for_cur_row(0) {} virtual ~handler(void) { diff --git a/sql/opt_range.cc b/sql/opt_range.cc index f5cf79bd609..96ae6174fdb 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1552,8 +1552,8 @@ QUICK_ROR_UNION_SELECT::~QUICK_ROR_UNION_SELECT() QUICK_RANGE::QUICK_RANGE() :min_key(0),max_key(0),min_length(0),max_length(0), - min_keypart_map(0), max_keypart_map(0), - flag(NO_MIN_RANGE | NO_MAX_RANGE) + flag(NO_MIN_RANGE | NO_MAX_RANGE), + min_keypart_map(0), max_keypart_map(0) {} SEL_ARG::SEL_ARG(SEL_ARG &arg) :Sql_alloc() @@ -10008,11 +10008,12 @@ QUICK_GROUP_MIN_MAX_SELECT(TABLE *table, JOIN *join_arg, bool have_min_arg, ha_rows records_arg, uint key_infix_len_arg, byte *key_infix_arg, MEM_ROOT *parent_alloc) :join(join_arg), index_info(index_info_arg), - group_prefix_len(group_prefix_len_arg), have_min(have_min_arg), + group_prefix_len(group_prefix_len_arg), + group_key_parts(group_key_parts_arg), have_min(have_min_arg), have_max(have_max_arg), seen_first_key(FALSE), min_max_arg_part(min_max_arg_part_arg), key_infix(key_infix_arg), key_infix_len(key_infix_len_arg), min_functions_it(NULL), - max_functions_it(NULL), group_key_parts(group_key_parts_arg) + max_functions_it(NULL) { head= table; file= head->file; diff --git a/sql/opt_range.h b/sql/opt_range.h index 1ad9567cddd..76a4caa1ccb 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -52,9 +52,9 @@ class QUICK_RANGE :public Sql_alloc { max_key((char*) sql_memdup(max_key_arg,max_length_arg+1)), min_length((uint16) min_length_arg), max_length((uint16) max_length_arg), + flag((uint16) flag_arg), min_keypart_map(min_keypart_map_arg), - max_keypart_map(max_keypart_map_arg), - flag((uint16) flag_arg) + max_keypart_map(max_keypart_map_arg) { #ifdef HAVE_purify dummy=0; diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index 354a97cefde..bb9d0e6d953 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -29,8 +29,8 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, MASTER_INFO::MASTER_INFO() :ssl(0), fd(-1), io_thd(0), inited(0), - abort_slave(0),slave_running(0), slave_run_id(0), - ssl_verify_server_cert(0) + abort_slave(0),slave_running(0), + ssl_verify_server_cert(0), slave_run_id(0) { host[0] = 0; user[0] = 0; password[0] = 0; ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[0]= 0; diff --git a/sql/set_var.cc b/sql/set_var.cc index dd271ddcae6..fa6d899c5f8 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -317,10 +317,10 @@ static sys_var_long_ptr sys_myisam_data_pointer_size(&vars, "myisam_data_pointer static sys_var_thd_ulonglong sys_myisam_max_sort_file_size(&vars, "myisam_max_sort_file_size", &SV::myisam_max_sort_file_size, fix_myisam_max_sort_file_size, 1); static sys_var_thd_ulong sys_myisam_repair_threads(&vars, "myisam_repair_threads", &SV::myisam_repair_threads); static sys_var_thd_ulong sys_myisam_sort_buffer_size(&vars, "myisam_sort_buffer_size", &SV::myisam_sort_buff_size); -static sys_var_bool_ptr sys_myisam_use_mmap(&vars, "myisam_use_mmap", +static sys_var_bool_ptr sys_myisam_use_mmap(&vars, "myisam_use_mmap", &opt_myisam_use_mmap); -static sys_var_thd_enum sys_myisam_stats_method(&vars, "myisam_stats_method", +static sys_var_thd_enum sys_myisam_stats_method(&vars, "myisam_stats_method", &SV::myisam_stats_method, &myisam_stats_method_typelib, NULL); @@ -337,16 +337,17 @@ static sys_var_thd_ulong sys_net_retry_count(&vars, "net_retry_count", &SV::net_retry_count, 0, fix_net_retry_count); static sys_var_thd_bool sys_new_mode(&vars, "new", &SV::new_mode); -static sys_var_bool_ptr_readonly sys_old_mode(&vars, "old", +static sys_var_bool_ptr_readonly sys_old_mode(&vars, "old", &global_system_variables.old_mode); -static sys_var_thd_bool sys_old_alter_table(&vars, "old_alter_table", - &SV::old_alter_table); -sys_var_thd_bool sys_old_passwords(&vars, "old_passwords", &SV::old_passwords); -static sys_var_thd_ulong sys_optimizer_prune_level(&vars, "optimizer_prune_level", +/* these two cannot be static */ +sys_var_thd_bool sys_old_alter_table(&vars, "old_alter_table", + &SV::old_alter_table); +sys_var_thd_bool sys_old_passwords(&vars, "old_passwords", &SV::old_passwords); +static sys_var_thd_ulong sys_optimizer_prune_level(&vars, "optimizer_prune_level", &SV::optimizer_prune_level); -static sys_var_thd_ulong sys_optimizer_search_depth(&vars, "optimizer_search_depth", +static sys_var_thd_ulong sys_optimizer_search_depth(&vars, "optimizer_search_depth", &SV::optimizer_search_depth); -static sys_var_thd_ulong sys_preload_buff_size(&vars, "preload_buffer_size", +static sys_var_thd_ulong sys_preload_buff_size(&vars, "preload_buffer_size", &SV::preload_buff_size); static sys_var_thd_ulong sys_read_buff_size(&vars, "read_buffer_size", &SV::read_buff_size); @@ -615,7 +616,8 @@ static sys_var_have_variable sys_have_dlopen(&vars, "have_dynamic_loading", &hav static sys_var_have_variable sys_have_geometry(&vars, "have_geometry", &have_geometry); static sys_var_have_plugin sys_have_innodb(&vars, "have_innodb", C_STRING_WITH_LEN("innodb"), MYSQL_STORAGE_ENGINE_PLUGIN); static sys_var_have_plugin sys_have_ndbcluster(&vars, "have_ndbcluster", C_STRING_WITH_LEN("ndbcluster"), MYSQL_STORAGE_ENGINE_PLUGIN); -static sys_var_have_variable sys_have_openssl(&vars, "have_openssl", &have_openssl); +static sys_var_have_variable sys_have_openssl(&vars, "have_openssl", &have_ssl); +static sys_var_have_variable sys_have_ssl(&vars, "have_ssl", &have_ssl); static sys_var_have_plugin sys_have_partition_db(&vars, "have_partitioning", C_STRING_WITH_LEN("partition"), MYSQL_STORAGE_ENGINE_PLUGIN); static sys_var_have_variable sys_have_query_cache(&vars, "have_query_cache", &have_query_cache); diff --git a/sql/set_var.h b/sql/set_var.h index 5ec7eb7ef4a..5556e9c9587 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -182,8 +182,9 @@ public: class sys_var_bool_ptr_readonly :public sys_var_bool_ptr { public: - sys_var_bool_ptr_readonly(const char *name_arg, my_bool *value_arg) - :sys_var_bool_ptr(name_arg, value_arg) + sys_var_bool_ptr_readonly(sys_var_chain *chain, const char *name_arg, + my_bool *value_arg) + :sys_var_bool_ptr(chain, name_arg, value_arg) {} bool is_readonly() const { return 1; } }; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 3d2683786c4..2cee2783988 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -294,15 +294,16 @@ THD::THD() lock_id(&main_lock_id), user_time(0), in_sub_stmt(0), binlog_table_maps(0), - global_read_lock(0), is_fatal_error(0), arg_of_last_insert_id_function(FALSE), first_successful_insert_id_in_prev_stmt(0), first_successful_insert_id_in_prev_stmt_for_binlog(0), first_successful_insert_id_in_cur_stmt(0), + stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE), + global_read_lock(0), + is_fatal_error(0), rand_used(0), time_zone_used(0), in_lock_tables(0), - stmt_depends_on_first_successful_insert_id_in_prev_stmt(FALSE), bootstrap(0), derived_tables_processing(FALSE), spcont(NULL) @@ -1836,7 +1837,7 @@ void Query_arena::cleanup_stmt() Statement::Statement(LEX *lex_arg, MEM_ROOT *mem_root_arg, enum enum_state state_arg, ulong id_arg) - :Query_arena(mem_root_arg, state_arg), main_lex(), + :Query_arena(mem_root_arg, state_arg), id(id_arg), mark_used_columns(MARK_COLUMNS_READ), lex(lex_arg), diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 34accdc6494..bc545f23428 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -633,15 +633,9 @@ static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc CALLER_INFO_PROTO) plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO) { - LEX *lex= NULL; + LEX *lex= thd ? thd->lex : 0; plugin_ref rc; DBUG_ENTER("plugin_lock"); - /* - thd->lex may point to a nested LEX or a stored procedure LEX. - main_lex is tightly coupled to the thread. - */ - if (thd) - lex= !thd->lex ? &thd->main_lex : thd->lex; pthread_mutex_lock(&LOCK_plugin); rc= my_intern_plugin_lock_ci(lex, *ptr); pthread_mutex_unlock(&LOCK_plugin); @@ -652,12 +646,10 @@ plugin_ref plugin_lock(THD *thd, plugin_ref *ptr CALLER_INFO_PROTO) plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type CALLER_INFO_PROTO) { - LEX *lex= NULL; + LEX *lex= thd ? thd->lex : 0; plugin_ref rc= NULL; st_plugin_int *plugin; DBUG_ENTER("plugin_lock"); - if (thd) - lex= !thd->lex ? &thd->main_lex : thd->lex; pthread_mutex_lock(&LOCK_plugin); if ((plugin= plugin_find_internal(name, type))) rc= my_intern_plugin_lock_ci(lex, plugin_int_to_ref(plugin)); @@ -946,7 +938,7 @@ static void intern_plugin_unlock(LEX *lex, plugin_ref plugin) void plugin_unlock(THD *thd, plugin_ref plugin) { - LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex) : NULL; + LEX *lex= thd ? thd->lex : 0; DBUG_ENTER("plugin_unlock"); if (!plugin) DBUG_VOID_RETURN; @@ -965,7 +957,7 @@ void plugin_unlock(THD *thd, plugin_ref plugin) void plugin_unlock_list(THD *thd, plugin_ref *list, uint count) { - LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex) : NULL; + LEX *lex= thd ? thd->lex : 0; DBUG_ENTER("plugin_unlock_list"); DBUG_ASSERT(list); pthread_mutex_lock(&LOCK_plugin); @@ -2037,7 +2029,7 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length) (pi= var->cast_pluginvar())) { rw_unlock(&LOCK_system_variables_hash); - LEX *lex= thd ? ( !thd->lex ? &thd->main_lex : thd->lex ) : NULL; + LEX *lex= thd ? thd->lex : 0; if (!(plugin= my_intern_plugin_lock(lex, plugin_int_to_ref(pi->plugin)))) var= NULL; /* failed to lock it, it must be uninstalling */ else @@ -2361,18 +2353,18 @@ void plugin_thdvar_cleanup(THD *thd) unlock_variables(thd, &thd->variables); cleanup_variables(thd, &thd->variables); - if ((idx= thd->main_lex.plugins.elements)) + if ((idx= thd->lex->plugins.elements)) { - list= ((plugin_ref*) thd->main_lex.plugins.buffer) + idx - 1; + list= ((plugin_ref*) thd->lex->plugins.buffer) + idx - 1; DBUG_PRINT("info",("unlocking %d plugins", idx)); - while ((char*) list >= thd->main_lex.plugins.buffer) + while ((char*) list >= thd->lex->plugins.buffer) intern_plugin_unlock(NULL, *list--); } reap_plugins(); pthread_mutex_unlock(&LOCK_plugin); - reset_dynamic(&thd->main_lex.plugins); + reset_dynamic(&thd->lex->plugins); DBUG_VOID_RETURN; } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a994ede6bdf..61228b31a8a 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -40,8 +40,7 @@ static int copy_data_between_tables(TABLE *from,TABLE *to, enum enum_enable_or_disable keys_onoff); static bool prepare_blob_field(THD *thd, create_field *sql_field); -static bool check_engine(THD *thd, const char *table_name, - HA_CREATE_INFO *create_info); +static bool check_engine(THD *, const char *, HA_CREATE_INFO *); static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, List *fields, List *keys, bool tmp_table, @@ -7097,7 +7096,7 @@ static bool check_engine(THD *thd, const char *table_name, if (req_engine && req_engine != *new_engine) { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_WARN_USING_OTHER_HANDLER, ER(ER_WARN_USING_OTHER_HANDLER), ha_resolve_storage_engine_name(*new_engine), diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index c0a8ebada43..99681905bfa 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4406,10 +4406,9 @@ default_collation: storage_engines: ident_or_text { - LEX *lex= YYTHD->lex; - plugin_ref plugin; + plugin_ref plugin= ha_resolve_by_name(YYTHD, &$1); - if ((plugin= ha_resolve_by_name(YYTHD, &$1))) + if (plugin) $$= plugin_data(plugin, handlerton*); else { @@ -4418,18 +4417,14 @@ storage_engines: my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str); MYSQL_YYABORT; } - if (lex->sql_command == SQLCOM_ALTER_TABLE) - { - TABLE_LIST *table= (TABLE_LIST *) lex->select_lex.table_list.first; - $$= ha_default_handlerton(YYTHD); - push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_WARN_USING_OTHER_HANDLER, - ER(ER_WARN_USING_OTHER_HANDLER), - ha_resolve_storage_engine_name($$), - table->table_name); - } + $$= 0; + push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_UNKNOWN_STORAGE_ENGINE, + ER(ER_UNKNOWN_STORAGE_ENGINE), + $1.str); } - }; + } + ; known_storage_engines: ident_or_text diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e7bf0f94195..17fd78940dd 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5098,7 +5098,7 @@ innobase_drop_database( /* Get the transaction associated with the current thd, or create one if not yet created */ - parent_trx = check_trx_exists(hton, ha_thd()); + parent_trx = check_trx_exists(hton, current_thd); /* In case MySQL calls this in the middle of a SELECT query, release possible adaptive hash latch to avoid deadlocks of threads */ From 56113a7c12d247d7b5c9cf72cb11cd08d83c356b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Apr 2007 14:24:09 +0200 Subject: [PATCH 013/137] mysql-test/mysql-test-run.pl set --language correctly even for --help (to have full plugin help) mysql-test/lib/mtr_cases.pl more robust check for innodb mysql-test/lib/mtr_cases.pl: more robust check for innodb mysql-test/mysql-test-run.pl: set --language correctly even for --help (to have full plugin help) --- mysql-test/lib/mtr_cases.pl | 2 +- mysql-test/mysql-test-run.pl | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 28c78fbffeb..d7aa4445551 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -580,7 +580,7 @@ sub collect_one_test_case($$$$$$$) { if ( $tinfo->{'innodb_test'} ) { # This is a test that need innodb - if ( $::mysqld_variables{'innodb'} eq "FALSE" ) + if ( $::mysqld_variables{'innodb'} ne "TRUE" ) { # innodb is not supported, skip it $tinfo->{'skip'}= 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4ed1686a121..4306a5ade77 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -58,7 +58,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff use File::Path; use File::Basename; use File::Copy; -use File::Temp qw / tempdir /; +use File::Temp qw /tempdir/; use Cwd; use Getopt::Long; use Sys::Hostname; @@ -113,6 +113,7 @@ our $glob_basedir; our $path_charsetsdir; our $path_client_bindir; +our $path_share; our $path_language; our $path_timefile; our $path_snapshot; @@ -704,6 +705,15 @@ sub command_line_setup () { "$glob_basedir/client", "$glob_basedir/bin"); + # Look for language files and charsetsdir, use same share + $path_share= mtr_path_exists("$glob_basedir/share/mysql", + "$glob_basedir/sql/share", + "$glob_basedir/share"); + + $path_language= mtr_path_exists("$path_share/english"); + $path_charsetsdir= mtr_path_exists("$path_share/charsets"); + + if (!$opt_extern) { $exe_mysqld= mtr_exe_exists (vs_config_dirs('sql', 'mysqld'), @@ -1351,7 +1361,7 @@ sub collect_mysqld_features () { # --no-defaults and --skip-grant-tables are to avoid loading # system-wide configs and plugins # - my $list= `$exe_mysqld --no-defaults --skip-grant-tables --verbose --help`; + my $list= `$exe_mysqld --no-defaults --language=$path_language --skip-grant-tables --verbose --help`; foreach my $line (split('\n', $list)) { @@ -1514,14 +1524,6 @@ sub executable_setup () { } } - # Look for language files and charsetsdir, use same share - my $path_share= mtr_path_exists("$glob_basedir/share/mysql", - "$glob_basedir/sql/share", - "$glob_basedir/share"); - - $path_language= mtr_path_exists("$path_share/english"); - $path_charsetsdir= mtr_path_exists("$path_share/charsets"); - # Look for my_print_defaults $exe_my_print_defaults= mtr_exe_exists(vs_config_dirs('extra', 'my_print_defaults'), From c43979f554196ebef8520fd4956f6917e257f3bf Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Apr 2007 14:37:57 +0200 Subject: [PATCH 014/137] WL#2936 - Falcon & MySQL plugin interface: server variables Fixed a compiler dependent expression to be more portable. Initialized 'dummy' in construct_help_options() so that loaded plugin show themselves as TRUE in the help output. mysys/hash.c: WL#2936 - Falcon & MySQL plugin interface: server variables Fixed a compiler dependent expression to be more portable. sql/handler.cc: WL#2936 - Falcon & MySQL plugin interface: server variables Added a DBUG_PRINT. sql/sql_plugin.cc: WL#2936 - Falcon & MySQL plugin interface: server variables Initialized 'dummy' in construct_help_options() so that loaded plugin show themselves as TRUE in the help output. Fixed a DBUG_ENTER, added a DBUG_PRINT. Added comments. --- mysys/hash.c | 9 ++++++--- sql/handler.cc | 1 + sql/sql_plugin.cc | 15 ++++++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/mysys/hash.c b/mysys/hash.c index ab875848989..964ba6b1ca3 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -315,9 +315,12 @@ my_bool my_hash_insert(HASH *info,const byte *record) LINT_INIT(gpos); LINT_INIT(gpos2); LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2); - if (HASH_UNIQUE & info->flags && - hash_search(info, hash_key(info, record, &idx, 1), idx)) - return(TRUE); /* Duplicate entry */ + if (HASH_UNIQUE & info->flags) + { + byte *key= (byte*) hash_key(info, record, &idx, 1); + if (hash_search(info, key, idx)) + return(TRUE); /* Duplicate entry */ + } flag=0; if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array))) diff --git a/sql/handler.cc b/sql/handler.cc index 07ca6de5023..73cadb1f7f4 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -416,6 +416,7 @@ int ha_initialize_handlerton(st_plugin_int *plugin) { handlerton *hton; DBUG_ENTER("ha_initialize_handlerton"); + DBUG_PRINT("plugin", ("initialize plugin: '%s'", plugin->name.str)); hton= (handlerton *)my_malloc(sizeof(handlerton), MYF(MY_WME | MY_ZEROFILL)); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index bc545f23428..c7ca879e9b4 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -649,7 +649,7 @@ plugin_ref plugin_lock_by_name(THD *thd, const LEX_STRING *name, int type LEX *lex= thd ? thd->lex : 0; plugin_ref rc= NULL; st_plugin_int *plugin; - DBUG_ENTER("plugin_lock"); + DBUG_ENTER("plugin_lock_by_name"); pthread_mutex_lock(&LOCK_plugin); if ((plugin= plugin_find_internal(name, type))) rc= my_intern_plugin_lock_ci(lex, plugin_int_to_ref(plugin)); @@ -2679,11 +2679,14 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, st_mysql_sys_var *opt, **plugin_option; st_bookmark *v; DBUG_ENTER("construct_options"); + DBUG_PRINT("plugin", ("plugin: '%s' enabled: %d can_disable: %d", + tmp->plugin->name, **enabled, can_disable)); /* support --skip-plugin-foo syntax */ memcpy(name, plugin_name, namelen + 1); my_casedn_str(&my_charset_latin1, name); strxmov(name + namelen + 1, "plugin-", name, NullS); + /* Now we have namelen + 1 + 7 + namelen + 1 == namelen * 2 + 9. */ for (p= name + namelen*2 + 8; p > name; p--) if (*p == '_') @@ -2693,10 +2696,18 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, { strxmov(name + namelen*2 + 10, "Enable ", plugin_name, " plugin. " "Disable with --skip-", name," (will save memory).", NullS); + /* + Now we have namelen * 2 + 10 (one char unused) + 7 + namelen + 9 + + 20 + namelen + 20 + 1 == namelen * 4 + 67. + */ options[0].comment= name + namelen*2 + 10; } + /* + NOTE: 'name' is one char above the allocated buffer! + NOTE: This code assumes that 'my_bool' and 'char' are of same size. + */ *((my_bool *)(name -1))= **enabled; *enabled= (my_bool *)(name - 1); @@ -2880,6 +2891,8 @@ static my_option *construct_help_options(MEM_ROOT *mem_root, bzero(opts, sizeof(my_option) * count); + dummy= TRUE; /* plugin is enabled. */ + can_disable= my_strcasecmp(&my_charset_latin1, p->name.str, "MyISAM") && my_strcasecmp(&my_charset_latin1, p->name.str, "MEMORY"); From 9bafb1a7ed01682219b8be7c631966e087e1a189 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Apr 2007 20:46:26 +0200 Subject: [PATCH 015/137] comment --- sql/sql_plugin.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index c7ca879e9b4..2f62b39d51c 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -92,17 +92,20 @@ static int cur_plugin_info_interface_version[MYSQL_MAX_PLUGIN_TYPE_NUM]= MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION }; +static bool initialized= 0; + +/* + A mutex LOCK_plugin must be acquired before accessing the + following variables/structures. + We are always manipulating ref count, so a rwlock here is unneccessary. +*/ +static pthread_mutex_t LOCK_plugin; static DYNAMIC_ARRAY plugin_dl_array; static DYNAMIC_ARRAY plugin_array; static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM]; -/* we are always manipulating ref count, so a rwlock is unneccessary */ -static pthread_mutex_t LOCK_plugin; -static bool initialized= 0; static bool reap_needed= false; - static int plugin_array_version=0; - /* write-lock on LOCK_system_variables_hash is required before modifying the following variables/structures From 2b14696099ef00d539be3375e01eaf531da53039 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Apr 2007 11:05:25 +0200 Subject: [PATCH 016/137] mysql-test/t/ndb_dd_basic.test fixed the test sql/ha_ndbcluster.cc LOCK_plugin is used in ha_ndbcluster.cc sql/sql_plugin.cc LOCK_plugin is used in ha_ndbcluster.cc mysql-test/t/ndb_dd_basic.test: fixed the test sql/ha_ndbcluster.cc: LOCK_plugin is used in ha_ndbcluster.cc sql/sql_plugin.cc: LOCK_plugin is used in ha_ndbcluster.cc --- mysql-test/t/ndb_dd_basic.test | 1 - sql/ha_ndbcluster.cc | 12 ++++++++++++ sql/sql_plugin.cc | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test index 7f74fe7d050..81286d3121f 100644 --- a/mysql-test/t/ndb_dd_basic.test +++ b/mysql-test/t/ndb_dd_basic.test @@ -25,7 +25,6 @@ INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=MYISAM; ---error ER_UNKNOWN_STORAGE_ENGINE ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undofile02.dat' INITIAL_SIZE = 4M diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index a2ca0c8047d..10f484b7f6d 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6851,6 +6851,7 @@ static int connect_callback() } extern int ndb_dictionary_is_mysqld; +extern pthread_mutex_t LOCK_plugin; static int ndbcluster_init(void *p) { @@ -6860,6 +6861,13 @@ static int ndbcluster_init(void *p) if (ndbcluster_inited) DBUG_RETURN(FALSE); + /* + Below we create new THD's. They'll need LOCK_plugin, but it's taken now by + plugin initialization code. Release it to avoid deadlocks. It's safe, as + there're no threads that may concurrently access plugin control structures. + */ + pthread_mutex_unlock(&LOCK_plugin); + pthread_mutex_init(&ndbcluster_mutex,MY_MUTEX_INIT_FAST); pthread_mutex_init(&LOCK_ndb_util_thread, MY_MUTEX_INIT_FAST); pthread_cond_init(&COND_ndb_util_thread, NULL); @@ -6998,6 +7006,8 @@ static int ndbcluster_init(void *p) goto ndbcluster_init_error; } + pthread_mutex_lock(&LOCK_plugin); + ndbcluster_inited= 1; DBUG_RETURN(FALSE); @@ -7010,6 +7020,8 @@ ndbcluster_init_error: g_ndb_cluster_connection= NULL; ndbcluster_hton->state= SHOW_OPTION_DISABLED; // If we couldn't use handler + pthread_mutex_lock(&LOCK_plugin); + DBUG_RETURN(TRUE); } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 2f62b39d51c..83d71af227e 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -99,7 +99,7 @@ static bool initialized= 0; following variables/structures. We are always manipulating ref count, so a rwlock here is unneccessary. */ -static pthread_mutex_t LOCK_plugin; +pthread_mutex_t LOCK_plugin; static DYNAMIC_ARRAY plugin_dl_array; static DYNAMIC_ARRAY plugin_array; static HASH plugin_hash[MYSQL_MAX_PLUGIN_TYPE_NUM]; From 611456362f520bd5b3380e7cf90cfb2aaadd18be Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Apr 2007 21:43:42 +0500 Subject: [PATCH 017/137] Bug #27123 (partition + on duplicate key update + varchar = Can't find record in table) key_restore function didn't work as intended in the case of VARCHAR or BLOB fields, stored the restored key in field->ptr instead of to_record. That produced the wrong key so search returned wrong result mysql-test/r/partition.result: result added mysql-test/t/partition.test: testcase sql/field.cc: Field_blob::store_length made static sql/field.h: Field_blob::store_length and set_ptr functions implemented in slightly different way sql/ha_ndbcluster.cc: set_ptr_offset used sql/key.cc: set key_part->field->ptr to the proper place inside the to_record so the restored key will be placed there as key_restore is supposed to behave --- mysql-test/r/partition.result | 8 ++++++++ mysql-test/t/partition.test | 11 +++++++++++ sql/field.cc | 2 +- sql/field.h | 17 ++++++++++++++--- sql/ha_ndbcluster.cc | 8 ++------ sql/key.cc | 23 +++++++++++++++++------ 6 files changed, 53 insertions(+), 16 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 2e5fa4b9195..46b704dc7b7 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1238,4 +1238,12 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ DROP TABLE t1, t2; set @@sql_mode=@org_mode; +create table t1 (c1 varchar(255),c2 tinyint,primary key(c1)) +partition by key (c1) partitions 10 ; +insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; +insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; +select * from t1; +c1 c2 +aaa 2 +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 399f3c4a41d..d6421b0ca3d 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1492,4 +1492,15 @@ show create table t2; DROP TABLE t1, t2; set @@sql_mode=@org_mode; +# +# Bug #27123 partition + on duplicate key update + varchar = Can't find record in +# +create table t1 (c1 varchar(255),c2 tinyint,primary key(c1)) + partition by key (c1) partitions 10 ; +insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; +insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; +select * from t1; +drop table t1; + + --echo End of 5.1 tests diff --git a/sql/field.cc b/sql/field.cc index a48a3ff7bcd..240c48bdf0c 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -6969,7 +6969,7 @@ Field_blob::Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, } -void Field_blob::store_length(uint32 number) +void Field_blob::store_length(char *ptr, uint packlength, uint32 number) { switch (packlength) { case 1: diff --git a/sql/field.h b/sql/field.h index 3d1ac7528c1..ac26ce13477 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1274,7 +1274,12 @@ public: } int reset(void) { bzero(ptr, packlength+sizeof(char*)); return 0; } void reset_fields() { bzero((char*) &value,sizeof(value)); } - void store_length(uint32 number); + static void store_length(char *ptr, uint packlength, uint32 number); + inline void store_length(uint32 number) + { + store_length(ptr, packlength, number); + } + inline uint32 get_length(uint row_offset=0) { return get_length(ptr+row_offset); } uint32 get_length(const char *ptr); @@ -1292,11 +1297,17 @@ public: memcpy(ptr,length,packlength); memcpy_fixed(ptr+packlength,&data,sizeof(char*)); } + void set_ptr_offset(my_ptrdiff_t ptr_diff, uint32 length,char *data) + { + char *ptr_ofs= ADD_TO_PTR(ptr,ptr_diff,char*); + store_length(ptr_ofs, packlength, length); + memcpy_fixed(ptr_ofs+packlength,&data,sizeof(char*)); + } inline void set_ptr(uint32 length,char *data) { - store_length(length); - memcpy_fixed(ptr+packlength,&data,sizeof(char*)); + set_ptr_offset(0, length, data); } + void get_key_image(char *buff,uint length, imagetype type); void set_key_image(char *buff,uint length); void sql_type(String &str) const; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5a0f27073d4..5f5e4d3ed51 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -853,9 +853,7 @@ int get_ndb_blobs_value(TABLE* table, NdbValue* value_array, i, offset, (long) buf, len, (int)ptrdiff)); DBUG_ASSERT(len == len64); // Ugly hack assumes only ptr needs to be changed - field_blob->ptr+= ptrdiff; - field_blob->set_ptr(len, buf); - field_blob->ptr-= ptrdiff; + field_blob->set_ptr_offset(ptrdiff, len, buf); } offset+= size; } @@ -864,9 +862,7 @@ int get_ndb_blobs_value(TABLE* table, NdbValue* value_array, // have to set length even in this case char *buf= buffer + offset; // or maybe NULL uint32 len= 0; - field_blob->ptr+= ptrdiff; - field_blob->set_ptr(len, buf); - field_blob->ptr-= ptrdiff; + field_blob->set_ptr_offset(ptrdiff, len, buf); DBUG_PRINT("info", ("[%u] isNull=%d", i, isNull)); } } diff --git a/sql/key.cc b/sql/key.cc index faa7bf1f04b..5054998bd99 100644 --- a/sql/key.cc +++ b/sql/key.cc @@ -221,23 +221,34 @@ void key_restore(byte *to_record, byte *from_key, KEY *key_info, } if (key_part->key_part_flag & HA_BLOB_PART) { + /* + This in fact never happens, as we have only partial BLOB + keys yet anyway, so it's difficult to find any sence to + restore the part of a record. + Maybe this branch is to be removed, but now we + have to ignore GCov compaining. + */ uint blob_length= uint2korr(from_key); + Field_blob *field= (Field_blob*) key_part->field; from_key+= HA_KEY_BLOB_LENGTH; key_length-= HA_KEY_BLOB_LENGTH; - ((Field_blob*) key_part->field)->set_ptr((ulong) blob_length, - (char*) from_key); + field->set_ptr_offset(to_record - field->table->record[0], + (ulong) blob_length, (char*) from_key); length= key_part->length; } else if (key_part->key_part_flag & HA_VAR_LENGTH_PART) { + Field *field= key_part->field; my_bitmap_map *old_map; + my_ptrdiff_t ptrdiff= to_record - field->table->record[0]; + field->move_field_offset(ptrdiff); key_length-= HA_KEY_BLOB_LENGTH; length= min(key_length, key_part->length); - old_map= dbug_tmp_use_all_columns(key_part->field->table, - key_part->field->table->write_set); - key_part->field->set_key_image((char *) from_key, length); - dbug_tmp_restore_column_map(key_part->field->table->write_set, old_map); + old_map= dbug_tmp_use_all_columns(field->table, field->table->write_set); + field->set_key_image((char *) from_key, length); + dbug_tmp_restore_column_map(field->table->write_set, old_map); from_key+= HA_KEY_BLOB_LENGTH; + field->move_field_offset(-ptrdiff); } else { From c38ec9d2ce71be993c185d3d66017ff1f6a1218e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Apr 2007 12:36:10 +0000 Subject: [PATCH 018/137] BUG#26675 remove additional varialbes definations in mysqld.cc and add NDBCLUSTER macro in set_var.cc sql/mysqld.cc: remove additional variables defination in none-ndbcluster engines. sql/set_var.cc: add NDBCLUSTER macro --- sql/mysqld.cc | 7 +------ sql/set_var.cc | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9bdf117f8f7..cf3505eb225 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -412,7 +412,7 @@ extern ulong srv_flush_log_at_trx_commit; #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE const char *opt_ndbcluster_connectstring= 0; const char *opt_ndb_connectstring= 0; -char opt_ndb_constrbuf[1024]; +char opt_ndb_constrbuf[1024]= {0}; unsigned opt_ndb_constrbuf_len= 0; my_bool opt_ndb_shm, opt_ndb_optimized_node_selection; ulong opt_ndb_cache_check_time; @@ -8433,11 +8433,6 @@ ulong srv_commit_concurrency; #endif -#ifndef WITH_NDBCLUSTER_STORAGE_ENGINE -ulong ndb_cache_check_time; -ulong ndb_extra_logging; -#endif - /***************************************************************************** Instantiate templates *****************************************************************************/ diff --git a/sql/set_var.cc b/sql/set_var.cc index d63ba62da6c..5b5ae8b1bd6 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -94,9 +94,12 @@ extern ulong srv_flush_log_at_trx_commit; } /* WITH_NDBCLUSTER_STORAGE_ENGINE */ +#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE extern ulong ndb_cache_check_time; extern char opt_ndb_constrbuf[]; extern ulong ndb_extra_logging; +#endif + #ifdef HAVE_NDB_BINLOG extern ulong ndb_report_thresh_binlog_epoch_slip; extern ulong ndb_report_thresh_binlog_mem_usage; @@ -528,6 +531,7 @@ sys_var_thd_bool sys_engine_condition_pushdown("engine_condition_pushdown", &SV::engine_condition_pushdown); +#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE /* ndb thread specific variable settings */ sys_var_thd_ulong sys_ndb_autoincrement_prefetch_sz("ndb_autoincrement_prefetch_sz", @@ -563,6 +567,7 @@ sys_var_long_ptr sys_ndb_extra_logging("ndb_extra_logging", &ndb_extra_logging); sys_var_thd_bool sys_ndb_use_copying_alter_table("ndb_use_copying_alter_table", &SV::ndb_use_copying_alter_table); +#endif //WITH_NDBCLUSTER_STORAGE_ENGINE /* Time/date/datetime formats */ @@ -924,6 +929,7 @@ SHOW_VAR init_vars[]= { #ifdef __NT__ {"named_pipe", (char*) &opt_enable_named_pipe, SHOW_MY_BOOL}, #endif +#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE {sys_ndb_autoincrement_prefetch_sz.name, (char*) &sys_ndb_autoincrement_prefetch_sz, SHOW_SYS}, {sys_ndb_cache_check_time.name,(char*) &sys_ndb_cache_check_time, SHOW_SYS}, @@ -943,6 +949,7 @@ SHOW_VAR init_vars[]= { (char*) &sys_ndb_use_copying_alter_table, SHOW_SYS}, {sys_ndb_use_exact_count.name,(char*) &sys_ndb_use_exact_count, SHOW_SYS}, {sys_ndb_use_transactions.name,(char*) &sys_ndb_use_transactions, SHOW_SYS}, +#endif //WITH_NDBCLUSTER_STORAGE_ENGINE {sys_net_buffer_length.name,(char*) &sys_net_buffer_length, SHOW_SYS}, {sys_net_read_timeout.name, (char*) &sys_net_read_timeout, SHOW_SYS}, {sys_net_retry_count.name, (char*) &sys_net_retry_count, SHOW_SYS}, From 66acd82f19ecb49229bb1070deda3c70f1b99e0f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Apr 2007 19:05:38 +0200 Subject: [PATCH 019/137] warning added --- sql/sql_plugin.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 83d71af227e..5ee6805b96b 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2683,7 +2683,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, st_bookmark *v; DBUG_ENTER("construct_options"); DBUG_PRINT("plugin", ("plugin: '%s' enabled: %d can_disable: %d", - tmp->plugin->name, **enabled, can_disable)); + plugin_name, **enabled, can_disable)); /* support --skip-plugin-foo syntax */ memcpy(name, plugin_name, namelen + 1); @@ -2759,7 +2759,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, break; default: sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", - opt->flags, tmp->plugin->name); + opt->flags, plugin_name); DBUG_RETURN(-1); }; } @@ -2799,7 +2799,13 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, { opt->update= update_func_str; if (!(opt->flags & PLUGIN_VAR_MEMALLOC)) + { opt->flags |= PLUGIN_VAR_READONLY; + sql_print_warning("Server variable %s of plugin %s was forced " + "to be read-only: string variable without " + "update_func and PLUGIN_VAR_MEMALLOC flag", + opt->name, plugin_name); + } } break; case PLUGIN_VAR_ENUM: @@ -2816,7 +2822,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, break; default: sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", - opt->flags, tmp->plugin->name); + opt->flags, plugin_name); DBUG_RETURN(-1); } @@ -2826,7 +2832,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, if (!opt->name) { sql_print_error("Missing variable name in plugin '%s'.", - tmp->plugin->name); + plugin_name); DBUG_RETURN(-1); } From 8bd7e5f48862f121a57f6eff11df01eb53f0479f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Apr 2007 09:45:15 +0800 Subject: [PATCH 020/137] BUG#22240 Upgrading from cluster 5.0 to 5.1 does not resize VARCHARS as expected. With --no-upgrade (-u) option, user can decide if ignore the upgrade, the default action is to upgrade them. storage/ndb/tools/restore/consumer_restore.cpp: 1)Assign the correct array type for varchar and varbinary type when creating them in NDB kernel 2)Replace the max length defined with the real length used for var data storage/ndb/tools/restore/consumer_restore.hpp: Add the "m_no_upgrade" member variable to decide if upgrading array type for var type storage/ndb/tools/restore/restore_main.cpp: Add --no-upgrade(-u) option for ndb_restore to decide if upgrade array type for var data. The default is false, it should be used with --skip-table-check(-s) option when -u option is unused. --- .../ndb/tools/restore/consumer_restore.cpp | 35 +++++++++++++++++-- .../ndb/tools/restore/consumer_restore.hpp | 2 ++ storage/ndb/tools/restore/restore_main.cpp | 13 ++++++- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp index 7e3395c36f6..030f610a697 100644 --- a/storage/ndb/tools/restore/consumer_restore.cpp +++ b/storage/ndb/tools/restore/consumer_restore.cpp @@ -839,6 +839,21 @@ BackupRestore::table(const TableS & table){ { copy.setMaxRows(table.getNoOfRecords()); } + + NdbTableImpl &tableImpl = NdbTableImpl::getImpl(copy); + if (table.getBackupVersion() < MAKE_VERSION(5,1,0) && !m_no_upgrade){ + for(int i= 0; i < copy.getNoOfColumns(); i++) + { + NdbDictionary::Column::Type t = copy.getColumn(i)->getType(); + + if (t == NdbDictionary::Column::Varchar || + t == NdbDictionary::Column::Varbinary) + tableImpl.getColumn(i)->setArrayType(NdbDictionary::Column::ArrayTypeShortVar); + if (t == NdbDictionary::Column::Longvarchar || + t == NdbDictionary::Column::Longvarbinary) + tableImpl.getColumn(i)->setArrayType(NdbDictionary::Column::ArrayTypeMediumVar); + } + } if (dict->createTable(copy) == -1) { @@ -1080,8 +1095,22 @@ void BackupRestore::tuple_a(restore_callback_t *cb) int size = attr_desc->size; int arraySize = attr_desc->arraySize; char * dataPtr = attr_data->string_value; - Uint32 length = attr_data->size; - + Uint32 length = 0; + + const unsigned char * src = (const unsigned char *)dataPtr; + switch(attr_desc->m_column->getType()){ + case NdbDictionary::Column::Varchar: + case NdbDictionary::Column::Varbinary: + length = src[0] + 1; + break; + case NdbDictionary::Column::Longvarchar: + case NdbDictionary::Column::Longvarbinary: + length = src[0] + (src[1] << 8) + 2; + break; + default: + length = attr_data->size; + break; + } if (j == 0 && tup.getTable()->have_auto_inc(i)) tup.getTable()->update_max_auto_val(dataPtr,size); @@ -1101,7 +1130,7 @@ void BackupRestore::tuple_a(restore_callback_t *cb) if (ret < 0) { ndbout_c("Column: %d type %d %d %d %d",i, attr_desc->m_column->getType(), - size, arraySize, attr_data->size); + size, arraySize, length); break; } } diff --git a/storage/ndb/tools/restore/consumer_restore.hpp b/storage/ndb/tools/restore/consumer_restore.hpp index 0bc9d8e8d20..8694cbffb0c 100644 --- a/storage/ndb/tools/restore/consumer_restore.hpp +++ b/storage/ndb/tools/restore/consumer_restore.hpp @@ -51,6 +51,7 @@ public: m_callback = 0; m_free_callback = 0; m_temp_error = false; + m_no_upgrade = false; m_transactions = 0; m_cache.m_old_table = 0; } @@ -91,6 +92,7 @@ public: bool m_restore_meta; bool m_no_restore_disk; bool m_restore_epoch; + bool m_no_upgrade; // for upgrade ArrayType from 5.0 backup file. Uint32 m_logCount; Uint32 m_dataCount; diff --git a/storage/ndb/tools/restore/restore_main.cpp b/storage/ndb/tools/restore/restore_main.cpp index ee3af467aa7..13054dda3cf 100644 --- a/storage/ndb/tools/restore/restore_main.cpp +++ b/storage/ndb/tools/restore/restore_main.cpp @@ -33,6 +33,7 @@ static int ga_nodeId = 0; static int ga_nParallelism = 128; static int ga_backupId = 0; static bool ga_dont_ignore_systab_0 = false; +static bool ga_no_upgrade = false; static Vector g_consumers; static const char* ga_backupPath = "." DIR_SEPARATOR; @@ -82,6 +83,10 @@ static struct my_option my_long_options[] = "Restore meta data into NDB Cluster using NDBAPI", (gptr*) &_restore_meta, (gptr*) &_restore_meta, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, + { "no-upgrade", 'u', + "Don't upgrade array type for var attributes, which don't resize VAR data and don't change column attributes", + (gptr*) &ga_no_upgrade, (gptr*) &ga_no_upgrade, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, { "no-restore-disk-objects", 'd', "Dont restore disk objects (tablespace/logfilegroups etc)", (gptr*) &_no_restore_disk, (gptr*) &_no_restore_disk, 0, @@ -388,6 +393,11 @@ o verify nodegroup mapping restore->m_no_restore_disk = true; } + if (ga_no_upgrade) + { + restore->m_no_upgrade = true; + } + if (ga_restore_epoch) { restore->m_restore_epoch = true; @@ -463,6 +473,8 @@ main(int argc, char** argv) g_options.appfmt(" -n %d", ga_nodeId); if (_restore_meta) g_options.appfmt(" -m"); + if (ga_no_upgrade) + g_options.appfmt(" -u"); if (ga_skip_table_check) g_options.appfmt(" -s"); if (_restore_data) @@ -474,7 +486,6 @@ main(int argc, char** argv) g_options.appfmt(" -p %d", ga_nParallelism); g_connect_string = opt_connect_str; - /** * we must always load meta data, even if we will only print it to stdout */ From ac0fb49f187d05747ea2a834f310cec2f4c8a27f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Apr 2007 10:40:23 +0200 Subject: [PATCH 021/137] WL#2936 - Falcon & MySQL plugin interface: server variables Added initialization for the plugin structure created in plugin_add(). Made a correct argument vector in mysql_install_plugin(): handle_options() assumes that arg0 (program name) always exists. mysys/my_getopt.c: WL#2936 - Falcon & MySQL plugin interface: server variables Added DBUG_ASSERTs. handle_options() assumes that arg0 (program name) always exists. plugin/fulltext/plugin_example.c: WL#2936 - Falcon & MySQL plugin interface: server variables Extended the fulltext parser example plugin with system variables. --- mysys/my_getopt.c | 3 +++ plugin/fulltext/plugin_example.c | 27 +++++++++++++++++++++++++-- sql/sql_plugin.cc | 10 ++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 4573d27555a..dd2663970ee 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -111,6 +111,9 @@ int handle_options(int *argc, char ***argv, int error, i; LINT_INIT(opt_found); + /* handle_options() assumes arg0 (program name) always exists */ + DBUG_ASSERT(argc && *argc >= 1); + DBUG_ASSERT(argv && *argv); (*argc)--; /* Skip the program name */ (*argv)++; /* --- || ---- */ init_variables(longopts); diff --git a/plugin/fulltext/plugin_example.c b/plugin/fulltext/plugin_example.c index c38498fb9e8..67c16a91268 100644 --- a/plugin/fulltext/plugin_example.c +++ b/plugin/fulltext/plugin_example.c @@ -215,6 +215,29 @@ static struct st_mysql_show_var simple_status[]= {0,0,0} }; +/* + Plugin system variables. +*/ + +static long sysvar_one_value; +static char *sysvar_two_value; + +static MYSQL_SYSVAR_LONG(simple_sysvar_one, sysvar_one_value, + PLUGIN_VAR_RQCMDARG, + "Simple fulltext parser example system variable number one. Give a number.", + NULL, NULL, 100L, 10L, ~0L, 0); + +static MYSQL_SYSVAR_STR(simple_sysvar_two, sysvar_two_value, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, + "Simple fulltext parser example system variable number two. Give a string.", + NULL, NULL, NULL); + +static struct st_mysql_sys_var* simple_system_variables[]= { + MYSQL_SYSVAR(simple_sysvar_one), + MYSQL_SYSVAR(simple_sysvar_two), + NULL +}; + /* Plugin library descriptor */ @@ -231,8 +254,8 @@ mysql_declare_plugin(ftexample) simple_parser_plugin_deinit,/* deinit function (when unloaded) */ 0x0001, /* version */ simple_status, /* status variables */ - NULL, /* system variables */ - NULL /* config options */ + simple_system_variables, /* system variables */ + NULL } mysql_declare_plugin_end; diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 83d71af227e..bac7c4f61b8 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -701,6 +701,8 @@ static bool plugin_add(MEM_ROOT *tmp_root, sql_print_error(ER(ER_UDF_EXISTS), name->str); DBUG_RETURN(TRUE); } + /* Clear the whole struct to catch future extensions. */ + bzero((char*) &tmp, sizeof(tmp)); if (! (tmp.plugin_dl= plugin_dl_add(dl, report))) DBUG_RETURN(TRUE); /* Find plugin by name */ @@ -1569,7 +1571,8 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl { TABLE_LIST tables; TABLE *table; - int error, argc=0; + int error, argc; + char *argv[2]; struct st_plugin_int *tmp; DBUG_ENTER("mysql_install_plugin"); @@ -1585,7 +1588,10 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl pthread_mutex_lock(&LOCK_plugin); rw_wrlock(&LOCK_system_variables_hash); - error= plugin_add(thd->mem_root, name, dl, &argc, NULL, REPORT_TO_USER); + argv[0]= ""; /* handle_options() assumes arg0 (program name) always exists */ + argv[1]= NULL; + argc= 1; + error= plugin_add(thd->mem_root, name, dl, &argc, argv, REPORT_TO_USER); rw_unlock(&LOCK_system_variables_hash); if (error || !(tmp= plugin_find_internal(name, MYSQL_ANY_PLUGIN))) From 3eff7d4dd5bba598fe055808697d630622fa249b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Apr 2007 09:24:21 -0600 Subject: [PATCH 022/137] Bug#25411 (trigger code truncated), PART I The issue found with bug 25411 is due to the function skip_rear_comments() which damages the source code while implementing a work around. The root cause of the problem is in the lexical analyser, which does not process special comments properly. For special comments like : [1] aaa /*!50000 bbb */ ccc since 5.0 is a version older that the current code, the parser is in lining the content of the special comment, so that the query to process is [2] aaa bbb ccc However, the text of the query captured when processing a stored procedure, stored function or trigger (or event in 5.1), can be after rebuilding it: [3] aaa bbb */ ccc which is wrong. To fix bug 25411 properly, the lexical analyser needs to return [2] when in lining special comments. In order to implement this, some preliminary cleanup is required in the code, which is implemented by this patch. Before this change, the structure named LEX (or st_lex) contains attributes that belong to lexical analysis, as well as attributes that represents the abstract syntax tree (AST) of a statement. Creating a new LEX structure for each statements (which makes sense for the AST part) also re-initialized the lexical analysis phase each time, which is conceptually wrong. With this patch, the previous st_lex structure has been split in two: - st_lex represents the Abstract Syntax Tree for a statement. The name "lex" has not been changed to avoid a bigger impact in the code base. - class lex_input_stream represents the internal state of the lexical analyser, which by definition should *not* be reinitialized when parsing multiple statements from the same input stream. This change is a pre-requisite for bug 25411, since the implementation of lex_input_stream will later improve to deal properly with special comments, and this processing can not be done with the current implementation of sp_head::reset_lex and sp_head::restore_lex, which interfere with the lexer. This change set alone does not fix bug 25411. sql/item_func.cc: Refactoring, separate lex_input_stream from st_lex. sql/log_event.cc: Refactoring, separate lex_input_stream from st_lex. sql/mysql_priv.h: Refactoring, separate lex_input_stream from st_lex. sql/slave.cc: Refactoring, separate lex_input_stream from st_lex. sql/sp.cc: Refactoring, separate lex_input_stream from st_lex. sql/sp_head.cc: Refactoring, separate lex_input_stream from st_lex. sql/sp_head.h: Refactoring, separate lex_input_stream from st_lex. sql/sql_class.cc: Refactoring, separate lex_input_stream from st_lex. sql/sql_class.h: Refactoring, separate lex_input_stream from st_lex. sql/sql_lex.cc: Refactoring, separate lex_input_stream from st_lex. sql/sql_lex.h: Refactoring, separate lex_input_stream from st_lex. sql/sql_parse.cc: Refactoring, separate lex_input_stream from st_lex. sql/sql_prepare.cc: Refactoring, separate lex_input_stream from st_lex. sql/sql_trigger.cc: Refactoring, separate lex_input_stream from st_lex. sql/sql_view.cc: Refactoring, separate lex_input_stream from st_lex. sql/sql_yacc.yy: Refactoring, separate lex_input_stream from st_lex. --- mysql-test/r/bdb_notembedded.result | 35 ++++ mysql-test/t/bdb_notembedded.test | 38 ++++ sql/item_func.cc | 2 +- sql/log_event.cc | 9 +- sql/mysql_priv.h | 6 +- sql/slave.cc | 3 +- sql/sp.cc | 9 +- sql/sp_head.cc | 31 +-- sql/sp_head.h | 6 +- sql/sql_class.cc | 2 +- sql/sql_class.h | 10 + sql/sql_lex.cc | 299 +++++++++++++++------------- sql/sql_lex.h | 70 +++++-- sql/sql_parse.cc | 103 +++++++--- sql/sql_prepare.cc | 8 +- sql/sql_trigger.cc | 8 +- sql/sql_view.cc | 14 +- sql/sql_yacc.yy | 171 ++++++++++------ 18 files changed, 530 insertions(+), 294 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index d972bde9155..7e4a06a1805 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4272,7 +4272,7 @@ int get_var_with_binlog(THD *thd, enum_sql_command sql_command, List tmp_var_list; LEX *sav_lex= thd->lex, lex_tmp; thd->lex= &lex_tmp; - lex_start(thd, NULL, 0); + lex_start(thd); tmp_var_list.push_back(new set_var_user(new Item_func_set_user_var(name, new Item_null()))); /* Create the variable */ diff --git a/sql/log_event.cc b/sql/log_event.cc index 8bb63e72bde..173ca6232ee 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1879,7 +1879,8 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli, thd->variables.collation_database= thd->db_charset; /* Execute the query (note that we bypass dispatch_command()) */ - mysql_parse(thd, thd->query, thd->query_length); + const char* found_semicolon= NULL; + mysql_parse(thd, thd->query, thd->query_length, &found_semicolon); } else @@ -2987,10 +2988,12 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli, thd->query_error= 0; clear_all_errors(thd, rli); /* - Usually mysql_init_query() is called by mysql_parse(), but we need it here + Usually lex_start() is called by mysql_parse(), but we need it here as the present method does not call mysql_parse(). */ - mysql_init_query(thd, 0, 0); + lex_start(thd); + mysql_reset_thd_for_next_command(thd); + if (!use_rli_only_for_errors) { /* Saved for InnoDB, see comment in Query_log_event::exec_event() */ diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index de567eacbeb..4017457b644 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -697,13 +697,15 @@ bool do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name, char *new_table_alias, bool skip_error); bool mysql_change_db(THD *thd,const char *name,bool no_access_check); -void mysql_parse(THD *thd,char *inBuf,uint length); + +void mysql_parse(THD *thd, const char *inBuf, uint length, + const char ** semicolon); + bool mysql_test_parse_for_slave(THD *thd,char *inBuf,uint length); bool is_update_query(enum enum_sql_command command); bool alloc_query(THD *thd, const char *packet, uint packet_length); void mysql_init_select(LEX *lex); void mysql_reset_thd_for_next_command(THD *thd); -void mysql_init_query(THD *thd, uchar *buf, uint length); bool mysql_new_select(LEX *lex, bool move_down); void create_select_for_variable(const char *var_name); void mysql_init_multi_delete(LEX *lex); diff --git a/sql/slave.cc b/sql/slave.cc index ba8c3ff902a..2b07f28b167 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1517,6 +1517,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, handler *file; ulonglong save_options; NET *net= &mysql->net; + const char *found_semicolon= NULL; DBUG_ENTER("create_table_from_dump"); packet_len= my_net_read(net); // read create table statement @@ -1567,7 +1568,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, save_db_length= thd->db_length; DBUG_ASSERT(db != 0); thd->reset_db((char*)db, strlen(db)); - mysql_parse(thd, thd->query, packet_len); // run create table + mysql_parse(thd, thd->query, packet_len, &found_semicolon); // run create table thd->db = save_db; // leave things the way the were before thd->db_length= save_db_length; thd->options = save_options; diff --git a/sql/sp.cc b/sql/sp.cc index c8701aa2c87..a17ac9f30aa 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -434,10 +434,15 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp, if ((ret= sp_use_new_db(thd, name->m_db, &old_db, 1, &dbchanged))) goto end; - lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length()); + { + Lex_input_stream lip(thd, defstr.c_ptr(), defstr.length()); + thd->m_lip= &lip; + lex_start(thd); + ret= MYSQLparse(thd); + } thd->spcont= 0; - if (MYSQLparse(thd) || thd->is_fatal_error || newlex.sphead == NULL) + if (ret || thd->is_fatal_error || newlex.sphead == NULL) { sp_head *sp= newlex.sphead; diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 21225d82188..548a6c903dc 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -519,9 +519,10 @@ void sp_head::init_strings(THD *thd, LEX *lex) { DBUG_ENTER("sp_head::init_strings"); - uchar *endp; /* Used to trim the end */ + const char *endp; /* Used to trim the end */ /* During parsing, we must use thd->mem_root */ MEM_ROOT *root= thd->mem_root; + Lex_input_stream *lip=thd->m_lip; if (m_param_begin && m_param_end) { @@ -531,17 +532,17 @@ sp_head::init_strings(THD *thd, LEX *lex) } /* If ptr has overrun end_of_query then end_of_query is the end */ - endp= (lex->ptr > lex->end_of_query ? lex->end_of_query : lex->ptr); + endp= (lip->ptr > lip->end_of_query ? lip->end_of_query : lip->ptr); /* Trim "garbage" at the end. This is sometimes needed with the "/ * ! VERSION... * /" wrapper in dump files. */ - endp= skip_rear_comments(m_body_begin, endp); + endp= skip_rear_comments((char*) m_body_begin, (char*) endp); m_body.length= endp - m_body_begin; - m_body.str= strmake_root(root, (char *)m_body_begin, m_body.length); - m_defstr.length= endp - lex->buf; - m_defstr.str= strmake_root(root, (char *)lex->buf, m_defstr.length); + m_body.str= strmake_root(root, m_body_begin, m_body.length); + m_defstr.length= endp - lip->buf; + m_defstr.str= strmake_root(root, lip->buf, m_defstr.length); DBUG_VOID_RETURN; } @@ -1756,24 +1757,13 @@ sp_head::reset_lex(THD *thd) DBUG_ENTER("sp_head::reset_lex"); LEX *sublex; LEX *oldlex= thd->lex; - my_lex_states org_next_state= oldlex->next_state; (void)m_lex.push_front(oldlex); thd->lex= sublex= new st_lex; - /* Reset most stuff. The length arguments doesn't matter here. */ - lex_start(thd, oldlex->buf, (ulong) (oldlex->end_of_query - oldlex->ptr)); + /* Reset most stuff. */ + lex_start(thd); - /* - next_state is normally the same (0), but it happens that we swap lex in - "mid-sentence", so we must restore it. - */ - sublex->next_state= org_next_state; - /* We must reset ptr and end_of_query again */ - sublex->ptr= oldlex->ptr; - sublex->end_of_query= oldlex->end_of_query; - sublex->tok_start= oldlex->tok_start; - sublex->yylineno= oldlex->yylineno; /* And keep the SP stuff too */ sublex->sphead= oldlex->sphead; sublex->spcont= oldlex->spcont; @@ -1806,9 +1796,6 @@ sp_head::restore_lex(THD *thd) if (! oldlex) return; // Nothing to restore - // Update some state in the old one first - oldlex->ptr= sublex->ptr; - oldlex->next_state= sublex->next_state; oldlex->trg_table_fields.push_back(&sublex->trg_table_fields); /* diff --git a/sql/sp_head.h b/sql/sp_head.h index cce400d6a14..4632f6808fd 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -125,7 +125,7 @@ public: create_field m_return_field_def; /* This is used for FUNCTIONs only. */ - uchar *m_tmp_query; // Temporary pointer to sub query string + const char *m_tmp_query; // Temporary pointer to sub query string uint m_old_cmq; // Old CLIENT_MULTI_QUERIES value st_sp_chistics *m_chistics; ulong m_sql_mode; // For SHOW CREATE and execution @@ -174,7 +174,9 @@ public: */ HASH m_sroutines; // Pointers set during parsing - uchar *m_param_begin, *m_param_end, *m_body_begin; + const char *m_param_begin; + const char *m_param_end; + const char *m_body_begin; /* Security context for stored routine which should be run under diff --git a/sql/sql_class.cc b/sql/sql_class.cc index a94f903a47b..0d8f2ca6394 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -176,7 +176,7 @@ THD::THD() rand_used(0), time_zone_used(0), last_insert_id_used(0), last_insert_id_used_bin_log(0), insert_id_used(0), clear_next_insert_id(0), in_lock_tables(0), bootstrap(0), - derived_tables_processing(FALSE), spcont(NULL) + derived_tables_processing(FALSE), spcont(NULL), m_lip(NULL) { ulong tmp; diff --git a/sql/sql_class.h b/sql/sql_class.h index 99803802001..d7091b5a3bd 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -28,6 +28,7 @@ class Slave_log_event; class Format_description_log_event; class sp_rcontext; class sp_cache; +class Lex_input_stream; enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE }; enum enum_ha_read_modes { RFIRST, RNEXT, RPREV, RLAST, RKEY, RNEXT_SAME }; @@ -1492,6 +1493,15 @@ public: query_id_t first_query_id; } binlog_evt_union; + /** + Character input stream consumed by the lexical analyser, + used during parsing. + Note that since the parser is not re-entrant, we keep only one input + stream here. This member is valid only when executing code during parsing, + and may point to invalid memory after that. + */ + Lex_input_stream *m_lip; + THD(); ~THD(); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 3be844b6761..6fe4bfbd4f1 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -32,13 +32,13 @@ sys_var_long_ptr trg_new_row_fake_var(0, 0); /* Macros to look like lex */ -#define yyGet() *(lex->ptr++) -#define yyGetLast() lex->ptr[-1] -#define yyPeek() lex->ptr[0] -#define yyPeek2() lex->ptr[1] -#define yyUnget() lex->ptr-- -#define yySkip() lex->ptr++ -#define yyLength() ((uint) (lex->ptr - lex->tok_start)-1) +#define yyGet() *(lip->ptr++) +#define yyGetLast() lip->ptr[-1] +#define yyPeek() lip->ptr[0] +#define yyPeek2() lip->ptr[1] +#define yyUnget() lip->ptr-- +#define yySkip() lip->ptr++ +#define yyLength() ((uint) (lip->ptr - lip->tok_start)-1) /* Longest standard keyword name */ #define TOCK_NAME_LENGTH 24 @@ -108,6 +108,27 @@ st_parsing_options::reset() allows_derived= TRUE; } +Lex_input_stream::Lex_input_stream(THD *thd, + const char* buffer, + unsigned int length) +: m_thd(thd), + yylineno(1), + yytoklen(0), + yylval(NULL), + ptr(buffer), + tok_start(NULL), + tok_end(NULL), + end_of_query(buffer + length), + tok_start_prev(NULL), + buf(buffer), + next_state(MY_LEX_START), + found_semicolon(NULL) +{ +} + +Lex_input_stream::~Lex_input_stream() +{} + /* This is called before every query that is to be parsed. @@ -115,14 +136,12 @@ st_parsing_options::reset() (We already do too much here) */ -void lex_start(THD *thd, uchar *buf,uint length) +void lex_start(THD *thd) { LEX *lex= thd->lex; DBUG_ENTER("lex_start"); lex->thd= lex->unit.thd= thd; - lex->buf= lex->ptr= buf; - lex->end_of_query= buf+length; lex->context_stack.empty(); lex->unit.init_query(); @@ -155,15 +174,13 @@ void lex_start(THD *thd, uchar *buf,uint length) lex->stmt_prepare_mode= FALSE; lex->derived_tables= 0; lex->lock_option= TL_READ; - lex->found_semicolon= 0; lex->safe_to_cache_query= 1; lex->time_zone_tables_used= 0; lex->leaf_tables_insert= 0; lex->parsing_options.reset(); lex->empty_field_list_on_rset= 0; lex->select_lex.select_number= 1; - lex->next_state=MY_LEX_START; - lex->yylineno = 1; + lex->in_comment=0; lex->length=0; lex->select_lex.in_sum_expr=0; @@ -201,22 +218,22 @@ void lex_end(LEX *lex) } -static int find_keyword(LEX *lex, uint len, bool function) +static int find_keyword(Lex_input_stream *lip, uint len, bool function) { - uchar *tok=lex->tok_start; + const char *tok= lip->tok_start; - SYMBOL *symbol = get_hash_symbol((const char *)tok,len,function); + SYMBOL *symbol= get_hash_symbol(tok, len, function); if (symbol) { - lex->yylval->symbol.symbol=symbol; - lex->yylval->symbol.str= (char*) tok; - lex->yylval->symbol.length=len; + lip->yylval->symbol.symbol=symbol; + lip->yylval->symbol.str= (char*) tok; + lip->yylval->symbol.length=len; if ((symbol->tok == NOT_SYM) && - (lex->thd->variables.sql_mode & MODE_HIGH_NOT_PRECEDENCE)) + (lip->m_thd->variables.sql_mode & MODE_HIGH_NOT_PRECEDENCE)) return NOT2_SYM; if ((symbol->tok == OR_OR_SYM) && - !(lex->thd->variables.sql_mode & MODE_PIPES_AS_CONCAT)) + !(lip->m_thd->variables.sql_mode & MODE_PIPES_AS_CONCAT)) return OR2_SYM; return symbol->tok; @@ -245,12 +262,12 @@ bool is_keyword(const char *name, uint len) /* make a copy of token before ptr and set yytoklen */ -static LEX_STRING get_token(LEX *lex,uint length) +static LEX_STRING get_token(Lex_input_stream *lip, uint length) { LEX_STRING tmp; yyUnget(); // ptr points now after last token char - tmp.length=lex->yytoklen=length; - tmp.str=(char*) lex->thd->strmake((char*) lex->tok_start,tmp.length); + tmp.length=lip->yytoklen=length; + tmp.str= lip->m_thd->strmake(lip->tok_start, tmp.length); return tmp; } @@ -261,14 +278,15 @@ static LEX_STRING get_token(LEX *lex,uint length) future to operate multichar strings (like ucs2) */ -static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote) +static LEX_STRING get_quoted_token(Lex_input_stream *lip, + uint length, char quote) { LEX_STRING tmp; byte *from, *to, *end; yyUnget(); // ptr points now after last token char - tmp.length=lex->yytoklen=length; - tmp.str=(char*) lex->thd->alloc(tmp.length+1); - for (from= (byte*) lex->tok_start, to= (byte*) tmp.str, end= to+length ; + tmp.length=lip->yytoklen=length; + tmp.str=(char*) lip->m_thd->alloc(tmp.length+1); + for (from= (byte*) lip->tok_start, to= (byte*) tmp.str, end= to+length ; to != end ; ) { @@ -285,15 +303,14 @@ static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote) Fix sometimes to do only one scan of the string */ -static char *get_text(LEX *lex) +static char *get_text(Lex_input_stream *lip) { reg1 uchar c,sep; uint found_escape=0; - CHARSET_INFO *cs= lex->thd->charset(); + CHARSET_INFO *cs= lip->m_thd->charset(); sep= yyGetLast(); // String should end with this - //lex->tok_start=lex->ptr-1; // Remember ' - while (lex->ptr != lex->end_of_query) + while (lip->ptr != lip->end_of_query) { c = yyGet(); #ifdef USE_MB @@ -301,18 +318,18 @@ static char *get_text(LEX *lex) int l; if (use_mb(cs) && (l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query))) { - lex->ptr += l-1; + lip->ptr-1, + lip->end_of_query))) { + lip->ptr += l-1; continue; } } #endif if (c == '\\' && - !(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)) + !(lip->m_thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)) { // Escaped character found_escape=1; - if (lex->ptr == lex->end_of_query) + if (lip->ptr == lip->end_of_query) return 0; yySkip(); } @@ -327,21 +344,23 @@ static char *get_text(LEX *lex) yyUnget(); /* Found end. Unescape and return string */ - uchar *str,*end,*start; + const char *str; + const char *end; + char *start; - str=lex->tok_start+1; - end=lex->ptr-1; - if (!(start=(uchar*) lex->thd->alloc((uint) (end-str)+1))) + str=lip->tok_start+1; + end=lip->ptr-1; + if (!(start=(char*) lip->m_thd->alloc((uint) (end-str)+1))) return (char*) ""; // Sql_alloc has set error flag if (!found_escape) { - lex->yytoklen=(uint) (end-str); - memcpy(start,str,lex->yytoklen); - start[lex->yytoklen]=0; + lip->yytoklen=(uint) (end-str); + memcpy(start,str,lip->yytoklen); + start[lip->yytoklen]=0; } else { - uchar *to; + char *to; for (to=start ; str != end ; str++) { @@ -356,7 +375,7 @@ static char *get_text(LEX *lex) continue; } #endif - if (!(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) && + if (!(lip->m_thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) && *str == '\\' && str+1 != end) { switch(*++str) { @@ -393,7 +412,7 @@ static char *get_text(LEX *lex) *to++ = *str; } *to=0; - lex->yytoklen=(uint) (to-start); + lip->yytoklen=(uint) (to-start); } return (char*) start; } @@ -506,20 +525,21 @@ int MYSQLlex(void *arg, void *yythd) int tokval, result_state; uint length; enum my_lex_states state; - LEX *lex= ((THD *)yythd)->lex; + THD *thd= (THD *)yythd; + Lex_input_stream *lip= thd->m_lip; + LEX *lex= thd->lex; YYSTYPE *yylval=(YYSTYPE*) arg; - CHARSET_INFO *cs= ((THD *) yythd)->charset(); + CHARSET_INFO *cs= thd->charset(); uchar *state_map= cs->state_map; uchar *ident_map= cs->ident_map; - lex->yylval=yylval; // The global state + lip->yylval=yylval; // The global state - lex->tok_end_prev= lex->tok_end; - lex->tok_start_prev= lex->tok_start; + lip->tok_start_prev= lip->tok_start; - lex->tok_start=lex->tok_end=lex->ptr; - state=lex->next_state; - lex->next_state=MY_LEX_OPERATOR_OR_IDENT; + lip->tok_start=lip->tok_end=lip->ptr; + state=lip->next_state; + lip->next_state=MY_LEX_OPERATOR_OR_IDENT; LINT_INIT(c); for (;;) { @@ -530,9 +550,9 @@ int MYSQLlex(void *arg, void *yythd) for (c=yyGet() ; (state_map[c] == MY_LEX_SKIP) ; c= yyGet()) { if (c == '\n') - lex->yylineno++; + lip->yylineno++; } - lex->tok_start=lex->ptr-1; // Start of real token + lip->tok_start=lip->ptr-1; // Start of real token state= (enum my_lex_states) state_map[c]; break; case MY_LEX_ESCAPE: @@ -551,13 +571,13 @@ int MYSQLlex(void *arg, void *yythd) state=MY_LEX_COMMENT; break; } - yylval->lex_str.str=(char*) (lex->ptr=lex->tok_start);// Set to first chr + yylval->lex_str.str=(char*) (lip->ptr=lip->tok_start);// Set to first chr yylval->lex_str.length=1; c=yyGet(); if (c != ')') - lex->next_state= MY_LEX_START; // Allow signed numbers + lip->next_state= MY_LEX_START; // Allow signed numbers if (c == ',') - lex->tok_start=lex->ptr; // Let tok_start point at next item + lip->tok_start=lip->ptr; // Let tok_start point at next item /* Check for a placeholder: it should not precede a possible identifier because of binlogging: when a placeholder is replaced with @@ -575,14 +595,14 @@ int MYSQLlex(void *arg, void *yythd) break; } /* Found N'string' */ - lex->tok_start++; // Skip N + lip->tok_start++; // Skip N yySkip(); // Skip ' - if (!(yylval->lex_str.str = get_text(lex))) + if (!(yylval->lex_str.str = get_text(lip))) { state= MY_LEX_CHAR; // Read char by char break; } - yylval->lex_str.length= lex->yytoklen; + yylval->lex_str.length= lip->yytoklen; return(NCHAR_STRING); case MY_LEX_IDENT_OR_HEX: @@ -598,7 +618,7 @@ int MYSQLlex(void *arg, void *yythd) break; } case MY_LEX_IDENT: - uchar *start; + const char *start; #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(cs)) { @@ -606,13 +626,13 @@ int MYSQLlex(void *arg, void *yythd) if (my_mbcharlen(cs, yyGetLast()) > 1) { int l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query); + lip->ptr-1, + lip->end_of_query); if (l == 0) { state = MY_LEX_CHAR; continue; } - lex->ptr += l - 1; + lip->ptr += l - 1; } while (ident_map[c=yyGet()]) { @@ -620,10 +640,10 @@ int MYSQLlex(void *arg, void *yythd) { int l; if ((l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query)) == 0) + lip->ptr-1, + lip->end_of_query)) == 0) break; - lex->ptr += l-1; + lip->ptr += l-1; } } } @@ -634,8 +654,8 @@ int MYSQLlex(void *arg, void *yythd) /* If there were non-ASCII characters, mark that we must convert */ result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; } - length= (uint) (lex->ptr - lex->tok_start)-1; - start= lex->ptr; + length= (uint) (lip->ptr - lip->tok_start)-1; + start= lip->ptr; if (lex->ignore_space) { /* @@ -644,19 +664,19 @@ int MYSQLlex(void *arg, void *yythd) */ for (; state_map[c] == MY_LEX_SKIP ; c= yyGet()); } - if (start == lex->ptr && c == '.' && ident_map[yyPeek()]) - lex->next_state=MY_LEX_IDENT_SEP; + if (start == lip->ptr && c == '.' && ident_map[yyPeek()]) + lip->next_state=MY_LEX_IDENT_SEP; else { // '(' must follow directly if function yyUnget(); - if ((tokval = find_keyword(lex,length,c == '('))) + if ((tokval = find_keyword(lip, length, c == '('))) { - lex->next_state= MY_LEX_START; // Allow signed numbers + lip->next_state= MY_LEX_START; // Allow signed numbers return(tokval); // Was keyword } yySkip(); // next state does a unget } - yylval->lex_str=get_token(lex,length); + yylval->lex_str=get_token(lip, length); /* Note: "SELECT _bla AS 'alias'" @@ -673,12 +693,12 @@ int MYSQLlex(void *arg, void *yythd) return(result_state); // IDENT or IDENT_QUOTED case MY_LEX_IDENT_SEP: // Found ident and now '.' - yylval->lex_str.str=(char*) lex->ptr; + yylval->lex_str.str=(char*) lip->ptr; yylval->lex_str.length=1; c=yyGet(); // should be '.' - lex->next_state= MY_LEX_IDENT_START;// Next is an ident (not a keyword) + lip->next_state= MY_LEX_IDENT_START;// Next is an ident (not a keyword) if (!ident_map[yyPeek()]) // Probably ` or " - lex->next_state= MY_LEX_START; + lip->next_state= MY_LEX_START; return((int) c); case MY_LEX_NUMBER_IDENT: // number or ident which num-start @@ -698,36 +718,36 @@ int MYSQLlex(void *arg, void *yythd) { yySkip(); while (my_isdigit(cs,yyGet())) ; - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(FLOAT_NUM); } } yyUnget(); /* purecov: inspected */ } - else if (c == 'x' && (lex->ptr - lex->tok_start) == 2 && - lex->tok_start[0] == '0' ) + else if (c == 'x' && (lip->ptr - lip->tok_start) == 2 && + lip->tok_start[0] == '0' ) { // Varbinary while (my_isxdigit(cs,(c = yyGet()))) ; - if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c]) + if ((lip->ptr - lip->tok_start) >= 4 && !ident_map[c]) { - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); yylval->lex_str.str+=2; // Skip 0x yylval->lex_str.length-=2; - lex->yytoklen-=2; + lip->yytoklen-=2; return (HEX_NUM); } yyUnget(); } - else if (c == 'b' && (lex->ptr - lex->tok_start) == 2 && - lex->tok_start[0] == '0' ) + else if (c == 'b' && (lip->ptr - lip->tok_start) == 2 && + lip->tok_start[0] == '0' ) { // b'bin-number' while (my_isxdigit(cs,(c = yyGet()))) ; - if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c]) + if ((lip->ptr - lip->tok_start) >= 4 && !ident_map[c]) { - yylval->lex_str= get_token(lex, yyLength()); + yylval->lex_str= get_token(lip, yyLength()); yylval->lex_str.str+= 2; // Skip 0x yylval->lex_str.length-= 2; - lex->yytoklen-= 2; + lip->yytoklen-= 2; return (BIN_NUM); } yyUnget(); @@ -745,10 +765,10 @@ int MYSQLlex(void *arg, void *yythd) { int l; if ((l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query)) == 0) + lip->ptr-1, + lip->end_of_query)) == 0) break; - lex->ptr += l-1; + lip->ptr += l-1; } } } @@ -760,16 +780,16 @@ int MYSQLlex(void *arg, void *yythd) result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; } if (c == '.' && ident_map[yyPeek()]) - lex->next_state=MY_LEX_IDENT_SEP;// Next is '.' + lip->next_state=MY_LEX_IDENT_SEP;// Next is '.' - yylval->lex_str= get_token(lex,yyLength()); + yylval->lex_str= get_token(lip, yyLength()); return(result_state); case MY_LEX_USER_VARIABLE_DELIMITER: // Found quote char { uint double_quotes= 0; char quote_char= c; // Used char - lex->tok_start=lex->ptr; // Skip first ` + lip->tok_start=lip->ptr; // Skip first ` while ((c=yyGet())) { int var_length; @@ -789,23 +809,23 @@ int MYSQLlex(void *arg, void *yythd) #ifdef USE_MB else if (var_length < 1) break; // Error - lex->ptr+= var_length-1; + lip->ptr+= var_length-1; #endif } if (double_quotes) - yylval->lex_str=get_quoted_token(lex,yyLength() - double_quotes, + yylval->lex_str=get_quoted_token(lip, yyLength() - double_quotes, quote_char); else - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); if (c == quote_char) yySkip(); // Skip end ` - lex->next_state= MY_LEX_START; + lip->next_state= MY_LEX_START; return(IDENT_QUOTED); } case MY_LEX_INT_OR_REAL: // Compleat int or incompleat real if (c != '.') { // Found complete integer number. - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return int_token(yylval->lex_str.str,yylval->lex_str.length); } // fall through @@ -823,47 +843,47 @@ int MYSQLlex(void *arg, void *yythd) break; } while (my_isdigit(cs,yyGet())) ; - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(FLOAT_NUM); } - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(DECIMAL_NUM); case MY_LEX_HEX_NUMBER: // Found x'hexstring' yyGet(); // Skip ' while (my_isxdigit(cs,(c = yyGet()))) ; - length=(lex->ptr - lex->tok_start); // Length of hexnum+3 + length=(lip->ptr - lip->tok_start); // Length of hexnum+3 if (!(length & 1) || c != '\'') { return(ABORT_SYM); // Illegal hex constant } yyGet(); // get_token makes an unget - yylval->lex_str=get_token(lex,length); + yylval->lex_str=get_token(lip, length); yylval->lex_str.str+=2; // Skip x' yylval->lex_str.length-=3; // Don't count x' and last ' - lex->yytoklen-=3; + lip->yytoklen-=3; return (HEX_NUM); case MY_LEX_BIN_NUMBER: // Found b'bin-string' yyGet(); // Skip ' while ((c= yyGet()) == '0' || c == '1'); - length= (lex->ptr - lex->tok_start); // Length of bin-num + 3 + length= (lip->ptr - lip->tok_start); // Length of bin-num + 3 if (c != '\'') return(ABORT_SYM); // Illegal hex constant yyGet(); // get_token makes an unget - yylval->lex_str= get_token(lex, length); + yylval->lex_str= get_token(lip, length); yylval->lex_str.str+= 2; // Skip b' yylval->lex_str.length-= 3; // Don't count b' and last ' - lex->yytoklen-= 3; + lip->yytoklen-= 3; return (BIN_NUM); case MY_LEX_CMP_OP: // Incomplete comparison operator if (state_map[yyPeek()] == MY_LEX_CMP_OP || state_map[yyPeek()] == MY_LEX_LONG_CMP_OP) yySkip(); - if ((tokval = find_keyword(lex,(uint) (lex->ptr - lex->tok_start),0))) + if ((tokval = find_keyword(lip,(uint) (lip->ptr - lip->tok_start),0))) { - lex->next_state= MY_LEX_START; // Allow signed numbers + lip->next_state= MY_LEX_START; // Allow signed numbers return(tokval); } state = MY_LEX_CHAR; // Something fishy found @@ -877,9 +897,9 @@ int MYSQLlex(void *arg, void *yythd) if (state_map[yyPeek()] == MY_LEX_CMP_OP) yySkip(); } - if ((tokval = find_keyword(lex,(uint) (lex->ptr - lex->tok_start),0))) + if ((tokval = find_keyword(lip,(uint) (lip->ptr - lip->tok_start),0))) { - lex->next_state= MY_LEX_START; // Found long op + lip->next_state= MY_LEX_START; // Found long op return(tokval); } state = MY_LEX_CHAR; // Something fishy found @@ -892,24 +912,24 @@ int MYSQLlex(void *arg, void *yythd) break; } yySkip(); - tokval = find_keyword(lex,2,0); // Is a bool operator - lex->next_state= MY_LEX_START; // Allow signed numbers + tokval = find_keyword(lip,2,0); // Is a bool operator + lip->next_state= MY_LEX_START; // Allow signed numbers return(tokval); case MY_LEX_STRING_OR_DELIMITER: - if (((THD *) yythd)->variables.sql_mode & MODE_ANSI_QUOTES) + if (thd->variables.sql_mode & MODE_ANSI_QUOTES) { state= MY_LEX_USER_VARIABLE_DELIMITER; break; } /* " used for strings */ case MY_LEX_STRING: // Incomplete text string - if (!(yylval->lex_str.str = get_text(lex))) + if (!(yylval->lex_str.str = get_text(lip))) { state= MY_LEX_CHAR; // Read char by char break; } - yylval->lex_str.length=lex->yytoklen; + yylval->lex_str.length=lip->yytoklen; return(TEXT_STRING); case MY_LEX_COMMENT: // Comment @@ -933,7 +953,7 @@ int MYSQLlex(void *arg, void *yythd) state=MY_LEX_START; if (my_isdigit(cs,yyPeek())) { // Version number - version=strtol((char*) lex->ptr,(char**) &lex->ptr,10); + version=strtol((char*) lip->ptr,(char**) &lip->ptr,10); } if (version <= MYSQL_VERSION_ID) { @@ -941,13 +961,13 @@ int MYSQLlex(void *arg, void *yythd) break; } } - while (lex->ptr != lex->end_of_query && + while (lip->ptr != lip->end_of_query && ((c=yyGet()) != '*' || yyPeek() != '/')) { if (c == '\n') - lex->yylineno++; + lip->yylineno++; } - if (lex->ptr != lex->end_of_query) + if (lip->ptr != lip->end_of_query) yySkip(); // remove last '/' state = MY_LEX_START; // Try again break; @@ -972,14 +992,13 @@ int MYSQLlex(void *arg, void *yythd) case MY_LEX_SEMICOLON: // optional line terminator if (yyPeek()) { - THD* thd= (THD*)yythd; if ((thd->client_capabilities & CLIENT_MULTI_STATEMENTS) && !lex->stmt_prepare_mode) { lex->safe_to_cache_query= 0; - lex->found_semicolon=(char*) lex->ptr; + lip->found_semicolon= lip->ptr; thd->server_status|= SERVER_MORE_RESULTS_EXISTS; - lex->next_state= MY_LEX_END; + lip->next_state= MY_LEX_END; return (END_OF_INPUT); } state= MY_LEX_CHAR; // Return ';' @@ -987,15 +1006,15 @@ int MYSQLlex(void *arg, void *yythd) } /* fall true */ case MY_LEX_EOL: - if (lex->ptr >= lex->end_of_query) + if (lip->ptr >= lip->end_of_query) { - lex->next_state=MY_LEX_END; // Mark for next loop + lip->next_state=MY_LEX_END; // Mark for next loop return(END_OF_INPUT); } state=MY_LEX_CHAR; break; case MY_LEX_END: - lex->next_state=MY_LEX_END; + lip->next_state=MY_LEX_END; return(0); // We found end of input last time /* Actually real shouldn't start with . but allow them anyhow */ @@ -1015,26 +1034,26 @@ int MYSQLlex(void *arg, void *yythd) case MY_LEX_STRING_OR_DELIMITER: break; case MY_LEX_USER_END: - lex->next_state=MY_LEX_SYSTEM_VAR; + lip->next_state=MY_LEX_SYSTEM_VAR; break; default: - lex->next_state=MY_LEX_HOSTNAME; + lip->next_state=MY_LEX_HOSTNAME; break; } - yylval->lex_str.str=(char*) lex->ptr; + yylval->lex_str.str=(char*) lip->ptr; yylval->lex_str.length=1; return((int) '@'); case MY_LEX_HOSTNAME: // end '@' of user@hostname for (c=yyGet() ; my_isalnum(cs,c) || c == '.' || c == '_' || c == '$'; c= yyGet()) ; - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(LEX_HOSTNAME); case MY_LEX_SYSTEM_VAR: - yylval->lex_str.str=(char*) lex->ptr; + yylval->lex_str.str=(char*) lip->ptr; yylval->lex_str.length=1; yySkip(); // Skip '@' - lex->next_state= (state_map[yyPeek()] == + lip->next_state= (state_map[yyPeek()] == MY_LEX_USER_VARIABLE_DELIMITER ? MY_LEX_OPERATOR_OR_IDENT : MY_LEX_IDENT_OR_KEYWORD); @@ -1051,16 +1070,16 @@ int MYSQLlex(void *arg, void *yythd) result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; if (c == '.') - lex->next_state=MY_LEX_IDENT_SEP; - length= (uint) (lex->ptr - lex->tok_start)-1; + lip->next_state=MY_LEX_IDENT_SEP; + length= (uint) (lip->ptr - lip->tok_start)-1; if (length == 0) return(ABORT_SYM); // Names must be nonempty. - if ((tokval= find_keyword(lex,length,0))) + if ((tokval= find_keyword(lip, length,0))) { yyUnget(); // Put back 'c' return(tokval); // Was keyword } - yylval->lex_str=get_token(lex,length); + yylval->lex_str=get_token(lip, length); return(result_state); } } @@ -1093,7 +1112,7 @@ Alter_info::Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root) Pointer to the last non-comment symbol of the statement. */ -uchar *skip_rear_comments(uchar *begin, uchar *end) +char *skip_rear_comments(char *begin, char *end) { while (begin < end && (end[-1] <= ' ' || end[-1] == '*' || end[-1] == '/' || end[-1] == ';')) diff --git a/sql/sql_lex.h b/sql/sql_lex.h index de7de0d46e9..8a9bc62a83e 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -469,7 +469,7 @@ public: void set_limit(st_select_lex *values); void set_thd(THD *thd_arg) { thd= thd_arg; } - friend void lex_start(THD *thd, uchar *buf, uint length); + friend void lex_start(THD *thd); friend int subselect_union_engine::exec(); List *get_unit_column_types(); @@ -675,7 +675,7 @@ public: void cut_subtree() { slave= 0; } bool test_limit(); - friend void lex_start(THD *thd, uchar *buf, uint length); + friend void lex_start(THD *thd); st_select_lex() : n_sum_items(0), n_child_sum_items(0) {} void make_empty_select() { @@ -898,30 +898,70 @@ struct st_parsing_options }; +/** + This class represents the character input stream consumed during + lexical analysis. +*/ +class Lex_input_stream +{ +public: + Lex_input_stream(THD *thd, const char* buff, unsigned int length); + ~Lex_input_stream(); + + /** Current thread. */ + THD *m_thd; + + /** Current line number. */ + uint yylineno; + + /** Length of the last token parsed. */ + uint yytoklen; + + /** Interface with bison, value of the last token parsed. */ + LEX_YYSTYPE yylval; + + /** Pointer to the current position in the input stream. */ + const char* ptr; + + /** Starting position of the last token parsed. */ + const char* tok_start; + + /** Ending position of the last token parsed. */ + const char* tok_end; + + /** End of the query text in the input stream. */ + const char* end_of_query; + + /** Starting position of the previous token parsed. */ + const char* tok_start_prev; + + /** Begining of the query text in the input stream. */ + const char* buf; + + /** Current state of the lexical analyser. */ + enum my_lex_states next_state; + + /** Position of ';' in the stream, to delimit multiple queries. */ + const char* found_semicolon; +}; + + /* The state of the lex parsing. This is saved in the THD struct */ typedef struct st_lex : public Query_tables_list { - uint yylineno,yytoklen; /* Simulate lex */ - LEX_YYSTYPE yylval; SELECT_LEX_UNIT unit; /* most upper unit */ SELECT_LEX select_lex; /* first SELECT_LEX */ /* current SELECT_LEX in parsing */ SELECT_LEX *current_select; /* list of all SELECT_LEX */ SELECT_LEX *all_selects_list; - uchar *buf; /* The beginning of string, used by SPs */ - uchar *ptr,*tok_start,*tok_end,*end_of_query; - - /* The values of tok_start/tok_end as they were one call of MYSQLlex before */ - uchar *tok_start_prev, *tok_end_prev; char *length,*dec,*change,*name; char *help_arg; char *backup_dir; /* For RESTORE/BACKUP */ char* to_log; /* For PURGE MASTER LOGS TO */ char* x509_subject,*x509_issuer,*ssl_cipher; - char* found_semicolon; /* For multi queries - next query */ String *wild; sql_exchange *exchange; select_result *result; @@ -990,7 +1030,6 @@ typedef struct st_lex : public Query_tables_list enum_sql_command sql_command, orig_sql_command; thr_lock_type lock_option; enum SSL_type ssl_type; /* defined in violite.h */ - enum my_lex_states next_state; enum enum_duplicates duplicates; enum enum_tx_isolation tx_isolation; enum enum_ha_read_modes ha_read_mode; @@ -1101,8 +1140,9 @@ typedef struct st_lex : public Query_tables_list Pointers to part of LOAD DATA statement that should be rewritten during replication ("LOCAL 'filename' REPLACE INTO" part). */ - uchar *fname_start, *fname_end; - + const char *fname_start; + const char *fname_end; + bool escape_used; st_lex(); @@ -1211,7 +1251,7 @@ struct st_lex_local: public st_lex extern void lex_init(void); extern void lex_free(void); -extern void lex_start(THD *thd, uchar *buf,uint length); +extern void lex_start(THD *thd); extern void lex_end(LEX *lex); extern int MYSQLlex(void *arg, void *yythd); -extern uchar *skip_rear_comments(uchar *begin, uchar *end); +extern char *skip_rear_comments(char *begin, char *end); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1b8bfd38fc4..36ae5ca4a31 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1236,6 +1236,7 @@ pthread_handler_t handle_bootstrap(void *arg) THD *thd=(THD*) arg; FILE *file=bootstrap_file; char *buff; + const char* found_semicolon= NULL; /* The following must be called before DBUG_ENTER */ thd->thread_stack= (char*) &thd; @@ -1312,7 +1313,7 @@ pthread_handler_t handle_bootstrap(void *arg) */ thd->query_id=next_query_id(); thd->set_time(); - mysql_parse(thd,thd->query,length); + mysql_parse(thd, thd->query, length, & found_semicolon); close_thread_tables(thd); // Free tables if (thd->is_fatal_error) @@ -1789,17 +1790,19 @@ bool dispatch_command(enum enum_server_command command, THD *thd, char *packet_end= thd->query + thd->query_length; /* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */ const char *format= "%.*b"; + const char* found_semicolon= NULL; + mysql_log.write(thd,command, format, thd->query_length, thd->query); DBUG_PRINT("query",("%-.4096s",thd->query)); if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(),QUERY_PRIOR); - mysql_parse(thd,thd->query, thd->query_length); + mysql_parse(thd, thd->query, thd->query_length, & found_semicolon); - while (!thd->killed && thd->lex->found_semicolon && !thd->net.report_error) + while (!thd->killed && found_semicolon && !thd->net.report_error) { - char *next_packet= thd->lex->found_semicolon; + char *next_packet= (char*) found_semicolon; net->no_send_error= 0; /* Multiple queries exits, execute them individually @@ -1824,7 +1827,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->set_time(); /* Reset the query start time. */ /* TODO: set thd->lex->sql_command to SQLCOM_END here */ VOID(pthread_mutex_unlock(&LOCK_thread_count)); - mysql_parse(thd, next_packet, length); + mysql_parse(thd, next_packet, length, & found_semicolon); } if (!(specialflag & SPECIAL_NO_PRIOR)) @@ -1845,7 +1848,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, LEX_STRING conv_name; /* used as fields initializator */ - lex_start(thd, 0, 0); + lex_start(thd); statistic_increment(thd->status_var.com_stat[SQLCOM_SHOW_FIELDS], &LOCK_status); @@ -1882,7 +1885,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; /* init structures for VIEW processing */ table_list.select_lex= &(thd->lex->select_lex); - mysql_init_query(thd, (uchar*)"", 0); + + lex_start(thd); + mysql_reset_thd_for_next_command(thd); + thd->lex-> select_lex.table_list.link_in_list((byte*) &table_list, (byte**) &table_list.next_local); @@ -5687,20 +5693,6 @@ bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize) } -/**************************************************************************** - Initialize global thd variables needed for query -****************************************************************************/ - -void -mysql_init_query(THD *thd, uchar *buf, uint length) -{ - DBUG_ENTER("mysql_init_query"); - lex_start(thd, buf, length); - mysql_reset_thd_for_next_command(thd); - DBUG_VOID_RETURN; -} - - /* Reset THD part responsible for command processing state. @@ -5887,21 +5879,54 @@ void mysql_init_multi_delete(LEX *lex) mysql_test_parse_for_slave() in this same file. */ -void mysql_parse(THD *thd, char *inBuf, uint length) +/** + Parse a query. + @param thd Current thread + @param inBuf Begining of the query text + @param length Length of the query text + @param [out] semicolon For multi queries, position of the character of + the next query in the query text. +*/ + +void mysql_parse(THD *thd, const char *inBuf, uint length, + const char ** found_semicolon) { DBUG_ENTER("mysql_parse"); DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on();); - mysql_init_query(thd, (uchar*) inBuf, length); - if (query_cache_send_result_to_client(thd, inBuf, length) <= 0) + /* + Warning. + The purpose of query_cache_send_result_to_client() is to lookup the + query in the query cache first, to avoid parsing and executing it. + So, the natural implementation would be to: + - first, call query_cache_send_result_to_client, + - second, if caching failed, initialise the lexical and syntactic parser. + The problem is that the query cache depends on a clean initialization + of the thd and thd->lex structures, which happen to be implemented + by: + - lex_start() + - mysql_reset_thd_for_next_command() + So, initializing the lexical analyser *before* using the query cache + is required for the cache to work properly. + FIXME: cleanup the dependencies in the code to simplify this. + */ + Lex_input_stream lip(thd, inBuf, length); + thd->m_lip= &lip; + lex_start(thd); + mysql_reset_thd_for_next_command(thd); + + if (query_cache_send_result_to_client(thd, (char*) inBuf, length) <= 0) { LEX *lex= thd->lex; - + sp_cache_flush_obsolete(&thd->sp_proc_cache); sp_cache_flush_obsolete(&thd->sp_func_cache); - - if (!MYSQLparse((void *)thd) && ! thd->is_fatal_error) + + int err= MYSQLparse(thd); + *found_semicolon= lip.found_semicolon; + + if (!err && ! thd->is_fatal_error) { #ifndef NO_EMBEDDED_ACCESS_CHECKS if (mqh_used && thd->user_connect && @@ -5924,8 +5949,8 @@ void mysql_parse(THD *thd, char *inBuf, uint length) PROCESSLIST. Note that we don't need LOCK_thread_count to modify query_length. */ - if (lex->found_semicolon && - (thd->query_length= (ulong)(lex->found_semicolon - thd->query))) + if (lip.found_semicolon && + (thd->query_length= (ulong)(lip.found_semicolon - thd->query))) thd->query_length--; /* Actually execute the query */ mysql_execute_command(thd); @@ -5952,6 +5977,12 @@ void mysql_parse(THD *thd, char *inBuf, uint length) thd->cleanup_after_query(); DBUG_ASSERT(thd->change_list.is_empty()); } + else + { + /* There are no multi queries in the cache. */ + *found_semicolon= NULL; + } + DBUG_VOID_RETURN; } @@ -5972,8 +6003,13 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) bool error= 0; DBUG_ENTER("mysql_test_parse_for_slave"); - mysql_init_query(thd, (uchar*) inBuf, length); - if (!MYSQLparse((void*) thd) && ! thd->is_fatal_error && + Lex_input_stream lip(thd, inBuf, length); + thd->m_lip= &lip; + lex_start(thd); + mysql_reset_thd_for_next_command(thd); + int err= MYSQLparse((void*) thd); + + if (!err && ! thd->is_fatal_error && all_tables_not_ok(thd,(TABLE_LIST*) lex->select_lex.table_list.first)) error= 1; /* Ignore question */ thd->end_statement(); @@ -7032,8 +7068,9 @@ bool check_simple_select() if (lex->current_select != &lex->select_lex) { char command[80]; - strmake(command, lex->yylval->symbol.str, - min(lex->yylval->symbol.length, sizeof(command)-1)); + Lex_input_stream *lip= thd->m_lip; + strmake(command, lip->yylval->symbol.str, + min(lip->yylval->symbol.length, sizeof(command)-1)); my_error(ER_CANT_USE_OPTION_HERE, MYF(0), command); return 1; } diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 85092f14624..ab26fc4e85d 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2799,11 +2799,15 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) old_stmt_arena= thd->stmt_arena; thd->stmt_arena= this; - lex_start(thd, (uchar*) thd->query, thd->query_length); + + Lex_input_stream lip(thd, thd->query, thd->query_length); + thd->m_lip= &lip; + lex_start(thd); lex->safe_to_cache_query= FALSE; lex->stmt_prepare_mode= TRUE; + int err= MYSQLparse((void *)thd); - error= MYSQLparse((void *)thd) || thd->is_fatal_error || + error= err || thd->is_fatal_error || thd->net.report_error || init_param_array(this); /* diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 55d51ad07b7..26b557a8247 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -978,10 +978,14 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db, LEX_STRING *trg_definer= it_definer++; thd->variables.sql_mode= (ulong)*trg_sql_mode; - lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length); + Lex_input_stream lip(thd, trg_create_str->str, trg_create_str->length); + thd->m_lip= &lip; + lex_start(thd); thd->spcont= 0; - if (MYSQLparse((void *)thd) || thd->is_fatal_error) + int err= MYSQLparse((void *)thd); + + if (err || thd->is_fatal_error) { /* Currently sphead is always deleted in case of a parse error */ DBUG_ASSERT(lex.sphead == 0); diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 83beec3d1be..5ec32ac3e79 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -761,8 +761,8 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, view->query.str= (char*)str.ptr(); view->query.length= str.length()-1; // we do not need last \0 view->source.str= thd->query + thd->lex->create_view_select_start; - view->source.length= (char *)skip_rear_comments((uchar *)view->source.str, - (uchar *)thd->query + + view->source.length= (char *)skip_rear_comments((char *)view->source.str, + (char *)thd->query + thd->query_length) - view->source.str; view->file_version= 1; @@ -973,10 +973,14 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, now Lex placed in statement memory */ table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local; - lex_start(thd, (uchar*)table->query.str, table->query.length); - view_select= &lex->select_lex; - view_select->select_number= ++thd->select_number; + { + Lex_input_stream lip(thd, table->query.str, table->query.length); + thd->m_lip= &lip; + lex_start(thd); + view_select= &lex->select_lex; + view_select->select_number= ++thd->select_number; + ulong save_mode= thd->variables.sql_mode; /* switch off modes which can prevent normal parsing of VIEW - MODE_REAL_AS_FLOAT affect only CREATE TABLE parsing diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 4a50a602121..82d148c4a1e 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -86,12 +86,13 @@ const LEX_STRING null_lex_str={0,0}; void my_parse_error(const char *s) { THD *thd= current_thd; + Lex_input_stream *lip= thd->m_lip; - char *yytext= (char*) thd->lex->tok_start; + const char *yytext= lip->tok_start; /* Push an error into the error stack */ my_printf_error(ER_PARSE_ERROR, ER(ER_PARSE_ERROR), MYF(0), s, - (yytext ? (char*) yytext : ""), - thd->lex->yylineno); + (yytext ? yytext : ""), + lip->yylineno); } /** @@ -1619,7 +1620,9 @@ create_function_tail: } | '(' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_head *sp; /* @@ -1639,9 +1642,9 @@ create_function_tail: } /* Order is important here: new - reset - init */ sp= new sp_head(); - sp->reset_thd_mem_root(YYTHD); + sp->reset_thd_mem_root(thd); sp->init(lex); - sp->init_sp_name(YYTHD, lex->spname); + sp->init_sp_name(thd, lex->spname); sp->m_type= TYPE_ENUM_FUNCTION; lex->sphead= sp; @@ -1650,15 +1653,17 @@ create_function_tail: * stored procedure, otherwise yylex will chop it into pieces * at each ';'. */ - sp->m_old_cmq= YYTHD->client_capabilities & CLIENT_MULTI_QUERIES; - YYTHD->client_capabilities &= ~CLIENT_MULTI_QUERIES; - lex->sphead->m_param_begin= lex->tok_start+1; + sp->m_old_cmq= thd->client_capabilities & CLIENT_MULTI_QUERIES; + thd->client_capabilities &= ~CLIENT_MULTI_QUERIES; + lex->sphead->m_param_begin= lip->tok_start+1; } sp_fdparam_list ')' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->m_param_end= lex->tok_start; + lex->sphead->m_param_end= lip->tok_start; } RETURNS_SYM { @@ -1682,10 +1687,12 @@ create_function_tail: } sp_c_chistics { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->tok_start; + lex->sphead->m_body_begin= lip->tok_start; } sp_proc_stmt { @@ -2233,14 +2240,18 @@ sp_opt_default: sp_proc_stmt: { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->reset_lex(YYTHD); - lex->sphead->m_tmp_query= lex->tok_start; + lex->sphead->reset_lex(thd); + lex->sphead->m_tmp_query= lip->tok_start; } statement { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_head *sp= lex->sphead; sp->m_flags|= sp_get_flags_for_command(lex); @@ -2267,15 +2278,15 @@ sp_proc_stmt: lex->tok_end otherwise. */ if (yychar == YYEMPTY) - i->m_query.length= lex->ptr - sp->m_tmp_query; + i->m_query.length= lip->ptr - sp->m_tmp_query; else - i->m_query.length= lex->tok_end - sp->m_tmp_query; - i->m_query.str= strmake_root(YYTHD->mem_root, - (char *)sp->m_tmp_query, + i->m_query.length= lip->tok_end - sp->m_tmp_query; + i->m_query.str= strmake_root(thd->mem_root, + sp->m_tmp_query, i->m_query.length); sp->add_instr(i); } - sp->restore_lex(YYTHD); + sp->restore_lex(thd); } | RETURN_SYM { Lex->sphead->reset_lex(YYTHD); } @@ -4444,10 +4455,18 @@ select_item: }; remember_name: - { $$=(char*) Lex->tok_start; }; + { + THD *thd= YYTHD; + Lex_input_stream *lip= thd->m_lip; + $$= (char*) lip->tok_start; + }; remember_end: - { $$=(char*) Lex->tok_end; }; + { + THD *thd= YYTHD; + Lex_input_stream *lip= thd->m_lip; + $$=(char*) lip->tok_end; + }; select_item2: table_wild { $$=$1; } /* table.* */ @@ -6292,12 +6311,14 @@ procedure_list2: procedure_item: remember_name expr { - LEX *lex= Lex; - if (add_proc_to_list(lex->thd, $2)) + THD *thd= YYTHD; + Lex_input_stream *lip= thd->m_lip; + + if (add_proc_to_list(thd, $2)) MYSQL_YYABORT; if (!$2->name) - $2->set_name($1,(uint) ((char*) lex->tok_end - $1), - YYTHD->charset()); + $2->set_name($1,(uint) ((char*) lip->tok_end - $1), + thd->charset()); } ; @@ -7337,13 +7358,16 @@ use: USE_SYM ident load: LOAD DATA_SYM { - LEX *lex=Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; + if (lex->sphead) { my_error(ER_SP_BADSTATEMENT, MYF(0), "LOAD DATA"); MYSQL_YYABORT; } - lex->fname_start= lex->ptr; + lex->fname_start= lip->ptr; } load_data {} @@ -7378,8 +7402,10 @@ load_data: } opt_duplicate INTO { - LEX *lex=Lex; - lex->fname_end= lex->ptr; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; + lex->fname_end= lip->ptr; } TABLE_SYM table_ident { @@ -7559,15 +7585,16 @@ text_string: param_marker: PARAM_MARKER { - THD *thd=YYTHD; + THD *thd= YYTHD; LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; Item_param *item; if (! lex->parsing_options.allows_variable) { my_error(ER_VIEW_SELECT_VARIABLE, MYF(0)); MYSQL_YYABORT; } - item= new Item_param((uint) (lex->tok_start - (uchar *) thd->query)); + item= new Item_param((uint) (lip->tok_start - thd->query)); if (!($$= item) || lex->param_list.push_back(item)) { my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); @@ -7590,8 +7617,11 @@ signed_literal: literal: text_literal { $$ = $1; } | NUM_literal { $$ = $1; } - | NULL_SYM { $$ = new Item_null(); - Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;} + | NULL_SYM + { + $$ = new Item_null(); + YYTHD->m_lip->next_state=MY_LEX_OPERATOR_OR_IDENT; + } | FALSE_SYM { $$= new Item_int((char*) "FALSE",0,1); } | TRUE_SYM { $$= new Item_int((char*) "TRUE",1,1); } | HEX_NUM { $$ = new Item_hex_string($1.str, $1.length);} @@ -7681,8 +7711,10 @@ order_ident: simple_ident: ident { + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_variable_t *spv; - LEX *lex = Lex; sp_pcontext *spc = lex->spcont; if (spc && (spv = spc->find_variable(&$1))) { @@ -7695,7 +7727,7 @@ simple_ident: Item_splocal *splocal; splocal= new Item_splocal($1, spv->offset, spv->type, - lex->tok_start_prev - + lip->tok_start_prev - lex->sphead->m_tmp_query); #ifndef DBUG_OFF if (splocal) @@ -8291,7 +8323,11 @@ option_value_list: option_type_value: { - if (Lex->sphead) + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; + + if (lex->sphead) { /* If we are in SP we want have own LEX for each assignment. @@ -8303,9 +8339,8 @@ option_type_value: QQ: May be we should simply prohibit group assignments in SP? */ - LEX *lex; - Lex->sphead->reset_lex(YYTHD); - lex= Lex; + Lex->sphead->reset_lex(thd); + lex= thd->lex; /* Set new LEX as if we at start of set rule. */ lex->sql_command= SQLCOM_SET_OPTION; @@ -8313,12 +8348,14 @@ option_type_value: lex->option_type=OPT_SESSION; lex->var_list.empty(); lex->one_shot_set= 0; - lex->sphead->m_tmp_query= lex->tok_start; + lex->sphead->m_tmp_query= lip->tok_start; } } ext_option_value { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; if (lex->sphead) { @@ -8340,24 +8377,24 @@ option_type_value: /* Extract the query statement from the tokenizer. The - end is either lex->ptr, if there was no lookahead, - lex->tok_end otherwise. + end is either lip->ptr, if there was no lookahead, + lip->tok_end otherwise. */ if (yychar == YYEMPTY) - qbuff.length= lex->ptr - sp->m_tmp_query; + qbuff.length= lip->ptr - sp->m_tmp_query; else - qbuff.length= lex->tok_end - sp->m_tmp_query; + qbuff.length= lip->tok_end - sp->m_tmp_query; - if (!(qbuff.str= alloc_root(YYTHD->mem_root, qbuff.length + 5))) + if (!(qbuff.str= alloc_root(thd->mem_root, qbuff.length + 5))) MYSQL_YYABORT; - strmake(strmake(qbuff.str, "SET ", 4), (char *)sp->m_tmp_query, + strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query, qbuff.length); qbuff.length+= 4; i->m_query= qbuff; sp->add_instr(i); } - lex->sphead->restore_lex(YYTHD); + lex->sphead->restore_lex(thd); } }; @@ -9615,7 +9652,9 @@ trigger_tail: TRIGGER_SYM remember_name sp_name trg_action_time trg_event ON remember_name table_ident FOR_SYM remember_name EACH_SYM ROW_SYM { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_head *sp; if (lex->sphead) @@ -9626,9 +9665,9 @@ trigger_tail: if (!(sp= new sp_head())) MYSQL_YYABORT; - sp->reset_thd_mem_root(YYTHD); + sp->reset_thd_mem_root(thd); sp->init(lex); - sp->init_sp_name(YYTHD, $3); + sp->init_sp_name(thd, $3); lex->stmt_definition_begin= $2; lex->ident.str= $7; @@ -9642,12 +9681,12 @@ trigger_tail: stored procedure, otherwise yylex will chop it into pieces at each ';'. */ - sp->m_old_cmq= YYTHD->client_capabilities & CLIENT_MULTI_QUERIES; - YYTHD->client_capabilities &= ~CLIENT_MULTI_QUERIES; + sp->m_old_cmq= thd->client_capabilities & CLIENT_MULTI_QUERIES; + thd->client_capabilities &= ~CLIENT_MULTI_QUERIES; bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->ptr; + lex->sphead->m_body_begin= lip->ptr; while (my_isspace(system_charset_info, lex->sphead->m_body_begin[0])) ++lex->sphead->m_body_begin; } @@ -9726,24 +9765,30 @@ sp_tail: } '(' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->m_param_begin= lex->tok_start+1; + lex->sphead->m_param_begin= lip->tok_start+1; } sp_pdparam_list ')' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->m_param_end= lex->tok_start; + lex->sphead->m_param_end= lip->tok_start; bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); } sp_c_chistics { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->tok_start; + lex->sphead->m_body_begin= lip->tok_start; } sp_proc_stmt { From ec57e081a5631dec9d518e64c4021bf393d7d149 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Apr 2007 09:56:04 +0800 Subject: [PATCH 023/137] Bug#25431, Adding index to table with BLOB is not done on-line add a new method is_equal in class Field_blob to compare BLOB field when alter table sql/field.cc: add a method compare_str_field_flags in class Field_str add a method is_equal in class Field_blob to compare BLOB field when alter table sql/field.h: add corresponding declaration of new method in class definition --- sql/field.cc | 30 +++++++++++++++++++++++++----- sql/field.h | 2 ++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index 250a9e3c1b9..ae93963652c 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -6159,13 +6159,21 @@ uint Field::is_equal(create_field *new_field) } +/* If one of the fields is binary and the other one isn't return 1 else 0 */ + +bool Field_str::compare_str_field_flags(create_field *new_field, uint32 flags) +{ + return (((new_field->flags & (BINCMP_FLAG | BINARY_FLAG)) && + !(flags & (BINCMP_FLAG | BINARY_FLAG))) || + (!(new_field->flags & (BINCMP_FLAG | BINARY_FLAG)) && + (flags & (BINCMP_FLAG | BINARY_FLAG)))); +} + + uint Field_str::is_equal(create_field *new_field) { - if (((new_field->flags & (BINCMP_FLAG | BINARY_FLAG)) && - !(flags & (BINCMP_FLAG | BINARY_FLAG))) || - (!(new_field->flags & (BINCMP_FLAG | BINARY_FLAG)) && - (flags & (BINCMP_FLAG | BINARY_FLAG)))) - return 0; /* One of the fields is binary and the other one isn't */ + if (compare_str_field_flags(new_field, flags)) + return 0; return ((new_field->sql_type == real_type()) && new_field->charset == field_charset && @@ -7671,6 +7679,18 @@ uint Field_blob::max_packed_col_length(uint max_length) } +uint Field_blob::is_equal(create_field *new_field) +{ + if (compare_str_field_flags(new_field, flags)) + return 0; + + return ((new_field->sql_type == get_blob_type_from_length(max_data_length())) + && new_field->charset == field_charset && + ((Field_blob *)new_field->field)->max_data_length() == + max_data_length()); +} + + #ifdef HAVE_SPATIAL void Field_geom::get_key_image(char *buff, uint length, imagetype type_arg) diff --git a/sql/field.h b/sql/field.h index b2169dac5b6..cabf8eb8f14 100644 --- a/sql/field.h +++ b/sql/field.h @@ -473,6 +473,7 @@ public: friend class create_field; my_decimal *val_decimal(my_decimal *); virtual bool str_needs_quotes() { return TRUE; } + bool compare_str_field_flags(create_field *new_field, uint32 flags); uint is_equal(create_field *new_field); }; @@ -1325,6 +1326,7 @@ public: bool has_charset(void) const { return charset() == &my_charset_bin ? FALSE : TRUE; } uint32 max_display_length(); + uint is_equal(create_field *new_field); }; From a67b02a06e4c3f2a4f73a6bfbad241c82368c933 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Apr 2007 15:57:42 +0800 Subject: [PATCH 024/137] BUG#25741 AllocNodeIdRef::NodeFailureHandlingNotCompleted storage/ndb/src/mgmsrv/MgmtSrvr.cpp: When running nodes return AllocNodeIdRef::NodeFailureHandlingNotCompleted error during applying the node id for restarting nodes, it should try again. storage/ndb/src/ndbapi/ndberror.c: change AllocNodeIdRef::NodeFailureHandlingNotCompleted error from permanent error to temporary error --- storage/ndb/src/mgmsrv/MgmtSrvr.cpp | 3 ++- storage/ndb/src/ndbapi/ndberror.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp index c6a3f804b70..2e9f16a5bd4 100644 --- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -2160,7 +2160,8 @@ MgmtSrvr::alloc_node_id_req(NodeId free_node_id, enum ndb_mgm_node_type type) const AllocNodeIdRef * const ref = CAST_CONSTPTR(AllocNodeIdRef, signal->getDataPtr()); if (ref->errorCode == AllocNodeIdRef::NotMaster || - ref->errorCode == AllocNodeIdRef::Busy) + ref->errorCode == AllocNodeIdRef::Busy || + ref->errorCode == AllocNodeIdRef::NodeFailureHandlingNotCompleted) { do_send = 1; nodeId = refToNode(ref->masterRef); diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index 8b14234c4be..3fb48b2edb5 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -471,7 +471,7 @@ ErrorBundle ErrorCodes[] = { { 1700, DMEC, IE, "Undefined error" }, { 1701, DMEC, AE, "Node already reserved" }, { 1702, DMEC, AE, "Node already connected" }, - { 1703, DMEC, AE, "Node failure handling not completed" }, + { 1703, DMEC, IT, "Node failure handling not completed" }, { 1704, DMEC, AE, "Node type mismatch" }, /** From ffe14d872e12dc589ac7dd8a1cbf7cd698ab57ff Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Apr 2007 14:39:16 +0000 Subject: [PATCH 025/137] BUG#27207 Return correct error message when ndb_mgmd start with wrong config.ini parameter in TCP section storage/ndb/src/mgmsrv/ConfigInfo.cpp: return false when configuration is wrong in TCP section --- storage/ndb/src/mgmsrv/ConfigInfo.cpp | 33 +++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index 6351af7246e..28706e863a6 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -2889,25 +2889,50 @@ static bool fixNodeId(InitConfigFileParser::Context & ctx, const char * data) char buf[] = "NodeIdX"; buf[6] = data[sizeof("NodeI")]; char sysbuf[] = "SystemX"; sysbuf[6] = data[sizeof("NodeI")]; const char* nodeId; - require(ctx.m_currentSection->get(buf, &nodeId)); + if(!ctx.m_currentSection->get(buf, &nodeId)) + { + ctx.reportError("Mandatory parameter %s missing from section" + "[%s] starting at line: %d", + buf, ctx.fname, ctx.m_sectionLineno); + return false; + } char tmpLine[MAX_LINE_LENGTH]; strncpy(tmpLine, nodeId, MAX_LINE_LENGTH); char* token1 = strtok(tmpLine, "."); char* token2 = strtok(NULL, "."); Uint32 id; - + + if(!token1) + { + ctx.reportError("Value for mandatory parameter %s missing from section " + "[%s] starting at line: %d", + buf, ctx.fname, ctx.m_sectionLineno); + return false; + } if (token2 == NULL) { // Only a number given errno = 0; char* p; id = strtol(token1, &p, 10); - if (errno != 0) warning("STRTOK1", nodeId); + if (errno != 0 || id <= 0x0 || id > MAX_NODES) + { + ctx.reportError("Illegal value for mandatory parameter %s from section " + "[%s] starting at line: %d", + buf, ctx.fname, ctx.m_sectionLineno); + return false; + } require(ctx.m_currentSection->put(buf, id, true)); } else { // A pair given (e.g. "uppsala.32") errno = 0; char* p; id = strtol(token2, &p, 10); - if (errno != 0) warning("STRTOK2", nodeId); + if (errno != 0 || id <= 0x0 || id > MAX_NODES) + { + ctx.reportError("Illegal value for mandatory parameter %s from section " + "[%s] starting at line: %d", + buf, ctx.fname, ctx.m_sectionLineno); + return false; + } require(ctx.m_currentSection->put(buf, id, true)); require(ctx.m_currentSection->put(sysbuf, token1)); } From c49e378ac4a690220d86c11ef40f2382848c6d30 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Apr 2007 11:38:11 -0600 Subject: [PATCH 026/137] code review fix --- sql/sql_lex.cc | 6 +++--- sql/sql_lex.h | 5 ++++- sql/sql_parse.cc | 9 +++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 95b9a77d411..ecdbb654ffd 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -122,7 +122,8 @@ Lex_input_stream::Lex_input_stream(THD *thd, tok_start_prev(NULL), buf(buffer), next_state(MY_LEX_START), - found_semicolon(NULL) + found_semicolon(NULL), + ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE)) { } @@ -192,7 +193,6 @@ void lex_start(THD *thd) lex->select_lex.udf_list.empty(); lex->current_select= &lex->select_lex; lex->yacc_yyss=lex->yacc_yyvs=0; - lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE); lex->sql_command= lex->orig_sql_command= SQLCOM_END; lex->duplicates= DUP_ERROR; lex->ignore= 0; @@ -656,7 +656,7 @@ int MYSQLlex(void *arg, void *yythd) } length= (uint) (lip->ptr - lip->tok_start)-1; start= lip->ptr; - if (lex->ignore_space) + if (lip->ignore_space) { /* If we find a space then this can't be an identifier. We notice this diff --git a/sql/sql_lex.h b/sql/sql_lex.h index d580b2016ae..d07de73d5b9 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -951,6 +951,9 @@ public: /** Position of ';' in the stream, to delimit multiple queries. */ const char* found_semicolon; + + /** SQL_MODE = IGNORE_SPACE. */ + bool ignore_space; }; @@ -1069,7 +1072,7 @@ typedef struct st_lex : public Query_tables_list uint8 create_view_algorithm; uint8 create_view_check; bool drop_if_exists, drop_temporary, local_file, one_shot_set; - bool in_comment, ignore_space, verbose, no_write_to_binlog; + bool in_comment, verbose, no_write_to_binlog; bool tx_chain, tx_release; /* Special JOIN::prepare mode: changing of query is prohibited. diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0505f0d3574..22689a3dfa1 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5990,16 +5990,14 @@ void mysql_parse(THD *thd, const char *inBuf, uint length, - first, call query_cache_send_result_to_client, - second, if caching failed, initialise the lexical and syntactic parser. The problem is that the query cache depends on a clean initialization - of the thd and thd->lex structures, which happen to be implemented - by: + of (among others) lex->safe_to_cache_query and thd->server_status, + which are reset respectively in - lex_start() - mysql_reset_thd_for_next_command() So, initializing the lexical analyser *before* using the query cache is required for the cache to work properly. FIXME: cleanup the dependencies in the code to simplify this. */ - Lex_input_stream lip(thd, inBuf, length); - thd->m_lip= &lip; lex_start(thd); mysql_reset_thd_for_next_command(thd); @@ -6010,6 +6008,9 @@ void mysql_parse(THD *thd, const char *inBuf, uint length, sp_cache_flush_obsolete(&thd->sp_proc_cache); sp_cache_flush_obsolete(&thd->sp_func_cache); + Lex_input_stream lip(thd, inBuf, length); + thd->m_lip= &lip; + int err= MYSQLparse(thd); *found_semicolon= lip.found_semicolon; From 034c11f3cdac8b2b39dd8593d1fbad5b92f98879 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Apr 2007 21:38:12 -0600 Subject: [PATCH 027/137] manual merge 5.0-runtime -> 5.1->runtime, with 25411 part I --- sql/event_data_objects.cc | 31 ++-- sql/ha_ndbcluster.cc | 2 +- sql/ha_ndbcluster_binlog.cc | 3 +- sql/log_event.cc | 5 +- sql/mysql_priv.h | 6 +- sql/slave.cc | 3 +- sql/sp.cc | 9 +- sql/sp_head.cc | 27 +--- sql/sp_head.h | 4 +- sql/sql_class.h | 11 ++ sql/sql_lex.cc | 284 +++++++++++++++++++----------------- sql/sql_lex.h | 71 +++++++-- sql/sql_parse.cc | 103 ++++++++----- sql/sql_partition.cc | 6 +- sql/sql_prepare.cc | 10 +- sql/sql_trigger.cc | 10 +- sql/sql_view.cc | 10 +- sql/sql_yacc.yy | 184 ++++++++++++++--------- 18 files changed, 479 insertions(+), 300 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index f5847e603e8..4b788a8f7d8 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -156,10 +156,14 @@ void Event_parse_data::init_body(THD *thd) { DBUG_ENTER("Event_parse_data::init_body"); - DBUG_PRINT("info", ("body: '%s' body_begin: 0x%lx end: 0x%lx", body_begin, - (long) body_begin, (long) thd->lex->ptr)); - body.length= thd->lex->ptr - body_begin; + /* This method is called from within the parser, from sql_yacc.yy */ + DBUG_ASSERT(thd->m_lip != NULL); + + DBUG_PRINT("info", ("body: '%s' body_begin: 0x%lx end: 0x%lx", body_begin, + (long) body_begin, (long) thd->m_lip->ptr)); + + body.length= thd->m_lip->ptr - body_begin; const char *body_end= body_begin + body.length - 1; /* Trim nuls or close-comments ('*'+'/') or spaces at the end */ @@ -1912,15 +1916,20 @@ Event_job_data::execute(THD *thd, bool drop) thd->query= sp_sql.c_ptr_safe(); thd->query_length= sp_sql.length(); - lex_start(thd, thd->query, thd->query_length); - - if (MYSQLparse(thd) || thd->is_fatal_error) { - sql_print_error("Event Scheduler: " - "%serror during compilation of %s.%s", - thd->is_fatal_error ? "fatal " : "", - (const char *) dbname.str, (const char *) name.str); - goto end; + Lex_input_stream lip(thd, thd->query, thd->query_length); + thd->m_lip= &lip; + lex_start(thd); + int err= MYSQLparse(thd); + + if (err || thd->is_fatal_error) + { + sql_print_error("Event Scheduler: " + "%serror during compilation of %s.%s", + thd->is_fatal_error ? "fatal " : "", + (const char *) dbname.str, (const char *) name.str); + goto end; + } } { diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 58d34d99174..d1e6ae56cb2 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6564,7 +6564,7 @@ int ndb_create_table_from_engine(THD *thd, const char *db, LEX *old_lex= thd->lex, newlex; thd->lex= &newlex; newlex.current_select= NULL; - lex_start(thd, "", 0); + lex_start(thd); int res= ha_create_table_from_engine(thd, db, table_name); thd->lex= old_lex; return res; diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index c65c81c088c..a7c2d1f51e9 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -230,6 +230,7 @@ static void run_query(THD *thd, char *buf, char *end, ulonglong save_thd_options= thd->options; DBUG_ASSERT(sizeof(save_thd_options) == sizeof(thd->options)); NET save_net= thd->net; + const char* found_semicolon= NULL; bzero((char*) &thd->net, sizeof(NET)); thd->query_length= end - buf; @@ -239,7 +240,7 @@ static void run_query(THD *thd, char *buf, char *end, thd->options&= ~OPTION_BIN_LOG; DBUG_PRINT("query", ("%s", thd->query)); - mysql_parse(thd, thd->query, thd->query_length); + mysql_parse(thd, thd->query, thd->query_length, &found_semicolon); if (print_error && thd->query_error) { diff --git a/sql/log_event.cc b/sql/log_event.cc index 048db4ac95d..591a91f2011 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5863,7 +5863,7 @@ int Rows_log_event::do_apply_event(RELAY_LOG_INFO const *rli) Table_map_log_event::do_apply_event() we don't call mysql_init_query() as that may reset the binlog format. */ - lex_start(thd, NULL, 0); + lex_start(thd); while ((error= lock_tables(thd, rli->tables_to_lock, rli->tables_to_lock_count, &need_reopen))) @@ -6513,7 +6513,8 @@ int Table_map_log_event::do_apply_event(RELAY_LOG_INFO const *rli) initialized, so we should call lex_start(); to be even safer, we call mysql_init_query() which does a more complete set of inits. */ - mysql_init_query(thd, NULL, 0); + lex_start(thd); + mysql_reset_thd_for_next_command(thd); /* Check if the slave is set to use SBR. If so, it should switch to using RBR until the end of the "statement", i.e., next diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 3a01ed27f61..d9386c9f4d7 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -838,13 +838,15 @@ bool do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, bool skip_error); bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch); -void mysql_parse(THD *thd,char *inBuf,uint length); + +void mysql_parse(THD *thd, const char *inBuf, uint length, + const char ** semicolon); + bool mysql_test_parse_for_slave(THD *thd,char *inBuf,uint length); bool is_update_query(enum enum_sql_command command); bool alloc_query(THD *thd, const char *packet, uint packet_length); void mysql_init_select(LEX *lex); void mysql_reset_thd_for_next_command(THD *thd); -void mysql_init_query(THD *thd, const char *buf, uint length); bool mysql_new_select(LEX *lex, bool move_down); void create_select_for_variable(const char *var_name); void mysql_init_multi_delete(LEX *lex); diff --git a/sql/slave.cc b/sql/slave.cc index f1b9ea8476b..f89a56e2087 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -923,6 +923,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, handler *file; ulonglong save_options; NET *net= &mysql->net; + const char *found_semicolon= NULL; DBUG_ENTER("create_table_from_dump"); packet_len= my_net_read(net); // read create table statement @@ -974,7 +975,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db, thd->db = (char*)db; DBUG_ASSERT(thd->db != 0); thd->db_length= strlen(thd->db); - mysql_parse(thd, thd->query, packet_len); // run create table + mysql_parse(thd, thd->query, packet_len, &found_semicolon); // run create table thd->db = save_db; // leave things the way the were before thd->db_length= save_db_length; thd->options = save_options; diff --git a/sql/sp.cc b/sql/sp.cc index 49b8b304e76..0a99be3f970 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -384,10 +384,15 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp, if ((ret= sp_use_new_db(thd, name->m_db, &old_db, 1, &dbchanged))) goto end; - lex_start(thd, defstr.c_ptr(), defstr.length()); + { + Lex_input_stream lip(thd, defstr.c_ptr(), defstr.length()); + thd->m_lip= &lip; + lex_start(thd); + ret= MYSQLparse(thd); + } thd->spcont= 0; - if (MYSQLparse(thd) || thd->is_fatal_error || newlex.sphead == NULL) + if (ret || thd->is_fatal_error || newlex.sphead == NULL) { sp_head *sp= newlex.sphead; diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 04a7b2574a4..89fcd80abcf 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -557,6 +557,7 @@ sp_head::init_strings(THD *thd, LEX *lex) const char *endp; /* Used to trim the end */ /* During parsing, we must use thd->mem_root */ MEM_ROOT *root= thd->mem_root; + Lex_input_stream *lip=thd->m_lip; if (m_param_begin && m_param_end) { @@ -565,7 +566,7 @@ sp_head::init_strings(THD *thd, LEX *lex) } /* If ptr has overrun end_of_query then end_of_query is the end */ - endp= (lex->ptr > lex->end_of_query ? lex->end_of_query : lex->ptr); + endp= (lip->ptr > lip->end_of_query ? lip->end_of_query : lip->ptr); /* Trim "garbage" at the end. This is sometimes needed with the "/ * ! VERSION... * /" wrapper in dump files. @@ -574,8 +575,8 @@ sp_head::init_strings(THD *thd, LEX *lex) m_body.length= endp - m_body_begin; m_body.str= strmake_root(root, m_body_begin, m_body.length); - m_defstr.length= endp - lex->buf; - m_defstr.str= strmake_root(root, lex->buf, m_defstr.length); + m_defstr.length= endp - lip->buf; + m_defstr.str= strmake_root(root, lip->buf, m_defstr.length); DBUG_VOID_RETURN; } @@ -1815,25 +1816,13 @@ sp_head::reset_lex(THD *thd) DBUG_ENTER("sp_head::reset_lex"); LEX *sublex; LEX *oldlex= thd->lex; - my_lex_states org_next_state= oldlex->next_state; (void)m_lex.push_front(oldlex); thd->lex= sublex= new st_lex; - /* Reset most stuff. The length arguments doesn't matter here. */ - lex_start(thd, oldlex->buf, (ulong) (oldlex->end_of_query - oldlex->ptr)); + /* Reset most stuff. */ + lex_start(thd); - /* - next_state is normally the same (0), but it happens that we swap lex in - "mid-sentence", so we must restore it. - */ - sublex->next_state= org_next_state; - /* We must reset ptr and end_of_query again */ - sublex->ptr= oldlex->ptr; - sublex->end_of_query= oldlex->end_of_query; - sublex->tok_start= oldlex->tok_start; - sublex->tok_end= oldlex->tok_end; - sublex->yylineno= oldlex->yylineno; /* And keep the SP stuff too */ sublex->sphead= oldlex->sphead; sublex->spcont= oldlex->spcont; @@ -1866,10 +1855,6 @@ sp_head::restore_lex(THD *thd) if (! oldlex) return; // Nothing to restore - // Update some state in the old one first - oldlex->ptr= sublex->ptr; - oldlex->tok_end= sublex->tok_end; - oldlex->next_state= sublex->next_state; oldlex->trg_table_fields.push_back(&sublex->trg_table_fields); /* diff --git a/sql/sp_head.h b/sql/sp_head.h index 551707fa7bd..51ca529bed0 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -176,7 +176,9 @@ public: */ HASH m_sroutines; // Pointers set during parsing - const char *m_param_begin, *m_param_end, *m_body_begin; + const char *m_param_begin; + const char *m_param_end; + const char *m_body_begin; /* Security context for stored routine which should be run under diff --git a/sql/sql_class.h b/sql/sql_class.h index 48a88087fd3..fd88df4bcc8 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -31,6 +31,7 @@ class Load_log_event; class Slave_log_event; class sp_rcontext; class sp_cache; +class Lex_input_stream; class Rows_log_event; enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE }; @@ -1423,6 +1424,16 @@ public: */ query_id_t first_query_id; } binlog_evt_union; + + /** + Character input stream consumed by the lexical analyser, + used during parsing. + Note that since the parser is not re-entrant, we keep only one input + stream here. This member is valid only when executing code during parsing, + and may point to invalid memory after that. + */ + Lex_input_stream *m_lip; + #ifdef WITH_PARTITION_STORAGE_ENGINE partition_info *work_part_info; #endif diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 4a162478388..24c4f42b32a 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -33,13 +33,13 @@ sys_var *trg_new_row_fake_var= (sys_var*) 0x01; /* Macros to look like lex */ -#define yyGet() ((uchar) *(lex->ptr++)) -#define yyGetLast() ((uchar) lex->ptr[-1]) -#define yyPeek() ((uchar) lex->ptr[0]) -#define yyPeek2() ((uchar) lex->ptr[1]) -#define yyUnget() lex->ptr-- -#define yySkip() lex->ptr++ -#define yyLength() ((uint) (lex->ptr - lex->tok_start)-1) +#define yyGet() ((uchar) *(lip->ptr++)) +#define yyGetLast() ((uchar) lip->ptr[-1]) +#define yyPeek() ((uchar) lip->ptr[0]) +#define yyPeek2() ((uchar) lip->ptr[1]) +#define yyUnget() lip->ptr-- +#define yySkip() lip->ptr++ +#define yyLength() ((uint) (lip->ptr - lip->tok_start)-1) /* Longest standard keyword name */ #define TOCK_NAME_LENGTH 24 @@ -120,6 +120,28 @@ st_parsing_options::reset() allows_derived= TRUE; } +Lex_input_stream::Lex_input_stream(THD *thd, + const char* buffer, + unsigned int length) +: m_thd(thd), + yylineno(1), + yytoklen(0), + yylval(NULL), + ptr(buffer), + tok_start(NULL), + tok_end(NULL), + end_of_query(buffer + length), + tok_start_prev(NULL), + buf(buffer), + next_state(MY_LEX_START), + found_semicolon(NULL), + ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE)) +{ +} + +Lex_input_stream::~Lex_input_stream() +{} + /* This is called before every query that is to be parsed. @@ -127,14 +149,12 @@ st_parsing_options::reset() (We already do too much here) */ -void lex_start(THD *thd, const char *buf, uint length) +void lex_start(THD *thd) { LEX *lex= thd->lex; DBUG_ENTER("lex_start"); lex->thd= lex->unit.thd= thd; - lex->buf= lex->ptr= buf; - lex->end_of_query= buf+length; lex->context_stack.empty(); lex->unit.init_query(); @@ -167,14 +187,11 @@ void lex_start(THD *thd, const char *buf, uint length) lex->stmt_prepare_mode= FALSE; lex->derived_tables= 0; lex->lock_option= TL_READ; - lex->found_semicolon= 0; lex->safe_to_cache_query= 1; lex->leaf_tables_insert= 0; lex->parsing_options.reset(); lex->empty_field_list_on_rset= 0; lex->select_lex.select_number= 1; - lex->next_state=MY_LEX_START; - lex->yylineno = 1; lex->in_comment=0; lex->length=0; lex->part_info= 0; @@ -184,7 +201,6 @@ void lex_start(THD *thd, const char *buf, uint length) lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc; lex->select_lex.group_list.empty(); lex->select_lex.order_list.empty(); - lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE); lex->sql_command= SQLCOM_END; lex->duplicates= DUP_ERROR; lex->ignore= 0; @@ -236,24 +252,24 @@ void lex_end(LEX *lex) } -static int find_keyword(LEX *lex, uint len, bool function) +static int find_keyword(Lex_input_stream *lip, uint len, bool function) { - const char *tok= lex->tok_start; + const char *tok= lip->tok_start; SYMBOL *symbol= get_hash_symbol(tok, len, function); if (symbol) { - lex->yylval->symbol.symbol=symbol; - lex->yylval->symbol.str= (char*) tok; - lex->yylval->symbol.length=len; - + lip->yylval->symbol.symbol=symbol; + lip->yylval->symbol.str= (char*) tok; + lip->yylval->symbol.length=len; + if ((symbol->tok == NOT_SYM) && - (lex->thd->variables.sql_mode & MODE_HIGH_NOT_PRECEDENCE)) + (lip->m_thd->variables.sql_mode & MODE_HIGH_NOT_PRECEDENCE)) return NOT2_SYM; if ((symbol->tok == OR_OR_SYM) && - !(lex->thd->variables.sql_mode & MODE_PIPES_AS_CONCAT)) + !(lip->m_thd->variables.sql_mode & MODE_PIPES_AS_CONCAT)) return OR2_SYM; - + return symbol->tok; } return 0; @@ -286,12 +302,12 @@ bool is_lex_native_function(const LEX_STRING *name) /* make a copy of token before ptr and set yytoklen */ -static LEX_STRING get_token(LEX *lex,uint length) +static LEX_STRING get_token(Lex_input_stream *lip, uint length) { LEX_STRING tmp; yyUnget(); // ptr points now after last token char - tmp.length=lex->yytoklen=length; - tmp.str=(char*) lex->thd->strmake((char*) lex->tok_start,tmp.length); + tmp.length=lip->yytoklen=length; + tmp.str= lip->m_thd->strmake(lip->tok_start, tmp.length); return tmp; } @@ -302,15 +318,16 @@ static LEX_STRING get_token(LEX *lex,uint length) future to operate multichar strings (like ucs2) */ -static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote) +static LEX_STRING get_quoted_token(Lex_input_stream *lip, + uint length, char quote) { LEX_STRING tmp; const char *from, *end; char *to; yyUnget(); // ptr points now after last token char - tmp.length=lex->yytoklen=length; - tmp.str=(char*) lex->thd->alloc(tmp.length+1); - for (from= lex->tok_start, to= tmp.str, end= to+length ; + tmp.length= lip->yytoklen=length; + tmp.str=(char*) lip->m_thd->alloc(tmp.length+1); + for (from= lip->tok_start, to= tmp.str, end= to+length ; to != end ; ) { @@ -327,31 +344,31 @@ static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote) Fix sometimes to do only one scan of the string */ -static char *get_text(LEX *lex) +static char *get_text(Lex_input_stream *lip) { reg1 uchar c,sep; uint found_escape=0; - CHARSET_INFO *cs= lex->thd->charset(); + CHARSET_INFO *cs= lip->m_thd->charset(); sep= yyGetLast(); // String should end with this - while (lex->ptr != lex->end_of_query) + while (lip->ptr != lip->end_of_query) { c = yyGet(); #ifdef USE_MB { int l; if (use_mb(cs) && - (l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query))) { - lex->ptr += l-1; + (l = my_ismbchar(cs, lip->ptr-1, lip->end_of_query))) { + lip->ptr += l-1; continue; } } #endif if (c == '\\' && - !(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)) + !(lip->m_thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)) { // Escaped character found_escape=1; - if (lex->ptr == lex->end_of_query) + if (lip->ptr == lip->end_of_query) return 0; yySkip(); } @@ -369,15 +386,15 @@ static char *get_text(LEX *lex) const char *str, *end; char *start; - str=lex->tok_start+1; - end=lex->ptr-1; - if (!(start= (char*) lex->thd->alloc((uint) (end-str)+1))) + str=lip->tok_start+1; + end=lip->ptr-1; + if (!(start= (char*) lip->m_thd->alloc((uint) (end-str)+1))) return (char*) ""; // Sql_alloc has set error flag if (!found_escape) { - lex->yytoklen=(uint) (end-str); - memcpy(start,str,lex->yytoklen); - start[lex->yytoklen]=0; + lip->yytoklen=(uint) (end-str); + memcpy(start,str,lip->yytoklen); + start[lip->yytoklen]=0; } else { @@ -395,7 +412,7 @@ static char *get_text(LEX *lex) continue; } #endif - if (!(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) && + if (!(lip->m_thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) && *str == '\\' && str+1 != end) { switch(*++str) { @@ -432,7 +449,7 @@ static char *get_text(LEX *lex) *to++ = *str; } *to=0; - lex->yytoklen=(uint) (to-start); + lip->yytoklen=(uint) (to-start); } return start; } @@ -545,19 +562,21 @@ int MYSQLlex(void *arg, void *yythd) int tokval, result_state; uint length; enum my_lex_states state; - LEX *lex= ((THD *)yythd)->lex; + THD *thd= (THD *)yythd; + Lex_input_stream *lip= thd->m_lip; + LEX *lex= thd->lex; YYSTYPE *yylval=(YYSTYPE*) arg; - CHARSET_INFO *cs= ((THD *) yythd)->charset(); + CHARSET_INFO *cs= thd->charset(); uchar *state_map= cs->state_map; uchar *ident_map= cs->ident_map; - lex->yylval=yylval; // The global state + lip->yylval=yylval; // The global state - lex->tok_start_prev= lex->tok_start; + lip->tok_start_prev= lip->tok_start; - lex->tok_start=lex->tok_end=lex->ptr; - state=lex->next_state; - lex->next_state=MY_LEX_OPERATOR_OR_IDENT; + lip->tok_start=lip->tok_end=lip->ptr; + state=lip->next_state; + lip->next_state=MY_LEX_OPERATOR_OR_IDENT; LINT_INIT(c); for (;;) { @@ -568,9 +587,9 @@ int MYSQLlex(void *arg, void *yythd) for (c=yyGet() ; (state_map[c] == MY_LEX_SKIP) ; c= yyGet()) { if (c == '\n') - lex->yylineno++; + lip->yylineno++; } - lex->tok_start=lex->ptr-1; // Start of real token + lip->tok_start=lip->ptr-1; // Start of real token state= (enum my_lex_states) state_map[c]; break; case MY_LEX_ESCAPE: @@ -589,13 +608,13 @@ int MYSQLlex(void *arg, void *yythd) state=MY_LEX_COMMENT; break; } - yylval->lex_str.str=(char*) (lex->ptr=lex->tok_start);// Set to first chr + yylval->lex_str.str=(char*) (lip->ptr=lip->tok_start);// Set to first chr yylval->lex_str.length=1; c=yyGet(); if (c != ')') - lex->next_state= MY_LEX_START; // Allow signed numbers + lip->next_state= MY_LEX_START; // Allow signed numbers if (c == ',') - lex->tok_start=lex->ptr; // Let tok_start point at next item + lip->tok_start=lip->ptr; // Let tok_start point at next item /* Check for a placeholder: it should not precede a possible identifier because of binlogging: when a placeholder is replaced with @@ -613,14 +632,14 @@ int MYSQLlex(void *arg, void *yythd) break; } /* Found N'string' */ - lex->tok_start++; // Skip N + lip->tok_start++; // Skip N yySkip(); // Skip ' - if (!(yylval->lex_str.str = get_text(lex))) + if (!(yylval->lex_str.str = get_text(lip))) { state= MY_LEX_CHAR; // Read char by char break; } - yylval->lex_str.length= lex->yytoklen; + yylval->lex_str.length= lip->yytoklen; return(NCHAR_STRING); case MY_LEX_IDENT_OR_HEX: @@ -643,21 +662,21 @@ int MYSQLlex(void *arg, void *yythd) result_state= IDENT_QUOTED; if (my_mbcharlen(cs, yyGetLast()) > 1) { - int l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query); + int l = my_ismbchar(cs, lip->ptr-1, lip->end_of_query); if (l == 0) { state = MY_LEX_CHAR; continue; } - lex->ptr += l - 1; + lip->ptr += l - 1; } while (ident_map[c=yyGet()]) { if (my_mbcharlen(cs, c) > 1) { int l; - if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0) + if ((l = my_ismbchar(cs, lip->ptr-1, lip->end_of_query)) == 0) break; - lex->ptr += l-1; + lip->ptr += l-1; } } } @@ -668,9 +687,9 @@ int MYSQLlex(void *arg, void *yythd) /* If there were non-ASCII characters, mark that we must convert */ result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; } - length= (uint) (lex->ptr - lex->tok_start)-1; - start= lex->ptr; - if (lex->ignore_space) + length= (uint) (lip->ptr - lip->tok_start)-1; + start= lip->ptr; + if (lip->ignore_space) { /* If we find a space then this can't be an identifier. We notice this @@ -678,19 +697,19 @@ int MYSQLlex(void *arg, void *yythd) */ for (; state_map[c] == MY_LEX_SKIP ; c= yyGet()); } - if (start == lex->ptr && c == '.' && ident_map[yyPeek()]) - lex->next_state=MY_LEX_IDENT_SEP; + if (start == lip->ptr && c == '.' && ident_map[yyPeek()]) + lip->next_state=MY_LEX_IDENT_SEP; else { // '(' must follow directly if function yyUnget(); - if ((tokval = find_keyword(lex,length,c == '('))) + if ((tokval = find_keyword(lip, length,c == '('))) { - lex->next_state= MY_LEX_START; // Allow signed numbers + lip->next_state= MY_LEX_START; // Allow signed numbers return(tokval); // Was keyword } yySkip(); // next state does a unget } - yylval->lex_str=get_token(lex,length); + yylval->lex_str=get_token(lip, length); /* Note: "SELECT _bla AS 'alias'" @@ -707,12 +726,12 @@ int MYSQLlex(void *arg, void *yythd) return(result_state); // IDENT or IDENT_QUOTED case MY_LEX_IDENT_SEP: // Found ident and now '.' - yylval->lex_str.str=(char*) lex->ptr; + yylval->lex_str.str=(char*) lip->ptr; yylval->lex_str.length=1; c=yyGet(); // should be '.' - lex->next_state= MY_LEX_IDENT_START;// Next is an ident (not a keyword) + lip->next_state= MY_LEX_IDENT_START;// Next is an ident (not a keyword) if (!ident_map[yyPeek()]) // Probably ` or " - lex->next_state= MY_LEX_START; + lip->next_state= MY_LEX_START; return((int) c); case MY_LEX_NUMBER_IDENT: // number or ident which num-start @@ -732,36 +751,36 @@ int MYSQLlex(void *arg, void *yythd) { yySkip(); while (my_isdigit(cs,yyGet())) ; - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(FLOAT_NUM); } } yyUnget(); /* purecov: inspected */ } - else if (c == 'x' && (lex->ptr - lex->tok_start) == 2 && - lex->tok_start[0] == '0' ) + else if (c == 'x' && (lip->ptr - lip->tok_start) == 2 && + lip->tok_start[0] == '0' ) { // Varbinary while (my_isxdigit(cs,(c = yyGet()))) ; - if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c]) + if ((lip->ptr - lip->tok_start) >= 4 && !ident_map[c]) { - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); yylval->lex_str.str+=2; // Skip 0x yylval->lex_str.length-=2; - lex->yytoklen-=2; + lip->yytoklen-=2; return (HEX_NUM); } yyUnget(); } - else if (c == 'b' && (lex->ptr - lex->tok_start) == 2 && - lex->tok_start[0] == '0' ) + else if (c == 'b' && (lip->ptr - lip->tok_start) == 2 && + lip->tok_start[0] == '0' ) { // b'bin-number' while (my_isxdigit(cs,(c = yyGet()))) ; - if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c]) + if ((lip->ptr - lip->tok_start) >= 4 && !ident_map[c]) { - yylval->lex_str= get_token(lex, yyLength()); + yylval->lex_str= get_token(lip, yyLength()); yylval->lex_str.str+= 2; // Skip 0x yylval->lex_str.length-= 2; - lex->yytoklen-= 2; + lip->yytoklen-= 2; return (BIN_NUM); } yyUnget(); @@ -778,9 +797,9 @@ int MYSQLlex(void *arg, void *yythd) if (my_mbcharlen(cs, c) > 1) { int l; - if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0) + if ((l = my_ismbchar(cs, lip->ptr-1, lip->end_of_query)) == 0) break; - lex->ptr += l-1; + lip->ptr += l-1; } } } @@ -792,16 +811,16 @@ int MYSQLlex(void *arg, void *yythd) result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; } if (c == '.' && ident_map[yyPeek()]) - lex->next_state=MY_LEX_IDENT_SEP;// Next is '.' + lip->next_state=MY_LEX_IDENT_SEP;// Next is '.' - yylval->lex_str= get_token(lex,yyLength()); + yylval->lex_str= get_token(lip, yyLength()); return(result_state); case MY_LEX_USER_VARIABLE_DELIMITER: // Found quote char { uint double_quotes= 0; char quote_char= c; // Used char - lex->tok_start=lex->ptr; // Skip first ` + lip->tok_start=lip->ptr; // Skip first ` while ((c=yyGet())) { int var_length; @@ -819,23 +838,23 @@ int MYSQLlex(void *arg, void *yythd) #ifdef USE_MB else if (var_length < 1) break; // Error - lex->ptr+= var_length-1; + lip->ptr+= var_length-1; #endif } if (double_quotes) - yylval->lex_str=get_quoted_token(lex,yyLength() - double_quotes, + yylval->lex_str=get_quoted_token(lip, yyLength() - double_quotes, quote_char); else - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); if (c == quote_char) yySkip(); // Skip end ` - lex->next_state= MY_LEX_START; + lip->next_state= MY_LEX_START; return(IDENT_QUOTED); } case MY_LEX_INT_OR_REAL: // Compleat int or incompleat real if (c != '.') { // Found complete integer number. - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return int_token(yylval->lex_str.str,yylval->lex_str.length); } // fall through @@ -853,47 +872,47 @@ int MYSQLlex(void *arg, void *yythd) break; } while (my_isdigit(cs,yyGet())) ; - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(FLOAT_NUM); } - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(DECIMAL_NUM); case MY_LEX_HEX_NUMBER: // Found x'hexstring' yyGet(); // Skip ' while (my_isxdigit(cs,(c = yyGet()))) ; - length=(lex->ptr - lex->tok_start); // Length of hexnum+3 + length=(lip->ptr - lip->tok_start); // Length of hexnum+3 if (!(length & 1) || c != '\'') { return(ABORT_SYM); // Illegal hex constant } yyGet(); // get_token makes an unget - yylval->lex_str=get_token(lex,length); + yylval->lex_str=get_token(lip, length); yylval->lex_str.str+=2; // Skip x' yylval->lex_str.length-=3; // Don't count x' and last ' - lex->yytoklen-=3; + lip->yytoklen-=3; return (HEX_NUM); case MY_LEX_BIN_NUMBER: // Found b'bin-string' yyGet(); // Skip ' while ((c= yyGet()) == '0' || c == '1'); - length= (lex->ptr - lex->tok_start); // Length of bin-num + 3 + length= (lip->ptr - lip->tok_start); // Length of bin-num + 3 if (c != '\'') return(ABORT_SYM); // Illegal hex constant yyGet(); // get_token makes an unget - yylval->lex_str= get_token(lex, length); + yylval->lex_str= get_token(lip, length); yylval->lex_str.str+= 2; // Skip b' yylval->lex_str.length-= 3; // Don't count b' and last ' - lex->yytoklen-= 3; + lip->yytoklen-= 3; return (BIN_NUM); case MY_LEX_CMP_OP: // Incomplete comparison operator if (state_map[yyPeek()] == MY_LEX_CMP_OP || state_map[yyPeek()] == MY_LEX_LONG_CMP_OP) yySkip(); - if ((tokval = find_keyword(lex,(uint) (lex->ptr - lex->tok_start),0))) + if ((tokval = find_keyword(lip, (uint) (lip->ptr - lip->tok_start),0))) { - lex->next_state= MY_LEX_START; // Allow signed numbers + lip->next_state= MY_LEX_START; // Allow signed numbers return(tokval); } state = MY_LEX_CHAR; // Something fishy found @@ -907,9 +926,9 @@ int MYSQLlex(void *arg, void *yythd) if (state_map[yyPeek()] == MY_LEX_CMP_OP) yySkip(); } - if ((tokval = find_keyword(lex,(uint) (lex->ptr - lex->tok_start),0))) + if ((tokval = find_keyword(lip, (uint) (lip->ptr - lip->tok_start),0))) { - lex->next_state= MY_LEX_START; // Found long op + lip->next_state= MY_LEX_START; // Found long op return(tokval); } state = MY_LEX_CHAR; // Something fishy found @@ -922,24 +941,24 @@ int MYSQLlex(void *arg, void *yythd) break; } yySkip(); - tokval = find_keyword(lex,2,0); // Is a bool operator - lex->next_state= MY_LEX_START; // Allow signed numbers + tokval = find_keyword(lip,2,0); // Is a bool operator + lip->next_state= MY_LEX_START; // Allow signed numbers return(tokval); case MY_LEX_STRING_OR_DELIMITER: - if (((THD *) yythd)->variables.sql_mode & MODE_ANSI_QUOTES) + if (thd->variables.sql_mode & MODE_ANSI_QUOTES) { state= MY_LEX_USER_VARIABLE_DELIMITER; break; } /* " used for strings */ case MY_LEX_STRING: // Incomplete text string - if (!(yylval->lex_str.str = get_text(lex))) + if (!(yylval->lex_str.str = get_text(lip))) { state= MY_LEX_CHAR; // Read char by char break; } - yylval->lex_str.length=lex->yytoklen; + yylval->lex_str.length=lip->yytoklen; return(TEXT_STRING); case MY_LEX_COMMENT: // Comment @@ -963,7 +982,7 @@ int MYSQLlex(void *arg, void *yythd) state=MY_LEX_START; if (my_isdigit(cs,yyPeek())) { // Version number - version=strtol((char*) lex->ptr,(char**) &lex->ptr,10); + version=strtol((char*) lip->ptr,(char**) &lip->ptr,10); } if (version <= MYSQL_VERSION_ID) { @@ -971,13 +990,13 @@ int MYSQLlex(void *arg, void *yythd) break; } } - while (lex->ptr != lex->end_of_query && + while (lip->ptr != lip->end_of_query && ((c=yyGet()) != '*' || yyPeek() != '/')) { if (c == '\n') - lex->yylineno++; + lip->yylineno++; } - if (lex->ptr != lex->end_of_query) + if (lip->ptr != lip->end_of_query) yySkip(); // remove last '/' state = MY_LEX_START; // Try again break; @@ -1002,14 +1021,13 @@ int MYSQLlex(void *arg, void *yythd) case MY_LEX_SEMICOLON: // optional line terminator if (yyPeek()) { - THD* thd= (THD*)yythd; if ((thd->client_capabilities & CLIENT_MULTI_STATEMENTS) && !lex->stmt_prepare_mode) { lex->safe_to_cache_query= 0; - lex->found_semicolon=(char*) lex->ptr; + lip->found_semicolon= lip->ptr; thd->server_status|= SERVER_MORE_RESULTS_EXISTS; - lex->next_state= MY_LEX_END; + lip->next_state= MY_LEX_END; return (END_OF_INPUT); } state= MY_LEX_CHAR; // Return ';' @@ -1017,15 +1035,15 @@ int MYSQLlex(void *arg, void *yythd) } /* fall true */ case MY_LEX_EOL: - if (lex->ptr >= lex->end_of_query) + if (lip->ptr >= lip->end_of_query) { - lex->next_state=MY_LEX_END; // Mark for next loop + lip->next_state=MY_LEX_END; // Mark for next loop return(END_OF_INPUT); } state=MY_LEX_CHAR; break; case MY_LEX_END: - lex->next_state=MY_LEX_END; + lip->next_state=MY_LEX_END; return(0); // We found end of input last time /* Actually real shouldn't start with . but allow them anyhow */ @@ -1045,26 +1063,26 @@ int MYSQLlex(void *arg, void *yythd) case MY_LEX_STRING_OR_DELIMITER: break; case MY_LEX_USER_END: - lex->next_state=MY_LEX_SYSTEM_VAR; + lip->next_state=MY_LEX_SYSTEM_VAR; break; default: - lex->next_state=MY_LEX_HOSTNAME; + lip->next_state=MY_LEX_HOSTNAME; break; } - yylval->lex_str.str=(char*) lex->ptr; + yylval->lex_str.str=(char*) lip->ptr; yylval->lex_str.length=1; return((int) '@'); case MY_LEX_HOSTNAME: // end '@' of user@hostname for (c=yyGet() ; my_isalnum(cs,c) || c == '.' || c == '_' || c == '$'; c= yyGet()) ; - yylval->lex_str=get_token(lex,yyLength()); + yylval->lex_str=get_token(lip, yyLength()); return(LEX_HOSTNAME); case MY_LEX_SYSTEM_VAR: - yylval->lex_str.str=(char*) lex->ptr; + yylval->lex_str.str=(char*) lip->ptr; yylval->lex_str.length=1; yySkip(); // Skip '@' - lex->next_state= (state_map[yyPeek()] == + lip->next_state= (state_map[yyPeek()] == MY_LEX_USER_VARIABLE_DELIMITER ? MY_LEX_OPERATOR_OR_IDENT : MY_LEX_IDENT_OR_KEYWORD); @@ -1081,16 +1099,16 @@ int MYSQLlex(void *arg, void *yythd) result_state= result_state & 0x80 ? IDENT_QUOTED : IDENT; if (c == '.') - lex->next_state=MY_LEX_IDENT_SEP; - length= (uint) (lex->ptr - lex->tok_start)-1; + lip->next_state=MY_LEX_IDENT_SEP; + length= (uint) (lip->ptr - lip->tok_start)-1; if (length == 0) return(ABORT_SYM); // Names must be nonempty. - if ((tokval= find_keyword(lex,length,0))) + if ((tokval= find_keyword(lip, length,0))) { yyUnget(); // Put back 'c' return(tokval); // Was keyword } - yylval->lex_str=get_token(lex,length); + yylval->lex_str=get_token(lip, length); return(result_state); } } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 1175776ffd3..278a59fe1ac 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -543,7 +543,7 @@ public: void set_thd(THD *thd_arg) { thd= thd_arg; } inline bool is_union (); - friend void lex_start(THD *thd, const char *buf, uint length); + friend void lex_start(THD *thd); friend int subselect_union_engine::exec(); List *get_unit_column_types(); @@ -744,7 +744,7 @@ public: void cut_subtree() { slave= 0; } bool test_limit(); - friend void lex_start(THD *thd, const char *buf, uint length); + friend void lex_start(THD *thd); st_select_lex() : n_sum_items(0), n_child_sum_items(0) {} void make_empty_select() { @@ -992,23 +992,67 @@ struct st_parsing_options }; +/** + This class represents the character input stream consumed during + lexical analysis. +*/ +class Lex_input_stream +{ +public: + Lex_input_stream(THD *thd, const char* buff, unsigned int length); + ~Lex_input_stream(); + + /** Current thread. */ + THD *m_thd; + + /** Current line number. */ + uint yylineno; + + /** Length of the last token parsed. */ + uint yytoklen; + + /** Interface with bison, value of the last token parsed. */ + LEX_YYSTYPE yylval; + + /** Pointer to the current position in the input stream. */ + const char* ptr; + + /** Starting position of the last token parsed. */ + const char* tok_start; + + /** Ending position of the last token parsed. */ + const char* tok_end; + + /** End of the query text in the input stream. */ + const char* end_of_query; + + /** Starting position of the previous token parsed. */ + const char* tok_start_prev; + + /** Begining of the query text in the input stream. */ + const char* buf; + + /** Current state of the lexical analyser. */ + enum my_lex_states next_state; + + /** Position of ';' in the stream, to delimit multiple queries. */ + const char* found_semicolon; + + /** SQL_MODE = IGNORE_SPACE. */ + bool ignore_space; +}; + + /* The state of the lex parsing. This is saved in the THD struct */ typedef struct st_lex : public Query_tables_list { - uint yylineno,yytoklen; /* Simulate lex */ - LEX_YYSTYPE yylval; SELECT_LEX_UNIT unit; /* most upper unit */ SELECT_LEX select_lex; /* first SELECT_LEX */ /* current SELECT_LEX in parsing */ SELECT_LEX *current_select; /* list of all SELECT_LEX */ SELECT_LEX *all_selects_list; - const char *buf; /* The beginning of string, used by SPs */ - const char *ptr,*tok_start,*tok_end,*end_of_query; - - /* The value of tok_start as they were one call of MYSQLlex before */ - const char *tok_start_prev; char *length,*dec,*change; LEX_STRING name; @@ -1017,7 +1061,6 @@ typedef struct st_lex : public Query_tables_list char *backup_dir; /* For RESTORE/BACKUP */ char* to_log; /* For PURGE MASTER LOGS TO */ char* x509_subject,*x509_issuer,*ssl_cipher; - char* found_semicolon; /* For multi queries - next query */ String *wild; sql_exchange *exchange; select_result *result; @@ -1101,7 +1144,6 @@ typedef struct st_lex : public Query_tables_list thr_lock_type lock_option; enum SSL_type ssl_type; /* defined in violite.h */ - enum my_lex_states next_state; enum enum_duplicates duplicates; enum enum_tx_isolation tx_isolation; enum enum_ha_read_modes ha_read_mode; @@ -1133,7 +1175,7 @@ typedef struct st_lex : public Query_tables_list uint8 create_view_algorithm; uint8 create_view_check; bool drop_if_exists, drop_temporary, local_file, one_shot_set; - bool in_comment, ignore_space, verbose, no_write_to_binlog; + bool in_comment, verbose, no_write_to_binlog; bool tx_chain, tx_release; /* Special JOIN::prepare mode: changing of query is prohibited. @@ -1210,7 +1252,8 @@ typedef struct st_lex : public Query_tables_list Pointers to part of LOAD DATA statement that should be rewritten during replication ("LOCAL 'filename' REPLACE INTO" part). */ - const char *fname_start, *fname_end; + const char *fname_start; + const char *fname_end; /* Reference to a struct that contains information in various commands @@ -1327,7 +1370,7 @@ struct st_lex_local: public st_lex extern void lex_init(void); extern void lex_free(void); -extern void lex_start(THD *thd, const char *buf, uint length); +extern void lex_start(THD *thd); extern void lex_end(LEX *lex); extern int MYSQLlex(void *arg, void *yythd); extern const char *skip_rear_comments(const char *ubegin, const char *uend); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index df2ac4d72fa..d2f9d31a495 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -300,6 +300,7 @@ pthread_handler_t handle_bootstrap(void *arg) THD *thd=(THD*) arg; FILE *file=bootstrap_file; char *buff; + const char* found_semicolon= NULL; /* The following must be called before DBUG_ENTER */ thd->thread_stack= (char*) &thd; @@ -375,7 +376,7 @@ pthread_handler_t handle_bootstrap(void *arg) */ thd->query_id=next_query_id(); thd->set_time(); - mysql_parse(thd,thd->query,length); + mysql_parse(thd, thd->query, length, & found_semicolon); close_thread_tables(thd); // Free tables if (thd->is_fatal_error) @@ -889,17 +890,19 @@ bool dispatch_command(enum enum_server_command command, THD *thd, char *packet_end= thd->query + thd->query_length; /* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */ const char *format= "%.*b"; + const char* found_semicolon= NULL; + general_log_print(thd, command, format, thd->query_length, thd->query); DBUG_PRINT("query",("%-.4096s",thd->query)); if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(),QUERY_PRIOR); - mysql_parse(thd,thd->query, thd->query_length); + mysql_parse(thd, thd->query, thd->query_length, & found_semicolon); - while (!thd->killed && thd->lex->found_semicolon && !thd->net.report_error) + while (!thd->killed && found_semicolon && !thd->net.report_error) { - char *next_packet= thd->lex->found_semicolon; + char *next_packet= (char*) found_semicolon; net->no_send_error= 0; /* Multiple queries exits, execute them individually @@ -924,7 +927,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->set_time(); /* Reset the query start time. */ /* TODO: set thd->lex->sql_command to SQLCOM_END here */ VOID(pthread_mutex_unlock(&LOCK_thread_count)); - mysql_parse(thd, next_packet, length); + mysql_parse(thd, next_packet, length, & found_semicolon); } if (!(specialflag & SPECIAL_NO_PRIOR)) @@ -946,7 +949,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, uint dummy; /* used as fields initializator */ - lex_start(thd, 0, 0); + lex_start(thd); statistic_increment(thd->status_var.com_stat[SQLCOM_SHOW_FIELDS], &LOCK_status); @@ -985,7 +988,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; /* init structures for VIEW processing */ table_list.select_lex= &(thd->lex->select_lex); - mysql_init_query(thd, "", 0); + + lex_start(thd); + mysql_reset_thd_for_next_command(thd); + thd->lex-> select_lex.table_list.link_in_list((byte*) &table_list, (byte**) &table_list.next_local); @@ -5038,20 +5044,6 @@ bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize) } -/**************************************************************************** - Initialize global thd variables needed for query -****************************************************************************/ - -void -mysql_init_query(THD *thd, const char *buf, uint length) -{ - DBUG_ENTER("mysql_init_query"); - lex_start(thd, buf, length); - mysql_reset_thd_for_next_command(thd); - DBUG_VOID_RETURN; -} - - /* Reset THD part responsible for command processing state. @@ -5263,22 +5255,55 @@ void mysql_init_multi_delete(LEX *lex) mysql_test_parse_for_slave() in this same file. */ -void mysql_parse(THD *thd, char *inBuf, uint length) +/** + Parse a query. + @param thd Current thread + @param inBuf Begining of the query text + @param length Length of the query text + @param [out] semicolon For multi queries, position of the character of + the next query in the query text. +*/ + +void mysql_parse(THD *thd, const char *inBuf, uint length, + const char ** found_semicolon) { DBUG_ENTER("mysql_parse"); DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on();); - mysql_init_query(thd, inBuf, length); + /* + Warning. + The purpose of query_cache_send_result_to_client() is to lookup the + query in the query cache first, to avoid parsing and executing it. + So, the natural implementation would be to: + - first, call query_cache_send_result_to_client, + - second, if caching failed, initialise the lexical and syntactic parser. + The problem is that the query cache depends on a clean initialization + of (among others) lex->safe_to_cache_query and thd->server_status, + which are reset respectively in + - lex_start() + - mysql_reset_thd_for_next_command() + So, initializing the lexical analyser *before* using the query cache + is required for the cache to work properly. + FIXME: cleanup the dependencies in the code to simplify this. + */ + lex_start(thd); + mysql_reset_thd_for_next_command(thd); - if (query_cache_send_result_to_client(thd, inBuf, length) <= 0) + if (query_cache_send_result_to_client(thd, (char*) inBuf, length) <= 0) { LEX *lex= thd->lex; - + sp_cache_flush_obsolete(&thd->sp_proc_cache); sp_cache_flush_obsolete(&thd->sp_func_cache); - - if (!MYSQLparse((void *)thd) && ! thd->is_fatal_error) + + Lex_input_stream lip(thd, inBuf, length); + thd->m_lip= &lip; + + int err= MYSQLparse(thd); + *found_semicolon= lip.found_semicolon; + + if (!err && ! thd->is_fatal_error) { #ifndef NO_EMBEDDED_ACCESS_CHECKS if (mqh_used && thd->user_connect && @@ -5301,8 +5326,8 @@ void mysql_parse(THD *thd, char *inBuf, uint length) PROCESSLIST. Note that we don't need LOCK_thread_count to modify query_length. */ - if (lex->found_semicolon && - (thd->query_length= (ulong)(lex->found_semicolon - thd->query))) + if (lip.found_semicolon && + (thd->query_length= (ulong)(lip.found_semicolon - thd->query))) thd->query_length--; /* Actually execute the query */ mysql_execute_command(thd); @@ -5329,6 +5354,12 @@ void mysql_parse(THD *thd, char *inBuf, uint length) thd->cleanup_after_query(); DBUG_ASSERT(thd->change_list.is_empty()); } + else + { + /* There are no multi queries in the cache. */ + *found_semicolon= NULL; + } + DBUG_VOID_RETURN; } @@ -5349,8 +5380,13 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) bool error= 0; DBUG_ENTER("mysql_test_parse_for_slave"); - mysql_init_query(thd, inBuf, length); - if (!MYSQLparse((void*) thd) && ! thd->is_fatal_error && + Lex_input_stream lip(thd, inBuf, length); + thd->m_lip= &lip; + lex_start(thd); + mysql_reset_thd_for_next_command(thd); + int err= MYSQLparse((void*) thd); + + if (!err && ! thd->is_fatal_error && all_tables_not_ok(thd,(TABLE_LIST*) lex->select_lex.table_list.first)) error= 1; /* Ignore question */ thd->end_statement(); @@ -6401,8 +6437,9 @@ bool check_simple_select() if (lex->current_select != &lex->select_lex) { char command[80]; - strmake(command, lex->yylval->symbol.str, - min(lex->yylval->symbol.length, sizeof(command)-1)); + Lex_input_stream *lip= thd->m_lip; + strmake(command, lip->yylval->symbol.str, + min(lip->yylval->symbol.length, sizeof(command)-1)); my_error(ER_CANT_USE_OPTION_HERE, MYF(0), command); return 1; } diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index d445c8bfbe0..47260b945fc 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3718,7 +3718,11 @@ bool mysql_unpack_partition(THD *thd, thd->lex= &lex; thd->variables.character_set_client= system_charset_info; - lex_start(thd, part_buf, part_info_len); + + Lex_input_stream lip(thd, part_buf, part_info_len); + thd->m_lip= &lip; + + lex_start(thd); /* We need to use the current SELECT_LEX since I need to keep the Name_resolution_context object which is referenced from the diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 31a6c7af04a..ca1b29ea57d 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2850,10 +2850,14 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) old_stmt_arena= thd->stmt_arena; thd->stmt_arena= this; - lex_start(thd, thd->query, thd->query_length); - lex->stmt_prepare_mode= TRUE; - error= MYSQLparse((void *)thd) || thd->is_fatal_error || + Lex_input_stream lip(thd, thd->query, thd->query_length); + thd->m_lip= &lip; + lex_start(thd); + lex->stmt_prepare_mode= TRUE; + int err= MYSQLparse((void *)thd); + + error= err || thd->is_fatal_error || thd->net.report_error || init_param_array(this); /* diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 7b4deba527a..89ac444efa9 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -976,10 +976,14 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db, LEX_STRING *trg_definer= it_definer++; thd->variables.sql_mode= (ulong)*trg_sql_mode; - lex_start(thd, trg_create_str->str, trg_create_str->length); - thd->spcont= 0; - if (MYSQLparse((void *)thd) || thd->is_fatal_error) + Lex_input_stream lip(thd, trg_create_str->str, trg_create_str->length); + thd->m_lip= &lip; + lex_start(thd); + thd->spcont= 0; + int err= MYSQLparse((void *)thd); + + if (err || thd->is_fatal_error) { /* Currently sphead is always deleted in case of a parse error */ DBUG_ASSERT(lex.sphead == 0); diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 453cbbc091e..5eaac8acc77 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -985,10 +985,14 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, now Lex placed in statement memory */ table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local; - lex_start(thd, table->query.str, table->query.length); - view_select= &lex->select_lex; - view_select->select_number= ++thd->select_number; + { + Lex_input_stream lip(thd, table->query.str, table->query.length); + thd->m_lip= &lip; + lex_start(thd); + view_select= &lex->select_lex; + view_select->select_number= ++thd->select_number; + ulong save_mode= thd->variables.sql_mode; /* switch off modes which can prevent normal parsing of VIEW - MODE_REAL_AS_FLOAT affect only CREATE TABLE parsing diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 0c7d2fc2187..61d78ae831a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -104,12 +104,13 @@ const LEX_STRING null_lex_str={0,0}; void my_parse_error(const char *s) { THD *thd= current_thd; + Lex_input_stream *lip= thd->m_lip; - char *yytext= (char*) thd->lex->tok_start; + const char *yytext= lip->tok_start; /* Push an error into the error stack */ my_printf_error(ER_PARSE_ERROR, ER(ER_PARSE_ERROR), MYF(0), s, - (yytext ? (char*) yytext : ""), - thd->lex->yylineno); + (yytext ? yytext : ""), + lip->yylineno); } /** @@ -1837,7 +1838,9 @@ opt_ev_comment: /* empty */ { $$= 0; } ev_sql_stmt: { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; /* This stops the following : @@ -1874,22 +1877,23 @@ ev_sql_stmt: bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->ptr; + lex->sphead->m_body_begin= lip->ptr; - Lex->event_parse_data->body_begin= lex->ptr; + lex->event_parse_data->body_begin= lip->ptr; } ev_sql_stmt_inner { - LEX *lex=Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; /* return back to the original memory root ASAP */ - lex->sphead->init_strings(YYTHD, lex); - lex->sphead->restore_thd_mem_root(YYTHD); + lex->sphead->init_strings(thd, lex); + lex->sphead->restore_thd_mem_root(thd); lex->sp_chistics.suid= SP_IS_SUID; //always the definer! - Lex->event_parse_data->init_body(YYTHD); + lex->event_parse_data->init_body(thd); } ; @@ -1983,7 +1987,9 @@ create_function_tail: } | '(' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_head *sp; /* @@ -2003,9 +2009,9 @@ create_function_tail: } /* Order is important here: new - reset - init */ sp= new sp_head(); - sp->reset_thd_mem_root(YYTHD); + sp->reset_thd_mem_root(thd); sp->init(lex); - sp->init_sp_name(YYTHD, lex->spname); + sp->init_sp_name(thd, lex->spname); sp->m_type= TYPE_ENUM_FUNCTION; lex->sphead= sp; @@ -2014,15 +2020,17 @@ create_function_tail: stored procedure, otherwise yylex will chop it into pieces at each ';'. */ - $$= YYTHD->client_capabilities & CLIENT_MULTI_QUERIES; - YYTHD->client_capabilities &= ~CLIENT_MULTI_QUERIES; - lex->sphead->m_param_begin= lex->tok_start+1; + $$= thd->client_capabilities & CLIENT_MULTI_QUERIES; + thd->client_capabilities &= ~CLIENT_MULTI_QUERIES; + lex->sphead->m_param_begin= lip->tok_start+1; } sp_fdparam_list ')' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->m_param_end= lex->tok_start; + lex->sphead->m_param_end= lip->tok_start; } RETURNS_SYM { @@ -2057,10 +2065,12 @@ create_function_tail: } sp_c_chistics { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->tok_start; + lex->sphead->m_body_begin= lip->tok_start; } sp_proc_stmt { @@ -2666,14 +2676,18 @@ sp_proc_stmt_if: sp_proc_stmt_statement: { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->reset_lex(YYTHD); - lex->sphead->m_tmp_query= lex->tok_start; + lex->sphead->reset_lex(thd); + lex->sphead->m_tmp_query= lip->tok_start; } statement { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_head *sp= lex->sphead; sp->m_flags|= sp_get_flags_for_command(lex); @@ -2700,15 +2714,15 @@ sp_proc_stmt_statement: lex->tok_end otherwise. */ if (yychar == YYEMPTY) - i->m_query.length= lex->ptr - sp->m_tmp_query; + i->m_query.length= lip->ptr - sp->m_tmp_query; else - i->m_query.length= lex->tok_end - sp->m_tmp_query; - i->m_query.str= strmake_root(YYTHD->mem_root, + i->m_query.length= lip->tok_end - sp->m_tmp_query; + i->m_query.str= strmake_root(thd->mem_root, sp->m_tmp_query, i->m_query.length); sp->add_instr(i); } - sp->restore_lex(YYTHD); + sp->restore_lex(thd); } ; @@ -6212,10 +6226,18 @@ select_item: }; remember_name: - { $$=(char*) Lex->tok_start; }; + { + THD *thd= YYTHD; + Lex_input_stream *lip= thd->m_lip; + $$= (char*) lip->tok_start; + }; remember_end: - { $$=(char*) Lex->tok_end; }; + { + THD *thd= YYTHD; + Lex_input_stream *lip= thd->m_lip; + $$=(char*) lip->tok_end; + }; select_item2: table_wild { $$=$1; } /* table.* */ @@ -7983,12 +8005,14 @@ procedure_list2: procedure_item: remember_name expr { - LEX *lex= Lex; - if (add_proc_to_list(lex->thd, $2)) + THD *thd= YYTHD; + Lex_input_stream *lip= thd->m_lip; + + if (add_proc_to_list(thd, $2)) MYSQL_YYABORT; if (!$2->name) - $2->set_name($1,(uint) ((char*) lex->tok_end - $1), - YYTHD->charset()); + $2->set_name($1,(uint) ((char*) lip->tok_end - $1), + thd->charset()); } ; @@ -9078,13 +9102,16 @@ use: USE_SYM ident load: LOAD DATA_SYM { - LEX *lex=Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; + if (lex->sphead) { my_error(ER_SP_BADSTATEMENT, MYF(0), "LOAD DATA"); MYSQL_YYABORT; } - lex->fname_start= lex->ptr; + lex->fname_start= lip->ptr; } load_data {} @@ -9118,8 +9145,10 @@ load_data: } opt_duplicate INTO { - LEX *lex=Lex; - lex->fname_end= lex->ptr; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; + lex->fname_end= lip->ptr; } TABLE_SYM table_ident { @@ -9300,14 +9329,15 @@ param_marker: PARAM_MARKER { THD *thd= YYTHD; - LEX *lex= thd->lex; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; Item_param *item; if (! lex->parsing_options.allows_variable) { my_error(ER_VIEW_SELECT_VARIABLE, MYF(0)); MYSQL_YYABORT; } - item= new Item_param((uint) (lex->tok_start - thd->query)); + item= new Item_param((uint) (lip->tok_start - thd->query)); if (!($$= item) || lex->param_list.push_back(item)) { my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); @@ -9330,8 +9360,11 @@ signed_literal: literal: text_literal { $$ = $1; } | NUM_literal { $$ = $1; } - | NULL_SYM { $$ = new Item_null(); - Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;} + | NULL_SYM + { + $$ = new Item_null(); + YYTHD->m_lip->next_state=MY_LEX_OPERATOR_OR_IDENT; + } | FALSE_SYM { $$= new Item_int((char*) "FALSE",0,1); } | TRUE_SYM { $$= new Item_int((char*) "TRUE",1,1); } | HEX_NUM { $$ = new Item_hex_string($1.str, $1.length);} @@ -9421,8 +9454,10 @@ order_ident: simple_ident: ident { + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_variable_t *spv; - LEX *lex = Lex; sp_pcontext *spc = lex->spcont; if (spc && (spv = spc->find_variable(&$1))) { @@ -9435,7 +9470,7 @@ simple_ident: Item_splocal *splocal; splocal= new Item_splocal($1, spv->offset, spv->type, - lex->tok_start_prev - + lip->tok_start_prev - lex->sphead->m_tmp_query); #ifndef DBUG_OFF if (splocal) @@ -10085,7 +10120,11 @@ option_value_list: option_type_value: { - if (Lex->sphead) + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; + + if (lex->sphead) { /* If we are in SP we want have own LEX for each assignment. @@ -10097,9 +10136,8 @@ option_type_value: QQ: May be we should simply prohibit group assignments in SP? */ - LEX *lex; - Lex->sphead->reset_lex(YYTHD); - lex= Lex; + lex->sphead->reset_lex(thd); + lex= thd->lex; /* Set new LEX as if we at start of set rule. */ lex->sql_command= SQLCOM_SET_OPTION; @@ -10107,12 +10145,14 @@ option_type_value: lex->option_type=OPT_SESSION; lex->var_list.empty(); lex->one_shot_set= 0; - lex->sphead->m_tmp_query= lex->tok_start; + lex->sphead->m_tmp_query= lip->tok_start; } } ext_option_value { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; if (lex->sphead) { @@ -10134,15 +10174,15 @@ option_type_value: /* Extract the query statement from the tokenizer. The - end is either lex->ptr, if there was no lookahead, - lex->tok_end otherwise. + end is either lip->ptr, if there was no lookahead, + lip->tok_end otherwise. */ if (yychar == YYEMPTY) - qbuff.length= lex->ptr - sp->m_tmp_query; + qbuff.length= lip->ptr - sp->m_tmp_query; else - qbuff.length= lex->tok_end - sp->m_tmp_query; + qbuff.length= lip->tok_end - sp->m_tmp_query; - if (!(qbuff.str= alloc_root(YYTHD->mem_root, qbuff.length + 5))) + if (!(qbuff.str= alloc_root(thd->mem_root, qbuff.length + 5))) MYSQL_YYABORT; strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query, @@ -10151,7 +10191,7 @@ option_type_value: i->m_query= qbuff; sp->add_instr(i); } - lex->sphead->restore_lex(YYTHD); + lex->sphead->restore_lex(thd); } }; @@ -11400,7 +11440,9 @@ trigger_tail: TRIGGER_SYM remember_name sp_name trg_action_time trg_event ON remember_name table_ident FOR_SYM remember_name EACH_SYM ROW_SYM { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; sp_head *sp; if (lex->sphead) @@ -11411,9 +11453,9 @@ trigger_tail: if (!(sp= new sp_head())) MYSQL_YYABORT; - sp->reset_thd_mem_root(YYTHD); + sp->reset_thd_mem_root(thd); sp->init(lex); - sp->init_sp_name(YYTHD, $3); + sp->init_sp_name(thd, $3); lex->stmt_definition_begin= $2; lex->ident.str= $7; lex->ident.length= $10 - $7; @@ -11426,12 +11468,12 @@ trigger_tail: stored procedure, otherwise yylex will chop it into pieces at each ';'. */ - $$= YYTHD->client_capabilities & CLIENT_MULTI_QUERIES; - YYTHD->client_capabilities &= ~CLIENT_MULTI_QUERIES; + $$= thd->client_capabilities & CLIENT_MULTI_QUERIES; + thd->client_capabilities &= ~CLIENT_MULTI_QUERIES; bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->ptr; + lex->sphead->m_body_begin= lip->ptr; while (my_isspace(system_charset_info, lex->sphead->m_body_begin[0])) ++lex->sphead->m_body_begin; } @@ -11510,24 +11552,30 @@ sp_tail: } '(' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->m_param_begin= lex->tok_start+1; + lex->sphead->m_param_begin= lip->tok_start+1; } sp_pdparam_list ')' { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; - lex->sphead->m_param_end= lex->tok_start; + lex->sphead->m_param_end= lip->tok_start; bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); } sp_c_chistics { - LEX *lex= Lex; + THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= thd->m_lip; lex->sphead->m_chistics= &lex->sp_chistics; - lex->sphead->m_body_begin= lex->tok_start; + lex->sphead->m_body_begin= lip->tok_start; } sp_proc_stmt { From 6cc76eb61cb190d5ec410ffe3bd2e064e7951e44 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Apr 2007 21:26:04 +0200 Subject: [PATCH 028/137] fixed: memleak in --help, sigsegv on shutdown Ingo's patch: WL#2936 - Falcon & MySQL plugin interface: server variables Added initialization for plugin string variables with their default values. Added deallocation of string values before a plugin and its variables is deleted. Added examples to plugin_example mysys/my_getopt.c: Ingo's patch: WL#2936 - Falcon & MySQL plugin interface: server variables Added initialization for string options. Since string variables do often have their default value assigned already, assign the default value only if the variable value is NULL. plugin/fulltext/plugin_example.c: Ingo's patch: WL#2936 - Falcon & MySQL plugin interface: server variables Added examples for thread variables, which have a SESSION and a GLOBAL value. sql/mysqld.cc: removed second fix_paths() in --help output (memory leak). removed invalid string defaul values (binlog_format) don't hide the error message in the help text sql/sql_plugin.cc: don't do plugin_dl_del for built-in plugins (sigsegv). Ingo's patch: WL#2936 - Falcon & MySQL plugin interface: server variables Clearing newly allocated variable value space. This is important for string variables. They are initialized to their default value only if their initial value is NULL. Setting default values for strings. Added a function to free global value space for string variables. Call the function before deleting a plugin and its variables. --- mysys/my_getopt.c | 24 +++++++++++ plugin/fulltext/plugin_example.c | 16 ++++++- sql/mysqld.cc | 8 ++-- sql/sql_plugin.cc | 71 ++++++++++++++++++++++++++++---- 4 files changed, 105 insertions(+), 14 deletions(-) diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index dd2663970ee..3c67c724a9a 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -813,6 +813,7 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp) static void init_one_value(const struct my_option *option, gptr *variable, longlong value) { + DBUG_ENTER("init_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { case GET_BOOL: *((my_bool*) variable)= (my_bool) value; @@ -837,9 +838,29 @@ static void init_one_value(const struct my_option *option, gptr *variable, case GET_SET: *((ulonglong*) variable)= (ulonglong) value; break; + case GET_STR: + /* + Do not clear variable value if it has no default value. + The default value may already be set. + */ + if ((char*) value) + *((char**) variable)= (char*) value; + break; + case GET_STR_ALLOC: + /* + Do not clear variable value if it has no default value. + The default value may already be set. + */ + if ((char*) value) + { + my_free((*(char**) variable), MYF(MY_ALLOW_ZERO_PTR)); + *((char**) variable)= my_strdup((char*) value, MYF(MY_WME)); + } + break; default: /* dummy default to avoid compiler warnings */ break; } + DBUG_VOID_RETURN; } @@ -858,9 +879,11 @@ static void init_one_value(const struct my_option *option, gptr *variable, static void init_variables(const struct my_option *options) { + DBUG_ENTER("init_variables"); for (; options->name; options++) { gptr *variable; + DBUG_PRINT("options", ("name: '%s'", options->name)); /* We must set u_max_value first as for some variables options->u_max_value == options->value and in this case we want to @@ -874,6 +897,7 @@ static void init_variables(const struct my_option *options) (variable= (*getopt_get_addr)("", 0, options))) init_one_value(options, variable, options->def_value); } + DBUG_VOID_RETURN; } diff --git a/plugin/fulltext/plugin_example.c b/plugin/fulltext/plugin_example.c index 67c16a91268..70022da2cc4 100644 --- a/plugin/fulltext/plugin_example.c +++ b/plugin/fulltext/plugin_example.c @@ -225,16 +225,28 @@ static char *sysvar_two_value; static MYSQL_SYSVAR_LONG(simple_sysvar_one, sysvar_one_value, PLUGIN_VAR_RQCMDARG, "Simple fulltext parser example system variable number one. Give a number.", - NULL, NULL, 100L, 10L, ~0L, 0); + NULL, NULL, 77L, 7L, 777L, 0); static MYSQL_SYSVAR_STR(simple_sysvar_two, sysvar_two_value, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, "Simple fulltext parser example system variable number two. Give a string.", - NULL, NULL, NULL); + NULL, NULL, "simple sysvar two default"); + +static MYSQL_THDVAR_LONG(simple_thdvar_one, + PLUGIN_VAR_RQCMDARG, + "Simple fulltext parser example thread variable number one. Give a number.", + NULL, NULL, 88L, 8L, 888L, 0); + +static MYSQL_THDVAR_STR(simple_thdvar_two, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, + "Simple fulltext parser example thread variable number two. Give a string.", + NULL, NULL, "simple thdvar two default"); static struct st_mysql_sys_var* simple_system_variables[]= { MYSQL_SYSVAR(simple_sysvar_one), MYSQL_SYSVAR(simple_sysvar_two), + MYSQL_SYSVAR(simple_thdvar_one), + MYSQL_SYSVAR(simple_thdvar_two), NULL }; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9fa726734c8..ff25b78c1ca 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1114,10 +1114,10 @@ void unireg_end(void) extern "C" void unireg_abort(int exit_code) { DBUG_ENTER("unireg_abort"); - if (opt_help) - usage(); if (exit_code) sql_print_error("Aborting\n"); + else if (opt_help) + usage(); clean_up(exit_code || !opt_bootstrap); /* purecov: inspected */ DBUG_PRINT("quit",("done with cleanup in unireg_abort")); wait_for_signal_thread_to_end(); @@ -5056,8 +5056,7 @@ struct my_option my_long_options[] = " to 'row' and back implicitly per each query accessing a NDB table." #endif ,(gptr*) &opt_binlog_format, (gptr*) &opt_binlog_format, - 0, GET_STR, REQUIRED_ARG, BINLOG_FORMAT_MIXED, BINLOG_FORMAT_STMT, - BINLOG_FORMAT_MIXED, 0, 0, 0}, + 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"binlog-do-db", OPT_BINLOG_DO_DB, "Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -6888,7 +6887,6 @@ Starts the MySQL database server\n"); #endif print_defaults(MYSQL_CONFIG_NAME,load_default_groups); puts(""); - fix_paths(); set_ports(); /* Print out all the options including plugin supplied options */ diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 016e7e2b3b4..6bb2d998720 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -196,6 +196,7 @@ static bool register_builtin(struct st_mysql_plugin *, struct st_plugin_int *, struct st_plugin_int **); static void unlock_variables(THD *thd, struct system_variables *vars); static void cleanup_variables(THD *thd, struct system_variables *vars); +static void plugin_vars_free_values(sys_var *vars); static void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt); #define my_intern_plugin_lock(A,B) intern_plugin_lock(A,B CALLER_INFO) @@ -829,8 +830,11 @@ static void plugin_del(struct st_plugin_int *plugin) { DBUG_ENTER("plugin_del(plugin)"); safe_mutex_assert_owner(&LOCK_plugin); + /* Free allocated strings before deleting the plugin. */ + plugin_vars_free_values(plugin->system_vars); hash_delete(&plugin_hash[plugin->plugin->type], (byte*)plugin); - plugin_dl_del(&plugin->plugin_dl->dl); + if (plugin->plugin_dl) + plugin_dl_del(&plugin->plugin_dl->dl); plugin->state= PLUGIN_IS_FREED; plugin_array_version++; rw_wrlock(&LOCK_system_variables_hash); @@ -1588,8 +1592,9 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl pthread_mutex_lock(&LOCK_plugin); rw_wrlock(&LOCK_system_variables_hash); - argv[0]= ""; /* handle_options() assumes arg0 (program name) always exists */ - argv[1]= NULL; + /* handle_options() assumes arg0 (program name) always exists */ + argv[0]= const_cast(""); // without a cast gcc emits a warning + argv[1]= 0; argc= 1; error= plugin_add(thd->mem_root, name, dl, &argc, argv, REPORT_TO_USER); rw_unlock(&LOCK_system_variables_hash); @@ -2171,6 +2176,17 @@ static st_bookmark *register_var(const char *plugin, const char *name, max_system_variables.dynamic_variables_ptr= my_realloc(max_system_variables.dynamic_variables_ptr, new_size, MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); + /* + Clear the new variable value space. This is required for string + variables. If their value is non-NULL, it must point to a valid + string. + */ + bzero(global_system_variables.dynamic_variables_ptr + + global_variables_dynamic_size, + new_size - global_variables_dynamic_size); + bzero(max_system_variables.dynamic_variables_ptr + + global_variables_dynamic_size, + new_size - global_variables_dynamic_size); global_variables_dynamic_size= new_size; } @@ -2311,6 +2327,9 @@ static void unlock_variables(THD *thd, struct system_variables *vars) /* Frees memory used by system variables + + Unlike plugin_vars_free_values() it frees all variables of all plugins, + it's used on shutdown. */ static void cleanup_variables(THD *thd, struct system_variables *vars) { @@ -2379,6 +2398,40 @@ void plugin_thdvar_cleanup(THD *thd) } +/** + @brief Free values of thread variables of a plugin. + + @detail This must be called before a plugin is deleted. Otherwise its + variables are no longer accessible and the value space is lost. Note + that only string values with PLUGIN_VAR_MEMALLOC are allocated and + must be freed. + + @param[in] vars Chain of system variables of a plugin +*/ + +static void plugin_vars_free_values(sys_var *vars) +{ + DBUG_ENTER("plugin_vars_free_values"); + + for (sys_var *var= vars; var; var= var->next) + { + sys_var_pluginvar *piv= var->cast_pluginvar(); + if (piv && + ((piv->plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR) && + (piv->plugin_var->flags & PLUGIN_VAR_MEMALLOC)) + { + /* Free the string from global_system_variables. */ + char **valptr= (char**) piv->real_value_ptr(NULL, OPT_GLOBAL); + DBUG_PRINT("plugin", ("freeing value for: '%s' addr: 0x%lx", + var->name, (long) valptr)); + my_free(*valptr, MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR)); + *valptr= NULL; + } + } + DBUG_VOID_RETURN; +} + + bool sys_var_pluginvar::check_update_type(Item_result type) { if (is_readonly()) @@ -2421,10 +2474,10 @@ SHOW_TYPE sys_var_pluginvar::show_type() byte* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) { - DBUG_ASSERT(thd); + DBUG_ASSERT(thd || (type != OPT_SESSION)); if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) { - if (type == OPT_GLOBAL) + if (type != OPT_SESSION) thd= NULL; return intern_sys_var_ptr(thd, *(int*) (plugin_var+1), false); @@ -2614,7 +2667,9 @@ static void plugin_opt_set_limits(struct my_option *options, options->def_value= *(my_bool*) ((void**)(opt + 1) + 1); break; case PLUGIN_VAR_STR: - options->var_type= GET_STR; + options->var_type= ((opt->flags & PLUGIN_VAR_MEMALLOC) ? + GET_STR_ALLOC : GET_STR); + options->def_value= (ulonglong)(intptr) *((char**) ((void**) (opt + 1) + 1)); break; /* threadlocal variables */ case PLUGIN_VAR_INT | PLUGIN_VAR_THDLOCAL: @@ -2654,7 +2709,9 @@ static void plugin_opt_set_limits(struct my_option *options, options->def_value= *(my_bool*) ((int*) (opt + 1) + 1); break; case PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL: - options->var_type= GET_STR; + options->var_type= ((opt->flags & PLUGIN_VAR_MEMALLOC) ? + GET_STR_ALLOC : GET_STR); + options->def_value= (intptr) *((char**) ((void**) (opt + 1) + 1)); break; default: DBUG_ASSERT(0); From 4cd780d22b0c2a8526683522f1ccb8d1d762bd68 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Apr 2007 14:13:34 -0700 Subject: [PATCH 029/137] mysql-test/mysql-test-run.pl provide the writable datadir for mysqld --help (for lower_case test) sql/log.h, sql/mysqld.cc make default binlog_format value to be 0 (for a hack of using GET_STR for enum to continue to work) mysql-test/mysql-test-run.pl: provide the writable datadir for mysqld --help (for lower_case test) sql/log.h: make default binlog_format value to be 0 (for a hack of using GET_STR for enum to continue to work) sql/mysqld.cc: make default binlog_format value to be 0 (for a hack of using GET_STR for enum to continue to work) --- mysql-test/mysql-test-run.pl | 4 ++-- sql/log.h | 6 +++--- sql/mysqld.cc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4306a5ade77..b4a3270294c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -666,6 +666,7 @@ sub command_line_setup () { $glob_mysql_test_dir= `cygpath -m "$glob_mysql_test_dir"`; chomp($glob_mysql_test_dir); } + $default_vardir= "$glob_mysql_test_dir/var"; # In most cases, the base directory we find everything relative to, # is the parent directory of the "mysql-test" directory. For source @@ -838,7 +839,6 @@ sub command_line_setup () { # -------------------------------------------------------------------------- # Set the "var/" directory, as it is the base for everything else # -------------------------------------------------------------------------- - $default_vardir= "$glob_mysql_test_dir/var"; if ( ! $opt_vardir ) { $opt_vardir= $default_vardir; @@ -1361,7 +1361,7 @@ sub collect_mysqld_features () { # --no-defaults and --skip-grant-tables are to avoid loading # system-wide configs and plugins # - my $list= `$exe_mysqld --no-defaults --language=$path_language --skip-grant-tables --verbose --help`; + my $list= `$exe_mysqld --no-defaults --datadir=$default_vardir --language=$path_language --skip-grant-tables --verbose --help`; foreach my $line (split('\n', $list)) { diff --git a/sql/log.h b/sql/log.h index ed0c3557d08..25bcbd6c62d 100644 --- a/sql/log.h +++ b/sql/log.h @@ -603,13 +603,13 @@ public: }; enum enum_binlog_format { - BINLOG_FORMAT_STMT= 0, // statement-based - BINLOG_FORMAT_ROW= 1, // row_based /* statement-based except for cases where only row-based can work (UUID() etc): */ - BINLOG_FORMAT_MIXED= 2, + BINLOG_FORMAT_MIXED= 0, + BINLOG_FORMAT_STMT= 1, // statement-based + BINLOG_FORMAT_ROW= 2, // row_based /* This value is last, after the end of binlog_format_typelib: it has no corresponding cell in this typelib. We use this value to be able to know if diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ff25b78c1ca..d9dff178d24 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -399,7 +399,7 @@ my_bool opt_noacl; my_bool sp_automatic_privileges= 1; ulong opt_binlog_rows_event_max_size; -const char *binlog_format_names[]= {"STATEMENT", "ROW", "MIXED", NullS}; +const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS}; TYPELIB binlog_format_typelib= { array_elements(binlog_format_names) - 1, "", binlog_format_names, NULL }; From f3bb32345517af7f4c7325f5494bebfaac284f30 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Apr 2007 23:42:22 +0200 Subject: [PATCH 030/137] WL#2936 - Falcon & MySQL plugin interface: server variables Changed back (type != OPT_SESSION) to (type == OPT_GLOBAL) --- sql/sql_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 6bb2d998720..24ccb9e0a3b 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2474,10 +2474,10 @@ SHOW_TYPE sys_var_pluginvar::show_type() byte* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) { - DBUG_ASSERT(thd || (type != OPT_SESSION)); + DBUG_ASSERT(thd || (type == OPT_GLOBAL)); if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) { - if (type != OPT_SESSION) + if (type == OPT_GLOBAL) thd= NULL; return intern_sys_var_ptr(thd, *(int*) (plugin_var+1), false); From 1700feaa0296250b10882bd421f555776614120c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 27 Apr 2007 17:14:25 -0600 Subject: [PATCH 031/137] Bug#21513 (SP having body starting with quoted label rendered unusable) Before this fix, the parser would sometime change where a token starts by altering Lex_input_string::tok_start, which later confused the code in sql_yacc.yy that needs to capture the source code of a SQL statement, like to represent the body of a stored procedure. This line of code in sql_lex.cc : case MY_LEX_USER_VARIABLE_DELIMITER: lip->tok_start= lip->ptr; // Skip first ` would ... and cause the bug reported. In general, the responsibility of sql_lex.cc is to *find* where token are in the SQL text, but is *not* to make up fake or incomplete tokens. With a quoted label like `my_label`, the token starts on the first quote. Extracting the token value should not change that (it did). With this fix, the lexical analysis has been cleaned up to not change lip->tok_start (in the case found for this bug). The functions get_token() and get_quoted_token() now have an extra parameters, used when some characters from the beginning of the token need to be skipped when extracting a token value, like when extracting 'AB' from '0xAB', for example, for a HEX_NUM token. This exposed a bad assumption in Item_hex_string and Item_bin_string, which has been fixed: The assumption was that the string given, 'AB', was in fact preceded in memory by '0x', which might be false (it can be preceded by "x'" and followed by "'" -- or not be preceded by valid memory at all) If a name is needed for Item_hex_string or Item_bin_string, the name is taken from the original and true source code ('0xAB'), and assigned in the select_item rule, instead of relying on assumptions related to how memory is used. mysql-test/r/sp.result: Lex_input_stream::tok_start must point at the real start of a token. mysql-test/t/sp.test: Lex_input_stream::tok_start must point at the real start of a token. sql/item.cc: Lex_input_stream::tok_start must point at the real start of a token. sql/sql_lex.cc: Lex_input_stream::tok_start must point at the real start of a token. sql/sql_yacc.yy: Lex_input_stream::tok_start must point at the real start of a token. --- mysql-test/r/sp.result | 7 +++++ mysql-test/t/sp.test | 11 ++++++++ sql/item.cc | 2 -- sql/sql_lex.cc | 64 ++++++++++++++++++++---------------------- sql/sql_yacc.yy | 14 +++++---- 5 files changed, 56 insertions(+), 42 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 9ba6a356db2..b5b79af031e 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6118,6 +6118,13 @@ Warning 1265 Data truncated for column 'bug5274_f1' at row 1 Warning 1265 Data truncated for column 'bug5274_f1' at row 1 DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| +drop procedure if exists proc_21513| +create procedure proc_21513()`my_label`:BEGIN END| +show create procedure proc_21513| +Procedure sql_mode Create Procedure +proc_21513 CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_21513`() +`my_label`:BEGIN END +drop procedure proc_21513| End of 5.0 tests. drop table t1,t2; CREATE TABLE t1 (a int auto_increment primary key) engine=MyISAM; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 64876ae0584..97677838d48 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7054,6 +7054,17 @@ SELECT bug5274_f2()| DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| +# +# Bug#21513 (SP having body starting with quoted label rendered unusable) +# +--disable_warnings +drop procedure if exists proc_21513| +--enable_warnings + +create procedure proc_21513()`my_label`:BEGIN END| +show create procedure proc_21513| + +drop procedure proc_21513| ### --echo End of 5.0 tests. diff --git a/sql/item.cc b/sql/item.cc index ed5bd67d096..a2a7d46edc3 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4602,7 +4602,6 @@ inline uint char_val(char X) Item_hex_string::Item_hex_string(const char *str, uint str_length) { - name=(char*) str-2; // Lex makes this start with 0x max_length=(str_length+1)/2; char *ptr=(char*) sql_alloc(max_length+1); if (!ptr) @@ -4713,7 +4712,6 @@ Item_bin_string::Item_bin_string(const char *str, uint str_length) uchar bits= 0; uint power= 1; - name= (char*) str - 2; max_length= (str_length + 7) >> 3; char *ptr= (char*) sql_alloc(max_length + 1); if (!ptr) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index ecdbb654ffd..fabd9a0e003 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -262,12 +262,12 @@ bool is_keyword(const char *name, uint len) /* make a copy of token before ptr and set yytoklen */ -static LEX_STRING get_token(Lex_input_stream *lip, uint length) +static LEX_STRING get_token(Lex_input_stream *lip, uint skip, uint length) { LEX_STRING tmp; yyUnget(); // ptr points now after last token char tmp.length=lip->yytoklen=length; - tmp.str= lip->m_thd->strmake(lip->tok_start, tmp.length); + tmp.str= lip->m_thd->strmake(lip->tok_start + skip, tmp.length); return tmp; } @@ -279,6 +279,7 @@ static LEX_STRING get_token(Lex_input_stream *lip, uint length) */ static LEX_STRING get_quoted_token(Lex_input_stream *lip, + uint skip, uint length, char quote) { LEX_STRING tmp; @@ -286,9 +287,10 @@ static LEX_STRING get_quoted_token(Lex_input_stream *lip, yyUnget(); // ptr points now after last token char tmp.length=lip->yytoklen=length; tmp.str=(char*) lip->m_thd->alloc(tmp.length+1); - for (from= (byte*) lip->tok_start, to= (byte*) tmp.str, end= to+length ; - to != end ; - ) + from= (byte*) lip->tok_start + skip; + to= (byte*) tmp.str; + end= to+length; + for ( ; to != end; ) { if ((*to++= *from++) == quote) from++; // Skip double quotes @@ -676,7 +678,7 @@ int MYSQLlex(void *arg, void *yythd) } yySkip(); // next state does a unget } - yylval->lex_str=get_token(lip, length); + yylval->lex_str=get_token(lip, 0, length); /* Note: "SELECT _bla AS 'alias'" @@ -718,7 +720,7 @@ int MYSQLlex(void *arg, void *yythd) { yySkip(); while (my_isdigit(cs,yyGet())) ; - yylval->lex_str=get_token(lip, yyLength()); + yylval->lex_str=get_token(lip, 0, yyLength()); return(FLOAT_NUM); } } @@ -730,10 +732,8 @@ int MYSQLlex(void *arg, void *yythd) while (my_isxdigit(cs,(c = yyGet()))) ; if ((lip->ptr - lip->tok_start) >= 4 && !ident_map[c]) { - yylval->lex_str=get_token(lip, yyLength()); - yylval->lex_str.str+=2; // Skip 0x - yylval->lex_str.length-=2; - lip->yytoklen-=2; + /* skip '0x' */ + yylval->lex_str=get_token(lip, 2, yyLength()-2); return (HEX_NUM); } yyUnget(); @@ -744,10 +744,8 @@ int MYSQLlex(void *arg, void *yythd) while (my_isxdigit(cs,(c = yyGet()))) ; if ((lip->ptr - lip->tok_start) >= 4 && !ident_map[c]) { - yylval->lex_str= get_token(lip, yyLength()); - yylval->lex_str.str+= 2; // Skip 0x - yylval->lex_str.length-= 2; - lip->yytoklen-= 2; + /* Skip '0b' */ + yylval->lex_str= get_token(lip, 2, yyLength()-2); return (BIN_NUM); } yyUnget(); @@ -782,14 +780,13 @@ int MYSQLlex(void *arg, void *yythd) if (c == '.' && ident_map[yyPeek()]) lip->next_state=MY_LEX_IDENT_SEP;// Next is '.' - yylval->lex_str= get_token(lip, yyLength()); + yylval->lex_str= get_token(lip, 0, yyLength()); return(result_state); case MY_LEX_USER_VARIABLE_DELIMITER: // Found quote char { uint double_quotes= 0; char quote_char= c; // Used char - lip->tok_start=lip->ptr; // Skip first ` while ((c=yyGet())) { int var_length; @@ -813,19 +810,20 @@ int MYSQLlex(void *arg, void *yythd) #endif } if (double_quotes) - yylval->lex_str=get_quoted_token(lip, yyLength() - double_quotes, + yylval->lex_str=get_quoted_token(lip, 1, + yyLength() - double_quotes -1, quote_char); else - yylval->lex_str=get_token(lip, yyLength()); + yylval->lex_str=get_token(lip, 1, yyLength() -1); if (c == quote_char) yySkip(); // Skip end ` lip->next_state= MY_LEX_START; return(IDENT_QUOTED); } - case MY_LEX_INT_OR_REAL: // Compleat int or incompleat real + case MY_LEX_INT_OR_REAL: // Complete int or incomplete real if (c != '.') { // Found complete integer number. - yylval->lex_str=get_token(lip, yyLength()); + yylval->lex_str=get_token(lip, 0, yyLength()); return int_token(yylval->lex_str.str,yylval->lex_str.length); } // fall through @@ -843,10 +841,10 @@ int MYSQLlex(void *arg, void *yythd) break; } while (my_isdigit(cs,yyGet())) ; - yylval->lex_str=get_token(lip, yyLength()); + yylval->lex_str=get_token(lip, 0, yyLength()); return(FLOAT_NUM); } - yylval->lex_str=get_token(lip, yyLength()); + yylval->lex_str=get_token(lip, 0, yyLength()); return(DECIMAL_NUM); case MY_LEX_HEX_NUMBER: // Found x'hexstring' @@ -858,10 +856,9 @@ int MYSQLlex(void *arg, void *yythd) return(ABORT_SYM); // Illegal hex constant } yyGet(); // get_token makes an unget - yylval->lex_str=get_token(lip, length); - yylval->lex_str.str+=2; // Skip x' - yylval->lex_str.length-=3; // Don't count x' and last ' - lip->yytoklen-=3; + yylval->lex_str=get_token(lip, + 2, // skip x' + length-3); // don't count x' and last ' return (HEX_NUM); case MY_LEX_BIN_NUMBER: // Found b'bin-string' @@ -871,11 +868,10 @@ int MYSQLlex(void *arg, void *yythd) if (c != '\'') return(ABORT_SYM); // Illegal hex constant yyGet(); // get_token makes an unget - yylval->lex_str= get_token(lip, length); - yylval->lex_str.str+= 2; // Skip b' - yylval->lex_str.length-= 3; // Don't count b' and last ' - lip->yytoklen-= 3; - return (BIN_NUM); + yylval->lex_str= get_token(lip, + 2, // skip b' + length-3); // don't count b' and last ' + return (BIN_NUM); case MY_LEX_CMP_OP: // Incomplete comparison operator if (state_map[yyPeek()] == MY_LEX_CMP_OP || @@ -1047,7 +1043,7 @@ int MYSQLlex(void *arg, void *yythd) for (c=yyGet() ; my_isalnum(cs,c) || c == '.' || c == '_' || c == '$'; c= yyGet()) ; - yylval->lex_str=get_token(lip, yyLength()); + yylval->lex_str=get_token(lip, 0, yyLength()); return(LEX_HOSTNAME); case MY_LEX_SYSTEM_VAR: yylval->lex_str.str=(char*) lip->ptr; @@ -1079,7 +1075,7 @@ int MYSQLlex(void *arg, void *yythd) yyUnget(); // Put back 'c' return(tokval); // Was keyword } - yylval->lex_str=get_token(lip, length); + yylval->lex_str=get_token(lip, 0, length); return(result_state); } } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 82d148c4a1e..390a991c7b6 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4439,21 +4439,23 @@ select_item_list: select_item: remember_name select_item2 remember_end select_alias { - if (add_item_to_list(YYTHD, $2)) + THD *thd= YYTHD; + DBUG_ASSERT($1 < $3); + + if (add_item_to_list(thd, $2)) MYSQL_YYABORT; if ($4.str) { $2->is_autogenerated_name= FALSE; $2->set_name($4.str, $4.length, system_charset_info); } - else if (!$2->name) { - char *str = $1; - if (str[-1] == '`') - str--; - $2->set_name(str,(uint) ($3 - str), YYTHD->charset()); + else if (!$2->name) + { + $2->set_name($1, (uint) ($3 - $1), thd->charset()); } }; + remember_name: { THD *thd= YYTHD; From deca8bd3d5a8532cc556592758211328b13719c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 28 Apr 2007 10:32:14 +0800 Subject: [PATCH 032/137] Bug#19710 revert patch because these two test cases still fail on Solaris & Power BE machines BitKeeper/deleted/.del-rpl_ndb_myisam2ndb.result: Delete: mysql-test/r/rpl_ndb_myisam2ndb.result BitKeeper/deleted/.del-rpl_ndb_innodb2ndb.result: Delete: mysql-test/r/rpl_ndb_innodb2ndb.result mysql-test/t/disabled.def: revert patch mysql-test/t/rpl_ndb_innodb2ndb-slave.opt: revert patch mysql-test/t/rpl_ndb_myisam2ndb-slave.opt: revert patch --- mysql-test/r/rpl_ndb_innodb2ndb.result | 855 ---------------------- mysql-test/r/rpl_ndb_myisam2ndb.result | 855 ---------------------- mysql-test/t/disabled.def | 2 + mysql-test/t/rpl_ndb_innodb2ndb-slave.opt | 2 +- mysql-test/t/rpl_ndb_myisam2ndb-slave.opt | 2 +- 5 files changed, 4 insertions(+), 1712 deletions(-) delete mode 100644 mysql-test/r/rpl_ndb_innodb2ndb.result delete mode 100644 mysql-test/r/rpl_ndb_myisam2ndb.result diff --git a/mysql-test/r/rpl_ndb_innodb2ndb.result b/mysql-test/r/rpl_ndb_innodb2ndb.result deleted file mode 100644 index cf4c67f063b..00000000000 --- a/mysql-test/r/rpl_ndb_innodb2ndb.result +++ /dev/null @@ -1,855 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=innodb; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = InnoDB, PARTITION p1 VALUES LESS THAN (1946) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (1966) ENGINE = InnoDB, PARTITION p3 VALUES LESS THAN (1986) ENGINE = InnoDB, PARTITION p4 VALUES LESS THAN (2005) ENGINE = InnoDB, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = InnoDB, PARTITION p1 VALUES IN (42,142) ENGINE = InnoDB, PARTITION p2 VALUES IN (412) ENGINE = InnoDB) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_myisam2ndb.result b/mysql-test/r/rpl_ndb_myisam2ndb.result deleted file mode 100644 index 35fc778a693..00000000000 --- a/mysql-test/r/rpl_ndb_myisam2ndb.result +++ /dev/null @@ -1,855 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -SET storage_engine=myisam; ---- Doing pre test cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 1 Basic testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly -- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 1 Basic testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 2 partition RANGE testing -- ---- Do setup -- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY RANGE (YEAR(t)) -(PARTITION p0 VALUES LESS THAN (1901), -PARTITION p1 VALUES LESS THAN (1946), -PARTITION p2 VALUES LESS THAN (1966), -PARTITION p3 VALUES LESS THAN (1986), -PARTITION p4 VALUES LESS THAN (2005), -PARTITION p5 VALUES LESS THAN MAXVALUE); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Show table on slave -- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1946) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (1966) ENGINE = MyISAM, PARTITION p3 VALUES LESS THAN (1986) ENGINE = MyISAM, PARTITION p4 VALUES LESS THAN (2005) ENGINE = MyISAM, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901) ENGINE = ndbcluster, PARTITION p1 VALUES LESS THAN (1946) ENGINE = ndbcluster, PARTITION p2 VALUES LESS THAN (1966) ENGINE = ndbcluster, PARTITION p3 VALUES LESS THAN (1986) ENGINE = ndbcluster, PARTITION p4 VALUES LESS THAN (2005) ENGINE = ndbcluster, PARTITION p5 VALUES LESS THAN MAXVALUE ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 2 partition RANGE testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; ---- Start test 3 partition LIST testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY LIST(id) -(PARTITION p0 VALUES IN (2, 4), -PARTITION p1 VALUES IN (42, 142)); ---- Test 3 Alter to add partition --- -ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); ---- Show table on master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Show table on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = MyISAM, PARTITION p1 VALUES IN (42,142) ENGINE = MyISAM, PARTITION p2 VALUES IN (412) ENGINE = MyISAM) */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (id) (PARTITION p0 VALUES IN (2,4) ENGINE = ndbcluster, PARTITION p1 VALUES IN (42,142) ENGINE = ndbcluster, PARTITION p2 VALUES IN (412) ENGINE = ndbcluster) */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 3 partition LIST testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 4 partition HASH testing --- ---- Do setup --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE) -PARTITION BY HASH( YEAR(t) ) -PARTITIONS 4; ---- show that tables have been created correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 ADD PRIMARY KEY(t,id); -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date NOT NULL DEFAULT '0000-00-00', - PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 4 partition HASH testing --- ---- Do Cleanup -- -DROP TABLE IF EXISTS t1; ---- Start test 5 partition by key testing --- ---- Create Table Section --- -CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), -bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, -f FLOAT DEFAULT 0, total BIGINT UNSIGNED, -y YEAR, t DATE,PRIMARY KEY(id)) -PARTITION BY KEY() -PARTITIONS 4; ---- Show that tables on master are ndbcluster tables --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Show that tables on slave --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned DEFAULT NULL, - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Make sure that our tables on slave are still right type --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` varchar(255) DEFAULT NULL, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- Check that simple Alter statements are replicated correctly --- -ALTER TABLE t1 MODIFY vc TEXT; ---- Show the new improved table on the master --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Make sure that our tables on slave are still same engine --- ---- and that the alter statements replicated correctly --- -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `id` mediumint(9) NOT NULL, - `b1` bit(8) DEFAULT NULL, - `vc` text, - `bc` char(255) DEFAULT NULL, - `d` decimal(10,4) DEFAULT '0.0000', - `f` float DEFAULT '0', - `total` bigint(20) unsigned NOT NULL DEFAULT '0', - `y` year(4) DEFAULT NULL, - `t` date DEFAULT NULL, - PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ ---- Perform basic operation on master --- ---- and ensure replicated correctly --- -"--- Insert into t1 --" as ""; ---- Select from t1 on master --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Select from t1 on slave --- -select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; -id hex(b1) vc bc d f total y t -2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14 -4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14 -42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14 -142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14 -412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14 ---- Update t1 on master -- -UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; ---- Check the update on master --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Check Update on slave --- -SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; -id hex(b1) vc bc d f total y t -412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 ---- Remove a record from t1 on master --- -DELETE FROM t1 WHERE id = 42; ---- Show current count on master for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 ---- Show current count on slave for t1 --- -SELECT COUNT(*) FROM t1; -COUNT(*) -4 -DELETE FROM t1; ---- End test 5 key partition testing --- ---- Do Cleanup --- -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index e8f69028845..fd64becbc00 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -23,6 +23,8 @@ rpl_ndb_2myisam : BUG#19227 Seems to pass currently rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master +rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement +rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly rpl_udf : BUG#27564 2007-03-31 lars New test case for rpl of UDF shows valgrind failure synchronization : Bug#24529 Test 'synchronization' fails on Mac pushbuild; Also on Linux 64 bit. diff --git a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt b/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt index 50d37bb6d1d..7f9eb96dff1 100644 --- a/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt +++ b/mysql-test/t/rpl_ndb_innodb2ndb-slave.opt @@ -1 +1 @@ ---default-storage-engine=ndbcluster --new=true +--default-storage-engine=ndbcluster diff --git a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt b/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt index 50d37bb6d1d..7f9eb96dff1 100644 --- a/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt +++ b/mysql-test/t/rpl_ndb_myisam2ndb-slave.opt @@ -1 +1 @@ ---default-storage-engine=ndbcluster --new=true +--default-storage-engine=ndbcluster From 53015163679cf8c8a8c7f7b12cc4b72970f896a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 08:12:44 -0700 Subject: [PATCH 033/137] compile-dist failure fix compile error when DBUG_OFF sql/sql_plugin.cc: fix compile error when DBUG_OFF --- sql/sql_plugin.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 8423209e0b0..c0feff3f1ed 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1151,9 +1151,13 @@ int plugin_init(int *argc, char **argv, int flags) if (is_myisam) { DBUG_ASSERT(!global_system_variables.table_plugin); +#ifdef DBUG_OFF + global_system_variables.table_plugin= plugin_ptr; +#else global_system_variables.table_plugin= (plugin_ref) my_malloc(sizeof(plugin_ptr), MYF(MY_WME | MY_FAE)); global_system_variables.table_plugin[0]= plugin_ptr; +#endif plugin_ptr->ref_count++; DBUG_ASSERT(plugin_ptr->ref_count == 1); } From 91673114656c32ba201ac04b9ecd2388bacd2e64 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 08:24:33 -0700 Subject: [PATCH 034/137] compilation error --- include/mysql/plugin.h | 2 +- sql/sql_plugin.cc | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 751ce516a39..af8a60361c8 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -657,7 +657,7 @@ char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length, #ifdef __cplusplus -}; +} #endif #endif diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 24ccb9e0a3b..b26ae0e070d 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1151,10 +1151,8 @@ int plugin_init(int *argc, char **argv, int flags) if (is_myisam) { DBUG_ASSERT(!global_system_variables.table_plugin); - global_system_variables.table_plugin= (plugin_ref) - my_malloc(sizeof(plugin_ptr), MYF(MY_WME | MY_FAE)); - global_system_variables.table_plugin[0]= plugin_ptr; - plugin_ptr->ref_count++; + global_system_variables.table_plugin= + my_intern_plugin_lock(NULL, plugin_int_to_ref(plugin_ptr)); DBUG_ASSERT(plugin_ptr->ref_count == 1); } } @@ -1436,7 +1434,7 @@ error: void plugin_shutdown(void) { - uint i, count= plugin_array.elements, free_slots; + uint i, count= plugin_array.elements, free_slots= 0; struct st_plugin_int **plugins, *plugin; struct st_plugin_dl **dl; DBUG_ENTER("plugin_shutdown"); From fc4b80d96574eca58e9722eddd6a67ff92933366 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 08:34:51 -0700 Subject: [PATCH 035/137] compilation failure on nocona (gcc (GCC) 3.2.3 20030502) --- storage/innobase/handler/ha_innodb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 6d875db5deb..5917f807c5a 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7688,8 +7688,8 @@ static MYSQL_SYSVAR_BOOL(file_per_table, innobase_file_per_table, static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, PLUGIN_VAR_OPCMDARG, - "Set to 0 (write and flush once per second), 1 (write and flush at each commit)\ - or 2 (write at commit, flush once per second).", + "Set to 0 (write and flush once per second), 1 (write and flush at each commit)" + " or 2 (write at commit, flush once per second).", NULL, NULL, 1, 0, 2, 0); static MYSQL_SYSVAR_STR(flush_method, innobase_unix_file_flush_method, From 5c79fa464fd9157b259b9c4048fe1595ef00ad17 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 08:37:24 -0700 Subject: [PATCH 036/137] fix pedantic compiler build failure - surplus ';' character --- include/mysql/plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 751ce516a39..af8a60361c8 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -657,7 +657,7 @@ char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length, #ifdef __cplusplus -}; +} #endif #endif From dfdd667a8dfb020f3c1e2fc525d92d18423b4227 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 08:46:34 -0700 Subject: [PATCH 037/137] fix windows build failure VC++ does not like compile_time_assert() macro --- sql/sql_lex.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index bd81aa2d5c1..4cb25aca77c 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1772,8 +1772,10 @@ st_lex::st_lex() :result(0), yacc_yyss(0), yacc_yyvs(0), sql_command(SQLCOM_END) { +#ifndef __WIN__ /* Check that plugins_static_buffer is declared immediately after plugins */ compile_time_assert((&plugins + 1) == (DYNAMIC_ARRAY*)plugins_static_buffer); +#endif my_init_dynamic_array2(&plugins, sizeof(plugin_ref), plugins_static_buffer, From 87128514a4022124bd1b09436d325baebf57d050 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 09:00:08 -0700 Subject: [PATCH 038/137] compilation failure sql/sql_lex.cc: remove bad fix --- include/my_global.h | 4 ++++ sql/sql_lex.cc | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/my_global.h b/include/my_global.h index 718709178e5..7775f19530e 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -466,12 +466,16 @@ C_MODE_END #include /* an assert that works at compile-time. only for constant expression */ +#ifdef __WIN__ +#define compile_time_assert(X) do { } while(0) +#else #define compile_time_assert(X) \ do \ { \ char compile_time_assert[(X) ? 1 : -1] \ __attribute__ ((unused)); \ } while(0) +#endif /* Go around some bugs in different OS and compilers */ #if defined (HPUX11) && defined(_LARGEFILE_SOURCE) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 4cb25aca77c..bd81aa2d5c1 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1772,10 +1772,8 @@ st_lex::st_lex() :result(0), yacc_yyss(0), yacc_yyvs(0), sql_command(SQLCOM_END) { -#ifndef __WIN__ /* Check that plugins_static_buffer is declared immediately after plugins */ compile_time_assert((&plugins + 1) == (DYNAMIC_ARRAY*)plugins_static_buffer); -#endif my_init_dynamic_array2(&plugins, sizeof(plugin_ref), plugins_static_buffer, From 84c0830bef22b9626feab53897ea493f1cc36f92 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 29 Apr 2007 17:46:18 -0700 Subject: [PATCH 039/137] compilation/test fixes include/my_global.h: only use compile_time_assert on gcc mysql-test/mysql-test-run.pl: better --datadir for mysqld --help sql/mysql_priv.h: error-prone but concatenation-friendly IF_NETWARE() storage/innobase/handler/ha_innodb.cc: no preprocessor directives inside macro arguments --- include/my_global.h | 2 +- mysql-test/mysql-test-run.pl | 5 ++++- sql/mysql_priv.h | 4 ++-- storage/innobase/handler/ha_innodb.cc | 4 +--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/my_global.h b/include/my_global.h index 7775f19530e..5a6567371d0 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -466,7 +466,7 @@ C_MODE_END #include /* an assert that works at compile-time. only for constant expression */ -#ifdef __WIN__ +#ifndef __GNUC__ #define compile_time_assert(X) do { } while(0) #else #define compile_time_assert(X) \ diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 413da029acc..1096123bf47 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1361,7 +1361,10 @@ sub collect_mysqld_features () { # --no-defaults and --skip-grant-tables are to avoid loading # system-wide configs and plugins # - my $list= `$exe_mysqld --no-defaults --datadir=$default_vardir --language=$path_language --skip-grant-tables --verbose --help`; + # --datadir - for lowercase test to work + # + my $tmp_datadir=$opt_vardir || $default_vardir; + my $list= `$exe_mysqld --no-defaults --datadir=$tmp_datadir --language=$path_language --skip-grant-tables --verbose --help`; foreach my $line (split('\n', $list)) { diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index b08b7913085..b6b4cc45f80 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -259,9 +259,9 @@ MY_LOCALE *my_locale_by_number(uint number); #define MAX_CONNECT_ERRORS 10 // errors before disabling host #ifdef __NETWARE__ -#define IF_NETWARE(A,B) (A) +#define IF_NETWARE(A,B) A #else -#define IF_NETWARE(A,B) (B) +#define IF_NETWARE(A,B) B #endif #if defined(__WIN__) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 5917f807c5a..a81cb748ce8 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7675,9 +7675,7 @@ static MYSQL_SYSVAR_ULONG(fast_shutdown, innobase_fast_shutdown, NetWare can't close unclosed files, can't automatically kill remaining threads, etc, so on this OS we disable the crash-like InnoDB shutdown. */ -#ifndef __NETWARE__ - " or 2 (fastest - crash-like)" -#endif + IF_NETWARE("", " or 2 (fastest - crash-like)") ".", NULL, NULL, 1, 0, IF_NETWARE(1,2), 0); From a7718cf5c9df143005182feb390ba8bea0568228 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 14:17:08 +0200 Subject: [PATCH 040/137] Bug#27926 wrong month name in cluster error log --- ndb/src/kernel/error/TimeModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndb/src/kernel/error/TimeModule.cpp b/ndb/src/kernel/error/TimeModule.cpp index 1c01f91f86b..2be734842ba 100644 --- a/ndb/src/kernel/error/TimeModule.cpp +++ b/ndb/src/kernel/error/TimeModule.cpp @@ -18,7 +18,7 @@ #include #include "TimeModule.hpp" -static const char* cMonth[] = { "x", "January", "February", "Mars", "April", "May", "June", +static const char* cMonth[] = { "x", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; static const char* cDay[] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", From 81c32c1e7015ef5bd232d1443b0e74ce93445f4f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 07:45:56 -0700 Subject: [PATCH 041/137] mysql-test/mysql-test-run.pl: another mysqld --help fix scripts/mysql_install_db.sh: don't fail if --skip-XXX is not recognized mysql-test/mysql-test-run.pl: another mysqld --help fix scripts/mysql_install_db.sh: don't fail if --skip-XXX is not recognized --- mysql-test/mysql-test-run.pl | 5 ++--- scripts/mysql_install_db.sh | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1096123bf47..f3c6e62819d 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1361,10 +1361,9 @@ sub collect_mysqld_features () { # --no-defaults and --skip-grant-tables are to avoid loading # system-wide configs and plugins # - # --datadir - for lowercase test to work + # --datadir must exist, mysqld will chdir into it # - my $tmp_datadir=$opt_vardir || $default_vardir; - my $list= `$exe_mysqld --no-defaults --datadir=$tmp_datadir --language=$path_language --skip-grant-tables --verbose --help`; + my $list= `$exe_mysqld --no-defaults --datadir=$path_language --language=$path_language --skip-grant-tables --verbose --help`; foreach my $line (split('\n', $list)) { diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 8ff7a9c11e1..506f1e58cbf 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -270,8 +270,8 @@ fi # Peform the install of system tables mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}" mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ ---basedir=$basedir --datadir=$ldata --skip-innodb \ ---skip-ndbcluster $args --max_allowed_packet=8M \ +--basedir=$basedir --datadir=$ldata --loose-skip-innodb \ +--loose-skip-ndbcluster $args --max_allowed_packet=8M \ --net_buffer_length=16K" # Pipe mysql_system_tables.sql to "mysqld --bootstrap" From a4a0faf4fd9df92cc2d498b93acd5b359cd3bc78 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 17:01:00 +0200 Subject: [PATCH 042/137] Necessary change for cross-builds: Include "mysql_fix_privilege_tables_sql.c" in the source tarball. scripts/Makefile.am: Necessary change for cross-builds (like we do for NetWare): Generate "mysql_fix_privilege_tables_sql.c" during Bootstrap and include it in the source tarball which is created via "make dist". --- scripts/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 79f4666f855..52c1b6140d3 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -18,7 +18,7 @@ BUILT_SOURCES = mysql_fix_privilege_tables.sql \ mysql_fix_privilege_tables_sql.c -noinst_PROGRAMS = comp_sql +EXTRA_PROGRAMS = comp_sql bin_SCRIPTS = @server_scripts@ \ msql2mysql \ @@ -70,6 +70,8 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) \ mysqlaccess.conf \ mysqlbug \ make_win_bin_dist \ + mysql_fix_privilege_tables.sql \ + mysql_fix_privilege_tables_sql.c \ mysql_system_tables_fix.sql \ CMakeLists.txt From 0f824dc212f9de5c8bc7590bb89b93d48955bc64 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 18:49:38 +0200 Subject: [PATCH 043/137] WL#2936 - Falcon & MySQL plugin interface: server variables Avoid compiler warnings cmd-line-utils/readline/rltty.c: Avoid a compiler warning config/ac-macros/misc.m4: Avoid a compiler warning, which could abort ./configure if CFLAGS contain -Werror. --- cmd-line-utils/readline/rltty.c | 3 +- config/ac-macros/misc.m4 | 4 +-- mysys/my_getopt.c | 12 ++++--- sql/mysqld.cc | 4 ++- sql/sql_parse.cc | 62 ++++++++++++++++----------------- sql/sql_plugin.cc | 7 ++-- 6 files changed, 48 insertions(+), 44 deletions(-) diff --git a/cmd-line-utils/readline/rltty.c b/cmd-line-utils/readline/rltty.c index ffbae1e08af..869538af9ab 100644 --- a/cmd-line-utils/readline/rltty.c +++ b/cmd-line-utils/readline/rltty.c @@ -139,8 +139,7 @@ static int ksrflow; /* Dummy call to force a backgrounded readline to stop before it tries to get the tty settings. */ static void -set_winsize (tty) - int tty; +set_winsize (int tty __attribute__((unused))) { #if defined (TIOCGWINSZ) struct winsize w; diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index 6e9dfe8231c..a20db96a950 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -479,7 +479,7 @@ AC_MSG_CHECKING(if conversion of longlong to float works) AC_CACHE_VAL(ac_cv_conv_longlong_to_float, [AC_TRY_RUN([#include typedef long long longlong; -main() +int main() { longlong ll=1; float f; @@ -487,7 +487,7 @@ main() f = (float) ll; fprintf(file,"%g\n",f); fclose(file); - exit (0); + return (0); }], ac_cv_conv_longlong_to_float=`cat conftestval`, ac_cv_conv_longlong_to_float=0, ifelse([$2], , , ac_cv_conv_longlong_to_float=$2))])dnl if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes" then diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 3c67c724a9a..a23e84ab96a 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -842,19 +842,23 @@ static void init_one_value(const struct my_option *option, gptr *variable, /* Do not clear variable value if it has no default value. The default value may already be set. + NOTE: To avoid compiler warnings, we first cast longlong to intptr, + so that the value has the same size as a pointer. */ - if ((char*) value) - *((char**) variable)= (char*) value; + if ((char*) (intptr) value) + *((char**) variable)= (char*) (intptr) value; break; case GET_STR_ALLOC: /* Do not clear variable value if it has no default value. The default value may already be set. + NOTE: To avoid compiler warnings, we first cast longlong to intptr, + so that the value has the same size as a pointer. */ - if ((char*) value) + if ((char*) (intptr) value) { my_free((*(char**) variable), MYF(MY_ALLOW_ZERO_PTR)); - *((char**) variable)= my_strdup((char*) value, MYF(MY_WME)); + *((char**) variable)= my_strdup((char*) (intptr) value, MYF(MY_WME)); } break; default: /* dummy default to avoid compiler warnings */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 750ea2ca6a1..a2956b7e53a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -677,7 +677,6 @@ pthread_handler_t signal_hand(void *arg); static void mysql_init_variables(void); static void get_options(int *argc,char **argv); static my_bool get_one_option(int, const struct my_option *, char *); -static void usage(void); static void set_server_version(void); static int init_thread_environment(); static char *get_relative_path(const char *path); @@ -700,6 +699,7 @@ static void clean_up(bool print_message); static int test_if_case_insensitive(const char *dir_name); #ifndef EMBEDDED_LIBRARY +static void usage(void); static void start_signal_handler(void); static void close_server_sock(); static void clean_up_mutexes(void); @@ -6877,6 +6877,7 @@ static void print_version(void) server_version,SYSTEM_TYPE,MACHINE_TYPE, MYSQL_COMPILATION_COMMENT); } +#ifndef EMBEDDED_LIBRARY static void usage(void) { if (!(default_charset_info= get_charset_by_csname(default_character_set_name, @@ -6922,6 +6923,7 @@ To see what values a running MySQL server is using, type\n\ 'mysqladmin variables' instead of 'mysqld --verbose --help'.\n"); } } +#endif /*!EMBEDDED_LIBRARY*/ /* diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9144af86a9b..2da450cf6cb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -43,37 +43,37 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables); const char *any_db="*any*"; // Special symbol for check_access const LEX_STRING command_name[]={ - { STRING_WITH_LEN("Sleep") }, - { STRING_WITH_LEN("Quit") }, - { STRING_WITH_LEN("Init DB") }, - { STRING_WITH_LEN("Query") }, - { STRING_WITH_LEN("Field List") }, - { STRING_WITH_LEN("Create DB") }, - { STRING_WITH_LEN("Drop DB") }, - { STRING_WITH_LEN("Refresh") }, - { STRING_WITH_LEN("Shutdown") }, - { STRING_WITH_LEN("Statistics") }, - { STRING_WITH_LEN("Processlist") }, - { STRING_WITH_LEN("Connect") }, - { STRING_WITH_LEN("Kill") }, - { STRING_WITH_LEN("Debug") }, - { STRING_WITH_LEN("Ping") }, - { STRING_WITH_LEN("Time") }, - { STRING_WITH_LEN("Delayed insert") }, - { STRING_WITH_LEN("Change user") }, - { STRING_WITH_LEN("Binlog Dump") }, - { STRING_WITH_LEN("Table Dump") }, - { STRING_WITH_LEN("Connect Out") }, - { STRING_WITH_LEN("Register Slave") }, - { STRING_WITH_LEN("Prepare") }, - { STRING_WITH_LEN("Execute") }, - { STRING_WITH_LEN("Long Data") }, - { STRING_WITH_LEN("Close stmt") }, - { STRING_WITH_LEN("Reset stmt") }, - { STRING_WITH_LEN("Set option") }, - { STRING_WITH_LEN("Fetch") }, - { STRING_WITH_LEN("Daemon") }, - { STRING_WITH_LEN("Error") } // Last command number + { C_STRING_WITH_LEN("Sleep") }, + { C_STRING_WITH_LEN("Quit") }, + { C_STRING_WITH_LEN("Init DB") }, + { C_STRING_WITH_LEN("Query") }, + { C_STRING_WITH_LEN("Field List") }, + { C_STRING_WITH_LEN("Create DB") }, + { C_STRING_WITH_LEN("Drop DB") }, + { C_STRING_WITH_LEN("Refresh") }, + { C_STRING_WITH_LEN("Shutdown") }, + { C_STRING_WITH_LEN("Statistics") }, + { C_STRING_WITH_LEN("Processlist") }, + { C_STRING_WITH_LEN("Connect") }, + { C_STRING_WITH_LEN("Kill") }, + { C_STRING_WITH_LEN("Debug") }, + { C_STRING_WITH_LEN("Ping") }, + { C_STRING_WITH_LEN("Time") }, + { C_STRING_WITH_LEN("Delayed insert") }, + { C_STRING_WITH_LEN("Change user") }, + { C_STRING_WITH_LEN("Binlog Dump") }, + { C_STRING_WITH_LEN("Table Dump") }, + { C_STRING_WITH_LEN("Connect Out") }, + { C_STRING_WITH_LEN("Register Slave") }, + { C_STRING_WITH_LEN("Prepare") }, + { C_STRING_WITH_LEN("Execute") }, + { C_STRING_WITH_LEN("Long Data") }, + { C_STRING_WITH_LEN("Close stmt") }, + { C_STRING_WITH_LEN("Reset stmt") }, + { C_STRING_WITH_LEN("Set option") }, + { C_STRING_WITH_LEN("Fetch") }, + { C_STRING_WITH_LEN("Daemon") }, + { C_STRING_WITH_LEN("Error") } // Last command number }; const char *xa_state_names[]={ diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index cffba604dfd..9f002633f4e 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2506,10 +2506,9 @@ byte* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type, result= real_value_ptr(thd, type); - if ((plugin_var->flags && PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_ENUM) + if ((plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_ENUM) result= (byte*) get_type(plugin_var_typelib(), *(ulong*)result); - else - if ((plugin_var->flags && PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_SET) + else if ((plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_SET) { char buffer[STRING_BUFFER_USUAL_SIZE]; String str(buffer, sizeof(buffer), system_charset_info); @@ -2620,7 +2619,7 @@ bool sys_var_pluginvar::update(THD *thd, set_var *var) options->def_value= (opt)->def_val; \ options->min_value= (opt)->min_val; \ options->max_value= (opt)->max_val; \ - options->block_size= (opt)->blk_sz + options->block_size= (long) (opt)->blk_sz static void plugin_opt_set_limits(struct my_option *options, From d2e8f9010fef50bd4cc2c339aaa46f88528e954c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 15:36:29 -0600 Subject: [PATCH 044/137] fix merge issues mysql-test/r/sp.result: manual merge sql/sql_lex.cc: merge typo --- mysql-test/r/sp.result | 7 +++++++ sql/sql_lex.cc | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index e3406e4bbde..ac394a9df3d 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6210,6 +6210,13 @@ Warning 1265 Data truncated for column 'bug5274_f1' at row 1 Warning 1265 Data truncated for column 'bug5274_f1' at row 1 DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| +drop procedure if exists proc_21513| +create procedure proc_21513()`my_label`:BEGIN END| +show create procedure proc_21513| +Procedure sql_mode Create Procedure +proc_21513 CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_21513`() +`my_label`:BEGIN END +drop procedure proc_21513| End of 5.0 tests. drop table t1,t2; CREATE TABLE t1 (a int auto_increment primary key) engine=MyISAM; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index d1056285d8d..c0fa16c0811 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -328,7 +328,7 @@ static LEX_STRING get_quoted_token(Lex_input_stream *lip, yyUnget(); // ptr points now after last token char tmp.length= lip->yytoklen=length; tmp.str=(char*) lip->m_thd->alloc(tmp.length+1); - from= lip->tok_start + skip + from= lip->tok_start + skip; to= tmp.str; end= to+length; for ( ; to != end; ) From eba2079397ddb4bb1836917ece4828ad8a0950f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 16:42:15 -0700 Subject: [PATCH 045/137] WL#2936 Change SET variables to be ulonglong type (64bit) include/mysql/plugin.h: WL2936 Change SET variables to be unsigned long long type Changed use of ulonglong to unsigned long long sql/sql_plugin.cc: WL2936 Change SET variables to be ulonglong type (64bit) --- include/mysql/plugin.h | 26 +++++++++++----------- sql/sql_plugin.cc | 50 ++++++++++++++++++++++++------------------ 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index af8a60361c8..fd43e9688d0 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -203,9 +203,9 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, type blk_sz; \ } MYSQL_SYSVAR_NAME(name) -#define DECLARE_MYSQL_SYSVAR_TYPELIB(name) struct { \ +#define DECLARE_MYSQL_SYSVAR_TYPELIB(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ - unsigned long *value, def_val;\ + type *value; type def_val; \ TYPELIB *typelib; \ } MYSQL_SYSVAR_NAME(name) @@ -227,11 +227,11 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, DECLARE_THDVAR_FUNC(type); \ } MYSQL_SYSVAR_NAME(name) -#define DECLARE_MYSQL_THDVAR_TYPELIB(name) struct { \ +#define DECLARE_MYSQL_THDVAR_TYPELIB(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ int offset; \ - unsigned long def_val; \ - DECLARE_THDVAR_FUNC(unsigned long); \ + type def_val; \ + DECLARE_THDVAR_FUNC(type); \ TYPELIB *typelib; \ } MYSQL_SYSVAR_NAME(name) @@ -271,22 +271,22 @@ DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long) = { \ #name, comment, check, update, &varname, def, min, max, blk } #define MYSQL_SYSVAR_LONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \ -DECLARE_MYSQL_SYSVAR_SIMPLE(name, longlong) = { \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, long long) = { \ PLUGIN_VAR_LONGLONG | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, &varname, def, min, max, blk } #define MYSQL_SYSVAR_ULONGLONG(name, varname, opt, comment, check, update, def, min, max, blk) \ -DECLARE_MYSQL_SYSVAR_SIMPLE(name, ulonglong) = { \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, unsigned long long) = { \ PLUGIN_VAR_LONGLONG | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, &varname, def, min, max, blk } #define MYSQL_SYSVAR_ENUM(name, varname, opt, comment, check, update, def, typelib) \ -DECLARE_MYSQL_SYSVAR_TYPELIB(name) = { \ +DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long) = { \ PLUGIN_VAR_ENUM | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, &varname, def, typelib } #define MYSQL_SYSVAR_SET(name, varname, opt, comment, check, update, def, typelib) \ -DECLARE_MYSQL_SYSVAR_TYPELIB(name) = { \ +DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long long) = { \ PLUGIN_VAR_SET | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, &varname, def, typelib } @@ -321,22 +321,22 @@ DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long) = { \ #name, comment, check, update, -1, def, min, max, blk, NULL } #define MYSQL_THDVAR_LONGLONG(name, opt, comment, check, update, def, min, max, blk) \ -DECLARE_MYSQL_THDVAR_SIMPLE(name, longlong) = { \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, long long) = { \ PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, -1, def, min, max, blk, NULL } #define MYSQL_THDVAR_ULONGLONG(name, opt, comment, check, update, def, min, max, blk) \ -DECLARE_MYSQL_THDVAR_SIMPLE(name, ulonglong) = { \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, unsigned long long) = { \ PLUGIN_VAR_LONGLONG | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_UNSIGNED | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, -1, def, min, max, blk, NULL } #define MYSQL_THDVAR_ENUM(name, opt, comment, check, update, def, typelib) \ -DECLARE_MYSQL_THDVAR_TYPELIB(name) = { \ +DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long) = { \ PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, -1, def, NULL, typelib } #define MYSQL_THDVAR_SET(name, opt, comment, check, update, def, typelib) \ -DECLARE_MYSQL_THDVAR_TYPELIB(name) = { \ +DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long long) = { \ PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, -1, def, NULL, typelib } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index cffba604dfd..7fbe63a938c 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1767,8 +1767,10 @@ typedef DECLARE_MYSQL_THDVAR_BASIC(thdvar_bool_t, my_bool); typedef DECLARE_MYSQL_SYSVAR_BASIC(sysvar_str_t, char *); typedef DECLARE_MYSQL_THDVAR_BASIC(thdvar_str_t, char *); -typedef DECLARE_MYSQL_SYSVAR_TYPELIB(sysvar_typelib_t); -typedef DECLARE_MYSQL_THDVAR_TYPELIB(thdvar_typelib_t); +typedef DECLARE_MYSQL_SYSVAR_TYPELIB(sysvar_enum_t, unsigned long); +typedef DECLARE_MYSQL_THDVAR_TYPELIB(thdvar_enum_t, unsigned long); +typedef DECLARE_MYSQL_SYSVAR_TYPELIB(sysvar_set_t, ulonglong); +typedef DECLARE_MYSQL_THDVAR_TYPELIB(thdvar_set_t, ulonglong); typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_int_t, int); typedef DECLARE_MYSQL_SYSVAR_SIMPLE(sysvar_long_t, long); @@ -1896,9 +1898,9 @@ static int check_func_enum(THD *thd, struct st_mysql_sys_var *var, int length; if (var->flags & PLUGIN_VAR_THDLOCAL) - typelib= ((thdvar_typelib_t*) var)->typelib; + typelib= ((thdvar_enum_t*) var)->typelib; else - typelib= ((sysvar_typelib_t*) var)->typelib; + typelib= ((sysvar_enum_t*) var)->typelib; if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) { @@ -1944,9 +1946,9 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var, int length; if (var->flags & PLUGIN_VAR_THDLOCAL) - typelib= ((thdvar_typelib_t*) var)->typelib; + typelib= ((thdvar_set_t*) var)->typelib; else - typelib= ((sysvar_typelib_t*)var)->typelib; + typelib= ((sysvar_set_t*)var)->typelib; if (value->value_type(value) == MYSQL_VALUE_TYPE_STRING) { @@ -2487,13 +2489,17 @@ byte* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) TYPELIB* sys_var_pluginvar::plugin_var_typelib(void) { - int type= plugin_var->flags & PLUGIN_VAR_TYPEMASK; - if (type == PLUGIN_VAR_ENUM || type == PLUGIN_VAR_SET) - { - if (plugin_var->flags & PLUGIN_VAR_THDLOCAL) - return ((thdvar_typelib_t *)plugin_var)->typelib; - else - return ((sysvar_typelib_t *)plugin_var)->typelib; + switch (plugin_var->flags & (PLUGIN_VAR_TYPEMASK | PLUGIN_VAR_THDLOCAL)) { + case PLUGIN_VAR_ENUM: + return ((sysvar_enum_t *)plugin_var)->typelib; + case PLUGIN_VAR_SET: + return ((sysvar_set_t *)plugin_var)->typelib; + case PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL: + return ((thdvar_enum_t *)plugin_var)->typelib; + case PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL: + return ((thdvar_set_t *)plugin_var)->typelib; + default: + return NULL; } return NULL; } @@ -2514,7 +2520,7 @@ byte* sys_var_pluginvar::value_ptr(THD *thd, enum_var_type type, char buffer[STRING_BUFFER_USUAL_SIZE]; String str(buffer, sizeof(buffer), system_charset_info); TYPELIB *typelib= plugin_var_typelib(); - ulong mask= 1, value= *(ulong*) result; + ulonglong mask= 1, value= *(ulonglong*) result; uint i; str.length(0); @@ -2649,15 +2655,15 @@ static void plugin_opt_set_limits(struct my_option *options, break; case PLUGIN_VAR_ENUM: options->var_type= GET_ENUM; - options->typelib= ((sysvar_typelib_t*) opt)->typelib; + options->typelib= ((sysvar_enum_t*) opt)->typelib; options->def_value= *(ulong*) ((int*) (opt + 1) + 1); options->min_value= options->block_size= 0; options->max_value= options->typelib->count - 1; break; case PLUGIN_VAR_SET: options->var_type= GET_SET; - options->typelib= ((sysvar_typelib_t*) opt)->typelib; - options->def_value= *(ulong*) ((int*) (opt + 1) + 1); + options->typelib= ((sysvar_set_t*) opt)->typelib; + options->def_value= *(ulonglong*) ((int*) (opt + 1) + 1); options->min_value= options->block_size= 0; options->max_value= (ULL(1) << options->typelib->count) - 1; break; @@ -2691,15 +2697,15 @@ static void plugin_opt_set_limits(struct my_option *options, break; case PLUGIN_VAR_ENUM | PLUGIN_VAR_THDLOCAL: options->var_type= GET_ENUM; - options->typelib= ((thdvar_typelib_t*) opt)->typelib; + options->typelib= ((thdvar_enum_t*) opt)->typelib; options->def_value= *(ulong*) ((int*) (opt + 1) + 1); options->min_value= options->block_size= 0; options->max_value= options->typelib->count - 1; break; case PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL: options->var_type= GET_SET; - options->typelib= ((thdvar_typelib_t*) opt)->typelib; - options->def_value= *(ulong*) ((int*) (opt + 1) + 1); + options->typelib= ((thdvar_set_t*) opt)->typelib; + options->def_value= *(ulonglong*) ((int*) (opt + 1) + 1); options->min_value= options->block_size= 0; options->max_value= (ULL(1) << options->typelib->count) - 1; break; @@ -2816,8 +2822,10 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, SET_PLUGIN_VAR_RESOLVE((thdvar_str_t *) opt); break; case PLUGIN_VAR_ENUM: + SET_PLUGIN_VAR_RESOLVE((thdvar_enum_t *) opt); + break; case PLUGIN_VAR_SET: - SET_PLUGIN_VAR_RESOLVE((thdvar_typelib_t *) opt); + SET_PLUGIN_VAR_RESOLVE((thdvar_set_t *) opt); break; default: sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", From 2203faa204085eab17283f0e59835012b4b37e63 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Apr 2007 17:46:05 -0700 Subject: [PATCH 046/137] strict compilers do not permit auto casting 'longlong *' to 'long long *' storage/innobase/handler/ha_innodb.cc: strict compilers did not permit auto casting 'longlong*' to 'long long *' storage/innobase/handler/ha_innodb.h: strict compilers did not permit auto casting 'longlong*' to 'long long *' --- storage/innobase/handler/ha_innodb.cc | 2 +- storage/innobase/handler/ha_innodb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a81cb748ce8..659576a8fad 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -102,7 +102,7 @@ long innobase_mirrored_log_groups, innobase_log_files_in_group, innobase_lock_wait_timeout, innobase_force_recovery, innobase_open_files; -longlong innobase_buffer_pool_size, innobase_log_file_size; +long long innobase_buffer_pool_size, innobase_log_file_size; /* The default values for the following char* start-up parameters are determined in innobase_init below: */ diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index e26298c1a28..90fc7727044 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -191,7 +191,7 @@ class ha_innobase: public handler }; extern long innobase_mirrored_log_groups, innobase_log_files_in_group; -extern longlong innobase_buffer_pool_size, innobase_log_file_size; +extern long long innobase_buffer_pool_size, innobase_log_file_size; extern long innobase_log_buffer_size; extern long innobase_additional_mem_pool_size; extern long innobase_buffer_pool_awe_mem_mb; From 51d6e623ffc108dbec460975e05e9a7799c5b51c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 May 2007 06:52:23 -0700 Subject: [PATCH 047/137] Updates to test/result files of funcs_1 to 5.0.40 level, - validated current result files - forced order by and removed time stamps removed a_version files (since do not make sense now when suite is in the main tree) Note: datadict tests still fail as a result of regression bug 28181 in 5.0.42 (discovered while performing this update) - tests should run clean once bug is fixed BitKeeper/deleted/.del-a_version_check.test: Delete: mysql-test/suite/funcs_1/t/a_version_check.test BitKeeper/deleted/.del-a_version_check.result: Delete: mysql-test/suite/funcs_1/r/a_version_check.result BitKeeper/deleted/.del-innodb_views.warnings: Delete: mysql-test/suite/funcs_1/r/innodb_views.warnings BitKeeper/deleted/.del-memory_views.warnings: Delete: mysql-test/suite/funcs_1/r/memory_views.warnings BitKeeper/deleted/.del-myisam_views.warnings: Delete: mysql-test/suite/funcs_1/r/myisam_views.warnings mysql-test/suite/funcs_1/datadict/datadict_load.inc: Modified to correct failiure to return host name on some systems mysql-test/suite/funcs_1/datadict/datadict_master.inc: corrections to force order by on queries and replace time stamps with strings mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc: corrections to force order by on queries mysql-test/suite/funcs_1/r/innodb__datadict.result: Updated result file with order bu selects, elimination of time stamps and selects with empty user (that we don't have anymore) mysql-test/suite/funcs_1/r/innodb_func_view.result: confirming existing results as correct ones - old result file had wrong cast values returned mysql-test/suite/funcs_1/r/innodb_trig_08.result: confirming existing results as correct ones - updated error message mysql-test/suite/funcs_1/r/innodb_views.result: confirming existing results as correct ones - returned results are correct, wrong 'expected' error messages removed mysql-test/suite/funcs_1/r/memory__datadict.result: Updated result file with order bu selects, elimination of time stamps and selects with empty user (that we don't have anymore) mysql-test/suite/funcs_1/r/memory_func_view.result: confirming existing results as correct ones - old result file had wrong cast values returned mysql-test/suite/funcs_1/r/memory_trig_08.result: confirming existing results as correct ones - updated error message mysql-test/suite/funcs_1/r/memory_views.result: confirming existing results as correct ones - returned results are correct, wrong 'expected' error messages removed mysql-test/suite/funcs_1/r/myisam__datadict.result: Updated result file with order bu selects, elimination of time stamps and selects with empty user (that we don't have anymore) mysql-test/suite/funcs_1/r/myisam_func_view.result: confirming existing results as correct ones - old result file had wrong cast values returned mysql-test/suite/funcs_1/r/myisam_trig_08.result: confirming existing results as correct ones - updated error message mysql-test/suite/funcs_1/r/myisam_views.result: confirming existing results as correct ones - returned results are correct, wrong 'expected' error messages removed mysql-test/suite/funcs_1/t/disabled.def: Updated disabled messages with clearer ones mysql-test/suite/funcs_1/views/views_master.inc: removed invalid -- lines generating warning files --- .../suite/funcs_1/datadict/datadict_load.inc | 3 +- .../funcs_1/datadict/datadict_master.inc | 55 +- .../funcs_1/datadict/datadict_show_schema.inc | 2 +- .../suite/funcs_1/r/a_version_check.result | 11 - .../suite/funcs_1/r/innodb__datadict.result | 1737 ++++++++--------- .../suite/funcs_1/r/innodb_func_view.result | 12 +- .../suite/funcs_1/r/innodb_trig_08.result | 5 +- .../suite/funcs_1/r/innodb_views.result | 27 +- .../suite/funcs_1/r/innodb_views.warnings | 2 - .../suite/funcs_1/r/memory__datadict.result | 1737 ++++++++--------- .../suite/funcs_1/r/memory_func_view.result | 12 +- .../suite/funcs_1/r/memory_trig_08.result | 5 +- .../suite/funcs_1/r/memory_views.result | 27 +- .../suite/funcs_1/r/memory_views.warnings | 2 - .../suite/funcs_1/r/myisam__datadict.result | 1737 ++++++++--------- .../suite/funcs_1/r/myisam_func_view.result | 12 +- .../suite/funcs_1/r/myisam_trig_08.result | 5 +- .../suite/funcs_1/r/myisam_views.result | 27 +- .../suite/funcs_1/r/myisam_views.warnings | 2 - .../suite/funcs_1/t/a_version_check.test | 29 - mysql-test/suite/funcs_1/t/disabled.def | 6 +- .../suite/funcs_1/views/views_master.inc | 8 +- 22 files changed, 2697 insertions(+), 2766 deletions(-) delete mode 100644 mysql-test/suite/funcs_1/r/a_version_check.result delete mode 100644 mysql-test/suite/funcs_1/r/innodb_views.warnings delete mode 100644 mysql-test/suite/funcs_1/r/memory_views.warnings delete mode 100644 mysql-test/suite/funcs_1/r/myisam_views.warnings delete mode 100755 mysql-test/suite/funcs_1/t/a_version_check.test diff --git a/mysql-test/suite/funcs_1/datadict/datadict_load.inc b/mysql-test/suite/funcs_1/datadict/datadict_load.inc index 2842703f2f8..4a9bdc9356d 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_load.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_load.inc @@ -44,7 +44,8 @@ if (0) # ------------------------------------------------------------------------------ # prepare a variable to be able to suppress machine dependant diffs # this can be used in: --replace_result $SERVER_NAME -let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`; +# let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`; +let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("localhost", "127.0.0.1", "%")`; ################################################################################ diff --git a/mysql-test/suite/funcs_1/datadict/datadict_master.inc b/mysql-test/suite/funcs_1/datadict/datadict_master.inc index 96185cafdda..385b17be9ee 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_master.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_master.inc @@ -105,7 +105,7 @@ SELECT DISTINCT u, AS Server_Clean FROM db_datadict.vu1; --replace_result $SERVER_NAME -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; delimiter //; CREATE PROCEDURE db_datadict.sp_1() @@ -141,8 +141,9 @@ if ($have_bug_11589) # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -152,7 +153,8 @@ SELECT * FROM tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM tables WHERE NOT( table_schema = 'information_schema'); --horizontal_results @@ -177,7 +179,7 @@ select count(*) from routines; select * from statistics; select * from views; --replace_result $SERVER_NAME -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; select * from schema_privileges; select * from table_privileges; select * from column_privileges; @@ -199,7 +201,8 @@ select concat("Table or view '", table_name, --replace_result $SERVER_NAME select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) - from user_privileges where privilege_type = 'select'; + from user_privileges where privilege_type = 'select' + order by grantee; select all table_schema from schema_privileges limit 0,5; @@ -293,13 +296,14 @@ select * from information_schema.schemata ORDER BY 2 DESC; # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHRCK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } --vertical_results ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -309,7 +313,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHRCK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --horizontal_results @@ -385,7 +390,7 @@ select concat(table_schema, ', ', table_name) "Table_info" from tables ORDER BY 1; --replace_result $SERVER_NAME -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; select * from schema_privileges where table_catalog is null limit 0, 5; select * from table_privileges where grantee like '%r%' limit 0, 5; @@ -399,7 +404,7 @@ select * from schemata limit 0,5; --replace_result $SERVER_NAME select distinct grantee from user_privileges; --replace_result $SERVER_NAME -select all grantee from user_privileges; +select all grantee from user_privileges order by grantee, privilege_type; select id , character_set_name from collations order by id asc limit 10; @@ -455,8 +460,7 @@ eval SELECT * LINES TERMINATED BY '\n' FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; -# FIXME: why do we get different error numbers with and without OUTFILE ? -#FIXME this should fail! --error 1146 +# The above error is bug 28181 - a regression in 5.0.42 eval SELECT * FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; @@ -469,7 +473,7 @@ eval SELECT * FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM schemata LIMIT 0, 5; -# FIXME 3.2.1.2: why do we get different error numbers with and without OUTFILE ? +# The above error is bug 28181 - a regression in 5.0.42 eval SELECT * FROM schemata LIMIT 0, 5; @@ -479,8 +483,7 @@ eval SELECT * LINES TERMINATED BY '\n' FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; -# FIXME: why do we get different error numbers with and without OUTFILE ? -#FIXME this should fail! --error 1146 +# The above error is bug 28181 - a regression in 5.0.42 eval SELECT * FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; @@ -3014,12 +3017,13 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3029,7 +3033,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3049,12 +3054,13 @@ connect (user_12_2, localhost, user_2, , db_datadict); # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3064,7 +3070,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3085,12 +3092,13 @@ connect (user_12_3, localhost, user_3, , db_datadict); # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3100,7 +3108,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3121,12 +3130,13 @@ connection default; # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3136,7 +3146,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol diff --git a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc index 06b2d6fed45..260119f030f 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc @@ -36,7 +36,7 @@ eval select table_name, index_schema, index_name, index_type --replace_result $SERVER_NAME eval select * - from information_schema.user_privileges; + from information_schema.user_privileges order by grantee, privilege_type; # where grantee="'u_6_401013'@'%'"; eval select * diff --git a/mysql-test/suite/funcs_1/r/a_version_check.result b/mysql-test/suite/funcs_1/r/a_version_check.result deleted file mode 100644 index 865569f9e69..00000000000 --- a/mysql-test/suite/funcs_1/r/a_version_check.result +++ /dev/null @@ -1,11 +0,0 @@ - -. Just show the version string for which the results in suite -. funcs_1 have been checked. -. -. I know that the .result file of this check needs to -. updated with each new version --- THIS IS INTENDED! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -funcs_1 checked with version: 5.0.36 -Warnings: -Warning 1466 Leading spaces are removed from name ' ' diff --git a/mysql-test/suite/funcs_1/r/innodb__datadict.result b/mysql-test/suite/funcs_1/r/innodb__datadict.result index f1bf8e6e25b..675f30da14a 100644 --- a/mysql-test/suite/funcs_1/r/innodb__datadict.result +++ b/mysql-test/suite/funcs_1/r/innodb__datadict.result @@ -418,13 +418,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -474,7 +472,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -495,7 +493,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -516,7 +514,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -537,7 +535,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -558,7 +556,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -579,7 +577,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -600,7 +598,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -621,7 +619,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -642,7 +640,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -663,7 +661,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -684,7 +682,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -705,7 +703,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -726,7 +724,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -747,7 +745,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -768,7 +766,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -789,7 +787,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -812,7 +810,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -833,7 +831,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -854,7 +852,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -875,7 +873,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -896,7 +894,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -917,7 +915,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -938,7 +936,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -959,7 +957,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -980,7 +978,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1001,7 +999,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1022,7 +1020,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1043,7 +1041,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1064,7 +1062,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1085,7 +1083,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1106,7 +1104,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1127,7 +1125,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1148,7 +1146,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1169,7 +1167,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1190,7 +1188,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1202,7 +1200,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1211,7 +1209,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1232,7 +1230,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1253,7 +1251,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1274,7 +1272,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1295,7 +1293,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1316,7 +1314,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1337,7 +1335,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1358,7 +1356,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1379,7 +1377,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1400,7 +1398,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1421,7 +1419,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1442,7 +1440,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1463,7 +1461,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1484,7 +1482,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1505,7 +1503,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1526,7 +1524,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2100,9 +2098,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -2565,7 +2563,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE @@ -2599,91 +2597,89 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE select * from views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -2853,11 +2849,12 @@ Table or view 'tb2' is associated with the database 'test1'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3090,7 +3087,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3111,7 +3108,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3132,7 +3129,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3153,7 +3150,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3174,7 +3171,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3195,7 +3192,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3216,7 +3213,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3237,7 +3234,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3258,7 +3255,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3279,7 +3276,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3300,7 +3297,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3321,7 +3318,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3342,7 +3339,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3363,7 +3360,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3384,7 +3381,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3405,7 +3402,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3428,7 +3425,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3449,7 +3446,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3470,7 +3467,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3491,7 +3488,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3512,7 +3509,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3533,7 +3530,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3554,7 +3551,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3575,7 +3572,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3596,7 +3593,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3617,7 +3614,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3638,7 +3635,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3659,7 +3656,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3680,7 +3677,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3701,7 +3698,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3722,7 +3719,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3743,7 +3740,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3764,7 +3761,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3785,7 +3782,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3806,7 +3803,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3818,7 +3815,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -3827,7 +3824,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3848,7 +3845,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3869,7 +3866,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3890,7 +3887,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3911,7 +3908,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3932,7 +3929,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3953,7 +3950,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3974,7 +3971,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3995,7 +3992,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4016,7 +4013,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4037,7 +4034,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4058,7 +4055,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4079,7 +4076,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4100,7 +4097,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4121,7 +4118,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4142,7 +4139,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4570,7 +4567,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -77 +75 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 28 @@ -4639,7 +4636,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -4694,13 +4691,11 @@ test, tb3 test, tb4 test1, tb2 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -4737,37 +4732,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -4793,7 +4761,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -4819,7 +4786,31 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -6292,85 +6283,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6439,86 +6428,84 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6572,85 +6559,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6717,85 +6702,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6858,85 +6841,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7012,86 +6993,84 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7144,85 +7123,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -9135,9 +9112,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -12028,178 +12005,178 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test1 tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test4 t6 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test1 tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test4 t6 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -12411,7 +12388,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE @@ -12445,7 +12422,7 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE user_1@localhost test SELECT * FROM information_schema.statistics; diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 764aac53414..5fac88b8f14 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -3814,13 +3814,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3831,13 +3829,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result index bb087d5882e..0f2d54f01ba 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result @@ -484,8 +484,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index fe133f06da7..63d1c8a3131 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -448,7 +448,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -585,7 +586,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -605,7 +608,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1790,7 +1795,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1799,7 +1806,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1816,7 +1825,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1828,7 +1839,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/r/innodb_views.warnings b/mysql-test/suite/funcs_1/r/innodb_views.warnings deleted file mode 100644 index 2c9dc825a5d..00000000000 --- a/mysql-test/suite/funcs_1/r/innodb_views.warnings +++ /dev/null @@ -1,2 +0,0 @@ -mysqltest: Warning detected in included file ./suite/funcs_1/views/views_master.inc at line 3039: Suspicious command '--eror 1116' detected, was this intentional? Use # instead of -- to avoid this warning -mysqltest: Warning detected in included file ./suite/funcs_1/views/views_master.inc at line 3050: Suspicious command '--eror 1116' detected, was this intentional? Use # instead of -- to avoid this warning diff --git a/mysql-test/suite/funcs_1/r/memory__datadict.result b/mysql-test/suite/funcs_1/r/memory__datadict.result index deb6550802d..1dea8a5f4a9 100644 --- a/mysql-test/suite/funcs_1/r/memory__datadict.result +++ b/mysql-test/suite/funcs_1/r/memory__datadict.result @@ -416,13 +416,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -472,7 +470,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -493,7 +491,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -514,7 +512,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -535,7 +533,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -556,7 +554,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -577,7 +575,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -598,7 +596,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -619,7 +617,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -640,7 +638,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -661,7 +659,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -682,7 +680,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -703,7 +701,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -724,7 +722,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -745,7 +743,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -766,7 +764,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -787,7 +785,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -810,7 +808,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -831,7 +829,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -852,7 +850,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -873,7 +871,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -894,7 +892,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -915,7 +913,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -936,7 +934,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -957,7 +955,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -978,7 +976,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -999,7 +997,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1020,7 +1018,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1041,7 +1039,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1062,7 +1060,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1083,7 +1081,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1104,7 +1102,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1125,7 +1123,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1146,7 +1144,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1167,7 +1165,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1188,7 +1186,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1200,7 +1198,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1209,7 +1207,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1230,7 +1228,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1251,7 +1249,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1272,7 +1270,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1293,7 +1291,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1314,7 +1312,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1335,7 +1333,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1356,7 +1354,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1377,7 +1375,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1398,7 +1396,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1419,7 +1417,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1440,7 +1438,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1461,7 +1459,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1482,7 +1480,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1503,7 +1501,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1524,7 +1522,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2098,9 +2096,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -2548,7 +2546,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE @@ -2582,91 +2580,89 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE select * from views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -2836,11 +2832,12 @@ Table or view 'tb2' is associated with the database 'test1'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3073,7 +3070,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3094,7 +3091,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3115,7 +3112,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3136,7 +3133,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3157,7 +3154,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3178,7 +3175,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3199,7 +3196,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3220,7 +3217,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3241,7 +3238,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3262,7 +3259,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3283,7 +3280,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3304,7 +3301,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3325,7 +3322,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3346,7 +3343,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3367,7 +3364,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3388,7 +3385,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3411,7 +3408,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3432,7 +3429,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3453,7 +3450,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3474,7 +3471,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3495,7 +3492,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3516,7 +3513,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3537,7 +3534,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3558,7 +3555,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3579,7 +3576,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3600,7 +3597,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3621,7 +3618,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3642,7 +3639,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3663,7 +3660,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3684,7 +3681,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3705,7 +3702,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3726,7 +3723,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3747,7 +3744,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3768,7 +3765,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3789,7 +3786,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3801,7 +3798,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -3810,7 +3807,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3831,7 +3828,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3852,7 +3849,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3873,7 +3870,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3894,7 +3891,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3915,7 +3912,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3936,7 +3933,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3957,7 +3954,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3978,7 +3975,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3999,7 +3996,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4020,7 +4017,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4041,7 +4038,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4062,7 +4059,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4083,7 +4080,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4104,7 +4101,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4125,7 +4122,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4553,7 +4550,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -77 +75 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 28 @@ -4622,7 +4619,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -4677,13 +4674,11 @@ test, tb3 test, tb4 test1, tb2 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -4720,37 +4715,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -4776,7 +4744,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -4802,7 +4769,31 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -6275,85 +6266,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6422,86 +6411,84 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 HASH select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6555,85 +6542,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6700,85 +6685,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6841,85 +6824,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6995,86 +6976,84 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7127,85 +7106,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -9103,9 +9080,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -11926,178 +11903,178 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test1 tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test1 tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test4 t6 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -12309,7 +12286,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE @@ -12343,7 +12320,7 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE user_1@localhost test SELECT * FROM information_schema.statistics; diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 50caa20e8c7..08e49d1bf6f 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -3814,13 +3814,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3831,13 +3829,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result index a842bbc3ac7..9a14845d0eb 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_08.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result @@ -480,8 +480,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index dac9e877e48..516eef24439 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -452,7 +452,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -589,7 +590,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -609,7 +612,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1794,7 +1799,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1803,7 +1810,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1820,7 +1829,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1832,7 +1843,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/r/memory_views.warnings b/mysql-test/suite/funcs_1/r/memory_views.warnings deleted file mode 100644 index 2c9dc825a5d..00000000000 --- a/mysql-test/suite/funcs_1/r/memory_views.warnings +++ /dev/null @@ -1,2 +0,0 @@ -mysqltest: Warning detected in included file ./suite/funcs_1/views/views_master.inc at line 3039: Suspicious command '--eror 1116' detected, was this intentional? Use # instead of -- to avoid this warning -mysqltest: Warning detected in included file ./suite/funcs_1/views/views_master.inc at line 3050: Suspicious command '--eror 1116' detected, was this intentional? Use # instead of -- to avoid this warning diff --git a/mysql-test/suite/funcs_1/r/myisam__datadict.result b/mysql-test/suite/funcs_1/r/myisam__datadict.result index 484b7a7f5e9..e9082e7aee7 100644 --- a/mysql-test/suite/funcs_1/r/myisam__datadict.result +++ b/mysql-test/suite/funcs_1/r/myisam__datadict.result @@ -446,13 +446,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -502,7 +500,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -523,7 +521,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -544,7 +542,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -565,7 +563,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -586,7 +584,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -607,7 +605,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -628,7 +626,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -649,7 +647,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -670,7 +668,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -691,7 +689,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -712,7 +710,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -733,7 +731,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -754,7 +752,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -775,7 +773,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -796,7 +794,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -817,7 +815,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -840,7 +838,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -861,7 +859,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -882,7 +880,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -903,7 +901,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -924,7 +922,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -945,7 +943,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -966,7 +964,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -987,7 +985,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1008,7 +1006,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1029,7 +1027,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1050,7 +1048,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1071,7 +1069,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1092,7 +1090,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1113,7 +1111,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1134,7 +1132,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1155,7 +1153,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1176,7 +1174,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1197,7 +1195,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1218,7 +1216,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1230,7 +1228,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1239,7 +1237,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1260,7 +1258,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1281,7 +1279,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1302,7 +1300,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1323,7 +1321,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1344,7 +1342,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1365,7 +1363,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1386,7 +1384,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1407,7 +1405,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1428,7 +1426,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1449,7 +1447,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1470,7 +1468,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1491,7 +1489,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1512,7 +1510,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1533,7 +1531,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1554,7 +1552,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2128,9 +2126,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -2618,7 +2616,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE @@ -2652,91 +2650,89 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE select * from views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -2906,11 +2902,12 @@ Table or view 'tb2' is associated with the database 'test1'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3143,7 +3140,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3164,7 +3161,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3185,7 +3182,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3206,7 +3203,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3227,7 +3224,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3248,7 +3245,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3269,7 +3266,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3290,7 +3287,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3311,7 +3308,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3332,7 +3329,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3353,7 +3350,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3374,7 +3371,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3395,7 +3392,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3416,7 +3413,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3437,7 +3434,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3458,7 +3455,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3481,7 +3478,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3502,7 +3499,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3523,7 +3520,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -3544,7 +3541,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3565,7 +3562,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3586,7 +3583,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3607,7 +3604,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3628,7 +3625,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3649,7 +3646,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3670,7 +3667,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3691,7 +3688,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3712,7 +3709,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3733,7 +3730,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3754,7 +3751,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3775,7 +3772,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3796,7 +3793,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3817,7 +3814,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3838,7 +3835,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3859,7 +3856,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -3871,7 +3868,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -3880,7 +3877,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -3901,7 +3898,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3922,7 +3919,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3943,7 +3940,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3964,7 +3961,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -3985,7 +3982,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4006,7 +4003,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4027,7 +4024,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4048,7 +4045,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4069,7 +4066,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4090,7 +4087,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4111,7 +4108,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4132,7 +4129,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4153,7 +4150,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4174,7 +4171,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4195,7 +4192,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4623,7 +4620,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -77 +75 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 28 @@ -4692,7 +4689,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -4747,13 +4744,11 @@ test, tb3 test, tb4 test1, tb2 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -4790,37 +4785,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -4846,7 +4814,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -4872,7 +4839,31 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -6345,85 +6336,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6492,86 +6481,84 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6625,85 +6612,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6770,85 +6755,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -6911,85 +6894,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7065,86 +7046,84 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7197,85 +7176,83 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES -''@'' NULL USAGE NO +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -9205,9 +9182,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -12180,178 +12157,178 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test1 tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test1 tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test4 t6 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -12563,7 +12540,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE @@ -12597,7 +12574,7 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE user_1@localhost test SELECT * FROM information_schema.statistics; diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 13fffecd365..4f8a1b23bc0 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -3814,13 +3814,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3831,13 +3829,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Truncated incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result index 8a13e91d71d..ec8e12ff32d 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result @@ -484,8 +484,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 3a76024cf80..1dbebbccb29 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -470,7 +470,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -607,7 +608,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -627,7 +630,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1812,7 +1817,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1821,7 +1828,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1838,7 +1847,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1850,7 +1861,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/r/myisam_views.warnings b/mysql-test/suite/funcs_1/r/myisam_views.warnings deleted file mode 100644 index 2c9dc825a5d..00000000000 --- a/mysql-test/suite/funcs_1/r/myisam_views.warnings +++ /dev/null @@ -1,2 +0,0 @@ -mysqltest: Warning detected in included file ./suite/funcs_1/views/views_master.inc at line 3039: Suspicious command '--eror 1116' detected, was this intentional? Use # instead of -- to avoid this warning -mysqltest: Warning detected in included file ./suite/funcs_1/views/views_master.inc at line 3050: Suspicious command '--eror 1116' detected, was this intentional? Use # instead of -- to avoid this warning diff --git a/mysql-test/suite/funcs_1/t/a_version_check.test b/mysql-test/suite/funcs_1/t/a_version_check.test deleted file mode 100755 index 60bd5b3c161..00000000000 --- a/mysql-test/suite/funcs_1/t/a_version_check.test +++ /dev/null @@ -1,29 +0,0 @@ -#### suite/funcs_1/t/a_version_check.test -# -# just a simple check of the version to be sure the correct server version is -# checked against the funcs_1 tests. - -# just show machine and version to be sure we are testing the correct files -# -let $message= . Just show the version string for which the results in suite - . funcs_1 have been checked. - . - . I know that the .result file of this check needs to - . updated with each new version --- THIS IS INTENDED!; ---source include/show_msg.inc - ---disable_query_log -SELECT CONCAT('funcs_1 checked with version: ', SUBSTR(version(), 1, 6 ) ) AS " "; -#SELECT CONCAT('aa = ', 'bb'); -#SELECT CONCAT('aa = ', 'bb') AS " "; - -if (0) -{ - # these more detailed results create differences between the OS. - # mioght be used later when we enable OS dependent .result files - --vertical_results - SELECT @@version_compile_os AS 'vers_comp_os', current_date; - SHOW VARIABLES LIKE 'vers%'; - --horizontal_results -} - diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index e65cc8e934c..6833178a353 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,6 +10,6 @@ # ############################################################################## -innodb_storedproc: switched off (too much changed output from WL#2984, needs to be checked) -memory_storedproc: switched off (too much changed output from WL#2984, needs to be checked) -myisam_storedproc: switched off (too much changed output from WL#2984, needs to be checked) +innodb_storedproc: (changes of WL#2984, using storeproc_nn instead) +memory_storedproc: (changes of WL#2984, using storeproc_nn instead) +myisam_storedproc: (changes of WL#2984, using storeproc_nn instead) diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index f01b1b01c1f..b06873af159 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -3036,7 +3036,9 @@ let $sublevel= `SELECT @max_level`; eval CREATE VIEW test1.v$level AS SELECT f1, f2 FROM test3.t1 tab1 NATURAL JOIN test1.v$sublevel tab2; eval SHOW CREATE VIEW test1.v$level; ---eror 1116 +# the following line as written as '--eror 1116' and the command +# is successful so assuming no expected error was intended +# --error 1116 eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$level; let $message= The output of following EXPLAIN is deactivated, because the result @@ -3047,7 +3049,9 @@ if (1) { --disable_result_log } ---eror 1116 +# the following line as written as '--eror 1116' and the command +# is successful so assuming no expected error was intended +# --error 1116 eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$level; if (1) From 325c6466c1872b6e86abef86690aa6d059b4d0ad Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 May 2007 20:48:39 +0200 Subject: [PATCH 048/137] ndb - dynarr256 fix release iterator storage/ndb/src/kernel/vm/DynArr256.cpp: fix release storage/ndb/src/kernel/vm/DynArr256.hpp: fix release --- storage/ndb/src/kernel/vm/DynArr256.cpp | 101 +++++++++++++----------- storage/ndb/src/kernel/vm/DynArr256.hpp | 12 ++- 2 files changed, 64 insertions(+), 49 deletions(-) diff --git a/storage/ndb/src/kernel/vm/DynArr256.cpp b/storage/ndb/src/kernel/vm/DynArr256.cpp index 83e36f34dba..2d9cc6869f4 100644 --- a/storage/ndb/src/kernel/vm/DynArr256.cpp +++ b/storage/ndb/src/kernel/vm/DynArr256.cpp @@ -345,18 +345,28 @@ err: void DynArr256::init(ReleaseIterator &iter) { - iter.m_sz = 0; + iter.m_sz = 1; iter.m_pos = 0; - iter.m_ptr_i[0] = m_head.m_ptr_i; - iter.m_ptr_i[1] = RNIL; + iter.m_ptr_i[0] = RNIL; + iter.m_ptr_i[1] = m_head.m_ptr_i; iter.m_ptr_i[2] = RNIL; iter.m_ptr_i[3] = RNIL; + iter.m_ptr_i[4] = RNIL; } -bool -DynArr256::release(ReleaseIterator &iter) +/** + * Iter is in next pos + * + * 0 - done + * 1 - data + * 2 - no data + */ +Uint32 +DynArr256::release(ReleaseIterator &iter, Uint32 * retptr) { - Uint32 ptrI = iter.m_ptr_i[iter.m_sz]; + Uint32 sz = iter.m_sz; + Uint32 pos = iter.m_pos; + Uint32 ptrI = iter.m_ptr_i[sz]; Uint32 page_no = ptrI >> DA256_BITS; Uint32 page_idx = ptrI & DA256_MASK; Uint32 type_id = (~m_pool.m_type_id) & 0xFFFF; @@ -365,9 +375,8 @@ DynArr256::release(ReleaseIterator &iter) if (ptrI != RNIL) { - Uint32 tmp = iter.m_pos & 255; - Uint32 p0 = tmp; - for (; p0<256 && p0 < tmp + 16; p0++) + Uint32 p0 = iter.m_pos & 255; + for (; p0<256; p0++) { Uint32 *retVal, *magic_ptr, p; if (p0 != 255) @@ -390,55 +399,53 @@ DynArr256::release(ReleaseIterator &iter) } Uint32 magic = *magic_ptr; + Uint32 val = *retVal; if (unlikely(! ((magic & (1 << p)) && (magic >> 16) == type_id))) goto err; - Uint32 val = * retVal; - if (val != RNIL) + if (sz == m_head.m_sz) { - if (iter.m_sz + 2 == m_head.m_sz) + * retptr = val; + p0++; + if (p0 != 256) { - * retVal = RNIL; - m_pool.release(val); - iter.m_pos = (iter.m_pos & ~255) + p0; - return false; + /** + * Move next + */ + iter.m_pos &= ~(Uint32)255; + iter.m_pos |= p0; } else { - * retVal = RNIL; - iter.m_sz++; - iter.m_ptr_i[iter.m_sz] = val; - iter.m_pos = (p0 << 8); - return false; + /** + * Move up + */ + m_pool.release(ptrI); + iter.m_sz --; + iter.m_pos >>= 8; } + return 1; + } + else if (val != RNIL) + { + iter.m_sz++; + iter.m_ptr_i[iter.m_sz] = val; + iter.m_pos = (p0 << 8); + * retVal = RNIL; + return 2; } } - if (p0 == 256) - { - if (iter.m_sz == 0) - goto done; - iter.m_sz--; - iter.m_pos >>= 8; - - m_pool.release(ptrI); - return false; - } - else - { - iter.m_pos = (iter.m_pos & ~255) + p0; - return false; - } + assert(p0 == 256); + m_pool.release(ptrI); + iter.m_sz --; + iter.m_pos >>= 8; + return 2; } done: - if (m_head.m_ptr_i != RNIL) - { - m_pool.release(m_head.m_ptr_i); - } - new (&m_head) Head(); - return true; + return 0; err: require(false); @@ -639,6 +646,7 @@ static void simple(DynArr256 & arr, int argc, char* argv[]) { + ndbout_c("argc: %d", argc); for (Uint32 i = 1; i<(Uint32)argc; i++) { Uint32 * s = arr.set(atoi(argv[i])); @@ -866,7 +874,8 @@ write(DynArr256& arr, int argc, char ** argv) ndbout_c("Elapsed %lldus -> %f us/set", start, uspg); DynArr256::ReleaseIterator iter; arr.init(iter); - while(!arr.release(iter)); + Uint32 val; + while(arr.release(iter, &val)); } } @@ -903,7 +912,7 @@ main(int argc, char** argv) DynArr256::Head head; DynArr256 arr(pool, head); - if (strcmp(argv[1], "--args") == 0) + if (strcmp(argv[1], "--simple") == 0) simple(arr, argc, argv); else if (strcmp(argv[1], "--basic") == 0) basic(arr, argc, argv); @@ -914,8 +923,8 @@ main(int argc, char** argv) DynArr256::ReleaseIterator iter; arr.init(iter); - Uint32 cnt = 0; - while (!arr.release(iter)) cnt++; + Uint32 cnt = 0, val; + while (arr.release(iter, &val)) cnt++; ndbout_c("allocatedpages: %d allocatednodes: %d releasednodes: %d" " releasecnt: %d", diff --git a/storage/ndb/src/kernel/vm/DynArr256.hpp b/storage/ndb/src/kernel/vm/DynArr256.hpp index 31329add1a2..780dee7e4bf 100644 --- a/storage/ndb/src/kernel/vm/DynArr256.hpp +++ b/storage/ndb/src/kernel/vm/DynArr256.hpp @@ -49,6 +49,8 @@ public: Uint32 m_ptr_i; Uint32 m_sz; + + bool isEmpty() const { return m_sz == 0;} }; DynArr256(DynArr256Pool & pool, Head& head) : @@ -61,12 +63,16 @@ public: { Uint32 m_sz; Uint32 m_pos; - Uint32 m_ptr_i[4]; + Uint32 m_ptr_i[5]; }; void init(ReleaseIterator&); - bool release(ReleaseIterator&); - + /** + * return 0 - done + * 1 - data (in retptr) + * 2 - nodata + */ + Uint32 release(ReleaseIterator&, Uint32* retptr); protected: Head & m_head; DynArr256Pool & m_pool; From 6cb6bb85942a6dd9600b4167ecd5decd1f4615ca Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 May 2007 18:25:29 -0700 Subject: [PATCH 049/137] WL#2936 Fix compiler warnings, Fix help output - this fixes im test failures. Fix incomplete change of SET plugin vars to ulonglong. Allow ER() to work without crashing when errmsg.sys has not been loaded. include/mysql/plugin.h: wl2936 slip in const modifier for default values, this removes compiler warnings when assigning a string const as default value. sql/derror.cc: WL2936 Allow init_errmessage() to return upon failure. Initialize errmesg to an array of empty strings if it failed to load errmsg.sys sql/mysqld.cc: wl2936 Include Ingo's compiler-warnings fix. If init_errmessage() failed to load errmsg.sys, abort. Failure to set working directory not fatal when '--help' is specified, as server will terminate anyway after displaying help information. sql/sql_plugin.cc: wl2936 complete change of SET vars from ulong to ulonglong. --- include/mysql/plugin.h | 5 +++-- sql/derror.cc | 23 +++++++++++++++-------- sql/mysqld.cc | 12 +++++++++--- sql/sql_plugin.cc | 14 ++++++-------- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index fd43e9688d0..7b224695324 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -193,7 +193,8 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, #define DECLARE_MYSQL_SYSVAR_BASIC(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ - type *value; type def_val; \ + type *value; \ + const type def_val; \ } MYSQL_SYSVAR_NAME(name) #define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \ @@ -215,7 +216,7 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, #define DECLARE_MYSQL_THDVAR_BASIC(name, type) struct { \ MYSQL_PLUGIN_VAR_HEADER; \ int offset; \ - type def_val; \ + const type def_val; \ DECLARE_THDVAR_FUNC(type); \ } MYSQL_SYSVAR_NAME(name) diff --git a/sql/derror.cc b/sql/derror.cc index 0e74d411b1f..eca553d1bf8 100644 --- a/sql/derror.cc +++ b/sql/derror.cc @@ -31,6 +31,9 @@ static void init_myfunc_errs(void); DESCRIPTION This function can be called multiple times to reload the messages. + If it fails to load the messages, it will fail softly by initializing + the errmesg pointer to an array of empty strings or by keeping the + old array if it exists. RETURN FALSE OK @@ -39,7 +42,7 @@ static void init_myfunc_errs(void); bool init_errmessage(void) { - const char **errmsgs; + const char **errmsgs, **ptr; DBUG_ENTER("init_errmessage"); /* @@ -49,8 +52,15 @@ bool init_errmessage(void) errmsgs= my_error_unregister(ER_ERROR_FIRST, ER_ERROR_LAST); /* Read messages from file. */ - if (read_texts(ERRMSG_FILE, &errmsgs, ER_ERROR_LAST - ER_ERROR_FIRST + 1)) - DBUG_RETURN(TRUE); + if (read_texts(ERRMSG_FILE, &errmsgs, ER_ERROR_LAST - ER_ERROR_FIRST + 1) && + !errmsgs) + { + if (!(errmsgs= (const char**) my_malloc((ER_ERROR_LAST-ER_ERROR_FIRST+1)* + sizeof(char*), MYF(0)))) + DBUG_RETURN(TRUE); + for (ptr= errmsgs; ptr < errmsgs + ER_ERROR_LAST - ER_ERROR_FIRST; ptr++) + *ptr= ""; + } /* Register messages for use with my_error(). */ if (my_error_register(errmsgs, ER_ERROR_FIRST, ER_ERROR_LAST)) @@ -66,7 +76,6 @@ bool init_errmessage(void) /* Read text from packed textfile in language-directory */ - /* If we can't read messagefile then it's panic- we can't continue */ static bool read_texts(const char *file_name,const char ***point, uint error_messages) @@ -79,7 +88,6 @@ static bool read_texts(const char *file_name,const char ***point, uchar head[32],*pos; DBUG_ENTER("read_texts"); - *point=0; // If something goes wrong LINT_INIT(buff); funktpos=0; if ((file=my_open(fn_format(name,file_name,language,"",4), @@ -119,7 +127,7 @@ but it should contain at least %d error messages.\n\ Check that the above file is the right version for this program!", name,count,error_messages); VOID(my_close(file,MYF(MY_WME))); - unireg_abort(1); + DBUG_RETURN(1); } x_free((gptr) *point); /* Free old language */ @@ -162,8 +170,7 @@ err: err1: if (file != FERR) VOID(my_close(file,MYF(MY_WME))); - unireg_abort(1); - DBUG_RETURN(1); // keep compiler happy + DBUG_RETURN(1); } /* read_texts */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index a2956b7e53a..fcb372e1c92 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1331,6 +1331,7 @@ static void clean_up_mutexes() ** Init IP and UNIX socket ****************************************************************************/ +#ifndef EMBEDDED_LIBRARY static void set_ports() { char *env; @@ -1355,7 +1356,6 @@ static void set_ports() } } -#ifndef EMBEDDED_LIBRARY /* Change to run as another user if started with --user */ static struct passwd *check_user(const char *user) @@ -2614,16 +2614,18 @@ int STDCALL handle_kill(ulong ctrl_type) } #endif +#if !defined(EMBEDDED_LIBRARY) static const char *load_default_groups[]= { #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE "mysql_cluster", #endif "mysqld","server", MYSQL_BASE_VERSION, 0, 0}; -#if defined(__WIN__) && !defined(EMBEDDED_LIBRARY) +#if defined(__WIN__) static const int load_default_groups_sz= sizeof(load_default_groups)/sizeof(load_default_groups[0]); #endif +#endif /*!EMBEDDED_LIBRARY*/ /* @@ -3384,6 +3386,10 @@ server."); } } + /* if the errmsg.sys is not loaded, terminate to maintain behaviour */ + if (!errmesg[0][0]) + unireg_abort(1); + /* We have to initialize the storage engines before CSV logging */ if (ha_init()) { @@ -3743,7 +3749,7 @@ int main(int argc, char **argv) We have enough space for fiddling with the argv, continue */ check_data_home(mysql_real_data_home); - if (my_setwd(mysql_real_data_home,MYF(MY_WME))) + if (my_setwd(mysql_real_data_home,MYF(MY_WME)) && !opt_help) unireg_abort(1); /* purecov: inspected */ mysql_data_home= mysql_data_home_buff; mysql_data_home[0]=FN_CURLIB; // all paths are relative from here diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index a9816eb4f98..590fee82027 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1939,8 +1939,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var, char buff[STRING_BUFFER_USUAL_SIZE], *error= 0; const char *strvalue= "NULL", *str; TYPELIB *typelib; - long result; - ulonglong tmp; + ulonglong result; uint error_len; bool not_used; int length; @@ -1966,18 +1965,17 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var, } else { - if (value->val_int(value, (long long *)&tmp)) + if (value->val_int(value, (long long *)&result)) goto err; - if (unlikely((tmp >= (ULL(1) << typelib->count)) && + if (unlikely((result >= (ULL(1) << typelib->count)) && (typelib->count < sizeof(long)*8))) { - llstr(tmp, buff); + llstr(result, buff); strvalue= buff; goto err; } - result= (long) tmp; } - *(long*)save= result; + *(ulonglong*)save= result; return 0; err: my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->name, strvalue); @@ -2887,7 +2885,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, if (!opt->check) opt->check= check_func_set; if (!opt->update) - opt->update= update_func_long; + opt->update= update_func_longlong; break; default: sql_print_error("Unknown variable type code 0x%x in plugin '%s'.", From 8e8ece72eb0530bee9b200d92ba14a143cd1dec9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 May 2007 23:34:14 -0700 Subject: [PATCH 050/137] Fixed bug #28188: performance degradation for outer join queries to which 'not exists' optimization is applied. In fact 'not exists' optimization did not work anymore after the patch introducing the evaluate_join_record function had been applied. Corrected the evaluate_join_record function to respect the 'not_exists' optimization. mysql-test/r/join_outer.result: Added a test case for bug #28188. mysql-test/t/join_outer.test: Added a test case for bug #28188. sql/sql_select.cc: Fixed bug #28188: performance degradation for outer join queries to which 'not exists' optimization is applied. Corrected the evaluate_join_record function to respect the 'not_exists' optimization. --- mysql-test/r/join_outer.result | 25 +++++++++++++++++++++++++ mysql-test/t/join_outer.test | 20 ++++++++++++++++++++ sql/sql_select.cc | 5 ++--- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index df66336bd81..c62601946c2 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1214,3 +1214,28 @@ SELECT * FROM t1 LEFT JOIN t2 USING(f1) WHERE f1='Bla'; f1 f2 f3 bla blah sheep DROP TABLE t1,t2; +CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8)); +CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id)); +INSERT INTO t1 VALUES +(1,'aaaaaaa'), (5,'eeeeeee'), (4,'ddddddd'), (2,'bbbbbbb'), (3,'ccccccc'); +INSERT INTO t2 VALUES +(3,10), (2,20), (5,30), (3,20), (5,10), (3,40), (3,30), (2,10), (2,40); +EXPLAIN +SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 5 +1 SIMPLE t2 ref idx idx 4 test.t1.id 2 Using where; Not exists +flush status; +SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; +id a +1 aaaaaaa +4 ddddddd +show status like 'Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 5 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 6 +DROP TABLE t1,t2; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index a0620e144c2..51e79a20d65 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -825,3 +825,23 @@ SELECT * FROM t1 LEFT JOIN t2 USING(f1) WHERE f1='bla'; SELECT * FROM t1 LEFT JOIN t2 USING(f1) WHERE f1='Bla'; DROP TABLE t1,t2; + +# +# Bug 28188: 'not exists' optimization for outer joins +# + +CREATE TABLE t1 (id int PRIMARY KEY, a varchar(8)); +CREATE TABLE t2 (id int NOT NULL, b int NOT NULL, INDEX idx(id)); +INSERT INTO t1 VALUES + (1,'aaaaaaa'), (5,'eeeeeee'), (4,'ddddddd'), (2,'bbbbbbb'), (3,'ccccccc'); +INSERT INTO t2 VALUES + (3,10), (2,20), (5,30), (3,20), (5,10), (3,40), (3,30), (2,10), (2,40); + +EXPLAIN +SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; + +flush status; +SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL; +show status like 'Handler_read%'; + +DROP TABLE t1,t2; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b7ac2130784..acef5a5ff48 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10526,7 +10526,6 @@ static enum_nested_loop_state evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, int error, my_bool *report_error) { - bool not_exists_optimize= join_tab->table->reginfo.not_exists_optimize; bool not_used_in_distinct=join_tab->not_used_in_distinct; ha_rows found_records=join->found_records; COND *select_cond= join_tab->select_cond; @@ -10563,6 +10562,8 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, first_unmatched->found= 1; for (JOIN_TAB *tab= first_unmatched; tab <= join_tab; tab++) { + if (tab->table->reginfo.not_exists_optimize) + return NESTED_LOOP_NO_MORE_ROWS; /* Check all predicates that has just been activated. */ /* Actually all predicates non-guarded by first_unmatched->found @@ -10608,8 +10609,6 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, if (found) { enum enum_nested_loop_state rc; - if (not_exists_optimize) - return NESTED_LOOP_NO_MORE_ROWS; /* A match from join_tab is found for the current partial join. */ rc= (*join_tab->next_select)(join, join_tab+1, 0); if (rc != NESTED_LOOP_OK && rc != NESTED_LOOP_NO_MORE_ROWS) From 4b25d4a0d77e1bf3aebb015f69cf3fcfa524c27f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 10:02:27 +0200 Subject: [PATCH 051/137] ndb_insert.test, ndb_insert.result, ha_ndbcluster.cc: Bug#27980 INSERT IGNORE wrongly ignores NULLs in unique index: added check for null values mysql-test/t/ndb_insert.test: Bug#27980 INSERT IGNORE wrongly ignores NULLs in unique index: added check for null values sql/ha_ndbcluster.cc: Bug#27980 INSERT IGNORE wrongly ignores NULLs in unique index: added check for null values mysql-test/r/ndb_insert.result: Bug#27980 INSERT IGNORE wrongly ignores NULLs in unique index: added check for null values --- mysql-test/r/ndb_insert.result | 8 +++++++ mysql-test/t/ndb_insert.test | 9 ++++++++ sql/ha_ndbcluster.cc | 42 ++++++++++++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/ndb_insert.result b/mysql-test/r/ndb_insert.result index 0818f9ce9ac..e7275bde2b8 100644 --- a/mysql-test/r/ndb_insert.result +++ b/mysql-test/r/ndb_insert.result @@ -649,3 +649,11 @@ pk a 6 NULL 7 4 DROP TABLE t1; +create table t1(a int primary key, b int, unique key(b)) engine=ndb; +insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); +select * from t1 order by a; +a b +1 0 +2 NULL +3 NULL +drop table t1; diff --git a/mysql-test/t/ndb_insert.test b/mysql-test/t/ndb_insert.test index bf25ca9a133..f346b7dc4ab 100644 --- a/mysql-test/t/ndb_insert.test +++ b/mysql-test/t/ndb_insert.test @@ -630,4 +630,13 @@ INSERT IGNORE INTO t1 VALUES (4,NULL),(5,NULL),(6,NULL),(7,4); SELECT * FROM t1 ORDER BY pk; DROP TABLE t1; +# +# Bug #27980 INSERT IGNORE wrongly ignores NULLs in unique index +# + +create table t1(a int primary key, b int, unique key(b)) engine=ndb; +insert ignore into t1 values (1,0), (2,0), (2,null), (3,null); +select * from t1 order by a; +drop table t1; + # End of 4.1 tests diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 8701a216b8e..9b48e0d4f38 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -1630,6 +1630,34 @@ bool ha_ndbcluster::check_all_operations_for_error(NdbTransaction *trans, DBUG_RETURN(true); } + +/** + * Check if record contains any null valued columns that are part of a key + */ +static +int +check_null_in_record(const KEY* key_info, const byte *record) +{ + KEY_PART_INFO *curr_part, *end_part; + curr_part= key_info->key_part; + end_part= curr_part + key_info->key_parts; + + while (curr_part != end_part) + { + if (curr_part->null_bit && + (record[curr_part->null_offset] & curr_part->null_bit)) + return 1; + curr_part++; + } + return 0; + /* + We could instead pre-compute a bitmask in table_share with one bit for + every null-bit in the key, and so check this just by OR'ing the bitmask + with the null bitmap in the record. + But not sure it's worth it. + */ +} + /* * Peek to check if any rows already exist with conflicting * primary key or unique index values @@ -1671,7 +1699,17 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record, bool check_pk) if (i != table->s->primary_key && key_info->flags & HA_NOSAME) { - // A unique index is defined on table + /* + A unique index is defined on table. + We cannot look up a NULL field value in a unique index. But since + keys with NULLs are not indexed, such rows cannot conflict anyway, so + we just skip the index in this case. + */ + if (check_null_in_record(key_info, record)) + { + DBUG_PRINT("info", ("skipping check for key with NULL")); + continue; + } NdbIndexOperation *iop; NDBINDEX *unique_index = (NDBINDEX *) m_index[i].unique_index; key_part= key_info->key_part; @@ -2816,7 +2854,7 @@ int ha_ndbcluster::index_end() } /** - * Check if key contains null + * Check if key contains nullable columns */ static int From deab2c1a661ebaf9ca5d5317e46abe334e6351e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 12:31:53 +0200 Subject: [PATCH 052/137] ha_ndbcluster.cc: Bug#27980 INSERT IGNORE wrongly ignores NULLs in unique index: added check for null values sql/ha_ndbcluster.cc: Bug#27980 INSERT IGNORE wrongly ignores NULLs in unique index: added check for null values --- sql/ha_ndbcluster.cc | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5bbaa793939..02fbee7237f 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -1909,6 +1909,33 @@ bool ha_ndbcluster::check_all_operations_for_error(NdbTransaction *trans, } +/** + * Check if record contains any null valued columns that are part of a key + */ +static +int +check_null_in_record(const KEY* key_info, const byte *record) +{ + KEY_PART_INFO *curr_part, *end_part; + curr_part= key_info->key_part; + end_part= curr_part + key_info->key_parts; + + while (curr_part != end_part) + { + if (curr_part->null_bit && + (record[curr_part->null_offset] & curr_part->null_bit)) + return 1; + curr_part++; + } + return 0; + /* + We could instead pre-compute a bitmask in table_share with one bit for + every null-bit in the key, and so check this just by OR'ing the bitmask + with the null bitmap in the record. + But not sure it's worth it. + */ +} + /* * Peek to check if any rows already exist with conflicting * primary key or unique index values @@ -1966,7 +1993,17 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record, if (i != table->s->primary_key && key_info->flags & HA_NOSAME) { - // A unique index is defined on table + /* + A unique index is defined on table. + We cannot look up a NULL field value in a unique index. But since + keys with NULLs are not indexed, such rows cannot conflict anyway, so + we just skip the index in this case. + */ + if (check_null_in_record(key_info, record)) + { + DBUG_PRINT("info", ("skipping check for key with NULL")); + continue; + } NdbIndexOperation *iop; const NDBINDEX *unique_index = m_index[i].unique_index; key_part= key_info->key_part; From 589ae7b4e090aa866b492a823f7e773bda03e1ec Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 14:01:49 +0200 Subject: [PATCH 053/137] Format corrections for various "Makefile.am": Leading tab, no trailing blank. client/Makefile.am: "Makefile" command lines must start with a tab, not with blanks. libmysqld/Makefile.am: "Makefile" command lines must start with a tab, not with blanks. netware/Makefile.am: "Makefile" command lines must start with a tab, not with blanks. scripts/Makefile.am: "Makefile" command lines must start with a tab, not with blanks. win/Makefile.am: After a backslash (to mark a continuation line) there must not be a trailing blank. --- client/Makefile.am | 14 +++++++------- libmysqld/Makefile.am | 6 +++--- netware/Makefile.am | 6 +++--- scripts/Makefile.am | 2 +- win/Makefile.am | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client/Makefile.am b/client/Makefile.am index 5f1569ba2c4..c7663c7da82 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -64,13 +64,13 @@ link_sources: for f in $(sql_src) ; do \ rm -f $$f; \ @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \ - done; \ - for f in $(strings_src) ; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ - done; \ - rm -f $(srcdir)/my_user.c; \ - @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c; + done; \ + for f in $(strings_src) ; do \ + rm -f $(srcdir)/$$f; \ + @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ + done; \ + rm -f $(srcdir)/my_user.c; \ + @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c; # Don't update the files from bitkeeper diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 330e72e5507..95e3e539eee 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -127,11 +127,11 @@ link_sources: for f in $(sqlsources); do \ rm -f $$f; \ if test -e $(top_srcdir)/sql/$$f ; \ - then \ + then \ @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \ - else \ + else \ @LN_CP_F@ $(top_builddir)/sql/$$f $$f; \ - fi ; \ + fi ; \ done; \ for f in $(libmysqlsources); do \ rm -f $$f; \ diff --git a/netware/Makefile.am b/netware/Makefile.am index c83a5b389ab..3ec9c7794bf 100644 --- a/netware/Makefile.am +++ b/netware/Makefile.am @@ -90,20 +90,20 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def install_test_db.ncf \ # Build init_db.sql from the files that contain # the system tables for this version of MySQL plus any commands init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \ - $(top_srcdir)/scripts/mysql_system_tables_data.sql + $(top_srcdir)/scripts/mysql_system_tables_data.sql @echo "Building $@"; @echo "CREATE DATABASE mysql;" > $@; @echo "CREATE DATABASE test;" >> $@; @echo "use mysql;" >> $@; @cat $(top_srcdir)/scripts/mysql_system_tables.sql \ - $(top_srcdir)/scripts/mysql_system_tables_fix.sql >> $@; + $(top_srcdir)/scripts/mysql_system_tables_fix.sql >> $@; # Build test_db.sql from init_db.sql plus # some test data test_db.sql: init_db.sql $(top_srcdir)/scripts/mysql_test_data_timezone.sql @echo "Building $@"; @cat init_db.sql \ - $(top_srcdir)/scripts/mysql_test_data_timezone.sql >> $@; + $(top_srcdir)/scripts/mysql_test_data_timezone.sql >> $@; endif diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 79f4666f855..97691318cc6 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -124,7 +124,7 @@ mysql_fix_privilege_tables.sql: mysql_system_tables.sql \ mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) $(top_builddir)/scripts/comp_sql$(EXEEXT) \ - mysql_fix_privilege_tables \ + mysql_fix_privilege_tables \ $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ diff --git a/win/Makefile.am b/win/Makefile.am index c6632737d7b..89f0d65b528 100755 --- a/win/Makefile.am +++ b/win/Makefile.am @@ -14,7 +14,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## Process this file with automake to create Makefile.in -EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat configure.js README \ +EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat configure.js README \ mysql_manifest.cmake create_manifest.js # Don't update the files from bitkeeper From aeeac397e9a195fccd51103676a90fe565604f6f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 14:16:21 +0200 Subject: [PATCH 054/137] Manual merge: Makefile lines must start with tab, not blank. --- client/Makefile.am | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/Makefile.am b/client/Makefile.am index d482512e411..2d8bd918734 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -109,13 +109,13 @@ link_sources: for f in $(sql_src) ; do \ rm -f $$f; \ @LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \ - done; \ - for f in $(strings_src) ; do \ - rm -f $(srcdir)/$$f; \ - @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ - done; \ - rm -f $(srcdir)/my_user.c; \ - @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c; + done; \ + for f in $(strings_src) ; do \ + rm -f $(srcdir)/$$f; \ + @LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \ + done; \ + rm -f $(srcdir)/my_user.c; \ + @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c; echo timestamp > link_sources; # Don't update the files from bitkeeper From 11a630c4ca7099b8599e63b2f7928d8fac69e86b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 15:50:08 +0200 Subject: [PATCH 055/137] generate map files on windows CMakeLists.txt: Generate map files for executables --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a286071bb0..6e6ac835b5d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,9 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) + # generate map files + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS") + # remove support for Exception handling STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) From 36305254293e2562d6c1f5f719a24bd481bc790d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 07:50:47 -0700 Subject: [PATCH 056/137] Coeection to the bug format to for better search - review comment --- .../suite/funcs_1/datadict/datadict_master.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/funcs_1/datadict/datadict_master.inc b/mysql-test/suite/funcs_1/datadict/datadict_master.inc index 385b17be9ee..03d3eeb3777 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_master.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_master.inc @@ -460,7 +460,9 @@ eval SELECT * LINES TERMINATED BY '\n' FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; -# The above error is bug 28181 - a regression in 5.0.42 +# The above will fail with access error as long as +# BUBG#28181 - a regression introduced in 5.0.42 is not fixed + eval SELECT * FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; @@ -473,7 +475,9 @@ eval SELECT * FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM schemata LIMIT 0, 5; -# The above error is bug 28181 - a regression in 5.0.42 +# The above will fail with access error as long as +# BUBG#28181 - a regression introduced in 5.0.42 is not fixed + eval SELECT * FROM schemata LIMIT 0, 5; @@ -483,7 +487,9 @@ eval SELECT * LINES TERMINATED BY '\n' FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; -# The above error is bug 28181 - a regression in 5.0.42 +# The above will fail with access error as long as +# BUBG#28181 - a regression introduced in 5.0.42 is not fixed + eval SELECT * FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; From 09812630ca71ce1060247035c7d006ffbe7c8827 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 16:51:15 +0200 Subject: [PATCH 057/137] RPM spec file error: Trailing '*' to cover '.gz' for a man page was missing. support-files/mysql.spec.sh: Man pages may/will be compressed, so the file name needs trailing '*' to cover '.gz'. --- support-files/mysql.spec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index ab544b65f74..b28af51d43e 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -556,7 +556,7 @@ fi %doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_install_db.1 +%doc %attr(644, root, man) %{_mandir}/man1/mysql_install_db.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1* From cd66d3dd12d1fd125c7a8bc5c3f2249dbcbab1cb Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 17:10:41 +0200 Subject: [PATCH 058/137] "ndb_size.tmpl" is gone (NDB change 2007-04-24), so remove it from the spec file. --- support-files/mysql.spec.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 5af5a0107ac..39c7f866e4f 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -650,7 +650,6 @@ fi %attr(755, root, root) %{_bindir}/ndb_size.pl %attr(755, root, root) %{_bindir}/ndb_test_platform %attr(755, root, root) %{_bindir}/ndb_waiter -%attr(-, root, root) %{_datadir}/mysql/ndb_size.tmpl %doc %attr(644, root, man) %{_mandir}/man1/ndb_config.1* %doc %attr(644, root, man) %{_mandir}/man1/ndb_desc.1* %doc %attr(644, root, man) %{_mandir}/man1/ndb_error_reporter.1* @@ -726,6 +725,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Wed May 02 2007 Joerg Bruehe + +- "ndb_size.tmpl" is not needed any more, + "man1/mysql_install_db.1" lacked the trailing '*'. + * Sat Apr 07 2007 Kent Boortz - Removed man page for "mysql_create_system_tables" From 2478a8be0c3d438119b3c024822a61a69ea972ce Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 20:07:01 +0200 Subject: [PATCH 059/137] Resolve a possible timing issue with "scripts/mysql_fix_privilege_tables_sql.c" in the source tarball, this is essential for cross builds, like for NetWare. scripts/Makefile.am: On a fast build machine, both the source (mysql_fix_privilege_tables.sql) and the generated file (mysql_fix_privilege_tables_sql.c) may have identical timestamps (granularity is one second only, may be too coarse). If that happens, the Makefile rule will fire, and "comp_sql" will be built and called - which fails in a cross build, like for NetWare. Prevent that by sleeping for 5 (five) seconds, this will ensure a time difference. --- scripts/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index cb0658f8756..754ca2ea4c0 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -122,9 +122,11 @@ mysql_fix_privilege_tables.sql: mysql_system_tables.sql \ # # Build mysql_fix_privilege_tables_sql.c from # mysql_fix_privileges_tables.sql using comp_sql +# The "sleep" ensures the generated file has a younger timestamp than its source. # mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) + sleep 5 $(top_builddir)/scripts/comp_sql$(EXEEXT) \ mysql_fix_privilege_tables \ $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ From f32d1e9b4962b91b8b83ab67f435925130b4a82e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 May 2007 17:30:23 -0700 Subject: [PATCH 060/137] Updated funcs_1 files to 5.1.18 level - validating current result files - updating with new features in information_schema / error messages - forced order by and removed time stamps removed a_version files that are not needed (now that the suite is in the main tree Note: datadict tests still fail as a result of bug 28181 (a regression introduced in 5.0.42 - and 5.1.18(?) - tests should runn clean once it is fixed BitKeeper/deleted/.del-a_version_check.test~82ea7fb267df9e58: Delete: mysql-test/suite/funcs_1/t/a_version_check.test BitKeeper/deleted/.del-a_version_check.result~97a8ec1e3211c26: Delete: mysql-test/suite/funcs_1/r/a_version_check.result mysql-test/suite/funcs_1/datadict/datadict_load.inc: Modified to correct failiure to return host name on some systems mysql-test/suite/funcs_1/datadict/datadict_master.inc: corrections to fooce order by on queries, replace time stamps with strings and enable the testing of referential_constraints table mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc: corrections to force order by on queries mysql-test/suite/funcs_1/r/innodb__datadict.result: Updated result file with order by selects, elimination of time stamps and selects of empty user (that we don't have anymore) and adding the testing of referential_constraints table mysql-test/suite/funcs_1/r/innodb_func_view.result: confirming existing results as correct - old result file had wrong cast values mysql-test/suite/funcs_1/r/innodb_trig_0102.result: Corrected error with long trigger name (that was previously quietly trimmed) mysql-test/suite/funcs_1/r/innodb_trig_08.result: confirmed existing results as corrects ones - updated error message mysql-test/suite/funcs_1/r/innodb_views.result: confirmed current results as correct - returned results included a wrong 'expected' error message mysql-test/suite/funcs_1/r/memory__datadict.result: Updated result file with order by selects, elimination of time stamps and selects of empty user (that we don't have anymore) and adding the testing of referential_constraints table mysql-test/suite/funcs_1/r/memory_func_view.result: confirming existing results as correct - old result file had wrong cast values mysql-test/suite/funcs_1/r/memory_trig_0102.result: Corrected error with long trigger name (that was previously quietly trimmed) mysql-test/suite/funcs_1/r/memory_trig_08.result: confirmed existing results as corrects ones - updated error message mysql-test/suite/funcs_1/r/memory_views.result: confirmed current results as correct - returned results included a wrong 'expected' error message mysql-test/suite/funcs_1/r/myisam__datadict.result: Updated result file with order by selects, elimination of time stamps and selects of empty user (that we don't have anymore) and adding the testing of referential_constraints table mysql-test/suite/funcs_1/r/myisam_func_view.result: confirming existing results as correct - old result file had wrong cast values mysql-test/suite/funcs_1/r/myisam_trig_0102.result: Corrected error with long trigger name (that was previously quietly trimmed) mysql-test/suite/funcs_1/r/myisam_trig_08.result: confirmed existing results as corrects ones - updated error message mysql-test/suite/funcs_1/r/myisam_views.result: confirmed current results as correct - returned results included a wrong 'expected' error message mysql-test/suite/funcs_1/r/ndb__datadict.result: Updated result file with order by selects, elimination of time stamps and selects of empty user (that we don't have anymore) and adding the testing of referential_constraints table mysql-test/suite/funcs_1/r/ndb_func_view.result: confirming existing results as correct - old result file had wrong cast values mysql-test/suite/funcs_1/r/ndb_trig_0102.result: Corrected error with long trigger name (that was previously quietly trimmed) mysql-test/suite/funcs_1/r/ndb_trig_08.result: confirmed existing results as corrects ones - updated error message mysql-test/suite/funcs_1/r/ndb_views.result: confirmed current results as correct - returned results included a wrong 'expected' error message mysql-test/suite/funcs_1/t/disabled.def: Updated disabled messages with clearer ones mysql-test/suite/funcs_1/triggers/triggers_0102.inc: Added code to test for error in case of a trigger name that is to long mysql-test/suite/funcs_1/views/views_master.inc: Correction to remove wrong '--eror' meaningless tag that generated warnings --- .../suite/funcs_1/datadict/datadict_load.inc | 3 +- .../funcs_1/datadict/datadict_master.inc | 79 +- .../funcs_1/datadict/datadict_show_schema.inc | 2 +- .../suite/funcs_1/r/a_version_check.result | 11 - .../suite/funcs_1/r/innodb__datadict.result | 2679 ++++++++-------- .../suite/funcs_1/r/innodb_func_view.result | 12 +- .../suite/funcs_1/r/innodb_trig_0102.result | 5 + .../suite/funcs_1/r/innodb_trig_08.result | 5 +- .../suite/funcs_1/r/innodb_views.result | 27 +- .../suite/funcs_1/r/memory__datadict.result | 2679 ++++++++-------- .../suite/funcs_1/r/memory_func_view.result | 12 +- .../suite/funcs_1/r/memory_trig_0102.result | 5 + .../suite/funcs_1/r/memory_trig_08.result | 5 +- .../suite/funcs_1/r/memory_views.result | 27 +- .../suite/funcs_1/r/myisam__datadict.result | 2679 ++++++++-------- .../suite/funcs_1/r/myisam_func_view.result | 12 +- .../suite/funcs_1/r/myisam_trig_0102.result | 5 + .../suite/funcs_1/r/myisam_trig_08.result | 5 +- .../suite/funcs_1/r/myisam_views.result | 27 +- .../suite/funcs_1/r/ndb__datadict.result | 2697 +++++++++-------- .../suite/funcs_1/r/ndb_func_view.result | 12 +- .../suite/funcs_1/r/ndb_trig_0102.result | 7 +- mysql-test/suite/funcs_1/r/ndb_trig_08.result | 5 +- mysql-test/suite/funcs_1/r/ndb_views.result | 27 +- .../suite/funcs_1/t/a_version_check.test | 29 - mysql-test/suite/funcs_1/t/disabled.def | 7 +- .../suite/funcs_1/triggers/triggers_0102.inc | 10 +- .../suite/funcs_1/views/views_master.inc | 8 +- 28 files changed, 5641 insertions(+), 5440 deletions(-) delete mode 100644 mysql-test/suite/funcs_1/r/a_version_check.result delete mode 100644 mysql-test/suite/funcs_1/t/a_version_check.test diff --git a/mysql-test/suite/funcs_1/datadict/datadict_load.inc b/mysql-test/suite/funcs_1/datadict/datadict_load.inc index 2842703f2f8..4a9bdc9356d 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_load.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_load.inc @@ -44,7 +44,8 @@ if (0) # ------------------------------------------------------------------------------ # prepare a variable to be able to suppress machine dependant diffs # this can be used in: --replace_result $SERVER_NAME -let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`; +# let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`; +let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("localhost", "127.0.0.1", "%")`; ################################################################################ diff --git a/mysql-test/suite/funcs_1/datadict/datadict_master.inc b/mysql-test/suite/funcs_1/datadict/datadict_master.inc index 6b3996717d9..6088a5c5143 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_master.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_master.inc @@ -13,14 +13,8 @@ let $message= . *__datadict.test are started. This can be a result of showing e.g. maximum . values of the number of rows of tables. . -. Currently (Dec 19, 2005) this .result file is checked OK for Linux 5.0.18-bk -. (ChangeSet@1.1993, 2005-12-19 16:21:02+04:00). Using the available Windows -. version 5.0.16 there are some known differences that can be ignored: -. -. - Fix for bug#14271 I_S: columns has no size for (var)binary columns -. - bug#14290 (CHARACTER_MAXIMUM_LENGTH values for columns using ucs2 have been fixed) -. - new column INFORMATION_SCHEMA.TRIGGERS.DEFINER is still not present in 5.0.16 -. - (:5055, :5122, :5215) 3 warnings now errors 1044 at call db_datadict.sp_4_1_3() +. This .result file has been checked OK with Linux 5.0.23-bk, +. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00. .; --source include/show_msg80.inc @@ -111,7 +105,7 @@ SELECT DISTINCT u, AS Server_Clean FROM db_datadict.vu1; --replace_result $SERVER_NAME -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; delimiter //; CREATE PROCEDURE db_datadict.sp_1() @@ -147,8 +141,9 @@ if ($have_bug_11589) # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -158,7 +153,8 @@ SELECT * FROM tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM tables WHERE NOT( table_schema = 'information_schema'); --horizontal_results @@ -183,7 +179,7 @@ select count(*) from routines; select * from statistics; select * from views; --replace_result $SERVER_NAME -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; select * from schema_privileges; select * from table_privileges; select * from column_privileges; @@ -205,7 +201,8 @@ select concat("Table or view '", table_name, --replace_result $SERVER_NAME select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) - from user_privileges where privilege_type = 'select'; + from user_privileges where privilege_type = 'select' + order by grantee; select all table_schema from schema_privileges limit 0,5; @@ -299,13 +296,14 @@ select * from information_schema.schemata ORDER BY 2 DESC; # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHRCK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } --vertical_results ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -315,7 +313,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHRCK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --horizontal_results @@ -391,7 +390,7 @@ select concat(table_schema, ', ', table_name) "Table_info" from tables ORDER BY 1; --replace_result $SERVER_NAME -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; select * from schema_privileges where table_catalog is null limit 0, 5; select * from table_privileges where grantee like '%r%' limit 0, 5; @@ -405,7 +404,7 @@ select * from schemata limit 0,5; --replace_result $SERVER_NAME select distinct grantee from user_privileges; --replace_result $SERVER_NAME -select all grantee from user_privileges; +select all grantee from user_privileges order by grantee, privilege_type; select id , character_set_name from collations order by id asc limit 10; @@ -461,8 +460,9 @@ eval SELECT * LINES TERMINATED BY '\n' FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; -# FIXME: why do we get different error numbers with and without OUTFILE ? -#FIXME this should fail! --error 1146 +# The above will fail with access error as long as +# BUBG#28181 - a regression introduced in 5.0.42 is not fixed + eval SELECT * FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; @@ -475,7 +475,9 @@ eval SELECT * FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM schemata LIMIT 0, 5; -# FIXME 3.2.1.2: why do we get different error numbers with and without OUTFILE ? +# The above will fail with access error as long as +# BUBG#28181 - a regression introduced in 5.0.42 is not fixed + eval SELECT * FROM schemata LIMIT 0, 5; @@ -485,8 +487,9 @@ eval SELECT * LINES TERMINATED BY '\n' FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; -# FIXME: why do we get different error numbers with and without OUTFILE ? -#FIXME this should fail! --error 1146 +# The above will fail with access error as long as +# BUBG#28181 - a regression introduced in 5.0.42 is not fixed + eval SELECT * FROM information_schema.schemata WHERE schema_name LIKE 'db_%'; @@ -3020,12 +3023,13 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3035,7 +3039,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3055,12 +3060,13 @@ connect (user_12_2, localhost, user_2, , db_datadict); # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3070,7 +3076,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3091,12 +3098,13 @@ connect (user_12_3, localhost, user_3, , db_datadict); # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3106,7 +3114,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3127,12 +3136,13 @@ connection default; # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME +# 17 CHECK_TIME # 20 CREATE_OPTIONS if ($have_bug_11589) { --disable_ps_protocol } ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; # 9 AVG_ROW_LENGTH @@ -3142,7 +3152,8 @@ SELECT * FROM information_schema.tables # 13 DATA_FREE # 15 CREATE_TIME # 16 UPDATE_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" +# 17 CHECK_TIME +--replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); --enable_ps_protocol @@ -3870,11 +3881,11 @@ let $message= Testcase 3.2.20.1:; let $is_table= referential_constraints; # when table is implemented remove this and the next 4 lines and "enable" 5th line: # and don't forget to add the test description to QATestPlanV50func -let $message= checking a table that will be implemented later; ---source include/show_msg.inc ---error 0,1109 +#let $message= checking a table that will be implemented later; +#--source include/show_msg.inc +#--error 1109 eval DESC $is_table; -#--source suite/funcs_1/datadict/datadict_show_table_design.inc +--source suite/funcs_1/datadict/datadict_show_table_design.inc # ------------------------------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc index 06b2d6fed45..260119f030f 100644 --- a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc +++ b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc @@ -36,7 +36,7 @@ eval select table_name, index_schema, index_name, index_type --replace_result $SERVER_NAME eval select * - from information_schema.user_privileges; + from information_schema.user_privileges order by grantee, privilege_type; # where grantee="'u_6_401013'@'%'"; eval select * diff --git a/mysql-test/suite/funcs_1/r/a_version_check.result b/mysql-test/suite/funcs_1/r/a_version_check.result deleted file mode 100644 index da6ba0846fd..00000000000 --- a/mysql-test/suite/funcs_1/r/a_version_check.result +++ /dev/null @@ -1,11 +0,0 @@ - -. Just show the version string for which the results in suite -. funcs_1 have been checked. -. -. I know that the .result file of this check needs to -. updated with each new version --- THIS IS INTENDED! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -funcs_1 checked with version: 5.1.17 -Warnings: -Warning 1548 Leading spaces are removed from name ' ' diff --git a/mysql-test/suite/funcs_1/r/innodb__datadict.result b/mysql-test/suite/funcs_1/r/innodb__datadict.result index 1a4cc1e4d00..25c5fbbf358 100644 --- a/mysql-test/suite/funcs_1/r/innodb__datadict.result +++ b/mysql-test/suite/funcs_1/r/innodb__datadict.result @@ -10,14 +10,8 @@ . *__datadict.test are started. This can be a result of showing e.g. maximum . values of the number of rows of tables. . -. Currently (Dec 19, 2005) this .result file is checked OK for Linux 5.0.18-bk -. (ChangeSet@1.1993, 2005-12-19 16:21:02+04:00). Using the available Windows -. version 5.0.16 there are some known differences that can be ignored: -. -. - Fix for bug#14271 I_S: columns has no size for (var)binary columns -. - bug#14290 (CHARACTER_MAXIMUM_LENGTH values for columns using ucs2 have been fixed) -. - new column INFORMATION_SCHEMA.TRIGGERS.DEFINER is still not present in 5.0.16 -. - (:5055, :5122, :5215) 3 warnings now errors 1044 at call db_datadict.sp_4_1_3() +. This .result file has been checked OK with Linux 5.0.23-bk, +. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00. . -------------------------------------------------------------------------------- @@ -424,13 +418,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -491,7 +483,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -512,7 +504,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -533,7 +525,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -554,7 +546,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -575,7 +567,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -596,7 +588,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -617,7 +609,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -638,7 +630,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -659,7 +651,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -680,7 +672,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -701,7 +693,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -722,7 +714,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -743,7 +735,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -764,7 +756,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -785,7 +777,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -806,7 +798,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -827,7 +819,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -848,7 +840,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -869,7 +861,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -890,7 +882,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -911,7 +903,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -932,7 +924,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -953,7 +945,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -974,7 +966,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -995,7 +987,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1016,7 +1008,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1037,7 +1029,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1060,7 +1052,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1081,7 +1073,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1102,7 +1094,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1123,7 +1115,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1144,7 +1136,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1165,7 +1157,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1186,7 +1178,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1207,7 +1199,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1228,7 +1220,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1249,7 +1241,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1270,7 +1262,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1291,7 +1283,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1312,7 +1304,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1333,7 +1325,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1354,7 +1346,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1375,7 +1367,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1396,7 +1388,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1408,7 +1400,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1417,7 +1409,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1438,7 +1430,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1459,7 +1451,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1480,7 +1472,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1501,7 +1493,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1522,7 +1514,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1543,7 +1535,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1564,7 +1556,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1576,7 +1568,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1585,7 +1577,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1606,7 +1598,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1627,7 +1619,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1648,7 +1640,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1669,7 +1661,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1690,7 +1682,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1711,7 +1703,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1732,7 +1724,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1753,7 +1745,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1774,7 +1766,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1795,7 +1787,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1816,7 +1808,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1837,7 +1829,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1858,7 +1850,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1879,7 +1871,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1900,7 +1892,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2336,14 +2328,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -2368,21 +2360,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -2399,26 +2393,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2442,23 +2436,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2545,20 +2539,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -2609,20 +2603,20 @@ NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_genera NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references @@ -2670,10 +2664,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -2735,9 +2731,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -3222,7 +3218,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -3247,7 +3243,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -3261,97 +3257,95 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE select * from views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -3551,11 +3545,12 @@ Table or view 'tb2' is associated with the database 'test1'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3592,8 +3587,8 @@ columns_priv 7 COLUMN_PRIVILEGES 7 db 22 ENGINES 6 -event 16 -EVENTS 19 +event 18 +EVENTS 21 FILES 38 func 4 general_log 6 @@ -3805,7 +3800,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3826,7 +3821,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3847,7 +3842,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3868,7 +3863,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3889,7 +3884,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3910,7 +3905,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3931,7 +3926,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3952,7 +3947,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3973,7 +3968,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3994,7 +3989,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4015,7 +4010,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4036,7 +4031,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4057,7 +4052,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4078,7 +4073,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4099,7 +4094,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4120,7 +4115,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4141,7 +4136,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4162,7 +4157,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4183,7 +4178,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4204,7 +4199,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4225,7 +4220,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4246,7 +4241,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4267,7 +4262,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4288,7 +4283,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4309,7 +4304,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4330,7 +4325,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4351,7 +4346,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4374,7 +4369,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4395,7 +4390,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4416,7 +4411,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4437,7 +4432,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4458,7 +4453,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4479,7 +4474,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4500,7 +4495,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4521,7 +4516,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4542,7 +4537,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4563,7 +4558,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4584,7 +4579,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4605,7 +4600,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4626,7 +4621,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4647,7 +4642,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4668,7 +4663,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4689,7 +4684,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4710,7 +4705,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4722,7 +4717,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4731,7 +4726,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4752,7 +4747,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4773,7 +4768,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4794,7 +4789,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4815,7 +4810,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4836,7 +4831,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4857,7 +4852,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4878,7 +4873,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4890,7 +4885,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4899,7 +4894,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4920,7 +4915,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4941,7 +4936,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4962,7 +4957,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4983,7 +4978,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5004,7 +4999,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5025,7 +5020,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5046,7 +5041,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5067,7 +5062,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5088,7 +5083,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5109,7 +5104,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5130,7 +5125,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5151,7 +5146,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5172,7 +5167,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5193,7 +5188,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5214,7 +5209,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5723,7 +5718,7 @@ COUNT(*) 68 SELECT COUNT(*) FROM information_schema. columns ; COUNT(*) -838 +842 SELECT COUNT(*) FROM information_schema. character_sets ; COUNT(*) 36 @@ -5744,7 +5739,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -83 +81 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 32 @@ -5788,7 +5783,7 @@ tot_tabs 65 select count(*) as the_cols from columns; the_cols -813 +817 select max(maxlen) as the_max from character_sets; the_max 3 @@ -5814,7 +5809,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -5886,13 +5881,11 @@ test, tb3 test, tb4 test1, tb2 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -5929,39 +5922,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -5989,7 +5953,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -6017,7 +5980,33 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -7490,91 +7479,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7643,92 +7630,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7782,91 +7767,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7933,91 +7916,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8080,91 +8061,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8240,92 +8219,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8378,91 +8355,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8824,14 +8799,14 @@ COLUMNS TABLE_CATALOG varchar(4096) COLUMNS TABLE_SCHEMA varchar(64) COLUMNS TABLE_NAME varchar(64) COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) +COLUMNS ORDINAL_POSITION bigint(21) unsigned COLUMNS COLUMN_DEFAULT longtext COLUMNS IS_NULLABLE varchar(3) COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) +COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned +COLUMNS CHARACTER_OCTET_LENGTH bigint(21) unsigned +COLUMNS NUMERIC_PRECISION bigint(21) unsigned +COLUMNS NUMERIC_SCALE bigint(21) unsigned COLUMNS CHARACTER_SET_NAME varchar(64) COLUMNS COLLATION_NAME varchar(64) COLUMNS COLUMN_TYPE longtext @@ -8856,6 +8831,7 @@ EVENTS EVENT_CATALOG varchar(64) EVENTS EVENT_SCHEMA varchar(64) EVENTS EVENT_NAME varchar(64) EVENTS DEFINER varchar(77) +EVENTS TIME_ZONE varchar(64) EVENTS EVENT_BODY varchar(8) EVENTS EVENT_DEFINITION longtext EVENTS EVENT_TYPE varchar(9) @@ -8865,12 +8841,13 @@ EVENTS INTERVAL_FIELD varchar(18) EVENTS SQL_MODE longtext EVENTS STARTS datetime EVENTS ENDS datetime -EVENTS STATUS varchar(8) +EVENTS STATUS varchar(18) EVENTS ON_COMPLETION varchar(12) EVENTS CREATED datetime EVENTS LAST_ALTERED datetime EVENTS LAST_EXECUTED datetime EVENTS EVENT_COMMENT varchar(64) +EVENTS ORIGINATOR bigint(10) FILES FILE_ID bigint(4) FILES FILE_NAME varchar(64) FILES FILE_TYPE varchar(20) @@ -8887,26 +8864,26 @@ FILES UPDATE_COUNT bigint(4) FILES FREE_EXTENTS bigint(4) FILES TOTAL_EXTENTS bigint(4) FILES EXTENT_SIZE bigint(4) -FILES INITIAL_SIZE bigint(21) -FILES MAXIMUM_SIZE bigint(21) -FILES AUTOEXTEND_SIZE bigint(21) +FILES INITIAL_SIZE bigint(21) unsigned +FILES MAXIMUM_SIZE bigint(21) unsigned +FILES AUTOEXTEND_SIZE bigint(21) unsigned FILES CREATION_TIME datetime FILES LAST_UPDATE_TIME datetime FILES LAST_ACCESS_TIME datetime FILES RECOVER_TIME bigint(4) FILES TRANSACTION_COUNTER bigint(4) -FILES VERSION bigint(21) +FILES VERSION bigint(21) unsigned FILES ROW_FORMAT varchar(10) -FILES TABLE_ROWS bigint(21) -FILES AVG_ROW_LENGTH bigint(21) -FILES DATA_LENGTH bigint(21) -FILES MAX_DATA_LENGTH bigint(21) -FILES INDEX_LENGTH bigint(21) -FILES DATA_FREE bigint(21) +FILES TABLE_ROWS bigint(21) unsigned +FILES AVG_ROW_LENGTH bigint(21) unsigned +FILES DATA_LENGTH bigint(21) unsigned +FILES MAX_DATA_LENGTH bigint(21) unsigned +FILES INDEX_LENGTH bigint(21) unsigned +FILES DATA_FREE bigint(21) unsigned FILES CREATE_TIME datetime FILES UPDATE_TIME datetime FILES CHECK_TIME datetime -FILES CHECKSUM bigint(21) +FILES CHECKSUM bigint(21) unsigned FILES STATUS varchar(20) FILES EXTRA varchar(255) GLOBAL_STATUS VARIABLE_NAME varchar(64) @@ -8930,23 +8907,23 @@ PARTITIONS TABLE_SCHEMA varchar(64) PARTITIONS TABLE_NAME varchar(64) PARTITIONS PARTITION_NAME varchar(64) PARTITIONS SUBPARTITION_NAME varchar(64) -PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) -PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) +PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) unsigned +PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) unsigned PARTITIONS PARTITION_METHOD varchar(12) PARTITIONS SUBPARTITION_METHOD varchar(12) PARTITIONS PARTITION_EXPRESSION longtext PARTITIONS SUBPARTITION_EXPRESSION longtext PARTITIONS PARTITION_DESCRIPTION longtext -PARTITIONS TABLE_ROWS bigint(21) -PARTITIONS AVG_ROW_LENGTH bigint(21) -PARTITIONS DATA_LENGTH bigint(21) -PARTITIONS MAX_DATA_LENGTH bigint(21) -PARTITIONS INDEX_LENGTH bigint(21) -PARTITIONS DATA_FREE bigint(21) +PARTITIONS TABLE_ROWS bigint(21) unsigned +PARTITIONS AVG_ROW_LENGTH bigint(21) unsigned +PARTITIONS DATA_LENGTH bigint(21) unsigned +PARTITIONS MAX_DATA_LENGTH bigint(21) unsigned +PARTITIONS INDEX_LENGTH bigint(21) unsigned +PARTITIONS DATA_FREE bigint(21) unsigned PARTITIONS CREATE_TIME datetime PARTITIONS UPDATE_TIME datetime PARTITIONS CHECK_TIME datetime -PARTITIONS CHECKSUM bigint(21) +PARTITIONS CHECKSUM bigint(21) unsigned PARTITIONS PARTITION_COMMENT varchar(80) PARTITIONS NODEGROUP varchar(12) PARTITIONS TABLESPACE_NAME varchar(64) @@ -9033,20 +9010,20 @@ TABLES TABLE_SCHEMA varchar(64) TABLES TABLE_NAME varchar(64) TABLES TABLE_TYPE varchar(64) TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) +TABLES VERSION bigint(21) unsigned TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) +TABLES TABLE_ROWS bigint(21) unsigned +TABLES AVG_ROW_LENGTH bigint(21) unsigned +TABLES DATA_LENGTH bigint(21) unsigned +TABLES MAX_DATA_LENGTH bigint(21) unsigned +TABLES INDEX_LENGTH bigint(21) unsigned +TABLES DATA_FREE bigint(21) unsigned +TABLES AUTO_INCREMENT bigint(21) unsigned TABLES CREATE_TIME datetime TABLES UPDATE_TIME datetime TABLES CHECK_TIME datetime TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) +TABLES CHECKSUM bigint(21) unsigned TABLES CREATE_OPTIONS varchar(255) TABLES TABLE_COMMENT varchar(80) TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) @@ -10229,14 +10206,14 @@ TABLE_CATALOG varchar(4096) YES NULL TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 +ORDINAL_POSITION bigint(21) unsigned NO 0 COLUMN_DEFAULT longtext YES NULL IS_NULLABLE varchar(3) NO DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL +CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL +NUMERIC_PRECISION bigint(21) unsigned YES NULL +NUMERIC_SCALE bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL COLUMN_TYPE longtext NO @@ -10251,14 +10228,14 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` bigint(21) NOT NULL DEFAULT '0', + `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0', `COLUMN_DEFAULT` longtext, `IS_NULLABLE` varchar(3) NOT NULL DEFAULT '', `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) DEFAULT NULL, - `NUMERIC_PRECISION` bigint(21) DEFAULT NULL, - `NUMERIC_SCALE` bigint(21) DEFAULT NULL, + `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned DEFAULT NULL, + `CHARACTER_OCTET_LENGTH` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_SCALE` bigint(21) unsigned DEFAULT NULL, `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, `COLLATION_NAME` varchar(64) DEFAULT NULL, `COLUMN_TYPE` longtext NOT NULL, @@ -10282,14 +10259,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10337,14 +10314,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10369,21 +10346,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -10400,26 +10379,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10443,23 +10422,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10546,20 +10525,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -10646,10 +10625,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -10711,9 +10692,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -11156,14 +11137,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11188,21 +11169,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11219,26 +11202,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11262,23 +11245,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11365,20 +11348,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -11715,14 +11698,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11747,21 +11730,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11778,26 +11763,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11821,23 +11806,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11924,20 +11909,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -12372,14 +12357,14 @@ NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext @@ -12404,6 +12389,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint( 3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) 1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) @@ -12413,12 +12399,13 @@ NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime 1.0000 information_schema EVENTS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime -3.0000 information_schema EVENTS STATUS varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema EVENTS STATUS varchar 18 54 utf8 utf8_general_ci varchar(18) 3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8 utf8_general_ci varchar(12) NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime 3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10) NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4) 3.0000 information_schema FILES FILE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8 utf8_general_ci varchar(20) @@ -12435,26 +12422,26 @@ NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20) 3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12478,23 +12465,23 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU 3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12581,20 +12568,20 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime 3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) @@ -12681,10 +12668,12 @@ NULL mysql event modified timestamp NULL NULL NULL NULL timestamp NULL mysql event last_executed datetime NULL NULL NULL NULL datetime NULL mysql event starts datetime NULL NULL NULL NULL datetime NULL mysql event ends datetime NULL NULL NULL NULL datetime -3.0000 mysql event status enum 8 24 utf8 utf8_general_ci enum('ENABLED','DISABLED') +3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') 3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') 3.0000 mysql event sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') 3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) +NULL mysql event originator int NULL NULL NULL NULL int(10) +1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) 3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) 3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) @@ -13968,20 +13957,20 @@ TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO TABLE_TYPE varchar(64) NO ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL +VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL +TABLE_ROWS bigint(21) unsigned YES NULL +AVG_ROW_LENGTH bigint(21) unsigned YES NULL +DATA_LENGTH bigint(21) unsigned YES NULL +MAX_DATA_LENGTH bigint(21) unsigned YES NULL +INDEX_LENGTH bigint(21) unsigned YES NULL +DATA_FREE bigint(21) unsigned YES NULL +AUTO_INCREMENT bigint(21) unsigned YES NULL CREATE_TIME datetime YES NULL UPDATE_TIME datetime YES NULL CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL +CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(255) YES NULL TABLE_COMMENT varchar(80) NO SHOW CREATE TABLE tables; @@ -13992,20 +13981,20 @@ TABLES CREATE TEMPORARY TABLE `TABLES` ( `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) DEFAULT NULL, + `VERSION` bigint(21) unsigned DEFAULT NULL, `ROW_FORMAT` varchar(10) DEFAULT NULL, - `TABLE_ROWS` bigint(21) DEFAULT NULL, - `AVG_ROW_LENGTH` bigint(21) DEFAULT NULL, - `DATA_LENGTH` bigint(21) DEFAULT NULL, - `MAX_DATA_LENGTH` bigint(21) DEFAULT NULL, - `INDEX_LENGTH` bigint(21) DEFAULT NULL, - `DATA_FREE` bigint(21) DEFAULT NULL, - `AUTO_INCREMENT` bigint(21) DEFAULT NULL, + `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, + `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_FREE` bigint(21) unsigned DEFAULT NULL, + `AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL, `CREATE_TIME` datetime DEFAULT NULL, `UPDATE_TIME` datetime DEFAULT NULL, `CHECK_TIME` datetime DEFAULT NULL, `TABLE_COLLATION` varchar(64) DEFAULT NULL, - `CHECKSUM` bigint(21) DEFAULT NULL, + `CHECKSUM` bigint(21) unsigned DEFAULT NULL, `CREATE_OPTIONS` varchar(255) DEFAULT NULL, `TABLE_COMMENT` varchar(80) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 @@ -14025,20 +14014,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select @@ -14066,228 +14055,228 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Events -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL General log -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL MySQL plugins -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql servers BASE TABLE MyISAM 10 Fixed 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL MySQL Foreign Servers table -NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Slow log -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test1 tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test4 t6 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql servers BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL MySQL Foreign Servers table +NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Slow log +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test1 tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB +NULL test4 t6 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -14499,7 +14488,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -14524,7 +14513,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -14538,7 +14527,7 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE user_1@localhost test SELECT * FROM information_schema.statistics; @@ -15191,9 +15180,6 @@ ERROR 42S02: Unknown table 'parameters' in information_schema Testcase 3.2.20.1: -------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ DESC referential_constraints; Field Type Null Key Default Extra CONSTRAINT_CATALOG varchar(512) YES NULL @@ -15207,6 +15193,57 @@ UPDATE_RULE varchar(64) NO DELETE_RULE varchar(64) NO TABLE_NAME varchar(64) NO REFERENCED_TABLE_NAME varchar(64) NO +USE information_schema; +DESC referential_constraints; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(4096) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +UNIQUE_CONSTRAINT_CATALOG varchar(4096) YES NULL +UNIQUE_CONSTRAINT_SCHEMA varchar(64) NO +UNIQUE_CONSTRAINT_NAME varchar(64) NO +MATCH_OPTION varchar(64) NO +UPDATE_RULE varchar(64) NO +DELETE_RULE varchar(64) NO +TABLE_NAME varchar(64) NO +REFERENCED_TABLE_NAME varchar(64) NO +SHOW CREATE TABLE referential_constraints; +Table Create Table +REFERENTIAL_CONSTRAINTS CREATE TEMPORARY TABLE `REFERENTIAL_CONSTRAINTS` ( + `CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `UNIQUE_CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `MATCH_OPTION` varchar(64) NOT NULL DEFAULT '', + `UPDATE_RULE` varchar(64) NOT NULL DEFAULT '', + `DELETE_RULE` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `REFERENCED_TABLE_NAME` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SELECT COUNT(*) FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +COUNT(*) +11 +SELECT * FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select *** End of Data Dictionary Tests *** -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 9fde670680d..ab4508fb302 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -3935,13 +3935,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3952,13 +3950,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result index 590d4c611bf..02a82db0901 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result @@ -199,6 +199,9 @@ CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX +BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; insert into t1 (f2) values ('insert 3.5.1.7'); select * from t1; f1 f2 f3 @@ -213,6 +216,8 @@ trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX drop trigger trg5_1; drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; drop table t1; Testcase 3.5.1.8: diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result index 4388950aba1..44d53923241 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result @@ -492,8 +492,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 4e7d80c6102..be0f36f49be 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -448,7 +448,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -585,7 +586,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -605,7 +608,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1790,7 +1795,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1799,7 +1806,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1816,7 +1825,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1828,7 +1839,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/r/memory__datadict.result b/mysql-test/suite/funcs_1/r/memory__datadict.result index fba08589ccf..0ef00f0e553 100644 --- a/mysql-test/suite/funcs_1/r/memory__datadict.result +++ b/mysql-test/suite/funcs_1/r/memory__datadict.result @@ -10,14 +10,8 @@ . *__datadict.test are started. This can be a result of showing e.g. maximum . values of the number of rows of tables. . -. Currently (Dec 19, 2005) this .result file is checked OK for Linux 5.0.18-bk -. (ChangeSet@1.1993, 2005-12-19 16:21:02+04:00). Using the available Windows -. version 5.0.16 there are some known differences that can be ignored: -. -. - Fix for bug#14271 I_S: columns has no size for (var)binary columns -. - bug#14290 (CHARACTER_MAXIMUM_LENGTH values for columns using ucs2 have been fixed) -. - new column INFORMATION_SCHEMA.TRIGGERS.DEFINER is still not present in 5.0.16 -. - (:5055, :5122, :5215) 3 warnings now errors 1044 at call db_datadict.sp_4_1_3() +. This .result file has been checked OK with Linux 5.0.23-bk, +. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00. . -------------------------------------------------------------------------------- @@ -422,13 +416,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -489,7 +481,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -510,7 +502,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -531,7 +523,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -552,7 +544,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -573,7 +565,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -594,7 +586,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -615,7 +607,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -636,7 +628,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -657,7 +649,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -678,7 +670,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -699,7 +691,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -720,7 +712,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -741,7 +733,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -762,7 +754,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -783,7 +775,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -804,7 +796,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -825,7 +817,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -846,7 +838,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -867,7 +859,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -888,7 +880,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -909,7 +901,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -930,7 +922,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -951,7 +943,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -972,7 +964,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -993,7 +985,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1014,7 +1006,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1035,7 +1027,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1058,7 +1050,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1079,7 +1071,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1100,7 +1092,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1121,7 +1113,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1142,7 +1134,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1163,7 +1155,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1184,7 +1176,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1205,7 +1197,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1226,7 +1218,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1247,7 +1239,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1268,7 +1260,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1289,7 +1281,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1310,7 +1302,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1331,7 +1323,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1352,7 +1344,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1373,7 +1365,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1394,7 +1386,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1406,7 +1398,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1415,7 +1407,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1436,7 +1428,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1457,7 +1449,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1478,7 +1470,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1499,7 +1491,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1520,7 +1512,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1541,7 +1533,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1562,7 +1554,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1574,7 +1566,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1583,7 +1575,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1604,7 +1596,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1625,7 +1617,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1646,7 +1638,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1667,7 +1659,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1688,7 +1680,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1709,7 +1701,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1730,7 +1722,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1751,7 +1743,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1772,7 +1764,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1793,7 +1785,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1814,7 +1806,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1835,7 +1827,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1856,7 +1848,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1877,7 +1869,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1898,7 +1890,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2334,14 +2326,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -2366,21 +2358,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -2397,26 +2391,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2440,23 +2434,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2543,20 +2537,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -2607,20 +2601,20 @@ NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_genera NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references @@ -2668,10 +2662,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -2733,9 +2729,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -3205,7 +3201,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -3230,7 +3226,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -3244,97 +3240,95 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE select * from views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -3534,11 +3528,12 @@ Table or view 'tb2' is associated with the database 'test1'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3575,8 +3570,8 @@ columns_priv 7 COLUMN_PRIVILEGES 7 db 22 ENGINES 6 -event 16 -EVENTS 19 +event 18 +EVENTS 21 FILES 38 func 4 general_log 6 @@ -3788,7 +3783,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3809,7 +3804,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3830,7 +3825,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3851,7 +3846,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3872,7 +3867,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3893,7 +3888,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3914,7 +3909,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3935,7 +3930,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3956,7 +3951,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3977,7 +3972,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3998,7 +3993,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4019,7 +4014,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4040,7 +4035,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4061,7 +4056,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4082,7 +4077,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4103,7 +4098,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4124,7 +4119,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4145,7 +4140,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4166,7 +4161,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4187,7 +4182,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4208,7 +4203,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4229,7 +4224,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4250,7 +4245,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4271,7 +4266,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4292,7 +4287,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4313,7 +4308,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4334,7 +4329,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4357,7 +4352,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4378,7 +4373,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4399,7 +4394,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4420,7 +4415,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4441,7 +4436,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4462,7 +4457,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4483,7 +4478,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4504,7 +4499,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4525,7 +4520,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4546,7 +4541,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4567,7 +4562,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4588,7 +4583,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4609,7 +4604,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4630,7 +4625,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4651,7 +4646,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4672,7 +4667,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4693,7 +4688,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4705,7 +4700,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4714,7 +4709,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4735,7 +4730,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4756,7 +4751,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4777,7 +4772,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4798,7 +4793,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4819,7 +4814,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4840,7 +4835,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4861,7 +4856,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4873,7 +4868,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4882,7 +4877,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4903,7 +4898,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4924,7 +4919,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4945,7 +4940,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4966,7 +4961,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4987,7 +4982,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5008,7 +5003,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5029,7 +5024,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5050,7 +5045,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5071,7 +5066,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5092,7 +5087,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5113,7 +5108,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5134,7 +5129,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5155,7 +5150,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5176,7 +5171,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5197,7 +5192,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5706,7 +5701,7 @@ COUNT(*) 68 SELECT COUNT(*) FROM information_schema. columns ; COUNT(*) -823 +827 SELECT COUNT(*) FROM information_schema. character_sets ; COUNT(*) 36 @@ -5727,7 +5722,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -83 +81 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 32 @@ -5771,7 +5766,7 @@ tot_tabs 65 select count(*) as the_cols from columns; the_cols -798 +802 select max(maxlen) as the_max from character_sets; the_max 3 @@ -5797,7 +5792,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -5869,13 +5864,11 @@ test, tb3 test, tb4 test1, tb2 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -5912,39 +5905,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -5972,7 +5936,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -6000,7 +5963,33 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -7473,91 +7462,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7626,92 +7613,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 HASH select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7765,91 +7750,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7916,91 +7899,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8063,91 +8044,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8223,92 +8202,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8361,91 +8338,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8807,14 +8782,14 @@ COLUMNS TABLE_CATALOG varchar(4096) COLUMNS TABLE_SCHEMA varchar(64) COLUMNS TABLE_NAME varchar(64) COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) +COLUMNS ORDINAL_POSITION bigint(21) unsigned COLUMNS COLUMN_DEFAULT longtext COLUMNS IS_NULLABLE varchar(3) COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) +COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned +COLUMNS CHARACTER_OCTET_LENGTH bigint(21) unsigned +COLUMNS NUMERIC_PRECISION bigint(21) unsigned +COLUMNS NUMERIC_SCALE bigint(21) unsigned COLUMNS CHARACTER_SET_NAME varchar(64) COLUMNS COLLATION_NAME varchar(64) COLUMNS COLUMN_TYPE longtext @@ -8839,6 +8814,7 @@ EVENTS EVENT_CATALOG varchar(64) EVENTS EVENT_SCHEMA varchar(64) EVENTS EVENT_NAME varchar(64) EVENTS DEFINER varchar(77) +EVENTS TIME_ZONE varchar(64) EVENTS EVENT_BODY varchar(8) EVENTS EVENT_DEFINITION longtext EVENTS EVENT_TYPE varchar(9) @@ -8848,12 +8824,13 @@ EVENTS INTERVAL_FIELD varchar(18) EVENTS SQL_MODE longtext EVENTS STARTS datetime EVENTS ENDS datetime -EVENTS STATUS varchar(8) +EVENTS STATUS varchar(18) EVENTS ON_COMPLETION varchar(12) EVENTS CREATED datetime EVENTS LAST_ALTERED datetime EVENTS LAST_EXECUTED datetime EVENTS EVENT_COMMENT varchar(64) +EVENTS ORIGINATOR bigint(10) FILES FILE_ID bigint(4) FILES FILE_NAME varchar(64) FILES FILE_TYPE varchar(20) @@ -8870,26 +8847,26 @@ FILES UPDATE_COUNT bigint(4) FILES FREE_EXTENTS bigint(4) FILES TOTAL_EXTENTS bigint(4) FILES EXTENT_SIZE bigint(4) -FILES INITIAL_SIZE bigint(21) -FILES MAXIMUM_SIZE bigint(21) -FILES AUTOEXTEND_SIZE bigint(21) +FILES INITIAL_SIZE bigint(21) unsigned +FILES MAXIMUM_SIZE bigint(21) unsigned +FILES AUTOEXTEND_SIZE bigint(21) unsigned FILES CREATION_TIME datetime FILES LAST_UPDATE_TIME datetime FILES LAST_ACCESS_TIME datetime FILES RECOVER_TIME bigint(4) FILES TRANSACTION_COUNTER bigint(4) -FILES VERSION bigint(21) +FILES VERSION bigint(21) unsigned FILES ROW_FORMAT varchar(10) -FILES TABLE_ROWS bigint(21) -FILES AVG_ROW_LENGTH bigint(21) -FILES DATA_LENGTH bigint(21) -FILES MAX_DATA_LENGTH bigint(21) -FILES INDEX_LENGTH bigint(21) -FILES DATA_FREE bigint(21) +FILES TABLE_ROWS bigint(21) unsigned +FILES AVG_ROW_LENGTH bigint(21) unsigned +FILES DATA_LENGTH bigint(21) unsigned +FILES MAX_DATA_LENGTH bigint(21) unsigned +FILES INDEX_LENGTH bigint(21) unsigned +FILES DATA_FREE bigint(21) unsigned FILES CREATE_TIME datetime FILES UPDATE_TIME datetime FILES CHECK_TIME datetime -FILES CHECKSUM bigint(21) +FILES CHECKSUM bigint(21) unsigned FILES STATUS varchar(20) FILES EXTRA varchar(255) GLOBAL_STATUS VARIABLE_NAME varchar(64) @@ -8913,23 +8890,23 @@ PARTITIONS TABLE_SCHEMA varchar(64) PARTITIONS TABLE_NAME varchar(64) PARTITIONS PARTITION_NAME varchar(64) PARTITIONS SUBPARTITION_NAME varchar(64) -PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) -PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) +PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) unsigned +PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) unsigned PARTITIONS PARTITION_METHOD varchar(12) PARTITIONS SUBPARTITION_METHOD varchar(12) PARTITIONS PARTITION_EXPRESSION longtext PARTITIONS SUBPARTITION_EXPRESSION longtext PARTITIONS PARTITION_DESCRIPTION longtext -PARTITIONS TABLE_ROWS bigint(21) -PARTITIONS AVG_ROW_LENGTH bigint(21) -PARTITIONS DATA_LENGTH bigint(21) -PARTITIONS MAX_DATA_LENGTH bigint(21) -PARTITIONS INDEX_LENGTH bigint(21) -PARTITIONS DATA_FREE bigint(21) +PARTITIONS TABLE_ROWS bigint(21) unsigned +PARTITIONS AVG_ROW_LENGTH bigint(21) unsigned +PARTITIONS DATA_LENGTH bigint(21) unsigned +PARTITIONS MAX_DATA_LENGTH bigint(21) unsigned +PARTITIONS INDEX_LENGTH bigint(21) unsigned +PARTITIONS DATA_FREE bigint(21) unsigned PARTITIONS CREATE_TIME datetime PARTITIONS UPDATE_TIME datetime PARTITIONS CHECK_TIME datetime -PARTITIONS CHECKSUM bigint(21) +PARTITIONS CHECKSUM bigint(21) unsigned PARTITIONS PARTITION_COMMENT varchar(80) PARTITIONS NODEGROUP varchar(12) PARTITIONS TABLESPACE_NAME varchar(64) @@ -9016,20 +8993,20 @@ TABLES TABLE_SCHEMA varchar(64) TABLES TABLE_NAME varchar(64) TABLES TABLE_TYPE varchar(64) TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) +TABLES VERSION bigint(21) unsigned TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) +TABLES TABLE_ROWS bigint(21) unsigned +TABLES AVG_ROW_LENGTH bigint(21) unsigned +TABLES DATA_LENGTH bigint(21) unsigned +TABLES MAX_DATA_LENGTH bigint(21) unsigned +TABLES INDEX_LENGTH bigint(21) unsigned +TABLES DATA_FREE bigint(21) unsigned +TABLES AUTO_INCREMENT bigint(21) unsigned TABLES CREATE_TIME datetime TABLES UPDATE_TIME datetime TABLES CHECK_TIME datetime TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) +TABLES CHECKSUM bigint(21) unsigned TABLES CREATE_OPTIONS varchar(255) TABLES TABLE_COMMENT varchar(80) TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) @@ -10197,14 +10174,14 @@ TABLE_CATALOG varchar(4096) YES NULL TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 +ORDINAL_POSITION bigint(21) unsigned NO 0 COLUMN_DEFAULT longtext YES NULL IS_NULLABLE varchar(3) NO DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL +CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL +NUMERIC_PRECISION bigint(21) unsigned YES NULL +NUMERIC_SCALE bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL COLUMN_TYPE longtext NO @@ -10219,14 +10196,14 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` bigint(21) NOT NULL DEFAULT '0', + `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0', `COLUMN_DEFAULT` longtext, `IS_NULLABLE` varchar(3) NOT NULL DEFAULT '', `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) DEFAULT NULL, - `NUMERIC_PRECISION` bigint(21) DEFAULT NULL, - `NUMERIC_SCALE` bigint(21) DEFAULT NULL, + `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned DEFAULT NULL, + `CHARACTER_OCTET_LENGTH` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_SCALE` bigint(21) unsigned DEFAULT NULL, `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, `COLLATION_NAME` varchar(64) DEFAULT NULL, `COLUMN_TYPE` longtext NOT NULL, @@ -10250,14 +10227,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10305,14 +10282,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10337,21 +10314,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -10368,26 +10347,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10411,23 +10390,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10514,20 +10493,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -10614,10 +10593,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -10679,9 +10660,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -11109,14 +11090,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11141,21 +11122,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11172,26 +11155,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11215,23 +11198,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11318,20 +11301,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -11653,14 +11636,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11685,21 +11668,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11716,26 +11701,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11759,23 +11744,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11862,20 +11847,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -12285,14 +12270,14 @@ NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext @@ -12317,6 +12302,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint( 3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) 1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) @@ -12326,12 +12312,13 @@ NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime 1.0000 information_schema EVENTS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime -3.0000 information_schema EVENTS STATUS varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema EVENTS STATUS varchar 18 54 utf8 utf8_general_ci varchar(18) 3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8 utf8_general_ci varchar(12) NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime 3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10) NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4) 3.0000 information_schema FILES FILE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8 utf8_general_ci varchar(20) @@ -12348,26 +12335,26 @@ NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20) 3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12391,23 +12378,23 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU 3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12494,20 +12481,20 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime 3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) @@ -12594,10 +12581,12 @@ NULL mysql event modified timestamp NULL NULL NULL NULL timestamp NULL mysql event last_executed datetime NULL NULL NULL NULL datetime NULL mysql event starts datetime NULL NULL NULL NULL datetime NULL mysql event ends datetime NULL NULL NULL NULL datetime -3.0000 mysql event status enum 8 24 utf8 utf8_general_ci enum('ENABLED','DISABLED') +3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') 3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') 3.0000 mysql event sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') 3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) +NULL mysql event originator int NULL NULL NULL NULL int(10) +1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) 3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) 3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) @@ -13866,20 +13855,20 @@ TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO TABLE_TYPE varchar(64) NO ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL +VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL +TABLE_ROWS bigint(21) unsigned YES NULL +AVG_ROW_LENGTH bigint(21) unsigned YES NULL +DATA_LENGTH bigint(21) unsigned YES NULL +MAX_DATA_LENGTH bigint(21) unsigned YES NULL +INDEX_LENGTH bigint(21) unsigned YES NULL +DATA_FREE bigint(21) unsigned YES NULL +AUTO_INCREMENT bigint(21) unsigned YES NULL CREATE_TIME datetime YES NULL UPDATE_TIME datetime YES NULL CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL +CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(255) YES NULL TABLE_COMMENT varchar(80) NO SHOW CREATE TABLE tables; @@ -13890,20 +13879,20 @@ TABLES CREATE TEMPORARY TABLE `TABLES` ( `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) DEFAULT NULL, + `VERSION` bigint(21) unsigned DEFAULT NULL, `ROW_FORMAT` varchar(10) DEFAULT NULL, - `TABLE_ROWS` bigint(21) DEFAULT NULL, - `AVG_ROW_LENGTH` bigint(21) DEFAULT NULL, - `DATA_LENGTH` bigint(21) DEFAULT NULL, - `MAX_DATA_LENGTH` bigint(21) DEFAULT NULL, - `INDEX_LENGTH` bigint(21) DEFAULT NULL, - `DATA_FREE` bigint(21) DEFAULT NULL, - `AUTO_INCREMENT` bigint(21) DEFAULT NULL, + `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, + `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_FREE` bigint(21) unsigned DEFAULT NULL, + `AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL, `CREATE_TIME` datetime DEFAULT NULL, `UPDATE_TIME` datetime DEFAULT NULL, `CHECK_TIME` datetime DEFAULT NULL, `TABLE_COLLATION` varchar(64) DEFAULT NULL, - `CHECKSUM` bigint(21) DEFAULT NULL, + `CHECKSUM` bigint(21) unsigned DEFAULT NULL, `CREATE_OPTIONS` varchar(255) DEFAULT NULL, `TABLE_COMMENT` varchar(80) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 @@ -13923,20 +13912,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select @@ -13964,228 +13953,228 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Events -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL General log -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL MySQL plugins -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql servers BASE TABLE MyISAM 10 Fixed 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL MySQL Foreign Servers table -NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Slow log -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test1 tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql servers BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL MySQL Foreign Servers table +NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Slow log +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test1 tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test4 t6 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -14397,7 +14386,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -14422,7 +14411,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -14436,7 +14425,7 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE user_1@localhost test SELECT * FROM information_schema.statistics; @@ -15089,9 +15078,6 @@ ERROR 42S02: Unknown table 'parameters' in information_schema Testcase 3.2.20.1: -------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ DESC referential_constraints; Field Type Null Key Default Extra CONSTRAINT_CATALOG varchar(512) YES NULL @@ -15105,6 +15091,57 @@ UPDATE_RULE varchar(64) NO DELETE_RULE varchar(64) NO TABLE_NAME varchar(64) NO REFERENCED_TABLE_NAME varchar(64) NO +USE information_schema; +DESC referential_constraints; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(4096) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +UNIQUE_CONSTRAINT_CATALOG varchar(4096) YES NULL +UNIQUE_CONSTRAINT_SCHEMA varchar(64) NO +UNIQUE_CONSTRAINT_NAME varchar(64) NO +MATCH_OPTION varchar(64) NO +UPDATE_RULE varchar(64) NO +DELETE_RULE varchar(64) NO +TABLE_NAME varchar(64) NO +REFERENCED_TABLE_NAME varchar(64) NO +SHOW CREATE TABLE referential_constraints; +Table Create Table +REFERENTIAL_CONSTRAINTS CREATE TEMPORARY TABLE `REFERENTIAL_CONSTRAINTS` ( + `CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `UNIQUE_CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `MATCH_OPTION` varchar(64) NOT NULL DEFAULT '', + `UPDATE_RULE` varchar(64) NOT NULL DEFAULT '', + `DELETE_RULE` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `REFERENCED_TABLE_NAME` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SELECT COUNT(*) FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +COUNT(*) +11 +SELECT * FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select *** End of Data Dictionary Tests *** -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 9fde670680d..ab4508fb302 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -3935,13 +3935,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3952,13 +3950,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result index a02ade90c8a..1319fc3e361 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result @@ -195,6 +195,9 @@ CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX +BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; insert into t1 (f2) values ('insert 3.5.1.7'); select * from t1; f1 f2 f3 @@ -209,6 +212,8 @@ trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX drop trigger trg5_1; drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; drop table t1; Testcase 3.5.1.8: diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result index c445f03a2c0..ddc990d1919 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_08.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result @@ -488,8 +488,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index cd8180c6f57..9267cc5a98b 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -452,7 +452,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -589,7 +590,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -609,7 +612,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1794,7 +1799,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1803,7 +1810,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1820,7 +1829,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1832,7 +1843,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/r/myisam__datadict.result b/mysql-test/suite/funcs_1/r/myisam__datadict.result index 5426c0aa59e..36662ad9259 100644 --- a/mysql-test/suite/funcs_1/r/myisam__datadict.result +++ b/mysql-test/suite/funcs_1/r/myisam__datadict.result @@ -10,14 +10,8 @@ . *__datadict.test are started. This can be a result of showing e.g. maximum . values of the number of rows of tables. . -. Currently (Dec 19, 2005) this .result file is checked OK for Linux 5.0.18-bk -. (ChangeSet@1.1993, 2005-12-19 16:21:02+04:00). Using the available Windows -. version 5.0.16 there are some known differences that can be ignored: -. -. - Fix for bug#14271 I_S: columns has no size for (var)binary columns -. - bug#14290 (CHARACTER_MAXIMUM_LENGTH values for columns using ucs2 have been fixed) -. - new column INFORMATION_SCHEMA.TRIGGERS.DEFINER is still not present in 5.0.16 -. - (:5055, :5122, :5215) 3 warnings now errors 1044 at call db_datadict.sp_4_1_3() +. This .result file has been checked OK with Linux 5.0.23-bk, +. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00. . -------------------------------------------------------------------------------- @@ -452,13 +446,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -519,7 +511,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -540,7 +532,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -561,7 +553,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -582,7 +574,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -603,7 +595,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -624,7 +616,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -645,7 +637,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -666,7 +658,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -687,7 +679,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -708,7 +700,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -729,7 +721,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -750,7 +742,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -771,7 +763,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -792,7 +784,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -813,7 +805,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -834,7 +826,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -855,7 +847,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -876,7 +868,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -897,7 +889,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -918,7 +910,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -939,7 +931,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -960,7 +952,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -981,7 +973,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1002,7 +994,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1023,7 +1015,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1044,7 +1036,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1065,7 +1057,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -1088,7 +1080,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1109,7 +1101,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1130,7 +1122,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -1151,7 +1143,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1172,7 +1164,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1193,7 +1185,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1214,7 +1206,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1235,7 +1227,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1256,7 +1248,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1277,7 +1269,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1298,7 +1290,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1319,7 +1311,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1340,7 +1332,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1361,7 +1353,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1382,7 +1374,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1403,7 +1395,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1424,7 +1416,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1436,7 +1428,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1445,7 +1437,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1466,7 +1458,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1487,7 +1479,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1508,7 +1500,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1529,7 +1521,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1550,7 +1542,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1571,7 +1563,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1592,7 +1584,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1604,7 +1596,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1613,7 +1605,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1634,7 +1626,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1655,7 +1647,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1676,7 +1668,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1697,7 +1689,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1718,7 +1710,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1739,7 +1731,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1760,7 +1752,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1781,7 +1773,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1802,7 +1794,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1823,7 +1815,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1844,7 +1836,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1865,7 +1857,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1886,7 +1878,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1907,7 +1899,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1928,7 +1920,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2364,14 +2356,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -2396,21 +2388,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -2427,26 +2421,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2470,23 +2464,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2573,20 +2567,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -2637,20 +2631,20 @@ NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_genera NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references @@ -2698,10 +2692,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -2763,9 +2759,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -3275,7 +3271,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -3300,7 +3296,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -3314,97 +3310,95 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE select * from views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -3604,11 +3598,12 @@ Table or view 'tb2' is associated with the database 'test1'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3645,8 +3640,8 @@ columns_priv 7 COLUMN_PRIVILEGES 7 db 22 ENGINES 6 -event 16 -EVENTS 19 +event 18 +EVENTS 21 FILES 38 func 4 general_log 6 @@ -3858,7 +3853,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3879,7 +3874,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3900,7 +3895,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3921,7 +3916,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3942,7 +3937,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3963,7 +3958,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3984,7 +3979,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4005,7 +4000,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4026,7 +4021,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4047,7 +4042,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4068,7 +4063,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4089,7 +4084,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4110,7 +4105,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4131,7 +4126,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4152,7 +4147,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4173,7 +4168,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4194,7 +4189,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4215,7 +4210,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4236,7 +4231,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4257,7 +4252,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4278,7 +4273,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4299,7 +4294,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4320,7 +4315,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4341,7 +4336,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4362,7 +4357,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4383,7 +4378,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4404,7 +4399,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4427,7 +4422,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4448,7 +4443,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4469,7 +4464,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4490,7 +4485,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4511,7 +4506,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4532,7 +4527,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4553,7 +4548,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4574,7 +4569,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4595,7 +4590,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4616,7 +4611,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4637,7 +4632,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4658,7 +4653,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4679,7 +4674,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4700,7 +4695,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4721,7 +4716,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4742,7 +4737,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4763,7 +4758,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4775,7 +4770,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4784,7 +4779,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4805,7 +4800,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4826,7 +4821,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4847,7 +4842,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4868,7 +4863,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4889,7 +4884,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4910,7 +4905,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4931,7 +4926,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4943,7 +4938,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4952,7 +4947,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4973,7 +4968,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4994,7 +4989,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5015,7 +5010,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5036,7 +5031,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5057,7 +5052,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5078,7 +5073,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5099,7 +5094,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5120,7 +5115,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5141,7 +5136,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5162,7 +5157,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5183,7 +5178,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5204,7 +5199,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5225,7 +5220,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5246,7 +5241,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5267,7 +5262,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5776,7 +5771,7 @@ COUNT(*) 68 SELECT COUNT(*) FROM information_schema. columns ; COUNT(*) -863 +867 SELECT COUNT(*) FROM information_schema. character_sets ; COUNT(*) 36 @@ -5797,7 +5792,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -83 +81 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 32 @@ -5841,7 +5836,7 @@ tot_tabs 65 select count(*) as the_cols from columns; the_cols -838 +842 select max(maxlen) as the_max from character_sets; the_max 3 @@ -5867,7 +5862,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -5939,13 +5934,11 @@ test, tb3 test, tb4 test1, tb2 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -5982,39 +5975,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -6042,7 +6006,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -6070,7 +6033,33 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -7543,91 +7532,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7696,92 +7683,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7835,91 +7820,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7986,91 +7969,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8133,91 +8114,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8293,92 +8272,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8431,91 +8408,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8877,14 +8852,14 @@ COLUMNS TABLE_CATALOG varchar(4096) COLUMNS TABLE_SCHEMA varchar(64) COLUMNS TABLE_NAME varchar(64) COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) +COLUMNS ORDINAL_POSITION bigint(21) unsigned COLUMNS COLUMN_DEFAULT longtext COLUMNS IS_NULLABLE varchar(3) COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) +COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned +COLUMNS CHARACTER_OCTET_LENGTH bigint(21) unsigned +COLUMNS NUMERIC_PRECISION bigint(21) unsigned +COLUMNS NUMERIC_SCALE bigint(21) unsigned COLUMNS CHARACTER_SET_NAME varchar(64) COLUMNS COLLATION_NAME varchar(64) COLUMNS COLUMN_TYPE longtext @@ -8909,6 +8884,7 @@ EVENTS EVENT_CATALOG varchar(64) EVENTS EVENT_SCHEMA varchar(64) EVENTS EVENT_NAME varchar(64) EVENTS DEFINER varchar(77) +EVENTS TIME_ZONE varchar(64) EVENTS EVENT_BODY varchar(8) EVENTS EVENT_DEFINITION longtext EVENTS EVENT_TYPE varchar(9) @@ -8918,12 +8894,13 @@ EVENTS INTERVAL_FIELD varchar(18) EVENTS SQL_MODE longtext EVENTS STARTS datetime EVENTS ENDS datetime -EVENTS STATUS varchar(8) +EVENTS STATUS varchar(18) EVENTS ON_COMPLETION varchar(12) EVENTS CREATED datetime EVENTS LAST_ALTERED datetime EVENTS LAST_EXECUTED datetime EVENTS EVENT_COMMENT varchar(64) +EVENTS ORIGINATOR bigint(10) FILES FILE_ID bigint(4) FILES FILE_NAME varchar(64) FILES FILE_TYPE varchar(20) @@ -8940,26 +8917,26 @@ FILES UPDATE_COUNT bigint(4) FILES FREE_EXTENTS bigint(4) FILES TOTAL_EXTENTS bigint(4) FILES EXTENT_SIZE bigint(4) -FILES INITIAL_SIZE bigint(21) -FILES MAXIMUM_SIZE bigint(21) -FILES AUTOEXTEND_SIZE bigint(21) +FILES INITIAL_SIZE bigint(21) unsigned +FILES MAXIMUM_SIZE bigint(21) unsigned +FILES AUTOEXTEND_SIZE bigint(21) unsigned FILES CREATION_TIME datetime FILES LAST_UPDATE_TIME datetime FILES LAST_ACCESS_TIME datetime FILES RECOVER_TIME bigint(4) FILES TRANSACTION_COUNTER bigint(4) -FILES VERSION bigint(21) +FILES VERSION bigint(21) unsigned FILES ROW_FORMAT varchar(10) -FILES TABLE_ROWS bigint(21) -FILES AVG_ROW_LENGTH bigint(21) -FILES DATA_LENGTH bigint(21) -FILES MAX_DATA_LENGTH bigint(21) -FILES INDEX_LENGTH bigint(21) -FILES DATA_FREE bigint(21) +FILES TABLE_ROWS bigint(21) unsigned +FILES AVG_ROW_LENGTH bigint(21) unsigned +FILES DATA_LENGTH bigint(21) unsigned +FILES MAX_DATA_LENGTH bigint(21) unsigned +FILES INDEX_LENGTH bigint(21) unsigned +FILES DATA_FREE bigint(21) unsigned FILES CREATE_TIME datetime FILES UPDATE_TIME datetime FILES CHECK_TIME datetime -FILES CHECKSUM bigint(21) +FILES CHECKSUM bigint(21) unsigned FILES STATUS varchar(20) FILES EXTRA varchar(255) GLOBAL_STATUS VARIABLE_NAME varchar(64) @@ -8983,23 +8960,23 @@ PARTITIONS TABLE_SCHEMA varchar(64) PARTITIONS TABLE_NAME varchar(64) PARTITIONS PARTITION_NAME varchar(64) PARTITIONS SUBPARTITION_NAME varchar(64) -PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) -PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) +PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) unsigned +PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) unsigned PARTITIONS PARTITION_METHOD varchar(12) PARTITIONS SUBPARTITION_METHOD varchar(12) PARTITIONS PARTITION_EXPRESSION longtext PARTITIONS SUBPARTITION_EXPRESSION longtext PARTITIONS PARTITION_DESCRIPTION longtext -PARTITIONS TABLE_ROWS bigint(21) -PARTITIONS AVG_ROW_LENGTH bigint(21) -PARTITIONS DATA_LENGTH bigint(21) -PARTITIONS MAX_DATA_LENGTH bigint(21) -PARTITIONS INDEX_LENGTH bigint(21) -PARTITIONS DATA_FREE bigint(21) +PARTITIONS TABLE_ROWS bigint(21) unsigned +PARTITIONS AVG_ROW_LENGTH bigint(21) unsigned +PARTITIONS DATA_LENGTH bigint(21) unsigned +PARTITIONS MAX_DATA_LENGTH bigint(21) unsigned +PARTITIONS INDEX_LENGTH bigint(21) unsigned +PARTITIONS DATA_FREE bigint(21) unsigned PARTITIONS CREATE_TIME datetime PARTITIONS UPDATE_TIME datetime PARTITIONS CHECK_TIME datetime -PARTITIONS CHECKSUM bigint(21) +PARTITIONS CHECKSUM bigint(21) unsigned PARTITIONS PARTITION_COMMENT varchar(80) PARTITIONS NODEGROUP varchar(12) PARTITIONS TABLESPACE_NAME varchar(64) @@ -9086,20 +9063,20 @@ TABLES TABLE_SCHEMA varchar(64) TABLES TABLE_NAME varchar(64) TABLES TABLE_TYPE varchar(64) TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) +TABLES VERSION bigint(21) unsigned TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) +TABLES TABLE_ROWS bigint(21) unsigned +TABLES AVG_ROW_LENGTH bigint(21) unsigned +TABLES DATA_LENGTH bigint(21) unsigned +TABLES MAX_DATA_LENGTH bigint(21) unsigned +TABLES INDEX_LENGTH bigint(21) unsigned +TABLES DATA_FREE bigint(21) unsigned +TABLES AUTO_INCREMENT bigint(21) unsigned TABLES CREATE_TIME datetime TABLES UPDATE_TIME datetime TABLES CHECK_TIME datetime TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) +TABLES CHECKSUM bigint(21) unsigned TABLES CREATE_OPTIONS varchar(255) TABLES TABLE_COMMENT varchar(80) TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) @@ -10299,14 +10276,14 @@ TABLE_CATALOG varchar(4096) YES NULL TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 +ORDINAL_POSITION bigint(21) unsigned NO 0 COLUMN_DEFAULT longtext YES NULL IS_NULLABLE varchar(3) NO DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL +CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL +NUMERIC_PRECISION bigint(21) unsigned YES NULL +NUMERIC_SCALE bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL COLUMN_TYPE longtext NO @@ -10321,14 +10298,14 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` bigint(21) NOT NULL DEFAULT '0', + `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0', `COLUMN_DEFAULT` longtext, `IS_NULLABLE` varchar(3) NOT NULL DEFAULT '', `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) DEFAULT NULL, - `NUMERIC_PRECISION` bigint(21) DEFAULT NULL, - `NUMERIC_SCALE` bigint(21) DEFAULT NULL, + `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned DEFAULT NULL, + `CHARACTER_OCTET_LENGTH` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_SCALE` bigint(21) unsigned DEFAULT NULL, `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, `COLLATION_NAME` varchar(64) DEFAULT NULL, `COLUMN_TYPE` longtext NOT NULL, @@ -10352,14 +10329,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10407,14 +10384,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10439,21 +10416,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -10470,26 +10449,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10513,23 +10492,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10616,20 +10595,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -10716,10 +10695,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -10781,9 +10762,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -11251,14 +11232,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11283,21 +11264,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11314,26 +11297,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11357,23 +11340,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11460,20 +11443,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -11827,14 +11810,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11859,21 +11842,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11890,26 +11875,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11933,23 +11918,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -12036,20 +12021,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -12499,14 +12484,14 @@ NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext @@ -12531,6 +12516,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint( 3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) 1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) @@ -12540,12 +12526,13 @@ NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime 1.0000 information_schema EVENTS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime -3.0000 information_schema EVENTS STATUS varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema EVENTS STATUS varchar 18 54 utf8 utf8_general_ci varchar(18) 3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8 utf8_general_ci varchar(12) NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime 3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10) NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4) 3.0000 information_schema FILES FILE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8 utf8_general_ci varchar(20) @@ -12562,26 +12549,26 @@ NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20) 3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12605,23 +12592,23 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU 3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12708,20 +12695,20 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime 3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) @@ -12808,10 +12795,12 @@ NULL mysql event modified timestamp NULL NULL NULL NULL timestamp NULL mysql event last_executed datetime NULL NULL NULL NULL datetime NULL mysql event starts datetime NULL NULL NULL NULL datetime NULL mysql event ends datetime NULL NULL NULL NULL datetime -3.0000 mysql event status enum 8 24 utf8 utf8_general_ci enum('ENABLED','DISABLED') +3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') 3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') 3.0000 mysql event sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') 3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) +NULL mysql event originator int NULL NULL NULL NULL int(10) +1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) 3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) 3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) @@ -14120,20 +14109,20 @@ TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO TABLE_TYPE varchar(64) NO ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL +VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL +TABLE_ROWS bigint(21) unsigned YES NULL +AVG_ROW_LENGTH bigint(21) unsigned YES NULL +DATA_LENGTH bigint(21) unsigned YES NULL +MAX_DATA_LENGTH bigint(21) unsigned YES NULL +INDEX_LENGTH bigint(21) unsigned YES NULL +DATA_FREE bigint(21) unsigned YES NULL +AUTO_INCREMENT bigint(21) unsigned YES NULL CREATE_TIME datetime YES NULL UPDATE_TIME datetime YES NULL CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL +CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(255) YES NULL TABLE_COMMENT varchar(80) NO SHOW CREATE TABLE tables; @@ -14144,20 +14133,20 @@ TABLES CREATE TEMPORARY TABLE `TABLES` ( `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) DEFAULT NULL, + `VERSION` bigint(21) unsigned DEFAULT NULL, `ROW_FORMAT` varchar(10) DEFAULT NULL, - `TABLE_ROWS` bigint(21) DEFAULT NULL, - `AVG_ROW_LENGTH` bigint(21) DEFAULT NULL, - `DATA_LENGTH` bigint(21) DEFAULT NULL, - `MAX_DATA_LENGTH` bigint(21) DEFAULT NULL, - `INDEX_LENGTH` bigint(21) DEFAULT NULL, - `DATA_FREE` bigint(21) DEFAULT NULL, - `AUTO_INCREMENT` bigint(21) DEFAULT NULL, + `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, + `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_FREE` bigint(21) unsigned DEFAULT NULL, + `AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL, `CREATE_TIME` datetime DEFAULT NULL, `UPDATE_TIME` datetime DEFAULT NULL, `CHECK_TIME` datetime DEFAULT NULL, `TABLE_COLLATION` varchar(64) DEFAULT NULL, - `CHECKSUM` bigint(21) DEFAULT NULL, + `CHECKSUM` bigint(21) unsigned DEFAULT NULL, `CREATE_OPTIONS` varchar(255) DEFAULT NULL, `TABLE_COMMENT` varchar(80) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 @@ -14177,20 +14166,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select @@ -14218,228 +14207,228 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Events -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL General log -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL MySQL plugins -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql servers BASE TABLE MyISAM 10 Fixed 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL MySQL Foreign Servers table -NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Slow log -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test1 tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql servers BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL MySQL Foreign Servers table +NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Slow log +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test1 tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test4 t6 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -14651,7 +14640,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -14676,7 +14665,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -14690,7 +14679,7 @@ NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NUL NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE user_1@localhost test SELECT * FROM information_schema.statistics; @@ -15343,9 +15332,6 @@ ERROR 42S02: Unknown table 'parameters' in information_schema Testcase 3.2.20.1: -------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ DESC referential_constraints; Field Type Null Key Default Extra CONSTRAINT_CATALOG varchar(512) YES NULL @@ -15359,6 +15345,57 @@ UPDATE_RULE varchar(64) NO DELETE_RULE varchar(64) NO TABLE_NAME varchar(64) NO REFERENCED_TABLE_NAME varchar(64) NO +USE information_schema; +DESC referential_constraints; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(4096) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +UNIQUE_CONSTRAINT_CATALOG varchar(4096) YES NULL +UNIQUE_CONSTRAINT_SCHEMA varchar(64) NO +UNIQUE_CONSTRAINT_NAME varchar(64) NO +MATCH_OPTION varchar(64) NO +UPDATE_RULE varchar(64) NO +DELETE_RULE varchar(64) NO +TABLE_NAME varchar(64) NO +REFERENCED_TABLE_NAME varchar(64) NO +SHOW CREATE TABLE referential_constraints; +Table Create Table +REFERENTIAL_CONSTRAINTS CREATE TEMPORARY TABLE `REFERENTIAL_CONSTRAINTS` ( + `CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `UNIQUE_CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `MATCH_OPTION` varchar(64) NOT NULL DEFAULT '', + `UPDATE_RULE` varchar(64) NOT NULL DEFAULT '', + `DELETE_RULE` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `REFERENCED_TABLE_NAME` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SELECT COUNT(*) FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +COUNT(*) +11 +SELECT * FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select *** End of Data Dictionary Tests *** -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 9fde670680d..ab4508fb302 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -3935,13 +3935,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3952,13 +3950,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result index 425d69bceb2..4d9a6c64947 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result @@ -199,6 +199,9 @@ CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX +BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; insert into t1 (f2) values ('insert 3.5.1.7'); select * from t1; f1 f2 f3 @@ -213,6 +216,8 @@ trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX drop trigger trg5_1; drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; drop table t1; Testcase 3.5.1.8: diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result index 4f350191099..906aea070d9 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result @@ -492,8 +492,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 1b405041850..a3620575c8b 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -470,7 +470,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -607,7 +608,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -627,7 +630,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1812,7 +1817,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1821,7 +1828,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1838,7 +1847,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1850,7 +1861,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/r/ndb__datadict.result b/mysql-test/suite/funcs_1/r/ndb__datadict.result index 74b279b3d43..cf3b5c29bfe 100644 --- a/mysql-test/suite/funcs_1/r/ndb__datadict.result +++ b/mysql-test/suite/funcs_1/r/ndb__datadict.result @@ -10,14 +10,8 @@ . *__datadict.test are started. This can be a result of showing e.g. maximum . values of the number of rows of tables. . -. Currently (Dec 19, 2005) this .result file is checked OK for Linux 5.0.18-bk -. (ChangeSet@1.1993, 2005-12-19 16:21:02+04:00). Using the available Windows -. version 5.0.16 there are some known differences that can be ignored: -. -. - Fix for bug#14271 I_S: columns has no size for (var)binary columns -. - bug#14290 (CHARACTER_MAXIMUM_LENGTH values for columns using ucs2 have been fixed) -. - new column INFORMATION_SCHEMA.TRIGGERS.DEFINER is still not present in 5.0.16 -. - (:5055, :5122, :5215) 3 warnings now errors 1044 at call db_datadict.sp_4_1_3() +. This .result file has been checked OK with Linux 5.0.23-bk, +. ChangeSet@1.2211, 2006-06-28 10:11:43-07:00. . -------------------------------------------------------------------------------- @@ -109,13 +103,11 @@ LENGTH( SUBSTRING( u, LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) AS Server_Clean FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu; +SELECT * FROM db_datadict.vu order by u; u server Server_Clean -'root'@'localhost' localhost' localhost 'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -''@'localhost' localhost' localhost 'root'@'' ' -''@'' ' +'root'@'localhost' localhost' localhost CREATE PROCEDURE db_datadict.sp_1() BEGIN SELECT * FROM db_datadict.v1; @@ -176,7 +168,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -197,7 +189,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -218,7 +210,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -239,7 +231,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -260,7 +252,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -281,7 +273,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -302,7 +294,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -323,7 +315,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -344,7 +336,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -365,7 +357,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -386,7 +378,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -407,7 +399,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -428,7 +420,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -449,7 +441,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -470,7 +462,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -491,7 +483,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -512,7 +504,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -533,7 +525,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -554,7 +546,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -575,7 +567,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -596,7 +588,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -617,7 +609,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -638,7 +630,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -659,7 +651,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -680,7 +672,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -701,7 +693,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -722,7 +714,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -745,7 +737,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -766,7 +758,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -787,7 +779,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -799,7 +791,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -808,7 +800,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -829,7 +821,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -850,7 +842,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -871,7 +863,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -892,7 +884,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -913,7 +905,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -934,7 +926,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -955,7 +947,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -976,7 +968,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -997,7 +989,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1018,7 +1010,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1029,7 +1021,7 @@ TABLE_NAME ndb_apply_status TABLE_TYPE BASE TABLE ENGINE NDBCLUSTER VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1039,7 +1031,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1060,7 +1052,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1081,7 +1073,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1102,7 +1094,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1123,7 +1115,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1135,7 +1127,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -1144,7 +1136,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1165,7 +1157,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1186,7 +1178,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -1207,7 +1199,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1228,7 +1220,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1249,7 +1241,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1270,7 +1262,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1291,7 +1283,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -1312,7 +1304,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1333,7 +1325,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1354,7 +1346,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1375,7 +1367,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1396,7 +1388,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1417,7 +1409,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1438,7 +1430,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1459,7 +1451,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1480,7 +1472,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1501,7 +1493,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1522,7 +1514,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1543,7 +1535,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1564,7 +1556,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -1585,7 +1577,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -2021,14 +2013,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -2053,21 +2045,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -2084,26 +2078,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2127,23 +2121,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -2230,20 +2224,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -2294,20 +2288,20 @@ NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_genera NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references +NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references +NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select,insert,update,references NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references @@ -2394,10 +2388,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -2444,6 +2440,9 @@ NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enu NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql ndb_apply_status server_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references NULL mysql ndb_apply_status epoch 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_apply_status log_name 3 NULL NO varchar 255 255 NULL NULL latin1 latin1_bin varchar(255) select,insert,update,references +NULL mysql ndb_apply_status start_pos 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_apply_status end_pos 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI select,insert,update,references @@ -2461,9 +2460,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -2868,7 +2867,7 @@ count(*) select * from statistics; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -2877,7 +2876,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -2903,7 +2902,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -2921,91 +2920,89 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges; +select * from user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from schema_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -3207,11 +3204,12 @@ Table or view 'tb4' is associated with the database 'test'. Table or view 't6' is associated with the database 'test4'. select grantee as "user's having select privilege", substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select'; +from user_privileges where privilege_type = 'select' + order by grantee; user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'localhost' 'localhost' 'root'@'127.0.0.1' '127.0.0.1' 'root'@'' '' +'root'@'localhost' 'localhost' select all table_schema from schema_privileges limit 0,5; table_schema test @@ -3248,8 +3246,8 @@ columns_priv 7 COLUMN_PRIVILEGES 7 db 22 ENGINES 6 -event 16 -EVENTS 19 +event 18 +EVENTS 21 FILES 38 func 4 general_log 6 @@ -3261,7 +3259,7 @@ help_relation 2 help_topic 6 host 20 KEY_COLUMN_USAGE 12 -ndb_apply_status 2 +ndb_apply_status 5 ndb_binlog_index 7 PARTITIONS 25 plugin 2 @@ -3462,7 +3460,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3483,7 +3481,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3504,7 +3502,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3525,7 +3523,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3546,7 +3544,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3567,7 +3565,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3588,7 +3586,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3609,7 +3607,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3630,7 +3628,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3651,7 +3649,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3672,7 +3670,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3693,7 +3691,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3714,7 +3712,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3735,7 +3733,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3756,7 +3754,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3777,7 +3775,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3798,7 +3796,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3819,7 +3817,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3840,7 +3838,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3861,7 +3859,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3882,7 +3880,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3903,7 +3901,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3924,7 +3922,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3945,7 +3943,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3966,7 +3964,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -3987,7 +3985,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4008,7 +4006,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS #CO# @@ -4031,7 +4029,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4052,7 +4050,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4073,7 +4071,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION NULL CHECKSUM NULL CREATE_OPTIONS NULL @@ -4085,7 +4083,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Dynamic -TABLE_ROWS 5 +TABLE_ROWS 3 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4094,7 +4092,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4115,7 +4113,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4136,7 +4134,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4157,7 +4155,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4178,7 +4176,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4199,7 +4197,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4220,7 +4218,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4241,7 +4239,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4262,7 +4260,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4283,7 +4281,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4304,7 +4302,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4315,7 +4313,7 @@ TABLE_NAME ndb_apply_status TABLE_TYPE BASE TABLE ENGINE NDBCLUSTER VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -4325,7 +4323,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4346,7 +4344,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4367,7 +4365,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4388,7 +4386,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4409,7 +4407,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4421,7 +4419,7 @@ TABLE_TYPE BASE TABLE ENGINE MyISAM VERSION 10 ROW_FORMAT Fixed -TABLE_ROWS 1 +TABLE_ROWS 0 AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# MAX_DATA_LENGTH #MDL# @@ -4430,7 +4428,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4451,7 +4449,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4472,7 +4470,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_bin CHECKSUM NULL CREATE_OPTIONS @@ -4493,7 +4491,7 @@ DATA_FREE #DF# AUTO_INCREMENT 6 CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4514,7 +4512,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4535,7 +4533,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4556,7 +4554,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4577,7 +4575,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION utf8_general_ci CHECKSUM NULL CREATE_OPTIONS @@ -4598,7 +4596,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4619,7 +4617,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4640,7 +4638,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4661,7 +4659,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4682,7 +4680,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4703,7 +4701,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4724,7 +4722,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4745,7 +4743,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4766,7 +4764,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4787,7 +4785,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4808,7 +4806,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4829,7 +4827,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4850,7 +4848,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -4871,7 +4869,7 @@ DATA_FREE #DF# AUTO_INCREMENT NULL CREATE_TIME YYYY-MM-DD hh:mm:ss UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME NULL +CHECK_TIME YYYY-MM-DD hh:mm:ss TABLE_COLLATION latin1_swedish_ci CHECKSUM NULL CREATE_OPTIONS @@ -5325,7 +5323,7 @@ END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh select * from information_schema.statistics limit 0, 5; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -5380,7 +5378,7 @@ COUNT(*) 68 SELECT COUNT(*) FROM information_schema. columns ; COUNT(*) -806 +813 SELECT COUNT(*) FROM information_schema. character_sets ; COUNT(*) 36 @@ -5401,7 +5399,7 @@ COUNT(*) 3 SELECT COUNT(*) FROM information_schema. user_privileges ; COUNT(*) -83 +81 SELECT COUNT(*) FROM information_schema. schema_privileges ; COUNT(*) 32 @@ -5445,7 +5443,7 @@ tot_tabs 65 select count(*) as the_cols from columns; the_cols -781 +788 select max(maxlen) as the_max from character_sets; the_max 3 @@ -5471,7 +5469,7 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_ NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE select concat(table_schema, ', ', table_name, ', ', view_definition) view_info from views; view_info @@ -5543,13 +5541,11 @@ test, tb2 test, tb3 test, tb4 test4, t6 -select distinct grantee from user_privileges; +select distinct grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' +'root'@'localhost' select * from schema_privileges where table_catalog is null limit 0, 5; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test SELECT NO @@ -5586,39 +5582,10 @@ NULL test1 latin1 latin1_swedish_ci NULL select distinct grantee from user_privileges; grantee 'root'@'localhost' -'root'@'127.0.0.1' -''@'localhost' 'root'@'' -''@'' -select all grantee from user_privileges; +'root'@'127.0.0.1' +select all grantee from user_privileges order by grantee, privilege_type; grantee -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' @@ -5646,7 +5613,6 @@ grantee 'root'@'127.0.0.1' 'root'@'127.0.0.1' 'root'@'127.0.0.1' -''@'localhost' 'root'@'' 'root'@'' 'root'@'' @@ -5674,7 +5640,33 @@ grantee 'root'@'' 'root'@'' 'root'@'' -''@'' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' +'root'@'localhost' select id , character_set_name from collations order by id asc limit 10; id character_set_name 1 big5 @@ -7147,91 +7139,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7300,92 +7290,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401013 db_datadict i_6_401013 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401013'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401013'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7439,91 +7427,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7590,91 +7576,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7737,91 +7721,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -7897,92 +7879,90 @@ where table_schema like 'db_datadict%'; table_name index_schema index_name index_type res_t_401015 db_datadict i_6_401015 BTREE select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -'u_6_401015'@'localhost' NULL USAGE NO -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES +'u_6_401015'@'localhost' NULL USAGE NO select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8035,91 +8015,89 @@ from information_schema.statistics where table_schema like 'db_datadict%'; table_name index_schema index_name index_type select * -from information_schema.user_privileges; +from information_schema.user_privileges order by grantee, privilege_type; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL EVENT YES -'root'@'localhost' NULL TRIGGER YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL INDEX YES 'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES 'root'@'127.0.0.1' NULL ALTER ROUTINE YES +'root'@'127.0.0.1' NULL CREATE YES +'root'@'127.0.0.1' NULL CREATE ROUTINE YES +'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES 'root'@'127.0.0.1' NULL CREATE USER YES +'root'@'127.0.0.1' NULL CREATE VIEW YES +'root'@'127.0.0.1' NULL DELETE YES +'root'@'127.0.0.1' NULL DROP YES 'root'@'127.0.0.1' NULL EVENT YES +'root'@'127.0.0.1' NULL EXECUTE YES +'root'@'127.0.0.1' NULL FILE YES +'root'@'127.0.0.1' NULL INDEX YES +'root'@'127.0.0.1' NULL INSERT YES +'root'@'127.0.0.1' NULL LOCK TABLES YES +'root'@'127.0.0.1' NULL PROCESS YES +'root'@'127.0.0.1' NULL REFERENCES YES +'root'@'127.0.0.1' NULL RELOAD YES +'root'@'127.0.0.1' NULL REPLICATION CLIENT YES +'root'@'127.0.0.1' NULL REPLICATION SLAVE YES +'root'@'127.0.0.1' NULL SELECT YES +'root'@'127.0.0.1' NULL SHOW DATABASES YES +'root'@'127.0.0.1' NULL SHOW VIEW YES +'root'@'127.0.0.1' NULL SHUTDOWN YES +'root'@'127.0.0.1' NULL SUPER YES 'root'@'127.0.0.1' NULL TRIGGER YES -''@'localhost' NULL USAGE NO -'root'@'' NULL SELECT YES -'root'@'' NULL INSERT YES -'root'@'' NULL UPDATE YES -'root'@'' NULL DELETE YES -'root'@'' NULL CREATE YES -'root'@'' NULL DROP YES -'root'@'' NULL RELOAD YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL PROCESS YES -'root'@'' NULL FILE YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL INDEX YES +'root'@'127.0.0.1' NULL UPDATE YES 'root'@'' NULL ALTER YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SUPER YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL CREATE ROUTINE YES 'root'@'' NULL ALTER ROUTINE YES +'root'@'' NULL CREATE YES +'root'@'' NULL CREATE ROUTINE YES +'root'@'' NULL CREATE TEMPORARY TABLES YES 'root'@'' NULL CREATE USER YES +'root'@'' NULL CREATE VIEW YES +'root'@'' NULL DELETE YES +'root'@'' NULL DROP YES 'root'@'' NULL EVENT YES +'root'@'' NULL EXECUTE YES +'root'@'' NULL FILE YES +'root'@'' NULL INDEX YES +'root'@'' NULL INSERT YES +'root'@'' NULL LOCK TABLES YES +'root'@'' NULL PROCESS YES +'root'@'' NULL REFERENCES YES +'root'@'' NULL RELOAD YES +'root'@'' NULL REPLICATION CLIENT YES +'root'@'' NULL REPLICATION SLAVE YES +'root'@'' NULL SELECT YES +'root'@'' NULL SHOW DATABASES YES +'root'@'' NULL SHOW VIEW YES +'root'@'' NULL SHUTDOWN YES +'root'@'' NULL SUPER YES 'root'@'' NULL TRIGGER YES -''@'' NULL USAGE NO +'root'@'' NULL UPDATE YES +'root'@'localhost' NULL ALTER YES +'root'@'localhost' NULL ALTER ROUTINE YES +'root'@'localhost' NULL CREATE YES +'root'@'localhost' NULL CREATE ROUTINE YES +'root'@'localhost' NULL CREATE TEMPORARY TABLES YES +'root'@'localhost' NULL CREATE USER YES +'root'@'localhost' NULL CREATE VIEW YES +'root'@'localhost' NULL DELETE YES +'root'@'localhost' NULL DROP YES +'root'@'localhost' NULL EVENT YES +'root'@'localhost' NULL EXECUTE YES +'root'@'localhost' NULL FILE YES +'root'@'localhost' NULL INDEX YES +'root'@'localhost' NULL INSERT YES +'root'@'localhost' NULL LOCK TABLES YES +'root'@'localhost' NULL PROCESS YES +'root'@'localhost' NULL REFERENCES YES +'root'@'localhost' NULL RELOAD YES +'root'@'localhost' NULL REPLICATION CLIENT YES +'root'@'localhost' NULL REPLICATION SLAVE YES +'root'@'localhost' NULL SELECT YES +'root'@'localhost' NULL SHOW DATABASES YES +'root'@'localhost' NULL SHOW VIEW YES +'root'@'localhost' NULL SHUTDOWN YES +'root'@'localhost' NULL SUPER YES +'root'@'localhost' NULL TRIGGER YES +'root'@'localhost' NULL UPDATE YES select * from information_schema.column_privileges where table_schema like 'db_datadict%'; @@ -8481,14 +8459,14 @@ COLUMNS TABLE_CATALOG varchar(4096) COLUMNS TABLE_SCHEMA varchar(64) COLUMNS TABLE_NAME varchar(64) COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) +COLUMNS ORDINAL_POSITION bigint(21) unsigned COLUMNS COLUMN_DEFAULT longtext COLUMNS IS_NULLABLE varchar(3) COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) +COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned +COLUMNS CHARACTER_OCTET_LENGTH bigint(21) unsigned +COLUMNS NUMERIC_PRECISION bigint(21) unsigned +COLUMNS NUMERIC_SCALE bigint(21) unsigned COLUMNS CHARACTER_SET_NAME varchar(64) COLUMNS COLLATION_NAME varchar(64) COLUMNS COLUMN_TYPE longtext @@ -8513,6 +8491,7 @@ EVENTS EVENT_CATALOG varchar(64) EVENTS EVENT_SCHEMA varchar(64) EVENTS EVENT_NAME varchar(64) EVENTS DEFINER varchar(77) +EVENTS TIME_ZONE varchar(64) EVENTS EVENT_BODY varchar(8) EVENTS EVENT_DEFINITION longtext EVENTS EVENT_TYPE varchar(9) @@ -8522,12 +8501,13 @@ EVENTS INTERVAL_FIELD varchar(18) EVENTS SQL_MODE longtext EVENTS STARTS datetime EVENTS ENDS datetime -EVENTS STATUS varchar(8) +EVENTS STATUS varchar(18) EVENTS ON_COMPLETION varchar(12) EVENTS CREATED datetime EVENTS LAST_ALTERED datetime EVENTS LAST_EXECUTED datetime EVENTS EVENT_COMMENT varchar(64) +EVENTS ORIGINATOR bigint(10) FILES FILE_ID bigint(4) FILES FILE_NAME varchar(64) FILES FILE_TYPE varchar(20) @@ -8544,26 +8524,26 @@ FILES UPDATE_COUNT bigint(4) FILES FREE_EXTENTS bigint(4) FILES TOTAL_EXTENTS bigint(4) FILES EXTENT_SIZE bigint(4) -FILES INITIAL_SIZE bigint(21) -FILES MAXIMUM_SIZE bigint(21) -FILES AUTOEXTEND_SIZE bigint(21) +FILES INITIAL_SIZE bigint(21) unsigned +FILES MAXIMUM_SIZE bigint(21) unsigned +FILES AUTOEXTEND_SIZE bigint(21) unsigned FILES CREATION_TIME datetime FILES LAST_UPDATE_TIME datetime FILES LAST_ACCESS_TIME datetime FILES RECOVER_TIME bigint(4) FILES TRANSACTION_COUNTER bigint(4) -FILES VERSION bigint(21) +FILES VERSION bigint(21) unsigned FILES ROW_FORMAT varchar(10) -FILES TABLE_ROWS bigint(21) -FILES AVG_ROW_LENGTH bigint(21) -FILES DATA_LENGTH bigint(21) -FILES MAX_DATA_LENGTH bigint(21) -FILES INDEX_LENGTH bigint(21) -FILES DATA_FREE bigint(21) +FILES TABLE_ROWS bigint(21) unsigned +FILES AVG_ROW_LENGTH bigint(21) unsigned +FILES DATA_LENGTH bigint(21) unsigned +FILES MAX_DATA_LENGTH bigint(21) unsigned +FILES INDEX_LENGTH bigint(21) unsigned +FILES DATA_FREE bigint(21) unsigned FILES CREATE_TIME datetime FILES UPDATE_TIME datetime FILES CHECK_TIME datetime -FILES CHECKSUM bigint(21) +FILES CHECKSUM bigint(21) unsigned FILES STATUS varchar(20) FILES EXTRA varchar(255) GLOBAL_STATUS VARIABLE_NAME varchar(64) @@ -8587,23 +8567,23 @@ PARTITIONS TABLE_SCHEMA varchar(64) PARTITIONS TABLE_NAME varchar(64) PARTITIONS PARTITION_NAME varchar(64) PARTITIONS SUBPARTITION_NAME varchar(64) -PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) -PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) +PARTITIONS PARTITION_ORDINAL_POSITION bigint(21) unsigned +PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint(21) unsigned PARTITIONS PARTITION_METHOD varchar(12) PARTITIONS SUBPARTITION_METHOD varchar(12) PARTITIONS PARTITION_EXPRESSION longtext PARTITIONS SUBPARTITION_EXPRESSION longtext PARTITIONS PARTITION_DESCRIPTION longtext -PARTITIONS TABLE_ROWS bigint(21) -PARTITIONS AVG_ROW_LENGTH bigint(21) -PARTITIONS DATA_LENGTH bigint(21) -PARTITIONS MAX_DATA_LENGTH bigint(21) -PARTITIONS INDEX_LENGTH bigint(21) -PARTITIONS DATA_FREE bigint(21) +PARTITIONS TABLE_ROWS bigint(21) unsigned +PARTITIONS AVG_ROW_LENGTH bigint(21) unsigned +PARTITIONS DATA_LENGTH bigint(21) unsigned +PARTITIONS MAX_DATA_LENGTH bigint(21) unsigned +PARTITIONS INDEX_LENGTH bigint(21) unsigned +PARTITIONS DATA_FREE bigint(21) unsigned PARTITIONS CREATE_TIME datetime PARTITIONS UPDATE_TIME datetime PARTITIONS CHECK_TIME datetime -PARTITIONS CHECKSUM bigint(21) +PARTITIONS CHECKSUM bigint(21) unsigned PARTITIONS PARTITION_COMMENT varchar(80) PARTITIONS NODEGROUP varchar(12) PARTITIONS TABLESPACE_NAME varchar(64) @@ -8690,20 +8670,20 @@ TABLES TABLE_SCHEMA varchar(64) TABLES TABLE_NAME varchar(64) TABLES TABLE_TYPE varchar(64) TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) +TABLES VERSION bigint(21) unsigned TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) +TABLES TABLE_ROWS bigint(21) unsigned +TABLES AVG_ROW_LENGTH bigint(21) unsigned +TABLES DATA_LENGTH bigint(21) unsigned +TABLES MAX_DATA_LENGTH bigint(21) unsigned +TABLES INDEX_LENGTH bigint(21) unsigned +TABLES DATA_FREE bigint(21) unsigned +TABLES AUTO_INCREMENT bigint(21) unsigned TABLES CREATE_TIME datetime TABLES UPDATE_TIME datetime TABLES CHECK_TIME datetime TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) +TABLES CHECKSUM bigint(21) unsigned TABLES CREATE_OPTIONS varchar(255) TABLES TABLE_COMMENT varchar(80) TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) @@ -9903,14 +9883,14 @@ TABLE_CATALOG varchar(4096) YES NULL TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 +ORDINAL_POSITION bigint(21) unsigned NO 0 COLUMN_DEFAULT longtext YES NULL IS_NULLABLE varchar(3) NO DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL +CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL +NUMERIC_PRECISION bigint(21) unsigned YES NULL +NUMERIC_SCALE bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL COLUMN_TYPE longtext NO @@ -9925,14 +9905,14 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` bigint(21) NOT NULL DEFAULT '0', + `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0', `COLUMN_DEFAULT` longtext, `IS_NULLABLE` varchar(3) NOT NULL DEFAULT '', `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) DEFAULT NULL, - `NUMERIC_PRECISION` bigint(21) DEFAULT NULL, - `NUMERIC_SCALE` bigint(21) DEFAULT NULL, + `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned DEFAULT NULL, + `CHARACTER_OCTET_LENGTH` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_SCALE` bigint(21) unsigned DEFAULT NULL, `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, `COLLATION_NAME` varchar(64) DEFAULT NULL, `COLUMN_TYPE` longtext NOT NULL, @@ -9956,14 +9936,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10011,14 +9991,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10043,21 +10023,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -10074,26 +10056,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10117,23 +10099,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10220,20 +10202,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -10320,10 +10302,12 @@ NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL mysql event status 13 ENABLED NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED') select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references NULL mysql event sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references @@ -10370,6 +10354,9 @@ NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enu NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql ndb_apply_status server_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references NULL mysql ndb_apply_status epoch 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_apply_status log_name 3 NULL NO varchar 255 255 NULL NULL latin1 latin1_bin varchar(255) select,insert,update,references +NULL mysql ndb_apply_status start_pos 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_apply_status end_pos 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI select,insert,update,references @@ -10387,9 +10374,9 @@ NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum(' NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references @@ -10798,14 +10785,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -10830,21 +10817,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -10861,26 +10850,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -10904,23 +10893,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11007,20 +10996,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -11374,14 +11363,14 @@ NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select @@ -11406,21 +11395,23 @@ NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema EVENTS EVENT_BODY 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS EVENT_DEFINITION 6 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS EVENT_TYPE 7 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema EVENTS EXECUTE_AT 8 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS INTERVAL_VALUE 9 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select -NULL information_schema EVENTS INTERVAL_FIELD 10 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select -NULL information_schema EVENTS SQL_MODE 11 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema EVENTS STARTS 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS ENDS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS STATUS 14 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema EVENTS ON_COMPLETION 15 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select -NULL information_schema EVENTS CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS LAST_EXECUTED 18 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema EVENTS EVENT_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS SQL_MODE 12 NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select @@ -11437,26 +11428,26 @@ NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NUL NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11480,23 +11471,23 @@ NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL u NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -11583,20 +11574,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select @@ -11949,6 +11940,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 tinyblob NULL NULL 1.0000 varbinary NULL NULL 1.0000 char latin1 latin1_bin +1.0000 varchar latin1 latin1_bin 1.0000 char latin1 latin1_swedish_ci 1.0000 enum latin1 latin1_swedish_ci 1.0000 longtext latin1 latin1_swedish_ci @@ -12046,14 +12038,14 @@ NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext @@ -12078,6 +12070,7 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint( 3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) 1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) @@ -12087,12 +12080,13 @@ NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime 1.0000 information_schema EVENTS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime -3.0000 information_schema EVENTS STATUS varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema EVENTS STATUS varchar 18 54 utf8 utf8_general_ci varchar(18) 3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8 utf8_general_ci varchar(12) NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime 3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10) NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4) 3.0000 information_schema FILES FILE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8 utf8_general_ci varchar(20) @@ -12109,26 +12103,26 @@ NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) -NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20) 3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12152,23 +12146,23 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU 3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) 1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12) 3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -12255,20 +12249,20 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime 3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) @@ -12355,10 +12349,12 @@ NULL mysql event modified timestamp NULL NULL NULL NULL timestamp NULL mysql event last_executed datetime NULL NULL NULL NULL datetime NULL mysql event starts datetime NULL NULL NULL NULL datetime NULL mysql event ends datetime NULL NULL NULL NULL datetime -3.0000 mysql event status enum 8 24 utf8 utf8_general_ci enum('ENABLED','DISABLED') +3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') 3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') 3.0000 mysql event sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') 3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) +NULL mysql event originator int NULL NULL NULL NULL int(10) +1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) 3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) 3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) @@ -12405,6 +12401,9 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) 3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') NULL mysql ndb_apply_status server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql ndb_apply_status epoch bigint NULL NULL NULL NULL bigint(20) unsigned +1.0000 mysql ndb_apply_status log_name varchar 255 255 latin1 latin1_bin varchar(255) +NULL mysql ndb_apply_status start_pos bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql ndb_apply_status end_pos bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned 1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255) NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned @@ -13611,20 +13610,20 @@ TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO TABLE_TYPE varchar(64) NO ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL +VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL +TABLE_ROWS bigint(21) unsigned YES NULL +AVG_ROW_LENGTH bigint(21) unsigned YES NULL +DATA_LENGTH bigint(21) unsigned YES NULL +MAX_DATA_LENGTH bigint(21) unsigned YES NULL +INDEX_LENGTH bigint(21) unsigned YES NULL +DATA_FREE bigint(21) unsigned YES NULL +AUTO_INCREMENT bigint(21) unsigned YES NULL CREATE_TIME datetime YES NULL UPDATE_TIME datetime YES NULL CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL +CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(255) YES NULL TABLE_COMMENT varchar(80) NO SHOW CREATE TABLE tables; @@ -13635,20 +13634,20 @@ TABLES CREATE TEMPORARY TABLE `TABLES` ( `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) DEFAULT NULL, + `VERSION` bigint(21) unsigned DEFAULT NULL, `ROW_FORMAT` varchar(10) DEFAULT NULL, - `TABLE_ROWS` bigint(21) DEFAULT NULL, - `AVG_ROW_LENGTH` bigint(21) DEFAULT NULL, - `DATA_LENGTH` bigint(21) DEFAULT NULL, - `MAX_DATA_LENGTH` bigint(21) DEFAULT NULL, - `INDEX_LENGTH` bigint(21) DEFAULT NULL, - `DATA_FREE` bigint(21) DEFAULT NULL, - `AUTO_INCREMENT` bigint(21) DEFAULT NULL, + `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, + `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_FREE` bigint(21) unsigned DEFAULT NULL, + `AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL, `CREATE_TIME` datetime DEFAULT NULL, `UPDATE_TIME` datetime DEFAULT NULL, `CHECK_TIME` datetime DEFAULT NULL, `TABLE_COLLATION` varchar(64) DEFAULT NULL, - `CHECKSUM` bigint(21) DEFAULT NULL, + `CHECKSUM` bigint(21) unsigned DEFAULT NULL, `CREATE_OPTIONS` varchar(255) DEFAULT NULL, `TABLE_COMMENT` varchar(80) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 @@ -13668,20 +13667,20 @@ NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select @@ -13709,228 +13708,228 @@ GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL root@localhost db_datadict SELECT * FROM information_schema.tables WHERE table_schema = 'information_schema'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# +NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMNS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ENGINES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema EVENTS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema FILES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema GLOBAL_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PARTITIONS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PLUGINS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema PROCESSLIST SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema REFERENTIAL_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema ROUTINES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_STATUS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema SESSION_VARIABLES SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema STATISTICS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 10 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# +NULL information_schema VIEWS SYSTEM VIEW MyISAM 10 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# SELECT * FROM information_schema.tables WHERE NOT( table_schema = 'information_schema'); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL NULL VIEW -NULL mysql user BASE TABLE MyISAM 10 Dynamic 8 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Users and global privileges -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Database privileges -NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Events -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL User defined functions -NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL General log -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL help topics -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql ndb_apply_status BASE TABLE NDBCLUSTER 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL MySQL plugins -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Procedure privileges -NULL mysql servers BASE TABLE MyISAM 10 Fixed 1 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL MySQL Foreign Servers table -NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Slow log -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL Time zone transition types -NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL latin1_swedish_ci NULL number_of_replicas: 2 +NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW +NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges +NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges +NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges +NULL mysql event BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Events +NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions +NULL mysql general_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL General log +NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories +NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords +NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation +NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics +NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges +NULL mysql ndb_apply_status BASE TABLE NDBCLUSTER 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL mysql ndb_binlog_index BASE TABLE MyISAM 10 Dynamic 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL mysql plugin BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL MySQL plugins +NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures +NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges +NULL mysql servers BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL MySQL Foreign Servers table +NULL mysql slow_log BASE TABLE CSV 10 Dynamic 2 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Slow log +NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges +NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones +NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones +NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names +NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions +NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types +NULL test t1 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t10 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t11 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t2 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t3 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t4 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t7 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t8 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test t9 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 +NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb2 BASE TABLE MyISAM 10 Dynamic 54 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb3 BASE TABLE MyISAM 10 Dynamic 11 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL +NULL test4 t6 BASE TABLE NDBCLUSTER 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL number_of_replicas: 2 DROP USER 'user_1'@'localhost'; DROP USER 'user_2'@'localhost'; DROP USER 'user_3'@'localhost'; @@ -14135,7 +14134,7 @@ NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE NULL db_datadict_2 tb_2_2 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE NULL db_datadict_2 tb_2_2 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 7 NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -14144,7 +14143,7 @@ NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A NULL NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE NULL mysql event 0 mysql PRIMARY 2 name A 0 NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE @@ -14170,7 +14169,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql servers 0 mysql PRIMARY 1 Server_name A 1 NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A 0 NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE @@ -14835,9 +14834,6 @@ ERROR 42S02: Unknown table 'parameters' in information_schema Testcase 3.2.20.1: -------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ DESC referential_constraints; Field Type Null Key Default Extra CONSTRAINT_CATALOG varchar(512) YES NULL @@ -14851,6 +14847,57 @@ UPDATE_RULE varchar(64) NO DELETE_RULE varchar(64) NO TABLE_NAME varchar(64) NO REFERENCED_TABLE_NAME varchar(64) NO +USE information_schema; +DESC referential_constraints; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(4096) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +UNIQUE_CONSTRAINT_CATALOG varchar(4096) YES NULL +UNIQUE_CONSTRAINT_SCHEMA varchar(64) NO +UNIQUE_CONSTRAINT_NAME varchar(64) NO +MATCH_OPTION varchar(64) NO +UPDATE_RULE varchar(64) NO +DELETE_RULE varchar(64) NO +TABLE_NAME varchar(64) NO +REFERENCED_TABLE_NAME varchar(64) NO +SHOW CREATE TABLE referential_constraints; +Table Create Table +REFERENTIAL_CONSTRAINTS CREATE TEMPORARY TABLE `REFERENTIAL_CONSTRAINTS` ( + `CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_CATALOG` varchar(4096) DEFAULT NULL, + `UNIQUE_CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `UNIQUE_CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `MATCH_OPTION` varchar(64) NOT NULL DEFAULT '', + `UPDATE_RULE` varchar(64) NOT NULL DEFAULT '', + `DELETE_RULE` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `REFERENCED_TABLE_NAME` varchar(64) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SELECT COUNT(*) FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +COUNT(*) +11 +SELECT * FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'referential_constraints' +ORDER BY ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select *** End of Data Dictionary Tests *** -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_func_view.result b/mysql-test/suite/funcs_1/r/ndb_func_view.result index 9fde670680d..ab4508fb302 100644 --- a/mysql-test/suite/funcs_1/r/ndb_func_view.result +++ b/mysql-test/suite/funcs_1/r/ndb_func_view.result @@ -3935,13 +3935,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' SHOW CREATE VIEW v1; View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as datetime) AS `CAST(my_time AS DATETIME)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values` @@ -3952,13 +3950,11 @@ CAST(my_time AS DATETIME) my_time id NULL NULL 1 0000-00-00 00:00:00 -838:59:59 2 0000-00-00 00:00:00 838:59:59 3 -0000-00-00 00:00:00 13:00:00 4 -0000-00-00 00:00:00 10:00:00 5 +0000-00-00 13:00:00 13:00:00 4 +0000-00-00 10:00:00 10:00:00 5 Warnings: Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' Warning 1292 Incorrect datetime value: '0000-00-00 838:59:59' -Warning 1292 Incorrect datetime value: '0000-00-00 13:00:00' -Warning 1292 Incorrect datetime value: '0000-00-00 10:00:00' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result index 7a20bb28d3c..0157151e8be 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result @@ -132,7 +132,7 @@ f121 f122 f142 f144 f134 Test 3.5.1.1 Before Update Trigger 27 0000000008 1 select @test_before, @test_after; @test_before @test_after -2 2 +2 1 drop trigger trg1_1; drop trigger trg1_2; drop trigger trg1_3; @@ -200,6 +200,9 @@ CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX +BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; insert into t1 (f2) values ('insert 3.5.1.7'); select * from t1; f1 f2 f3 @@ -214,6 +217,8 @@ trg5_1 trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX drop trigger trg5_1; drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; +ERROR 42000: Identifier name 'trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ' is too long +drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; drop table t1; Testcase 3.5.1.8: diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result index ad42796b9e5..a60caec0144 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_08.result @@ -493,8 +493,9 @@ BEGIN WHILE @counter1 < new.f136 SET @counter1 = @counter1 + 1; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; -END' at line 4 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136 +SET @counter1 = @counter1 + 1; +END' at line 3 delete from tb3 where f122='Test 3.5.8.5-while'; drop trigger trg7; diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result index 2b92e819461..a8dba47ac6e 100644 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ b/mysql-test/suite/funcs_1/r/ndb_views.result @@ -448,7 +448,8 @@ SET @x=0; CREATE or REPLACE VIEW v1 AS Select 1 INTO @x; ERROR HY000: View's SELECT contains a 'INTO' clause Select @x; -ERROR HY000: View's SELECT contains a variable or parameter +@x +0 CREATE or REPLACE VIEW v1 AS Select 1 FROM (SELECT 1 FROM t1) my_table; ERROR HY000: View's SELECT contains a subquery in the FROM clause @@ -585,7 +586,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp CREATE or REPLACE view v1 as Select f59, f60 from tb2 by group f59 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by group f59' at line 2 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.5 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE VIEW v1 SELECT * FROM tb2 limit 100 ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM tb2 limit 100' at line 1 @@ -605,7 +608,9 @@ CREATE VIEW v1 SELECT 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1' at line 1 CREATE VIEW v1 AS ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.6 +-------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1 ; CREATE or REPLACE VIEW v1 as SELECT * from tb2 limit 100 ; @@ -1790,7 +1795,9 @@ ERROR HY000: View's SELECT contains a subquery in the FROM clause SELECT * FROM test.v1 ; ERROR 42S02: Table 'test.v1' doesn't exist Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.40 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Set @var1 = 'ABC' ; Set @var2 = 'XYZ' ; @@ -1799,7 +1806,9 @@ ERROR HY000: View's SELECT contains a variable or parameter CREATE VIEW test.v1 AS SELECT @@global.sort_buffer_size; ERROR HY000: View's SELECT contains a variable or parameter Drop view if exists test.v1 ; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.41 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; Drop procedure if exists sp1 ; Create procedure sp1() DETERMINISTIC @@ -1816,7 +1825,9 @@ Warnings: Note 1051 Unknown table 'test.v1' Drop procedure sp1 ; ERROR 42000: PROCEDURE test.sp1 does not exist -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.42 +-------------------------------------------------------------------------------- Drop VIEW if exists test.v1 ; CREATE TEMPORARY VIEW test.v1 AS SELECT * FROM test.tb2 limit 2 ; @@ -1828,7 +1839,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT * FROM test.tb2 limit 2' at line 1 Drop view if exists test.v1 ; Use test; -ERROR HY000: View's SELECT contains a variable or parameter + +Testcase 3.3.1.43 +-------------------------------------------------------------------------------- Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); diff --git a/mysql-test/suite/funcs_1/t/a_version_check.test b/mysql-test/suite/funcs_1/t/a_version_check.test deleted file mode 100644 index 60bd5b3c161..00000000000 --- a/mysql-test/suite/funcs_1/t/a_version_check.test +++ /dev/null @@ -1,29 +0,0 @@ -#### suite/funcs_1/t/a_version_check.test -# -# just a simple check of the version to be sure the correct server version is -# checked against the funcs_1 tests. - -# just show machine and version to be sure we are testing the correct files -# -let $message= . Just show the version string for which the results in suite - . funcs_1 have been checked. - . - . I know that the .result file of this check needs to - . updated with each new version --- THIS IS INTENDED!; ---source include/show_msg.inc - ---disable_query_log -SELECT CONCAT('funcs_1 checked with version: ', SUBSTR(version(), 1, 6 ) ) AS " "; -#SELECT CONCAT('aa = ', 'bb'); -#SELECT CONCAT('aa = ', 'bb') AS " "; - -if (0) -{ - # these more detailed results create differences between the OS. - # mioght be used later when we enable OS dependent .result files - --vertical_results - SELECT @@version_compile_os AS 'vers_comp_os', current_date; - SHOW VARIABLES LIKE 'vers%'; - --horizontal_results -} - diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index cfb16800c35..6833178a353 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,7 +10,6 @@ # ############################################################################## -innodb_storedproc: switched off (too much changed output from WL#2984, needs to be checked) -memory_storedproc: switched off (too much changed output from WL#2984, needs to be checked) -myisam_storedproc: switched off (too much changed output from WL#2984, needs to be checked) -~ +innodb_storedproc: (changes of WL#2984, using storeproc_nn instead) +memory_storedproc: (changes of WL#2984, using storeproc_nn instead) +myisam_storedproc: (changes of WL#2984, using storeproc_nn instead) diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc index ce06e0c0c3e..af94041d245 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc @@ -214,8 +214,14 @@ let $message= Testcase 3.5.1.7: - need to fix; eval create table t1 (f1 int, f2 char(25),f3 int) engine=$engine_type; CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 for each row set new.f3 = '14'; +# In 5.0 names to long (more than 64 chars) were trimed without an error +# In 5.1 an error is returned. So adding a call with the expected error +# and one with a shorter name to validate proper execution + --error 1059 CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; + CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX + BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; insert into t1 (f2) values ('insert 3.5.1.7'); select * from t1; @@ -227,8 +233,10 @@ let $message= Testcase 3.5.1.7: - need to fix; --disable_warnings --error 0, 1360 drop trigger trg5_1; - # The above trigger should be dropped since the name was trimmed. + # In 5.1 the long name should generate an error that is to long + --error 1059 drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ; + drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX; drop table t1; #Section 3.5.1.8 diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index 8f0eab5849d..0e3371bdb18 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -3036,7 +3036,9 @@ let $sublevel= `SELECT @max_level`; eval CREATE VIEW test1.v$level AS SELECT f1, f2 FROM test3.t1 tab1 NATURAL JOIN test1.v$sublevel tab2; eval SHOW CREATE VIEW test1.v$level; ---eror 1116 +# the following line as written as '--eror 1116' and the command +# is successful so assuming no expected error was intended +# --error 1116 eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$level; let $message= The output of following EXPLAIN is deactivated, because the result @@ -3047,7 +3049,9 @@ if (1) { --disable_result_log } ---eror 1116 +# the following line as written as '--eror 1116' and the command +# is successful so assuming no expected error was intended +# --error 1116 eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$level; if (1) From ad33a48afc21c7c89e7ea893ea826e305bd09258 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 May 2007 15:51:02 +0200 Subject: [PATCH 061/137] Better distinction between "CLEANFILES" and "DISTCLEANFILES" for some generated files (here: "scripts/mysql_fix_privilege_tables{.sql,_sql.c}"). Important for cross-builds. scripts/Makefile.am: Generated files like "mysql_fix_privilege_tables{.sql,_sql.c}" should survive a "make clean", this is essential for cross-builds. So move them from "CLEANFILES" to "DISTCLEANFILES". --- scripts/Makefile.am | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 754ca2ea4c0..d4944962884 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -16,7 +16,7 @@ ## Process this file with automake to create Makefile.in BUILT_SOURCES = mysql_fix_privilege_tables.sql \ - mysql_fix_privilege_tables_sql.c + mysql_fix_privilege_tables_sql.c EXTRA_PROGRAMS = comp_sql @@ -70,7 +70,6 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) \ mysqlaccess.conf \ mysqlbug \ make_win_bin_dist \ - mysql_fix_privilege_tables.sql \ mysql_fix_privilege_tables_sql.c \ mysql_system_tables_fix.sql \ CMakeLists.txt @@ -100,13 +99,11 @@ CLEANFILES = @server_scripts@ \ mysql_tableinfo \ mysql_upgrade_shell \ mysqld_multi \ - make_win_src_distribution \ - mysql_fix_privilege_tables.sql \ - mysql_fix_privilege_tables_sql.c + make_win_src_distribution # mysqlbug should be distributed built so that people can report build # failures with it. -DISTCLEANFILES = mysqlbug +DISTCLEANFILES = $(BUILT_SOURCES) mysqlbug # We want the right version and configure comand line in mysqlbug mysqlbug: ${top_builddir}/config.status mysqlbug.sh @@ -122,11 +119,12 @@ mysql_fix_privilege_tables.sql: mysql_system_tables.sql \ # # Build mysql_fix_privilege_tables_sql.c from # mysql_fix_privileges_tables.sql using comp_sql -# The "sleep" ensures the generated file has a younger timestamp than its source. +# The "sleep" ensures the generated file has a younger timestamp than its source +# (which may have been generated in this very same "make" run). # mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) - sleep 5 + sleep 2 $(top_builddir)/scripts/comp_sql$(EXEEXT) \ mysql_fix_privilege_tables \ $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ From 1a0e3a285818f0a71cdc7f387a63f7cc72c72972 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 00:53:37 +0400 Subject: [PATCH 062/137] Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. The generic string to int conversion was used by the Item_func_signed and the Item_func_unsigned classes to convert DATE/DATETIME values to the SIGNED/UNSIGNED type. But this conversion produces wrong results for such values. Now if the item which result has to be converted can return its result as longlong then the item->val_int() method is used to allow the item to carry out the conversion itself and return the correct result. This condition is checked in the Item_func_signed::val_int() and the Item_func_unsigned::val_int() functions. mysql-test/t/cast.test: Added a test case for the bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. mysql-test/r/cast.result: Added a test case for the bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. sql/item_func.cc: Bug#23656: Wrong conversion result of a DATETIME to integer using CAST function. Now if the item which result has to be converted can return its result as longlong then the item->val_int() method is used to allow the item to carry out the conversion itself and return the correct result. This condition is checked in the Item_func_signed::val_int() and the Item_func_unsigned::val_int() functions. --- mysql-test/r/cast.result | 6 ++++++ mysql-test/t/cast.test | 6 ++++++ sql/item_func.cc | 6 ++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 23c38bb792c..f6f46bd4079 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -281,4 +281,10 @@ DROP TABLE t1; select isnull(date(NULL)), isnull(cast(NULL as DATE)); isnull(date(NULL)) isnull(cast(NULL as DATE)) 1 1 +SELECT CAST(cast('01-01-01' as date) AS UNSIGNED); +CAST(cast('01-01-01' as date) AS UNSIGNED) +20010101 +SELECT CAST(cast('01-01-01' as date) AS SIGNED); +CAST(cast('01-01-01' as date) AS SIGNED) +20010101 End of 4.1 tests diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 7e8ef031e6b..8eef66f9e1b 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -173,4 +173,10 @@ DROP TABLE t1; select isnull(date(NULL)), isnull(cast(NULL as DATE)); +# +# Bug#23656: Wrong result of CAST from DATE to int +# +SELECT CAST(cast('01-01-01' as date) AS UNSIGNED); +SELECT CAST(cast('01-01-01' as date) AS SIGNED); + --echo End of 4.1 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index c6b2fa5cc3e..12bb6571369 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -477,7 +477,8 @@ longlong Item_func_signed::val_int() longlong value; int error; - if (args[0]->cast_to_int_type() != STRING_RESULT) + if (args[0]->cast_to_int_type() != STRING_RESULT || + args[0]->result_as_longlong()) { value= args[0]->val_int(); null_value= args[0]->null_value; @@ -529,7 +530,8 @@ longlong Item_func_unsigned::val_int() return (longlong) (dvalue + (dvalue > 0 ? 0.5 : -0.5)); } - if (args[0]->cast_to_int_type() != STRING_RESULT) + if (args[0]->cast_to_int_type() != STRING_RESULT || + args[0]->result_as_longlong()) { value= args[0]->val_int(); null_value= args[0]->null_value; From 0ad4e1b2a6f4919afbfc43a7cd71e828e3aeb74a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 10:48:51 +0300 Subject: [PATCH 063/137] Bug #27807. Non-correlated scalar subqueries may get executed in EXPLAIN at the optimization phase if they are part of a right hand sargable expression. If the scalar subquery uses a temp table to materialize its results it will replace the subquery structure from the parser with a simple select from the materialization table. As a result the EXPLAIN will crash as the temporary materialization table is not to be shown in EXPLAIN at all. Fixed by preserving the original query structure right after calling optimize() for scalar subqueries with temp tables executed during EXPLAIN. mysql-test/r/subselect.result: Bug #27807: test case mysql-test/t/subselect.test: Bug #27807: test case sql/item_subselect.cc: Bug #27807: preserve the join structure sql/sql_select.cc: Bug #27807: introduce initialization function for tmp_join sql/sql_select.h: Bug #27807: introduce initialization function for tmp_join --- mysql-test/r/subselect.result | 8 ++++++++ mysql-test/t/subselect.test | 10 ++++++++++ sql/item_subselect.cc | 15 +++++++++++++++ sql/sql_select.cc | 36 +++++++++++++++++++++++++++-------- sql/sql_select.h | 1 + 5 files changed, 62 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 94075df57b4..2b16242fac2 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4012,3 +4012,11 @@ WHERE (SELECT COUNT(t0.b) FROM t1 t WHERE t.b>20) GROUP BY a; ERROR HY000: Invalid use of group function SET @@sql_mode=default; DROP TABLE t1; +CREATE TABLE t1 (a int, b int, KEY (a)); +INSERT INTO t1 VALUES (1,1),(2,1); +EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ref a a 5 const 1 Using where; Using index +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +DROP TABLE t1; +End of 5.0 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 482b3e883e6..123a1ef3282 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -2845,3 +2845,13 @@ SELECT a FROM t1 t0 SET @@sql_mode=default; DROP TABLE t1; + +# +# Bug #27807: Server crash when executing subquery with EXPLAIN +# +CREATE TABLE t1 (a int, b int, KEY (a)); +INSERT INTO t1 VALUES (1,1),(2,1); +EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); +DROP TABLE t1; + +--echo End of 5.0 tests. diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index b3744d6eb96..a4d07e08473 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1774,6 +1774,21 @@ int subselect_single_select_engine::exec() thd->lex->current_select= save_select; DBUG_RETURN(join->error ? join->error : 1); } + if (!select_lex->uncacheable && thd->lex->describe && + !(join->select_options & SELECT_DESCRIBE) && + join->need_tmp && item->const_item()) + { + /* + Force join->join_tmp creation, because this subquery will be replaced + by a simple select from the materialization temp table by optimize() + called by EXPLAIN and we need to preserve the initial query structure + so we can display it. + */ + select_lex->uncacheable|= UNCACHEABLE_EXPLAIN; + select_lex->master_unit()->uncacheable|= UNCACHEABLE_EXPLAIN; + if (join->init_save_join_tab()) + DBUG_RETURN(1); + } if (item->engine_changed) { DBUG_RETURN(1); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9b27daabc0e..499fed58c4b 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1426,14 +1426,13 @@ JOIN::optimize() } } - if (select_lex->uncacheable && !is_top_level_join()) - { - /* If this join belongs to an uncacheable subquery */ - if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN)))) - DBUG_RETURN(-1); - error= 0; // Ensure that tmp_join.error= 0 - restore_tmp(); - } + /* + If this join belongs to an uncacheable subquery save + the original join + */ + if (select_lex->uncacheable && !is_top_level_join() && + init_save_join_tab()) + DBUG_RETURN(-1); } error= 0; @@ -1495,6 +1494,27 @@ JOIN::reinit() DBUG_RETURN(0); } +/** + @brief Save the original join layout + + @details Saves the original join layout so it can be reused in + re-execution and for EXPLAIN. + + @return Operation status + @retval 0 success. + @retval 1 error occurred. +*/ + +bool +JOIN::init_save_join_tab() +{ + if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN)))) + return 1; + error= 0; // Ensure that tmp_join.error= 0 + restore_tmp(); + return 0; +} + bool JOIN::save_join_tab() diff --git a/sql/sql_select.h b/sql/sql_select.h index 9aa6fc1cfcd..5081366c10b 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -434,6 +434,7 @@ public: void cleanup(bool full); void clear(); bool save_join_tab(); + bool init_save_join_tab(); bool send_row_on_empty_set() { return (do_send_rows && tmp_table_param.sum_func_count != 0 && From 13cfc4775c4e310ad8a8c44efa512944b4c7a11d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 14:41:58 +0500 Subject: [PATCH 064/137] Bug#28181 Access denied to 'information_schema when select into out file (regression) allow select into out file from I_S if user has FILE privilege otherwise issue an error mysql-test/r/outfile.result: test result mysql-test/t/outfile.test: test case sql/sql_parse.cc: allow select into out file from I_S if user has FILE privilege otherwise issue an error --- mysql-test/r/outfile.result | Bin 1382 -> 2135 bytes mysql-test/t/outfile.test | 35 +++++++++++++++++++++++++++++++++++ sql/sql_parse.cc | 3 ++- 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/outfile.result b/mysql-test/r/outfile.result index 023c4ea205f4c5a038bf841e341968343f71ad5e..8503df545d2d0bfc67d5c8aa9e6e8a51ca23d5ca 100644 GIT binary patch delta 766 zcmb`_y-ve05C`yy#S@Qk%3`U4G@wpoDFZW7XQaw?F0F+>g6$S%$}90UyaCU_If(*N zVTjZvQFQ+J=XdwTKCeIOt4?|p5up-M>_k8?ZFtiWLoC@?ItKKR9^1RMc2ekrOVzy> zHiFO^oc-CAFCe-I_wpJPcFPE2J(Mu Kllaual6?b_NfAN- delta 7 OcmcaE@QiCi8Y=(|&jRxR diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test index 7c90fd32909..f285407efd4 100644 --- a/mysql-test/t/outfile.test +++ b/mysql-test/t/outfile.test @@ -96,3 +96,38 @@ create table t1(a int); eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1; drop table t1; +# +# Bug#28181 Access denied to 'information_schema when +# select into out file (regression) +# +create database mysqltest; +create user user_1@localhost; +grant all on mysqltest.* to user_1@localhost; +connect (con28181_1,localhost,user_1,,mysqltest); + +--error 1044 +eval select schema_name +into outfile "../tmp/outfile-test.4" +fields terminated by ',' optionally enclosed by '"' + lines terminated by '\n' +from information_schema.schemata +where schema_name like 'mysqltest'; + +connection default; +grant file on *.* to user_1@localhost; + +connect (con28181_2,localhost,user_1,,mysqltest); +eval select schema_name +into outfile "../tmp/outfile-test.4" +fields terminated by ',' optionally enclosed by '"' + lines terminated by '\n' +from information_schema.schemata +where schema_name like 'mysqltest'; + +connection default; +--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4 +use test; +revoke all privileges on *.* from user_1@localhost; +drop user user_1@localhost; +drop database mysqltest; + diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 35089bbb251..3ca0c78d96a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5261,7 +5261,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, if (schema_db) { - if (want_access & ~(SELECT_ACL | EXTRA_ACL)) + if (!(sctx->master_access & FILE_ACL) && (want_access & FILE_ACL) || + (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL))) { if (!no_errors) { From 764e010e8cfd408c1e23fa5f1973b51c01c36a7d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 12:19:06 +0200 Subject: [PATCH 065/137] bugfix in checksum with force varpart mysql-test/mysql-test-run.pl: bigger needed for running some tests --- mysql-test/mysql-test-run.pl | 2 +- mysql-test/r/ndb_row_format.result | 26 +++++++++++++++++++ mysql-test/t/ndb_row_format.test | 24 +++++++++++++++++ .../kernel/blocks/dbtup/DbtupExecQuery.cpp | 6 +++++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 2de7c507dc3..5d9e42fa7d7 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2487,7 +2487,7 @@ sub ndbcluster_start_install ($) { else { $ndb_no_ord=32; - $ndb_con_op=5000; + $ndb_con_op=10000; $ndb_dmem="20M"; $ndb_imem="1M"; $ndb_pbmem="4M"; diff --git a/mysql-test/r/ndb_row_format.result b/mysql-test/r/ndb_row_format.result index 6db289c75aa..ae165d87c5c 100644 --- a/mysql-test/r/ndb_row_format.result +++ b/mysql-test/r/ndb_row_format.result @@ -37,3 +37,29 @@ ROW_FORMAT=DYNAMIC ENGINE=NDB; ForceVarPart: 1 DROP TABLE t1; +create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; +insert into t1(b) values ('0123456789'); +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +select count(*) from t1; +count(*) +1024 +begin; +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +rollback; +select count(*),b from t1 group by b; +count(*) b +1024 0123456789 +drop table t1; diff --git a/mysql-test/t/ndb_row_format.test b/mysql-test/t/ndb_row_format.test index 9668d8ea515..b1582cbe339 100644 --- a/mysql-test/t/ndb_row_format.test +++ b/mysql-test/t/ndb_row_format.test @@ -60,3 +60,27 @@ CREATE TABLE t1 ENGINE=NDB; --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep ForceVarPart DROP TABLE t1; + +# test of bug +create table t1 (a int auto_increment primary key, b varchar(1000)) engine = ndb; +insert into t1(b) values ('0123456789'); +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +insert into t1(b) select b from t1; +select count(*) from t1; +begin; +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +update t1 set b = concat(b,b); +rollback; +select count(*),b from t1 group by b; +drop table t1; diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index ce337afb20b..69b2d6d116e 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -2846,6 +2846,12 @@ Dbtup::handle_size_change_after_update(KeyReqStruct* req_struct, if (unlikely(realloc_var_part(regFragPtr, regTabPtr, pagePtr, refptr, alloc, needed))) return -1; + + if (regTabPtr->m_bits & Tablerec::TR_Checksum) + { + jam(); + setChecksum(org, regTabPtr); + } } req_struct->m_tuple_ptr->m_header_bits = copy_bits; return 0; From 353b6f26b1469f4d77d2eedee9653207503377ed Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 16:43:29 +0300 Subject: [PATCH 066/137] Bug #27531: the 4.1 fix. When checking for applicability of join cache we must disable its usage only if there is no temp table in use. When a temp table is used we can use join cache (and it will not make the result-set unordered) to fill the temp table. The filesort() operation is then applied to the data in the temp table and hence is not affected by join cache usage. Fixed by narrowing the condition for disabling join cache to exclude the case where temp table is used. mysql-test/r/join.result: Bug #27531: test case mysql-test/t/join.test: Bug #27531: test case sql/sql_select.cc: Bug #27531: Disable join cache only if not using temp table --- mysql-test/r/join.result | 50 ++++++++++++++++++++++++++++++++++++++++ mysql-test/t/join.test | 24 +++++++++++++++++++ sql/sql_select.cc | 9 +++++--- 3 files changed, 80 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index dc763472b0e..9ac8825fcb8 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -376,3 +376,53 @@ i i i 2 NULL 4 2 2 2 drop table t1,t2,t3; +CREATE TABLE t1 (a int, b int default 0, c int default 1); +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 (a) SELECT a + 8 FROM t1; +INSERT INTO t1 (a) SELECT a + 16 FROM t1; +CREATE TABLE t2 (a int, d int, e int default 0); +INSERT INTO t2 (a, d) VALUES (1,1),(2,2),(3,3),(4,4); +INSERT INTO t2 (a, d) SELECT a+4, a+4 FROM t2; +INSERT INTO t2 (a, d) SELECT a+8, a+8 FROM t2; +EXPLAIN +SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e +ORDER BY t1.b, t1.c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where +SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e +ORDER BY t1.b, t1.c; +e +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +DROP TABLE t1,t2; diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test index 2715f30b6cf..0fe5de8c9b7 100644 --- a/mysql-test/t/join.test +++ b/mysql-test/t/join.test @@ -326,4 +326,28 @@ select t1.i,t2.i,t3.i from t2 natural right join t3,t1 order by t1.i,t2.i,t3.i; select t1.i,t2.i,t3.i from t2 right join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i; drop table t1,t2,t3; +# +# Bug #27531: Query performance degredation in 4.1.22 and greater +# +CREATE TABLE t1 (a int, b int default 0, c int default 1); + +INSERT INTO t1 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 (a) SELECT a + 8 FROM t1; +INSERT INTO t1 (a) SELECT a + 16 FROM t1; + +CREATE TABLE t2 (a int, d int, e int default 0); + +INSERT INTO t2 (a, d) VALUES (1,1),(2,2),(3,3),(4,4); +INSERT INTO t2 (a, d) SELECT a+4, a+4 FROM t2; +INSERT INTO t2 (a, d) SELECT a+8, a+8 FROM t2; + +# should use join cache +EXPLAIN +SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e + ORDER BY t1.b, t1.c; +SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e + ORDER BY t1.b, t1.c; + +DROP TABLE t1,t2; + # End of 4.1 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 36a15841065..656d1b5639a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3939,14 +3939,17 @@ make_join_readinfo(JOIN *join, uint options) disable join cache because it will change the ordering of the results. Code handles sort table that is at any location (not only first after the const tables) despite the fact that it's currently prohibited. + We must disable join cache if the first non-const table alone is + ordered. If there is a temp table the ordering is done as a last + operation and doesn't prevent join cache usage. */ - if (!ordered_set && - (table == join->sort_by_table && + if (!ordered_set && !join->need_tmp && + ((table == join->sort_by_table && (!join->order || join->skip_sort_order || test_if_skip_sort_order(tab, join->order, join->select_limit, 1)) ) || - (join->sort_by_table == (TABLE *) 1 && i != join->const_tables)) + (join->sort_by_table == (TABLE *) 1 && i != join->const_tables))) ordered_set= 1; switch (tab->type) { From 5dee5507a51d3b00f30f81f2afab18845f4d0dce Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 16:10:09 +0200 Subject: [PATCH 067/137] WL#2936 - Falcon & MySQL plugin interface: server variables Fix tests when InnoDB is not built-in. Innodb options would cause mysqld to abort with an error indicating that the option is unknown. Fix tests on Windows where mysql-test-run.pl was unable to probe mysqld for version and variables information, caused by output being redirected to a log file instead. mysql-test/mysql-test-run.pl: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/binlog_row_mix_innodb_myisam-master.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is not required here. This test case runs only if innodb is available. In this case the option must be present. mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is not required here. This test case runs only if innodb is available. In this case the option must be present. mysql-test/t/federated_transactions-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/myisam-blob-master.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_auto_increment-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_deadlock_innodb-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_insert_id-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_insert_id_pk-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_insert_ignore-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_multi_engine-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_ndb_relayrotate-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_read_only-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_relayrotate-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_row_basic_11bugs-master.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_row_basic_11bugs-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_row_create_table-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_row_func003-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_row_sp003-master.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_row_sp003-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/rpl_stm_000001-slave.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. mysql-test/t/warnings-master.opt: WL#2936 - Falcon & MySQL plugin interface: server variables 'loose' prefix is required on command line options which may be ignored if the plugin for which the option is intended is not installed/builtin to mysqld. sql/mysqld.cc: WL#2936 - Falcon & MySQL plugin interface: server variables Do not enable the 'old-fashioned error log' when the user has '--help' specified on the command line. We do want the help output sent to the console. This fixes help output on Windows because it enables this option by default. --- mysql-test/mysql-test-run.pl | 6 +++--- mysql-test/t/binlog_row_mix_innodb_myisam-master.opt | 2 +- mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt | 2 +- mysql-test/t/federated_transactions-slave.opt | 2 +- mysql-test/t/myisam-blob-master.opt | 2 +- mysql-test/t/rpl_auto_increment-slave.opt | 2 +- mysql-test/t/rpl_deadlock_innodb-slave.opt | 2 +- mysql-test/t/rpl_insert_id-slave.opt | 2 +- mysql-test/t/rpl_insert_id_pk-slave.opt | 2 +- mysql-test/t/rpl_insert_ignore-slave.opt | 2 +- mysql-test/t/rpl_multi_engine-slave.opt | 2 +- mysql-test/t/rpl_ndb_relayrotate-slave.opt | 2 +- mysql-test/t/rpl_read_only-slave.opt | 2 +- mysql-test/t/rpl_relayrotate-slave.opt | 2 +- mysql-test/t/rpl_row_basic_11bugs-master.opt | 2 +- mysql-test/t/rpl_row_basic_11bugs-slave.opt | 2 +- mysql-test/t/rpl_row_create_table-slave.opt | 2 +- mysql-test/t/rpl_row_func003-slave.opt | 2 +- mysql-test/t/rpl_row_sp003-master.opt | 2 +- mysql-test/t/rpl_row_sp003-slave.opt | 2 +- mysql-test/t/rpl_stm_000001-slave.opt | 2 +- mysql-test/t/warnings-master.opt | 2 +- sql/mysqld.cc | 8 ++++++-- 23 files changed, 30 insertions(+), 26 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f3c6e62819d..b8df3781600 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3784,14 +3784,14 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--server-id=%d", $prefix, $idx > 0 ? $idx + 101 : 1); - mtr_add_arg($args, "%s--innodb_data_file_path=ibdata1:10M:autoextend", + mtr_add_arg($args, "%s--loose-innodb_data_file_path=ibdata1:10M:autoextend", $prefix); mtr_add_arg($args, "%s--local-infile", $prefix); if ( $idx > 0 or !$use_innodb) { - mtr_add_arg($args, "%s--skip-innodb", $prefix); + mtr_add_arg($args, "%s--loose-skip-innodb", $prefix); } my $cluster= $clusters->[$mysqld->{'cluster'}]; @@ -3835,7 +3835,7 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--report-port=%d", $prefix, $mysqld->{'port'}); mtr_add_arg($args, "%s--report-user=root", $prefix); - mtr_add_arg($args, "%s--skip-innodb", $prefix); + mtr_add_arg($args, "%s--loose-skip-innodb", $prefix); mtr_add_arg($args, "%s--skip-slave-start", $prefix); # Directory where slaves find the dumps generated by "load data" diff --git a/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt b/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt index cb48f1aaf60..e76299453d3 100644 --- a/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt +++ b/mysql-test/t/binlog_row_mix_innodb_myisam-master.opt @@ -1 +1 @@ ---loose-innodb_lock_wait_timeout=2 +--innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt b/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt index cb48f1aaf60..e76299453d3 100644 --- a/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt +++ b/mysql-test/t/binlog_stm_mix_innodb_myisam-master.opt @@ -1 +1 @@ ---loose-innodb_lock_wait_timeout=2 +--innodb_lock_wait_timeout=2 diff --git a/mysql-test/t/federated_transactions-slave.opt b/mysql-test/t/federated_transactions-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/federated_transactions-slave.opt +++ b/mysql-test/t/federated_transactions-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/myisam-blob-master.opt b/mysql-test/t/myisam-blob-master.opt index 1a1076c7bad..ededac33ec7 100644 --- a/mysql-test/t/myisam-blob-master.opt +++ b/mysql-test/t/myisam-blob-master.opt @@ -1 +1 @@ ---max-allowed-packet=24M --skip-innodb --key-buffer-size=1M +--max-allowed-packet=24M --loose-skip-innodb --key-buffer-size=1M diff --git a/mysql-test/t/rpl_auto_increment-slave.opt b/mysql-test/t/rpl_auto_increment-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_auto_increment-slave.opt +++ b/mysql-test/t/rpl_auto_increment-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_deadlock_innodb-slave.opt b/mysql-test/t/rpl_deadlock_innodb-slave.opt index f4a8c640458..c52c239a1a1 100644 --- a/mysql-test/t/rpl_deadlock_innodb-slave.opt +++ b/mysql-test/t/rpl_deadlock_innodb-slave.opt @@ -1 +1 @@ ---innodb --loose-innodb_lock_wait_timeout=4 --slave-transaction-retries=2 --max-relay-log-size=4096 +--innodb --innodb_lock_wait_timeout=4 --slave-transaction-retries=2 --max-relay-log-size=4096 diff --git a/mysql-test/t/rpl_insert_id-slave.opt b/mysql-test/t/rpl_insert_id-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_insert_id-slave.opt +++ b/mysql-test/t/rpl_insert_id-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_insert_id_pk-slave.opt b/mysql-test/t/rpl_insert_id_pk-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_insert_id_pk-slave.opt +++ b/mysql-test/t/rpl_insert_id_pk-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_insert_ignore-slave.opt b/mysql-test/t/rpl_insert_ignore-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_insert_ignore-slave.opt +++ b/mysql-test/t/rpl_insert_ignore-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_multi_engine-slave.opt b/mysql-test/t/rpl_multi_engine-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_multi_engine-slave.opt +++ b/mysql-test/t/rpl_multi_engine-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_ndb_relayrotate-slave.opt b/mysql-test/t/rpl_ndb_relayrotate-slave.opt index 3a4abbf091e..cf4319f2b40 100644 --- a/mysql-test/t/rpl_ndb_relayrotate-slave.opt +++ b/mysql-test/t/rpl_ndb_relayrotate-slave.opt @@ -1,3 +1,3 @@ -O max_relay_log_size=16384 ---innodb +--loose-innodb --log-warnings diff --git a/mysql-test/t/rpl_read_only-slave.opt b/mysql-test/t/rpl_read_only-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_read_only-slave.opt +++ b/mysql-test/t/rpl_read_only-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_relayrotate-slave.opt b/mysql-test/t/rpl_relayrotate-slave.opt index 3a4abbf091e..cf4319f2b40 100644 --- a/mysql-test/t/rpl_relayrotate-slave.opt +++ b/mysql-test/t/rpl_relayrotate-slave.opt @@ -1,3 +1,3 @@ -O max_relay_log_size=16384 ---innodb +--loose-innodb --log-warnings diff --git a/mysql-test/t/rpl_row_basic_11bugs-master.opt b/mysql-test/t/rpl_row_basic_11bugs-master.opt index ceba85f40e5..ed7656c1f99 100644 --- a/mysql-test/t/rpl_row_basic_11bugs-master.opt +++ b/mysql-test/t/rpl_row_basic_11bugs-master.opt @@ -1,2 +1,2 @@ ---binlog_ignore_db=test_ignore --innodb +--binlog_ignore_db=test_ignore --loose-innodb diff --git a/mysql-test/t/rpl_row_basic_11bugs-slave.opt b/mysql-test/t/rpl_row_basic_11bugs-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_row_basic_11bugs-slave.opt +++ b/mysql-test/t/rpl_row_basic_11bugs-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_row_create_table-slave.opt b/mysql-test/t/rpl_row_create_table-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_row_create_table-slave.opt +++ b/mysql-test/t/rpl_row_create_table-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_row_func003-slave.opt b/mysql-test/t/rpl_row_func003-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_row_func003-slave.opt +++ b/mysql-test/t/rpl_row_func003-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_row_sp003-master.opt b/mysql-test/t/rpl_row_sp003-master.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_row_sp003-master.opt +++ b/mysql-test/t/rpl_row_sp003-master.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_row_sp003-slave.opt b/mysql-test/t/rpl_row_sp003-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_row_sp003-slave.opt +++ b/mysql-test/t/rpl_row_sp003-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/rpl_stm_000001-slave.opt b/mysql-test/t/rpl_stm_000001-slave.opt index 627becdbfb5..48457b17309 100644 --- a/mysql-test/t/rpl_stm_000001-slave.opt +++ b/mysql-test/t/rpl_stm_000001-slave.opt @@ -1 +1 @@ ---innodb +--loose-innodb diff --git a/mysql-test/t/warnings-master.opt b/mysql-test/t/warnings-master.opt index bea071a9c9b..21356507809 100644 --- a/mysql-test/t/warnings-master.opt +++ b/mysql-test/t/warnings-master.opt @@ -1 +1 @@ ---skip-innodb +--loose-skip-innodb diff --git a/sql/mysqld.cc b/sql/mysqld.cc index fcb372e1c92..4e3a4af5f08 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3189,8 +3189,12 @@ static int init_server_components() /* Setup logs */ - /* enable old-fashioned error log */ - if (opt_error_log) + /* + Enable old-fashioned error log, except when the user has requested + help information. Since the implementation of plugin server + variables the help output is now written much later. + */ + if (opt_error_log && !opt_help) { if (!log_error_file_ptr[0]) fn_format(log_error_file, pidfile_name, mysql_data_home, ".err", From 67e5e1237a7b6f56f9a6aca93195267a1d9a0b4f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 17:33:41 +0300 Subject: [PATCH 068/137] post merge (5.0-opt -> 5.1-opt) fixes --- mysql-test/r/subselect.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 6f01217c1a0..1859fe26791 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4042,7 +4042,6 @@ id select_type table type possible_keys key key_len ref rows Extra 2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort DROP TABLE t1; End of 5.0 tests. -End of 5.0 tests. CREATE TABLE t1 (a int, b int); INSERT INTO t1 VALUES (2,22),(1,11),(2,22); SELECT a FROM t1 WHERE (SELECT COUNT(b) FROM DUAL) > 0 GROUP BY a; From 99bde6d9ecf76fabfa1460b9780134f40663a11f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 18:57:10 +0400 Subject: [PATCH 069/137] Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. The LEAST/GREATEST functions compared DATE/DATETIME values as strings which in some cases could lead to a wrong result. A new member function called cmp_datetimes() is added to the Item_func_min_max class. It compares arguments in DATETIME context and returns index of the least/greatest argument. The Item_func_min_max::fix_length_and_dec() function now detects when arguments should be compared in DATETIME context and sets the newly added flag compare_as_dates. It indicates that the cmp_datetimes() function should be called to get a correct result. Item_func_min_max::val_xxx() methods are corrected to call the cmp_datetimes() function when needed. Objects of the Item_splocal class now stores and reports correct original field type. mysql-test/t/type_datetime.test: Added a test case for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. mysql-test/r/type_datetime.result: Added a test case for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. mysql-test/r/sp-vars.result: A test case result corrected after the fix for the bug#27759. sql/mysql_priv.h: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. Added the prototype of the get_datetime_value() function. sql/item_func.h: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. A new member function called cmp_datetimes() is added to the Item_func_min_max class. sql/item_func.cc: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. A new member function called cmp_datetimes() is added to the Item_func_min_max class. It compares arguments in DATETIME context and returns index of the least/greatest argument. The Item_func_min_max::fix_length_and_dec() function now detects when arguments should be compared in DATETIME context and sets the newly added flag compare_as_dates. It indicates that the cmp_datetimes() function should be called to get a correct result. Item_func_min_max::val_xxx() methods are corrected to call the cmp_datetimes() function when needed. sql/item_cmpfunc.cc: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. The get_datetime_value() function is no longer static. sql/item.h: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. Objects of the Item_splocal class now stores and reports correct original field type. sql/item.cc: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. Objects of the Item_splocal class now stores and reports correct original field type. --- mysql-test/r/sp-vars.result | 4 +- mysql-test/r/type_datetime.result | 30 +++++++++++ mysql-test/t/type_datetime.test | 26 +++++++++ sql/item.cc | 1 + sql/item.h | 3 +- sql/item_cmpfunc.cc | 4 +- sql/item_func.cc | 90 +++++++++++++++++++++++++++++++ sql/item_func.h | 10 +++- sql/mysql_priv.h | 2 + 9 files changed, 164 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result index 6090dfdf737..b112c6bece6 100644 --- a/mysql-test/r/sp-vars.result +++ b/mysql-test/r/sp-vars.result @@ -690,12 +690,12 @@ END| CALL p1(NOW()); Table Create Table t1 CREATE TABLE "t1" ( - "x" varbinary(19) default NULL + "x" datetime default NULL ) CALL p1('test'); Table Create Table t1 CREATE TABLE "t1" ( - "x" varbinary(19) default NULL + "x" datetime default NULL ) Warnings: Warning 1264 Out of range value adjusted for column 'x' at row 1 diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 3a28410b7dc..3a7313f48eb 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -264,3 +264,33 @@ f2 SELECT 1 from dual where NOW() BETWEEN CURRENT_DATE() - INTERVAL 1 DAY AND CURRENT_DATE(); 1 drop table t1; +select least(cast('01-01-01' as date), '01-01-02'); +least(cast('01-01-01' as date), '01-01-02') +2001-01-01 +select greatest(cast('01-01-01' as date), '01-01-02'); +greatest(cast('01-01-01' as date), '01-01-02') +01-01-02 +select least(cast('01-01-01' as date), '01-01-02') + 0; +least(cast('01-01-01' as date), '01-01-02') + 0 +20010101 +select greatest(cast('01-01-01' as date), '01-01-02') + 0; +greatest(cast('01-01-01' as date), '01-01-02') + 0 +20010102 +select least(cast('01-01-01' as datetime), '01-01-02') + 0; +least(cast('01-01-01' as datetime), '01-01-02') + 0 +20010101000000 +DROP PROCEDURE IF EXISTS test27759 ; +CREATE PROCEDURE test27759() +BEGIN +declare v_a date default '2007-4-10'; +declare v_b date default '2007-4-11'; +declare v_c datetime default '2004-4-9 0:0:0'; +select v_a as a,v_b as b, +least( v_a, v_b ) as a_then_b, +least( v_b, v_a ) as b_then_a, +least( v_c, v_a ) as c_then_a; +END;| +call test27759(); +a b a_then_b b_then_a c_then_a +2007-04-10 2007-04-11 2007-04-10 2007-04-10 2004-04-09 00:00:00 +drop procedure test27759; diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index fc7b20d77a4..c82dee168d2 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -178,3 +178,29 @@ select f2, f3 from t1 where '01-03-10' between f2 and f3; select f2 from t1 where DATE(f2) between "2001-4-15" AND "01-4-15"; SELECT 1 from dual where NOW() BETWEEN CURRENT_DATE() - INTERVAL 1 DAY AND CURRENT_DATE(); drop table t1; + +# +# Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. +# +select least(cast('01-01-01' as date), '01-01-02'); +select greatest(cast('01-01-01' as date), '01-01-02'); +select least(cast('01-01-01' as date), '01-01-02') + 0; +select greatest(cast('01-01-01' as date), '01-01-02') + 0; +select least(cast('01-01-01' as datetime), '01-01-02') + 0; +--disable_warnings +DROP PROCEDURE IF EXISTS test27759 ; +--enable_warnings +DELIMITER |; +CREATE PROCEDURE test27759() +BEGIN +declare v_a date default '2007-4-10'; +declare v_b date default '2007-4-11'; +declare v_c datetime default '2004-4-9 0:0:0'; +select v_a as a,v_b as b, + least( v_a, v_b ) as a_then_b, + least( v_b, v_a ) as b_then_a, + least( v_c, v_a ) as c_then_a; +END;| +DELIMITER ;| +call test27759(); +drop procedure test27759; diff --git a/sql/item.cc b/sql/item.cc index 28729e9936f..30486e7559a 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1011,6 +1011,7 @@ Item_splocal::Item_splocal(const LEX_STRING &sp_var_name, maybe_null= TRUE; m_type= sp_map_item_type(sp_var_type); + m_field_type= sp_var_type; m_result_type= sp_map_result_type(sp_var_type); } diff --git a/sql/item.h b/sql/item.h index 43afbd30d47..18a05b0b4ad 100644 --- a/sql/item.h +++ b/sql/item.h @@ -946,7 +946,7 @@ class Item_splocal :public Item_sp_variable, Type m_type; Item_result m_result_type; - + enum_field_types m_field_type; public: /* Position of this reference to SP variable in the statement (the @@ -978,6 +978,7 @@ public: inline enum Type type() const; inline Item_result result_type() const; + inline enum_field_types field_type() const { return m_field_type; } private: bool set_value(THD *thd, sp_rcontext *ctx, Item **it); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 66c73dd910e..5d614e7cd04 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -745,7 +745,7 @@ void Arg_comparator::set_datetime_cmp_func(Item **a1, Item **b1) obtained value */ -static ulonglong +ulonglong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, Item *warn_item, bool *is_null) { @@ -781,7 +781,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, MYSQL_TYPE_DATE ? MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME; value= get_date_from_str(thd, str, t_type, warn_item->name, &error); } - if (item->const_item()) + if (item->const_item() && cache_arg) { Item_cache_int *cache= new Item_cache_int(); /* Mark the cache as non-const to prevent re-caching. */ diff --git a/sql/item_func.cc b/sql/item_func.cc index 503b4362e7a..4ee6af37dad 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2120,6 +2120,7 @@ double Item_func_units::val_real() void Item_func_min_max::fix_length_and_dec() { int max_int_part=0; + bool datetime_found= FALSE; decimals=0; max_length=0; maybe_null=0; @@ -2133,18 +2134,88 @@ void Item_func_min_max::fix_length_and_dec() if (args[i]->maybe_null) maybe_null=1; cmp_type=item_cmp_type(cmp_type,args[i]->result_type()); + if (args[i]->result_type() != ROW_RESULT && args[i]->is_datetime()) + { + datetime_found= TRUE; + if (!datetime_item || args[i]->field_type() == MYSQL_TYPE_DATETIME) + datetime_item= args[i]; + } } if (cmp_type == STRING_RESULT) + { agg_arg_charsets(collation, args, arg_count, MY_COLL_CMP_CONV, 1); + if (datetime_found) + { + thd= current_thd; + compare_as_dates= TRUE; + } + } else if ((cmp_type == DECIMAL_RESULT) || (cmp_type == INT_RESULT)) max_length= my_decimal_precision_to_length(max_int_part+decimals, decimals, unsigned_flag); } +/* + Compare item arguments in the DATETIME context. + + SYNOPSIS + cmp_datetimes() + value [out] found least/greatest DATE/DATETIME value + + DESCRIPTION + Compare item arguments as DATETIME values and return the index of the + least/greatest argument in the arguments array. + The correct integer DATE/DATETIME value of the found argument is + stored to the value pointer, if latter is provided. + + RETURN + 0 If one of arguments is NULL + # index of the least/greatest argument +*/ + +uint Item_func_min_max::cmp_datetimes(ulonglong *value) +{ + ulonglong min_max; + uint min_max_idx= 0; + LINT_INIT(min_max); + + for (uint i=0; i < arg_count ; i++) + { + Item **arg= args + i; + bool is_null; + ulonglong res= get_datetime_value(thd, &arg, 0, datetime_item, &is_null); + if ((null_value= args[i]->null_value)) + return 0; + if (i == 0 || (res < min_max ? cmp_sign : -cmp_sign) > 0) + { + min_max= res; + min_max_idx= i; + } + } + if (value) + { + *value= min_max; + if (datetime_item->field_type() == MYSQL_TYPE_DATE) + *value/= 1000000L; + } + return min_max_idx; +} + + String *Item_func_min_max::val_str(String *str) { DBUG_ASSERT(fixed == 1); + if (compare_as_dates) + { + String *str_res; + uint min_max_idx= cmp_datetimes(NULL); + if (null_value) + return 0; + str_res= args[min_max_idx]->val_str(str); + str_res->set_charset(collation.collation); + return str_res; + } switch (cmp_type) { case INT_RESULT: { @@ -2212,6 +2283,12 @@ double Item_func_min_max::val_real() { DBUG_ASSERT(fixed == 1); double value=0.0; + if (compare_as_dates) + { + ulonglong result; + (void)cmp_datetimes(&result); + return (double)result; + } for (uint i=0; i < arg_count ; i++) { if (i == 0) @@ -2233,6 +2310,12 @@ longlong Item_func_min_max::val_int() { DBUG_ASSERT(fixed == 1); longlong value=0; + if (compare_as_dates) + { + ulonglong result; + (void)cmp_datetimes(&result); + return (longlong)result; + } for (uint i=0; i < arg_count ; i++) { if (i == 0) @@ -2256,6 +2339,13 @@ my_decimal *Item_func_min_max::val_decimal(my_decimal *dec) my_decimal tmp_buf, *tmp, *res; LINT_INIT(res); + if (compare_as_dates) + { + ulonglong value; + (void)cmp_datetimes(&value); + ulonglong2decimal(value, dec); + return dec; + } for (uint i=0; i < arg_count ; i++) { if (i == 0) diff --git a/sql/item_func.h b/sql/item_func.h index ec5d6bcda02..99e5328c39c 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -693,15 +693,23 @@ class Item_func_min_max :public Item_func Item_result cmp_type; String tmp_value; int cmp_sign; + /* TRUE <=> arguments should be compared in the DATETIME context. */ + bool compare_as_dates; + /* An item used for issuing warnings while string to DATETIME conversion. */ + Item *datetime_item; + THD *thd; + public: Item_func_min_max(List &list,int cmp_sign_arg) :Item_func(list), - cmp_type(INT_RESULT), cmp_sign(cmp_sign_arg) {} + cmp_type(INT_RESULT), cmp_sign(cmp_sign_arg), compare_as_dates(FALSE), + datetime_item(0) {} double val_real(); longlong val_int(); String *val_str(String *); my_decimal *val_decimal(my_decimal *); void fix_length_and_dec(); enum Item_result result_type () const { return cmp_type; } + uint cmp_datetimes(ulonglong *value); }; class Item_func_min :public Item_func_min_max diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 7e873dd7cc6..9995afb8287 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1525,6 +1525,8 @@ void make_date(const DATE_TIME_FORMAT *format, const TIME *l_time, String *str); void make_time(const DATE_TIME_FORMAT *format, const TIME *l_time, String *str); +ulonglong get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, + Item *warn_item, bool *is_null); int test_if_number(char *str,int *res,bool allow_wildcards); void change_byte(byte *,uint,char,char); From 0c835da8035a291eda9445d91c09a5ffdba8a5b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 18:06:06 +0300 Subject: [PATCH 070/137] bug #27531: 5.1 part of the fix: - added join cache indication in EXPLAIN (Extra column). - prefer filesort over full scan over index for ORDER BY (because it's faster). - when switching from REF to RANGE because RANGE uses longer key turn off sort on the head table only as the resulting RANGE access is a candidate for join cache and we don't want to disable it by sorting on the first table only. mysql-test/r/archive_gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/compress.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/ctype_utf8.result: bug #27531: join cache in EXPLAIN mysql-test/r/derived.result: bug #27531: join cache in EXPLAIN mysql-test/r/distinct.result: bug #27531: join cache in EXPLAIN mysql-test/r/func_group.result: bug #27531: join cache in EXPLAIN mysql-test/r/func_group_innodb.result: bug #27531: join cache in EXPLAIN mysql-test/r/gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/greedy_optimizer.result: bug #27531: join cache in EXPLAIN mysql-test/r/group_by.result: bug #27531: join cache in EXPLAIN mysql-test/r/group_min_max.result: bug #27531: join cache in EXPLAIN mysql-test/r/index_merge_myisam.result: bug #27531: join cache in EXPLAIN mysql-test/r/information_schema.result: bug #27531: join cache in EXPLAIN mysql-test/r/innodb_gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/innodb_mysql.result: bug #27531: join cache in EXPLAIN mysql-test/r/join.result: bug #27531: join cache in EXPLAIN mysql-test/r/join_nested.result: bug #27531: join cache in EXPLAIN mysql-test/r/key_diff.result: bug #27531: join cache in EXPLAIN mysql-test/r/myisam.result: bug #27531: join cache in EXPLAIN mysql-test/r/ndb_condition_pushdown.result: bug #27531: join cache in EXPLAIN mysql-test/r/ndb_gis.result: bug #27531: join cache in EXPLAIN mysql-test/r/range.result: bug #27531: join cache in EXPLAIN mysql-test/r/row.result: bug #27531: join cache in EXPLAIN mysql-test/r/select.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/ssl.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/ssl_compress.result: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. mysql-test/r/subselect.result: bug #27531: join cache in EXPLAIN mysql-test/r/subselect3.result: bug #27531: join cache in EXPLAIN mysql-test/r/union.result: bug #27531: join cache in EXPLAIN mysql-test/r/view.result: bug #27531: join cache in EXPLAIN sql/sql_select.cc: bug #27531: - join cache in EXPLAIN. - prefer filesort over full scan over index for ORDER BY. - disable sorting on the first table only when switching from REF to RANGE. --- mysql-test/r/archive_gis.result | 2 +- mysql-test/r/compress.result | 6 +- mysql-test/r/ctype_utf8.result | 2 +- mysql-test/r/derived.result | 10 +- mysql-test/r/distinct.result | 12 +- mysql-test/r/func_group.result | 4 +- mysql-test/r/func_group_innodb.result | 4 +- mysql-test/r/gis.result | 2 +- mysql-test/r/greedy_optimizer.result | 236 ++++++++++----------- mysql-test/r/group_by.result | 4 +- mysql-test/r/group_min_max.result | 2 +- mysql-test/r/index_merge_myisam.result | 8 +- mysql-test/r/information_schema.result | 2 +- mysql-test/r/innodb_gis.result | 2 +- mysql-test/r/innodb_mysql.result | 4 +- mysql-test/r/join.result | 2 +- mysql-test/r/join_nested.result | 26 +-- mysql-test/r/key_diff.result | 2 +- mysql-test/r/myisam.result | 6 +- mysql-test/r/ndb_condition_pushdown.result | 4 +- mysql-test/r/ndb_gis.result | 4 +- mysql-test/r/range.result | 16 +- mysql-test/r/row.result | 2 +- mysql-test/r/select.result | 20 +- mysql-test/r/ssl.result | 6 +- mysql-test/r/ssl_compress.result | 6 +- mysql-test/r/subselect.result | 4 +- mysql-test/r/subselect3.result | 2 +- mysql-test/r/union.result | 2 +- mysql-test/r/view.result | 2 +- sql/sql_select.cc | 14 ++ 31 files changed, 216 insertions(+), 202 deletions(-) diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 6f8175bd609..71eeb063d59 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -402,7 +402,7 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result index 11b15ed7675..2eced78b07a 100644 --- a/mysql-test/r/compress.result +++ b/mysql-test/r/compress.result @@ -611,11 +611,11 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t3 ref period period 4 test.t1.period 4181 explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index period period 4 NULL 41810 +1 SIMPLE t3 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t1 ref period period 4 test.t3.period 4181 explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index period period 4 NULL 41810 +1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort 1 SIMPLE t3 ref period period 4 test.t1.period 4181 select period from t1; period @@ -1434,7 +1434,7 @@ companynr companynr 41 40 explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary +1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary; Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; fld1 companynr fld3 period diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index d76d89d5630..3abba528164 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1454,7 +1454,7 @@ insert into t1 values ('123'), ('456'); explain select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort +1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort; Using join cache 1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1; substr(Z.a,-1) a diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 3a098308b49..750d542d14d 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -57,7 +57,7 @@ a b a b 3 c 3 c explain select * from t1 as x1, (select * from t1) as x2; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY x1 ALL NULL NULL NULL NULL 4 +1 PRIMARY x1 ALL NULL NULL NULL NULL 4 Using join cache 1 PRIMARY ALL NULL NULL NULL NULL 4 2 DERIVED t1 ALL NULL NULL NULL NULL 4 drop table if exists t2,t3; @@ -188,13 +188,13 @@ pla_id test 105 3 explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY m2 ALL NULL NULL NULL NULL 9 +1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache 1 PRIMARY ALL NULL NULL NULL NULL 6 Using where 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY m2 ALL NULL NULL NULL NULL 9 +1 PRIMARY m2 ALL NULL NULL NULL NULL 9 Using join cache 1 PRIMARY ALL NULL NULL NULL NULL 6 Using where 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 @@ -245,7 +245,7 @@ a a 2 2 explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY ALL NULL NULL NULL NULL 2 +1 PRIMARY ALL NULL NULL NULL NULL 2 Using join cache 1 PRIMARY ALL NULL NULL NULL NULL 2 4 DERIVED t1 ALL NULL NULL NULL NULL 2 5 UNION t1 ALL NULL NULL NULL NULL 2 @@ -312,7 +312,7 @@ b 3.5000 explain SELECT s.name, AVG(s.val) AS median FROM (SELECT x.name, x.val FROM t1 x, t1 y WHERE x.name=y.name GROUP BY x.name, x.val HAVING SUM(y.val <= x.val) >= COUNT(*)/2 AND SUM(y.val >= x.val) >= COUNT(*)/2) AS s GROUP BY s.name; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY ALL NULL NULL NULL NULL 3 Using temporary; Using filesort -2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort +2 DERIVED x ALL NULL NULL NULL NULL 17 Using temporary; Using filesort; Using join cache 2 DERIVED y ALL NULL NULL NULL NULL 17 Using where drop table t1; create table t2 (a int, b int, primary key (a)); diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 8bf8c95c6fb..3419ce150eb 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -174,7 +174,7 @@ INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2'); explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary -1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index +1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index; Using join cache 1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; a @@ -299,11 +299,11 @@ WHERE ((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2)) AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2)); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary -1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct -1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct +1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary; Using join cache +1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct; Using join cache +1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct; Using join cache 1 SIMPLE j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct -1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct +1 SIMPLE t2_lj ref id id 4 test.j_lj_t2.id 1 Using where; Using index; Distinct; Using join cache 1 SIMPLE j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct 1 SIMPLE t3_lj ref id id 4 test.j_lj_t3.id 1 Using where; Using index; Distinct SELECT DISTINCT @@ -514,7 +514,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary +1 SIMPLE t1_1 ALL NULL NULL NULL NULL 3 Using temporary; Using join cache 1 SIMPLE t1_2 index NULL PRIMARY 4 NULL 3 Using index; Distinct EXPLAIN SELECT DISTINCT t1_1.a, t1_1.b FROM t1 t1_1, t1 t1_2 WHERE t1_1.a = t1_2.a; diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 7177028cb48..0e6cae2f103 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -613,7 +613,7 @@ id select_type table type possible_keys key key_len ref rows Extra explain select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index +1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index; Using join cache 1 SIMPLE t2 range k1 k1 3 NULL 4 Using where; Using index explain select min(a4 - 0.01) from t1; @@ -650,7 +650,7 @@ id select_type table type possible_keys key key_len ref rows Extra explain select concat(min(t1.a1),min(t2.a4)) from t1, t2 where t2.a4 <> 'AME'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index +1 SIMPLE t2 range k2 k2 4 NULL 6 Using where; Using index; Using join cache 1 SIMPLE t1 index NULL PRIMARY 3 NULL 15 Using index drop table t1, t2; create table t1 (a char(10)); diff --git a/mysql-test/r/func_group_innodb.result b/mysql-test/r/func_group_innodb.result index 230f2a7633f..dba546a72de 100644 --- a/mysql-test/r/func_group_innodb.result +++ b/mysql-test/r/func_group_innodb.result @@ -78,7 +78,7 @@ min(7) 7 explain select min(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache 1 SIMPLE t1i ALL NULL NULL NULL NULL 1 select min(7) from t2i join t1i; min(7) @@ -94,7 +94,7 @@ max(7) 7 explain select max(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache 1 SIMPLE t1i ALL NULL NULL NULL NULL 1 select max(7) from t2i join t1i; max(7) diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index cfca4e318c0..62486936e02 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -394,7 +394,7 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` diff --git a/mysql-test/r/greedy_optimizer.result b/mysql-test/r/greedy_optimizer.result index b02ff04780b..ebd2468c9af 100644 --- a/mysql-test/r/greedy_optimizer.result +++ b/mysql-test/r/greedy_optimizer.result @@ -120,11 +120,11 @@ select @@optimizer_search_depth; 63 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -132,11 +132,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -144,11 +144,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -156,11 +156,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -168,11 +168,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -180,11 +180,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -200,11 +200,11 @@ select @@optimizer_search_depth; 0 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -212,11 +212,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -224,11 +224,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -236,11 +236,11 @@ Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -248,11 +248,11 @@ Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -260,11 +260,11 @@ Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -276,11 +276,11 @@ select @@optimizer_search_depth; 1 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -288,11 +288,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -303,9 +303,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -315,9 +315,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -327,9 +327,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -339,9 +339,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -352,11 +352,11 @@ select @@optimizer_search_depth; 62 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -364,11 +364,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -376,11 +376,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -388,11 +388,11 @@ Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -400,11 +400,11 @@ Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -412,11 +412,11 @@ Variable_name Value Last_query_cost 289.418727 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.c21 1 Using where 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -432,11 +432,11 @@ select @@optimizer_search_depth; 0 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -444,11 +444,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -456,11 +456,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -468,11 +468,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -480,11 +480,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -492,11 +492,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -508,11 +508,11 @@ select @@optimizer_search_depth; 1 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -520,11 +520,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -535,9 +535,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -547,9 +547,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -559,9 +559,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -571,9 +571,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where -1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where +1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where; Using join cache +1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where; Using join cache +1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where show status like 'Last_query_cost'; Variable_name Value @@ -584,11 +584,11 @@ select @@optimizer_search_depth; 62 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -596,11 +596,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.c22 1 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.c42 1 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index show status like 'Last_query_cost'; @@ -608,11 +608,11 @@ Variable_name Value Last_query_cost 821.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -620,11 +620,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using index; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using index; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index show status like 'Last_query_cost'; @@ -632,11 +632,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; @@ -644,11 +644,11 @@ Variable_name Value Last_query_cost 794.837037 explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 +1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3 Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 6 Using where -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.c12 1 Using where; Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where +1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t1.c14 1 Using where; Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 18 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where show status like 'Last_query_cost'; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 7068b62993b..807986c5f4e 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -536,11 +536,11 @@ a b 1 1 explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort; Using join cache 1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where explain select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary +1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using temporary; Using join cache 1 SIMPLE t2 ALL a NULL NULL NULL 4 Using where drop table t1,t2; create table t1 (a int, b int); diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index dcaf249e9c4..bc07b933895 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -2266,7 +2266,7 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2 ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) AND t1_outer1.b = t1_outer2.b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index +1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index; Using join cache 1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index 2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result index 45dfe0af505..e8a37257782 100644 --- a/mysql-test/r/index_merge_myisam.result +++ b/mysql-test/r/index_merge_myisam.result @@ -270,7 +270,7 @@ id select_type table type possible_keys key key_len ref rows Extra explain select * from t0,t1 where t0.key1 = 5 and (t1.key1 = t0.key1 or t1.key8 = t0.key1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t0 ref i1 i1 4 const 1 +1 SIMPLE t0 ref i1 i1 4 const 1 Using join cache 1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where explain select * from t0,t1 where t0.key1 < 3 and (t1.key1 = t0.key1 or t1.key8 = t0.key1); @@ -347,7 +347,7 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2) where (A.key1 < 500000 or A.key2 < 3) and (B.key1 < 500000 or B.key2 < 3); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where +1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where; Using join cache 1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A force index(i1,i2), t0 as B force index (i1,i2) @@ -361,7 +361,7 @@ from t0 as A force index(i1,i2), t0 as B force index (i1,i2) where (A.key1 = 1 or A.key2 = 1) and (B.key1 = 1 or B.key2 = 1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where +1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where; Using join cache 1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A force index(i1,i2), t0 as B force index (i1,i2) @@ -376,7 +376,7 @@ from t0 as A, t0 as B where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where +1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where; Using join cache 1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A, t0 as B diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 078946b4d81..fc7a45445a6 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -289,7 +289,7 @@ explain select a.ROUTINE_NAME from information_schema.ROUTINES a, information_schema.SCHEMATA b where a.ROUTINE_SCHEMA = b.SCHEMA_NAME; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE # ALL NULL NULL NULL NULL 2 +1 SIMPLE # ALL NULL NULL NULL NULL 2 Using join cache 1 SIMPLE # ALL NULL NULL NULL NULL 2 Using where select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a, mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1; diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index e5d921514c5..945eca234bb 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -402,7 +402,7 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index e51318af827..36d6f62c72c 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -163,7 +163,7 @@ min(7) 7 explain select min(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache 1 SIMPLE t1i ALL NULL NULL NULL NULL 1 select min(7) from t2i join t1i; min(7) @@ -179,7 +179,7 @@ max(7) 7 explain select max(7) from t2i join t1i; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2i ALL NULL NULL NULL NULL 1 +1 SIMPLE t2i ALL NULL NULL NULL NULL 1 Using join cache 1 SIMPLE t1i ALL NULL NULL NULL NULL 1 select max(7) from t2i join t1i; max(7) diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 07035a12483..86c206195b1 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -403,7 +403,7 @@ EXPLAIN SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e ORDER BY t1.b, t1.c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort +1 SIMPLE t1 ALL NULL NULL NULL NULL 32 Using temporary; Using filesort; Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 16 Using where SELECT STRAIGHT_JOIN t2.e FROM t1,t2 WHERE t2.d=1 AND t1.b=t2.e ORDER BY t1.b, t1.c; diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index 8df5a9220a8..d080b1a2a46 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -228,7 +228,7 @@ LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using join cache 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Warnings: @@ -543,7 +543,7 @@ WHERE t0.a=1 AND t0.b=t1.b AND (t2.a >= 4 OR t2.c IS NULL); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 @@ -638,7 +638,7 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where @@ -646,7 +646,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) @@ -835,7 +835,7 @@ t2 ON t3.a=1 AND t2.b=t4.b WHERE t1.a <= 2; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 @@ -849,7 +849,7 @@ LEFT JOIN (t1,t2) ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using join cache 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 @@ -905,7 +905,7 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where @@ -913,7 +913,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) @@ -955,7 +955,7 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where @@ -963,7 +963,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join cache 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) @@ -1004,7 +1004,7 @@ t0.b=t1.b AND (t8.b=t9.b OR t8.c IS NULL) AND (t9.a=1); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where +1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join cache 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where @@ -1012,7 +1012,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where +1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join cache 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) @@ -1062,7 +1062,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where -1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where +1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join cache 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`))) diff --git a/mysql-test/r/key_diff.result b/mysql-test/r/key_diff.result index 8097186bde1..35aad39edbf 100644 --- a/mysql-test/r/key_diff.result +++ b/mysql-test/r/key_diff.result @@ -35,7 +35,7 @@ D E a a a a a a explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL a NULL NULL NULL 5 +1 SIMPLE t1 ALL a NULL NULL NULL 5 Using join cache 1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a; a b a b diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index dcb471510cd..e9d798d998d 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -345,11 +345,11 @@ t1 1 c_2 1 c A 5 NULL NULL YES BTREE t1 1 c_2 2 a A 5 NULL NULL BTREE explain select * from t1,t2 where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t2 ALL a NULL NULL NULL 2 Using join cache 1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where explain select * from t1,t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL a NULL NULL NULL 2 +1 SIMPLE t2 ALL a NULL NULL NULL 2 Using join cache 1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where explain select * from t1 force index(a),t2 force index(a) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra @@ -361,7 +361,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where explain select * from t1,t2 force index(c) where t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using join cache 1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where explain select * from t1 where a=0 or a=2; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result index 0d67d310a2b..df281230c9e 100644 --- a/mysql-test/r/ndb_condition_pushdown.result +++ b/mysql-test/r/ndb_condition_pushdown.result @@ -1730,7 +1730,7 @@ pk1 attr1 attr2 attr3 attr4 explain select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t2 ALL NULL NULL NULL NULL # Using where with pushed condition; Using temporary; Using filesort; Using join cache 1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where with pushed condition select * from t2,t3 where t2.attr1 < 1 and t2.attr2 = t3.attr2 and t3.attr1 < 5 order by t2.pk1; pk1 attr1 attr2 attr3 pk1 attr1 attr2 attr3 attr4 @@ -1746,7 +1746,7 @@ pk1 attr1 attr2 attr3 attr4 explain select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort +1 SIMPLE t4 range attr1 attr1 4 NULL # Using where with pushed condition; Using temporary; Using filesort; Using join cache 1 SIMPLE t3 ALL NULL NULL NULL NULL # Using where select * from t3,t4 where t4.attr1 > 1 and t4.attr2 = t3.attr2 and t4.attr3 < 5 order by t4.pk1; pk1 attr1 attr2 attr3 attr4 pk1 attr1 attr2 attr3 attr4 diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 279a0884b5b..c01c1673e44 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -402,7 +402,7 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` @@ -952,7 +952,7 @@ Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort +1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Using join cache 1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Warnings: Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid` diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index d9efe21c5d0..c2cb7426a74 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -220,27 +220,27 @@ insert into t1 (x) values (1),(2),(3),(4),(5),(6),(7),(8),(9); update t1 set y=x; explain select * from t1, t1 t2 where t1.y = 8 and t2.x between 7 and t1.y+0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache 1 SIMPLE t2 range x x 5 NULL 2 Using where explain select * from t1, t1 t2 where t1.y = 8 and t2.x >= 7 and t2.x <= t1.y+0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache 1 SIMPLE t2 range x x 5 NULL 2 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x between t1.y-1 and t1.y+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache 1 SIMPLE t2 range x x 5 NULL 3 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= t1.y-1 and t2.x <= t1.y+1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache 1 SIMPLE t2 range x x 5 NULL 3 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache 1 SIMPLE t2 range x x 5 NULL 2 Using where explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref y y 5 const 1 Using where +1 SIMPLE t1 ref y y 5 const 1 Using where; Using join cache 1 SIMPLE t2 range x x 5 NULL 2 Using where explain select count(*) from t1 where x in (1); id select_type table type possible_keys key key_len ref rows Extra @@ -255,12 +255,12 @@ CREATE TABLE t2 (keya int(11) NOT NULL default '0', KEY j1 (keya)); INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2); explain select * from t1, t2 where (t1.key1 (`test`.`t1`.`a`,(select 1 AS `Not_used` from `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t2`.`a`) and (((`test`.`t1`.`a`) = `test`.`t2`.`a`) or isnull(`test`.`t2`.`a`))) having (`test`.`t2`.`a`))) AS `t1.a in (select t2.a from t2,t3 where t3.a=t2.a)` from `test`.`t1` @@ -1354,7 +1354,7 @@ a explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index -2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index +2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index; Using join cache 2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 100.00 Using where; Using index Warnings: Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`a`,(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and ((`test`.`t2`.`a`) = `test`.`t1`.`a`)))) diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 657d95b7ee3..132c36fbf11 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -254,7 +254,7 @@ select a,b, oref, from t2; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 -2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key +2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key; Using join cache 2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where Warnings: Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1 diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 275f3357c65..acf237bf125 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -499,7 +499,7 @@ a b explain (select * from t1 where a=1 and b=10) union (select straight_join t1.a,t2.a from t1,t2 where t1.a=t2.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index +2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using join cache 2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index NULL UNION RESULT ALL NULL NULL NULL NULL NULL explain (select * from t1 where a=1) union (select * from t1 where b=1); diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8ebf4d40067..cc353f5e1db 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2317,7 +2317,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref a a 10 const,test.t1.b 2 Using where; Using index EXPLAIN SELECT * FROM v2 WHERE a=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 1 Using where; Using index +1 SIMPLE t1 ref a a 5 const 1 Using where; Using index; Using join cache 1 SIMPLE t3 ALL NULL NULL NULL NULL 3 Using where DROP VIEW v1,v2; DROP TABLE t1,t2,t3; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 19fa76ee06b..8f4fa75be91 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5893,6 +5893,12 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) tab->ref.key= -1; tab->ref.key_parts=0; // Don't use ref key. join->best_positions[i].records_read= rows2double(tab->quick->records); + /* + We will use join cache here : prevent sorting of the first + table only and sort at the end. + */ + if (i != join->const_tables && join->tables > join->const_tables + 1) + join->full_join= 1; } tmp= NULL; @@ -12660,6 +12666,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, uint nr; key_map keys; + /* + filesort() and join cache are usually faster than reading in + index order and not using join cache + */ + if (tab->type == JT_ALL && tab->join->tables > tab->join->const_tables + 1) + DBUG_RETURN(0); /* If not used with LIMIT, only use keys if the whole query can be resolved with a key; This is because filesort() is usually faster than @@ -15513,6 +15525,8 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, break; } } + if (tab->next_select == sub_select_cache) + extra.append(STRING_WITH_LEN("; Using join cache")); /* Skip initial "; "*/ const char *str= extra.ptr(); From 359b0e59c9375fbaa2beb84f02e01c6fbbf8d31d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 18:55:01 +0300 Subject: [PATCH 071/137] bug #27531: fixed coverage of out-of-mem errors --- sql/item_subselect.cc | 2 +- sql/sql_select.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index a4d07e08473..ccd361dba99 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1787,7 +1787,7 @@ int subselect_single_select_engine::exec() select_lex->uncacheable|= UNCACHEABLE_EXPLAIN; select_lex->master_unit()->uncacheable|= UNCACHEABLE_EXPLAIN; if (join->init_save_join_tab()) - DBUG_RETURN(1); + DBUG_RETURN(1); /* purecov: inspected */ } if (item->engine_changed) { diff --git a/sql/sql_select.cc b/sql/sql_select.cc index efdc834f04a..3a480c01ac1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1432,7 +1432,7 @@ JOIN::optimize() */ if (select_lex->uncacheable && !is_top_level_join() && init_save_join_tab()) - DBUG_RETURN(-1); + DBUG_RETURN(-1); /* purecov: inspected */ } error= 0; @@ -1509,7 +1509,7 @@ bool JOIN::init_save_join_tab() { if (!(tmp_join= (JOIN*)thd->alloc(sizeof(JOIN)))) - return 1; + return 1; /* purecov: inspected */ error= 0; // Ensure that tmp_join.error= 0 restore_tmp(); return 0; From cd3ced79e9670f3dead8d4613d697f8c01db3d48 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 May 2007 16:44:07 -0700 Subject: [PATCH 072/137] WL#2936 Move copying of global variables into thd.variables into plugin_thdvar_init(). plugin_thdvar_init() may be called multiple times when THD::change_user() is called. This fixes a plugin ref-count leak when running the test mysql_client_test sql/sql_class.cc: wl2936 Initialize thd.variables to zero in constructor. Move copying of global variables into thd.variables into plugin_thdvar_init() sql/sql_plugin.cc: wl2936 Move copying of global variables into thd.variables into plugin_thdvar_init(). plugin_thdvar_init() may be called multiple times when THD::change_user() is called. This fixes a plugin ref-count leak when running the test mysql_client_test --- sql/sql_class.cc | 3 +-- sql/sql_plugin.cc | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index b29cfb8fcaf..87cf9b16d24 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -345,6 +345,7 @@ THD::THD() time_after_lock=(time_t) 0; current_linfo = 0; slave_thread = 0; + bzero(&variables, sizeof(variables)); thread_id= variables.pseudo_thread_id= 0; one_shot_set= 0; file_id = 0; @@ -455,8 +456,6 @@ void THD::pop_internal_handler() void THD::init(void) { pthread_mutex_lock(&LOCK_global_system_variables); - variables= global_system_variables; - variables.table_plugin= NULL; plugin_thdvar_init(this); variables.time_format= date_time_format_copy((THD*) 0, variables.time_format); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 590fee82027..66b6cb5d9eb 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2303,14 +2303,26 @@ static byte *mysql_sys_var_ptr(void* a_thd, int offset) void plugin_thdvar_init(THD *thd) { + plugin_ref old_table_plugin= thd->variables.table_plugin; + DBUG_ENTER("plugin_thdvar_init"); + + thd->variables.table_plugin= NULL; + cleanup_variables(thd, &thd->variables); + + thd->variables= global_system_variables; + thd->variables.table_plugin= NULL; + /* we are going to allocate these lazily */ thd->variables.dynamic_variables_version= 0; thd->variables.dynamic_variables_size= 0; thd->variables.dynamic_variables_ptr= 0; - DBUG_ASSERT(!(thd->variables.table_plugin)); + pthread_mutex_lock(&LOCK_plugin); thd->variables.table_plugin= - my_plugin_lock(NULL, &global_system_variables.table_plugin); + my_intern_plugin_lock(NULL, global_system_variables.table_plugin); + intern_plugin_unlock(NULL, old_table_plugin); + pthread_mutex_unlock(&LOCK_plugin); + DBUG_VOID_RETURN; } From e449dcfe66fec7b44f787fa6a4cf3c95c5fe0846 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 6 May 2007 23:40:16 +0500 Subject: [PATCH 073/137] Bug #28005 Partitions: can't use -9223372036854775808 the Item_neg changes INT_RESULT with DECIMAL_RESULT when it gets this border value, what is not necessary. mysql-test/r/partition.result: result added mysql-test/t/partition.test: testcase sql/item_func.cc: we can handle '==' case in ordinary way - no need to use DECIMAL_RESULT --- mysql-test/r/partition.result | 2 ++ mysql-test/t/partition.test | 6 ++++++ sql/item_func.cc | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 3549e987d73..de477310fe3 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1233,4 +1233,6 @@ select * from t1; c1 c2 aaa 2 drop table t1; +create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808)); +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 36f3a40503b..68c13c0792a 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1441,5 +1441,11 @@ insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; select * from t1; drop table t1; +# +# Bug #28005 Partitions: can't use -9223372036854775808 +# + +create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808)); +drop table t1; --echo End of 5.1 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index 313d96c4c81..2315f5b2523 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1483,7 +1483,7 @@ void Item_func_neg::fix_length_and_dec() */ if (hybrid_type == INT_RESULT && args[0]->type() == INT_ITEM && - ((ulonglong) args[0]->val_int() >= (ulonglong) LONGLONG_MIN)) + ((ulonglong) args[0]->val_int() > (ulonglong) LONGLONG_MIN)) { /* Ensure that result is converted to DECIMAL, as longlong can't hold From 97841978d4d33cf57db6cc06153da6d560aa70da Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 11:15:59 +0500 Subject: [PATCH 074/137] bug #28005 (Partitions can't use -922337...) one more test added mysql-test/r/bigint.result: test result mysql-test/t/bigint.test: testcase --- mysql-test/r/bigint.result | 10 ++++++++++ mysql-test/t/bigint.test | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index d8f78cd5103..7d105cae19d 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -352,3 +352,13 @@ select c1 mod 50 as result from t1; result 6 drop table t1; +select -9223372036854775808 bi; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def bi 8 20 20 N 32897 0 63 +bi +-9223372036854775808 +select -9223372036854775809 bi; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def bi 246 20 20 N 129 0 63 +bi +-9223372036854775809 diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 6c1229db83f..47e3df74a7e 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -288,3 +288,8 @@ insert into t1 values (10000002383263201056); select c1 mod 50 as result from t1; drop table t1; +# Bug #28005 Partitions: can't use -9223372036854775808 +--enable_metadata +select -9223372036854775808 bi; +select -9223372036854775809 bi; +--disable_metadata From 72569cc66d2a1d8edcc3e368213619f7ea855329 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 10:23:10 +0200 Subject: [PATCH 075/137] Bug#26977 exception handlers never hreturn - In some cases, flow control optimization implemented in sp::optimize removes hreturn instructions, causing SQL exception handlers to: * never return * execute wrong logic - This patch overrides default short cut optimization on hreturn instructions to avoid this problem. mysql-test/r/sp-code.result: Added test case mysql-test/t/sp-code.test: Added test case sql/sp_head.cc: Override opt_mark to get correct execution paths without jump short cut optimization. sql/sp_head.h: Added override sp_instr_hreturn::opt_shortcut_jump so that jump short cuts aren't performed on hreturn instructions operating on handlers which are set to CONTINUE after interruption. --- mysql-test/r/sp-code.result | 113 ++++++++++++++++++++++++++++++++++++ mysql-test/t/sp-code.test | 75 ++++++++++++++++++++++++ sql/sp_head.cc | 16 ++++- sql/sp_head.h | 6 ++ 4 files changed, 207 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 9d86a6bc08d..219f3c9b37a 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -620,4 +620,117 @@ SHOW PROCEDURE CODE p1; Pos Instruction 0 stmt 2 "CREATE INDEX idx ON t1 (c1)" DROP PROCEDURE p1; +drop table if exists t1; +drop procedure if exists proc_26977_broken; +drop procedure if exists proc_26977_works; +create table t1(a int unique); +create procedure proc_26977_broken(v int) +begin +declare i int default 5; +declare continue handler for sqlexception +begin +select 'caught something'; +retry: +while i > 0 do +begin +set i = i - 1; +select 'looping', i; +end; +end while retry; +end; +select 'do something'; +insert into t1 values (v); +select 'do something again'; +insert into t1 values (v); +end// +create procedure proc_26977_works(v int) +begin +declare i int default 5; +declare continue handler for sqlexception +begin +select 'caught something'; +retry: +while i > 0 do +begin +set i = i - 1; +select 'looping', i; +end; +end while retry; +select 'optimizer: keep hreturn'; +end; +select 'do something'; +insert into t1 values (v); +select 'do something again'; +insert into t1 values (v); +end// +show procedure code proc_26977_broken; +Pos Instruction +0 set i@1 5 +1 hpush_jump 8 2 CONTINUE +2 stmt 0 "select 'caught something'" +3 jump_if_not 7(7) (i@1 > 0) +4 set i@1 (i@1 - 1) +5 stmt 0 "select 'looping', i" +6 jump 3 +7 hreturn 2 +8 stmt 0 "select 'do something'" +9 stmt 5 "insert into t1 values (v)" +10 stmt 0 "select 'do something again'" +11 stmt 5 "insert into t1 values (v)" +12 hpop 1 +show procedure code proc_26977_works; +Pos Instruction +0 set i@1 5 +1 hpush_jump 9 2 CONTINUE +2 stmt 0 "select 'caught something'" +3 jump_if_not 7(7) (i@1 > 0) +4 set i@1 (i@1 - 1) +5 stmt 0 "select 'looping', i" +6 jump 3 +7 stmt 0 "select 'optimizer: keep hreturn'" +8 hreturn 2 +9 stmt 0 "select 'do something'" +10 stmt 5 "insert into t1 values (v)" +11 stmt 0 "select 'do something again'" +12 stmt 5 "insert into t1 values (v)" +13 hpop 1 +call proc_26977_broken(1); +do something +do something +do something again +do something again +caught something +caught something +looping i +looping 4 +looping i +looping 3 +looping i +looping 2 +looping i +looping 1 +looping i +looping 0 +call proc_26977_works(2); +do something +do something +do something again +do something again +caught something +caught something +looping i +looping 4 +looping i +looping 3 +looping i +looping 2 +looping i +looping 1 +looping i +looping 0 +optimizer: keep hreturn +optimizer: keep hreturn +drop table t1; +drop procedure proc_26977_broken; +drop procedure proc_26977_works; End of 5.0 tests. diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test index 97bc29fcad2..0f249c95172 100644 --- a/mysql-test/t/sp-code.test +++ b/mysql-test/t/sp-code.test @@ -446,4 +446,79 @@ SHOW PROCEDURE CODE p1; DROP PROCEDURE p1; +# +# Bug#26977 exception handlers never hreturn +# +--disable_warnings +drop table if exists t1; +drop procedure if exists proc_26977_broken; +drop procedure if exists proc_26977_works; +--enable_warnings + +create table t1(a int unique); + +delimiter //; + +create procedure proc_26977_broken(v int) +begin + declare i int default 5; + + declare continue handler for sqlexception + begin + select 'caught something'; + retry: + while i > 0 do + begin + set i = i - 1; + select 'looping', i; + end; + end while retry; + end; + + select 'do something'; + insert into t1 values (v); + select 'do something again'; + insert into t1 values (v); +end// + +create procedure proc_26977_works(v int) +begin + declare i int default 5; + + declare continue handler for sqlexception + begin + select 'caught something'; + retry: + while i > 0 do + begin + set i = i - 1; + select 'looping', i; + end; + end while retry; + select 'optimizer: keep hreturn'; + end; + + select 'do something'; + insert into t1 values (v); + select 'do something again'; + insert into t1 values (v); +end// +delimiter ;// + +show procedure code proc_26977_broken; + +show procedure code proc_26977_works; + +## This caust an error because of jump short cut +## optimization. +call proc_26977_broken(1); + +## This works +call proc_26977_works(2); + +drop table t1; +drop procedure proc_26977_broken; +drop procedure proc_26977_works; + + --echo End of 5.0 tests. diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 1ebef4f8bee..5a1faf50296 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2982,10 +2982,20 @@ sp_instr_hreturn::print(String *str) uint sp_instr_hreturn::opt_mark(sp_head *sp, List *leads) { - if (m_dest) - return sp_instr_jump::opt_mark(sp, leads); - marked= 1; + + if (m_dest) + { + /* + This is an EXIT handler; next instruction step is in m_dest. + */ + return m_dest; + } + + /* + This is a CONTINUE handler; next instruction step will come from + the handler stack and not from opt_mark. + */ return UINT_MAX; } diff --git a/sql/sp_head.h b/sql/sp_head.h index 4632f6808fd..ed99885ae9a 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -973,6 +973,12 @@ public: virtual void print(String *str); + /* This instruction will not be short cut optimized. */ + virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start) + { + return m_ip; + } + virtual uint opt_mark(sp_head *sp, List *leads); private: From 17da0553bbbe388ae0ffcfcd915a9a1a6d70259f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 13:29:59 +0500 Subject: [PATCH 076/137] fixed Solaris compilation failure sql/field.cc: parameters fixed to not interfere with the Field_blob members sql/field.h: BIGENDIAN machine will require 'table' member. so cannot be static --- sql/field.cc | 16 ++++++++-------- sql/field.h | 5 ++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index dca2d7137e0..3ae82fe6182 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7006,34 +7006,34 @@ Field_blob::Field_blob(char *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, } -void Field_blob::store_length(char *ptr, uint packlength, uint32 number) +void Field_blob::store_length(char *i_ptr, uint i_packlength, uint32 i_number) { - switch (packlength) { + switch (i_packlength) { case 1: - ptr[0]= (uchar) number; + i_ptr[0]= (uchar) i_number; break; case 2: #ifdef WORDS_BIGENDIAN if (table->s->db_low_byte_first) { - int2store(ptr,(unsigned short) number); + int2store(i_ptr,(unsigned short) i_number); } else #endif - shortstore(ptr,(unsigned short) number); + shortstore(i_ptr,(unsigned short) i_number); break; case 3: - int3store(ptr,number); + int3store(i_ptr,i_number); break; case 4: #ifdef WORDS_BIGENDIAN if (table->s->db_low_byte_first) { - int4store(ptr,number); + int4store(i_ptr,i_number); } else #endif - longstore(ptr,number); + longstore(i_ptr,i_number); } } diff --git a/sql/field.h b/sql/field.h index 9d89e53c36c..2c2640a8262 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1307,7 +1307,10 @@ public: } int reset(void) { bzero(ptr, packlength+sizeof(char*)); return 0; } void reset_fields() { bzero((char*) &value,sizeof(value)); } - static void store_length(char *ptr, uint packlength, uint32 number); +#ifndef WORDS_BIGENDIAN + static +#endif + void store_length(char *i_ptr, uint i_packlength, uint32 i_number); inline void store_length(uint32 number) { store_length(ptr, packlength, number); From a33d5e1755c9b6dc6839632240adf3454fa959f8 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 13:48:27 +0200 Subject: [PATCH 077/137] ndb - bug#28276 Fix DeleteRead in multi-operation Dont use setup_read, as it will (correctly) find that tuple is deleted storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: Fix multi-op DeleteRead storage/ndb/test/ndbapi/testBasic.cpp: Fix multi-op DeleteRead --- .../kernel/blocks/dbtup/DbtupExecQuery.cpp | 21 +++++------ storage/ndb/test/ndbapi/testBasic.cpp | 36 +++++++++++++------ 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 69b2d6d116e..c657feb6f95 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -1491,6 +1491,7 @@ int Dbtup::handleDeleteReq(Signal* signal, goto error; } memcpy(dst, org, regTabPtr->total_rec_size << 2); + req_struct->m_tuple_ptr = (Tuple_header*)dst; } else { @@ -1528,18 +1529,18 @@ int Dbtup::handleDeleteReq(Signal* signal, return 0; } - if (setup_read(req_struct, regOperPtr, regFragPtr, regTabPtr, disk)) + if (regTabPtr->need_expand(disk)) + prepare_read(req_struct, regTabPtr, disk); + + Uint32 RlogSize; + int ret= handleReadReq(signal, regOperPtr, regTabPtr, req_struct); + if (ret == 0 && (RlogSize= req_struct->log_size)) { - Uint32 RlogSize; - int ret= handleReadReq(signal, regOperPtr, regTabPtr, req_struct); - if (ret == 0 && (RlogSize= req_struct->log_size)) - { - jam(); - sendLogAttrinfo(signal, RlogSize, regOperPtr); - } - return ret; + jam(); + sendLogAttrinfo(signal, RlogSize, regOperPtr); } - + return ret; + error: tupkeyErrorLab(signal); return -1; diff --git a/storage/ndb/test/ndbapi/testBasic.cpp b/storage/ndb/test/ndbapi/testBasic.cpp index 44c3d023169..838ab8a1997 100644 --- a/storage/ndb/test/ndbapi/testBasic.cpp +++ b/storage/ndb/test/ndbapi/testBasic.cpp @@ -1290,17 +1290,7 @@ runDeleteRead(NDBT_Context* ctx, NDBT_Step* step){ NdbTransaction* pTrans = pNdb->startTransaction(); NdbOperation* pOp = pTrans->getNdbOperation(tab->getName()); pOp->deleteTuple(); - for(a = 0; agetNoOfColumns(); a++) - { - if (tab->getColumn(a)->getPrimaryKey() == true) - { - if(tmp.equalForAttr(pOp, a, 0) != 0) - { - ERR(pTrans->getNdbError()); - return NDBT_FAILED; - } - } - } + tmp.equalForRow(pOp, loops); // Define attributes to read for(a = 0; agetNoOfColumns(); a++) @@ -1313,6 +1303,30 @@ runDeleteRead(NDBT_Context* ctx, NDBT_Step* step){ pTrans->execute(Commit); pTrans->close(); + + pTrans = pNdb->startTransaction(); + pOp = pTrans->getNdbOperation(tab->getName()); + pOp->insertTuple(); + tmp.setValues(pOp, loops, 0); + + pOp = pTrans->getNdbOperation(tab->getName()); + pOp->deleteTuple(); + tmp.equalForRow(pOp, loops); + for(a = 0; agetNoOfColumns(); a++) + { + if((row.attributeStore(a) = pOp->getValue(tab->getColumn(a)->getName())) == 0) + { + ERR(pTrans->getNdbError()); + return NDBT_FAILED; + } + } + if (pTrans->execute(Commit) != 0) + { + ERR(pTrans->getNdbError()); + return NDBT_FAILED; + } + + pTrans->close(); } return NDBT_OK; From 59ae1777e5e5e123baf57e497791a2c2596096da Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 17:33:28 +0500 Subject: [PATCH 078/137] merging fix mysql-test/r/sp-vars.result: merging --- mysql-test/r/sp-vars.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result index 7d5b71cb67d..968bb75309b 100644 --- a/mysql-test/r/sp-vars.result +++ b/mysql-test/r/sp-vars.result @@ -690,12 +690,12 @@ END| CALL p1(NOW()); Table Create Table t1 CREATE TABLE "t1" ( - "x" datetime default NULL + "x" datetime DEFAULT NULL ) CALL p1('test'); Table Create Table t1 CREATE TABLE "t1" ( - "x" datetime default NULL + "x" datetime DEFAULT NULL ) Warnings: Warning 1264 Out of range value for column 'x' at row 1 From 90d22e8614e74af9d5542dd93d5f39b96c49f385 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 14:53:55 +0200 Subject: [PATCH 079/137] Fix compile error with some compilers --- .../src/kernel/blocks/dbtup/DbtupExecQuery.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index c657feb6f95..ec44d127f2c 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -1532,15 +1532,17 @@ int Dbtup::handleDeleteReq(Signal* signal, if (regTabPtr->need_expand(disk)) prepare_read(req_struct, regTabPtr, disk); - Uint32 RlogSize; - int ret= handleReadReq(signal, regOperPtr, regTabPtr, req_struct); - if (ret == 0 && (RlogSize= req_struct->log_size)) { - jam(); - sendLogAttrinfo(signal, RlogSize, regOperPtr); + Uint32 RlogSize; + int ret= handleReadReq(signal, regOperPtr, regTabPtr, req_struct); + if (ret == 0 && (RlogSize= req_struct->log_size)) + { + jam(); + sendLogAttrinfo(signal, RlogSize, regOperPtr); + } + return ret; } - return ret; - + error: tupkeyErrorLab(signal); return -1; From 96ad130f985245318995681d4a32b907270ffaa1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 16:02:57 +0200 Subject: [PATCH 080/137] ndb - bug#27942 Increase size of memory channel storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp: increase size of memchannel to prevent crashes (for DD) --- storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp index 966f82cc9c2..411e7064efa 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp @@ -75,7 +75,7 @@ template class MemoryChannel { public: - MemoryChannel( int size= 256); + MemoryChannel( int size= 512); virtual ~MemoryChannel( ); void writeChannel( T *t); From cc33cf29834abff0e07dac5f9c0e083c37722267 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 18:24:46 +0400 Subject: [PATCH 081/137] item_func.cc: Fixed compiler warnings. sql/item_func.cc: Fixed compiler warnings. --- sql/item_func.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/item_func.cc b/sql/item_func.cc index e761cf7fb43..7a31b564502 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2328,7 +2328,7 @@ double Item_func_min_max::val_real() double value=0.0; if (compare_as_dates) { - ulonglong result; + ulonglong result= 0; (void)cmp_datetimes(&result); return (double)result; } @@ -2355,7 +2355,7 @@ longlong Item_func_min_max::val_int() longlong value=0; if (compare_as_dates) { - ulonglong result; + ulonglong result= 0; (void)cmp_datetimes(&result); return (longlong)result; } @@ -2384,7 +2384,7 @@ my_decimal *Item_func_min_max::val_decimal(my_decimal *dec) if (compare_as_dates) { - ulonglong value; + ulonglong value= 0; (void)cmp_datetimes(&value); ulonglong2decimal(value, dec); return dec; From 0fd2b3ddc6535334cb52e600e3e7636c77d0e4af Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 22:20:43 +0400 Subject: [PATCH 082/137] Bug#28133: Wrong DATE/DATETIME comparison in IN() function. The IN function was comparing DATE/DATETIME values either as ints or as strings. Both methods have their disadvantages and may lead to a wrong result. Now IN function checks whether all of its arguments has the STRING result types and at least one of them is a DATE/DATETIME item. If so it uses either an object of the in_datetime class or an object of the cmp_item_datetime class to perform its work. If the IN() function arguments are rows then row columns are checked whether the DATE/DATETIME comparator should be used to compare them. The in_datetime class is used to find occurence of the item to be checked in the vector of the constant DATE/DATETIME values. The cmp_item_datetime class is used to compare items one by one in the DATE/DATETIME context. Both classes obtain values from items with help of the get_datetime_value() function and cache the left item if it is a constant one. mysql-test/t/type_datetime.test: Added a test case for the bug#28133: Wrong DATE/DATETIME comparison in IN() function. mysql-test/r/type_datetime.result: Added a test case for the bug#28133: Wrong DATE/DATETIME comparison in IN() function. mysql-test/r/func_in.result: A test case result is corrected after the fix for the bug#28133. sql/item_cmpfunc.h: Bug#28133: Wrong DATE/DATETIME comparison in IN() function. Two DATE/DATETIME comparison classes are added. The in_datetime class is used to find occurence of the item to be checked in the vector of the constant DATE/DATETIME values. The cmp_item_datetime class is used to compare items one by one in the DATE/DATETIME context. Both classes obtain values from items with help of the get_datetime_value() function and cache the left item if it is a constant one. sql/item_cmpfunc.cc: Bug#28133: Wrong DATE/DATETIME comparison in IN() function. Now IN function checks whether all of its arguments has the STRING result types and at least one of them is a DATE/DATETIME item. If so it uses either an object of the in_datetime class or an object of the cmp_item_datetime class to perform its work. If the IN() function arguments are rows then row columns are checked whether the DATE/DATETIME comparator should be used to compare them. --- mysql-test/r/func_in.result | 1 + mysql-test/r/type_datetime.result | 46 ++++++ mysql-test/t/type_datetime.test | 19 +++ sql/item_cmpfunc.cc | 254 ++++++++++++++++++++++++------ sql/item_cmpfunc.h | 102 +++++++++--- 5 files changed, 351 insertions(+), 71 deletions(-) diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index 87855091699..a3e0773649f 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -467,6 +467,7 @@ CREATE TABLE t4 (a DATE); INSERT INTO t4 VALUES ('1972-02-06'), ('1972-07-29'); SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29'); a +1972-02-06 Warnings: Warning 1292 Incorrect date value: '19772-07-29' for column 'a' at row 1 DROP TABLE t1,t2,t3,t4; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index f5ff3369c8b..0d03446c7eb 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -266,3 +266,49 @@ f2 SELECT 1 from dual where NOW() BETWEEN CURRENT_DATE() - INTERVAL 1 DAY AND CURRENT_DATE(); 1 drop table t1; +create table t1 (f1 date); +insert into t1 values('01-01-01'),('01-01-02'),('01-01-03'); +select * from t1 where f1 in ('01-01-01','2001-01-02','2001-01-03 00:00:00'); +f1 +2001-01-01 +2001-01-02 +2001-01-03 +create table t2(f2 datetime); +insert into t2 values('01-01-01 00:00:00'),('01-02-03 12:34:56'),('02-04-06 11:22:33'); +select * from t2 where f2 in ('01-01-01','01-02-03 12:34:56','01-02-03'); +f2 +2001-01-01 00:00:00 +2001-02-03 12:34:56 +select * from t1,t2 where '01-01-02' in (f1, cast(f2 as date)); +f1 f2 +2001-01-02 2001-01-01 00:00:00 +2001-01-02 2001-02-03 12:34:56 +2001-01-02 2002-04-06 11:22:33 +select * from t1,t2 where '01-01-01' in (f1, '01-02-03'); +f1 f2 +2001-01-01 2001-01-01 00:00:00 +2001-01-01 2001-02-03 12:34:56 +2001-01-01 2002-04-06 11:22:33 +select * from t1,t2 where if(1,'01-02-03 12:34:56','') in (f1, f2); +f1 f2 +2001-01-01 2001-02-03 12:34:56 +2001-01-02 2001-02-03 12:34:56 +2001-01-03 2001-02-03 12:34:56 +create table t3(f3 varchar(20)); +insert into t3 select * from t2; +select * from t2,t3 where f2 in (f3,'03-04-05'); +f2 f3 +2001-01-01 00:00:00 2001-01-01 00:00:00 +2001-02-03 12:34:56 2001-02-03 12:34:56 +2002-04-06 11:22:33 2002-04-06 11:22:33 +select f1,f2,f3 from t1,t2,t3 where (f1,'1') in ((f2,'1'),(f3,'1')); +f1 f2 f3 +2001-01-01 2001-01-01 00:00:00 2001-01-01 00:00:00 +2001-01-01 2001-02-03 12:34:56 2001-01-01 00:00:00 +2001-01-01 2002-04-06 11:22:33 2001-01-01 00:00:00 +2001-01-01 2001-01-01 00:00:00 2001-02-03 12:34:56 +2001-01-01 2001-01-01 00:00:00 2002-04-06 11:22:33 +select f1 from t1 where ('1',f1) in (('1','01-01-01'),('1','2001-1-1 0:0:0'),('1','02-02-02')); +f1 +2001-01-01 +drop table t1,t2,t3; diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index 2c38b3ea9e3..90ca1ce9832 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -180,3 +180,22 @@ select f2, f3 from t1 where '01-03-10' between f2 and f3; select f2 from t1 where DATE(f2) between "2001-4-15" AND "01-4-15"; SELECT 1 from dual where NOW() BETWEEN CURRENT_DATE() - INTERVAL 1 DAY AND CURRENT_DATE(); drop table t1; + +# +# Bug#28133: Wrong DATE/DATETIME comparison in IN() function. +# +create table t1 (f1 date); +insert into t1 values('01-01-01'),('01-01-02'),('01-01-03'); +select * from t1 where f1 in ('01-01-01','2001-01-02','2001-01-03 00:00:00'); +create table t2(f2 datetime); +insert into t2 values('01-01-01 00:00:00'),('01-02-03 12:34:56'),('02-04-06 11:22:33'); +select * from t2 where f2 in ('01-01-01','01-02-03 12:34:56','01-02-03'); +select * from t1,t2 where '01-01-02' in (f1, cast(f2 as date)); +select * from t1,t2 where '01-01-01' in (f1, '01-02-03'); +select * from t1,t2 where if(1,'01-02-03 12:34:56','') in (f1, f2); +create table t3(f3 varchar(20)); +insert into t3 select * from t2; +select * from t2,t3 where f2 in (f3,'03-04-05'); +select f1,f2,f3 from t1,t2,t3 where (f1,'1') in ((f2,'1'),(f3,'1')); +select f1 from t1 where ('1',f1) in (('1','01-01-01'),('1','2001-1-1 0:0:0'),('1','02-02-02')); +drop table t1,t2,t3; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 169c017c914..5127336f4f9 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -780,7 +780,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, MYSQL_TYPE_DATE ? MYSQL_TIMESTAMP_DATE : MYSQL_TIMESTAMP_DATETIME; value= get_date_from_str(thd, str, t_type, warn_item->name, &error); } - if (item->const_item()) + if (item->const_item() && cache_arg) { Item_cache_int *cache= new Item_cache_int(); /* Mark the cache as non-const to prevent re-caching. */ @@ -2785,7 +2785,6 @@ in_row::in_row(uint elements, Item * item) base= (char*) new cmp_item_row[count= elements]; size= sizeof(cmp_item_row); compare= (qsort2_cmp) cmp_row; - tmp.store_value(item); /* We need to reset these as otherwise we will call sort() with uninitialized (even if not used) elements @@ -2837,6 +2836,27 @@ byte *in_longlong::get_value(Item *item) return (byte*) &tmp; } +void in_datetime::set(uint pos,Item *item) +{ + Item **tmp= &item; + bool is_null; + struct packed_longlong *buff= &((packed_longlong*) base)[pos]; + + buff->val= get_datetime_value(thd, &tmp, 0, warn_item, &is_null); + buff->unsigned_flag= 1L; +} + +byte *in_datetime::get_value(Item *item) +{ + bool is_null; + Item **tmp_item= lval_cache ? &lval_cache : &item; + tmp.val= get_datetime_value(thd, &tmp_item, &lval_cache, warn_item, &is_null); + if (item->null_value) + return 0; + tmp.unsigned_flag= 1L; + return (byte*) &tmp; +} + in_double::in_double(uint elements) :in_vector(elements,sizeof(double),(qsort2_cmp) cmp_double, 0) {} @@ -2941,12 +2961,18 @@ cmp_item_row::~cmp_item_row() } +void cmp_item_row::alloc_comparators() +{ + if (!comparators) + comparators= (cmp_item **) current_thd->calloc(sizeof(cmp_item *)*n); +} + + void cmp_item_row::store_value(Item *item) { DBUG_ENTER("cmp_item_row::store_value"); n= item->cols(); - if (!comparators) - comparators= (cmp_item **) current_thd->calloc(sizeof(cmp_item *)*n); + alloc_comparators(); if (comparators) { item->bring_value(); @@ -3058,6 +3084,36 @@ cmp_item* cmp_item_decimal::make_same() } +void cmp_item_datetime::store_value(Item *item) +{ + bool is_null; + Item **tmp_item= lval_cache ? &lval_cache : &item; + value= get_datetime_value(thd, &tmp_item, &lval_cache, warn_item, &is_null); +} + + +int cmp_item_datetime::cmp(Item *arg) +{ + bool is_null; + Item **tmp_item= &arg; + return value != + get_datetime_value(thd, &tmp_item, 0, warn_item, &is_null); +} + + +int cmp_item_datetime::compare(cmp_item *ci) +{ + cmp_item_datetime *l_cmp= (cmp_item_datetime *)ci; + return (value < l_cmp->value) ? -1 : ((value == l_cmp->value) ? 0 : 1); +} + + +cmp_item *cmp_item_datetime::make_same() +{ + return new cmp_item_datetime(warn_item); +} + + bool Item_func_in::nulls_in_row() { Item **arg,**arg_end; @@ -3133,7 +3189,11 @@ void Item_func_in::fix_length_and_dec() Item **arg, **arg_end; uint const_itm= 1; THD *thd= current_thd; - + bool datetime_found= FALSE; + /* TRUE <=> arguments values will be compared as DATETIMEs. */ + bool compare_as_datetime= FALSE; + Item *date_arg= 0; + if (agg_cmp_type(thd, &cmp_type, args, arg_count)) return; @@ -3149,58 +3209,148 @@ void Item_func_in::fix_length_and_dec() break; } } + /* + When comparing rows create the row comparator object beforehand to ease + the DATETIME comparison detection procedure. + */ + if (cmp_type == ROW_RESULT) + { + cmp_item_row *cmp= 0; + if (const_itm && !nulls_in_row()) + { + array= new in_row(arg_count-1, 0); + cmp= &((in_row*)array)->tmp; + } + else + { + if (!(cmp= new cmp_item_row)) + return; + in_item= cmp; + } + cmp->n= args[0]->cols(); + cmp->alloc_comparators(); + } + /* All DATE/DATETIME fields/functions has the STRING result type. */ + if (cmp_type == STRING_RESULT || cmp_type == ROW_RESULT) + { + uint col, cols= args[0]->cols(); + for (col= 0; col < cols; col++) + { + bool skip_column= FALSE; + /* + Check that all items to be compared has the STRING result type and at + least one of them is a DATE/DATETIME item. + */ + for (arg= args, arg_end= args + arg_count; arg != arg_end ; arg++) + { + Item *itm= ((cmp_type == STRING_RESULT) ? arg[0] : + arg[0]->element_index(col)); + if (itm->result_type() != STRING_RESULT) + { + skip_column= TRUE; + break; + } + else if (itm->is_datetime()) + { + datetime_found= TRUE; + /* + Internally all DATE/DATETIME values are converted to the DATETIME + type. So try to find a DATETIME item to issue correct warnings. + */ + if (!date_arg) + date_arg= itm; + else if (itm->field_type() == MYSQL_TYPE_DATETIME) + { + date_arg= itm; + /* All arguments are already checked to have the STRING result. */ + if (cmp_type == STRING_RESULT) + break; + } + } + } + if (skip_column) + continue; + if (datetime_found) + { + if (cmp_type == ROW_RESULT) + { + cmp_item **cmp= 0; + if (array) + cmp= ((in_row*)array)->tmp.comparators + col; + else + cmp= ((cmp_item_row*)in_item)->comparators + col; + *cmp= new cmp_item_datetime(date_arg); + /* Reset variables for the next column. */ + date_arg= 0; + datetime_found= FALSE; + } + else + compare_as_datetime= TRUE; + } + } + } /* Row item with NULLs inside can return NULL or FALSE => they can't be processed as static */ if (const_itm && !nulls_in_row()) { - /* - IN must compare INT/DATE/DATETIME/TIMESTAMP columns and constants - as int values (the same way as equality does). - So we must check here if the column on the left and all the constant - values on the right can be compared as integers and adjust the - comparison type accordingly. - */ - if (args[0]->real_item()->type() == FIELD_ITEM && - thd->lex->sql_command != SQLCOM_CREATE_VIEW && - thd->lex->sql_command != SQLCOM_SHOW_CREATE && - cmp_type != INT_RESULT) + if (compare_as_datetime) + array= new in_datetime(date_arg, arg_count - 1); + else { - Field *field= ((Item_field*) (args[0]->real_item()))->field; - if (field->can_be_compared_as_longlong()) + /* + IN must compare INT columns and constants as int values (the same + way as equality does). + So we must check here if the column on the left and all the constant + values on the right can be compared as integers and adjust the + comparison type accordingly. + */ + if (args[0]->real_item()->type() == FIELD_ITEM && + thd->lex->sql_command != SQLCOM_CREATE_VIEW && + thd->lex->sql_command != SQLCOM_SHOW_CREATE && + cmp_type != INT_RESULT) { - bool all_converted= TRUE; - for (arg=args+1, arg_end=args+arg_count; arg != arg_end ; arg++) + Field *field= ((Item_field*) (args[0]->real_item()))->field; + if (field->can_be_compared_as_longlong()) { - if (!convert_constant_item (thd, field, &arg[0])) - all_converted= FALSE; + bool all_converted= TRUE; + for (arg=args+1, arg_end=args+arg_count; arg != arg_end ; arg++) + { + if (!convert_constant_item (thd, field, &arg[0])) + all_converted= FALSE; + } + if (all_converted) + cmp_type= INT_RESULT; } - if (all_converted) - cmp_type= INT_RESULT; } - } - switch (cmp_type) { - case STRING_RESULT: - array=new in_string(arg_count-1,(qsort2_cmp) srtcmp_in, - cmp_collation.collation); - break; - case INT_RESULT: - array= new in_longlong(arg_count-1); - break; - case REAL_RESULT: - array= new in_double(arg_count-1); - break; - case ROW_RESULT: - array= new in_row(arg_count-1, args[0]); - break; - case DECIMAL_RESULT: - array= new in_decimal(arg_count - 1); - break; - default: - DBUG_ASSERT(0); - return; + switch (cmp_type) { + case STRING_RESULT: + array=new in_string(arg_count-1,(qsort2_cmp) srtcmp_in, + cmp_collation.collation); + break; + case INT_RESULT: + array= new in_longlong(arg_count-1); + break; + case REAL_RESULT: + array= new in_double(arg_count-1); + break; + case ROW_RESULT: + /* + The row comparator was created at the beginning but only DATETIME + items comparators were initialized. Call store_value() to setup + others. + */ + ((in_row*)array)->tmp.store_value(args[0]); + break; + case DECIMAL_RESULT: + array= new in_decimal(arg_count - 1); + break; + default: + DBUG_ASSERT(0); + return; + } } if (array && !(thd->is_fatal_error)) // If not EOM { @@ -3219,7 +3369,19 @@ void Item_func_in::fix_length_and_dec() } else { - in_item= cmp_item::get_comparator(cmp_type, cmp_collation.collation); + if (in_item) + { + /* + The row comparator was created at the beginning but only DATETIME + items comparators were initialized. Call store_value() to setup + others. + */ + in_item->store_value(args[0]); + } + else if (compare_as_datetime) + in_item= new cmp_item_datetime(date_arg); + else + in_item= cmp_item::get_comparator(cmp_type, cmp_collation.collation); if (cmp_type == STRING_RESULT) in_item->cmp_charset= cmp_collation.collation; } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 761ca90d0a7..79091b9c87d 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -833,6 +833,7 @@ public: class in_longlong :public in_vector { +protected: /* Here we declare a temporary variable (tmp) of the same type as the elements of this vector. tmp is used in finding if a given value is in @@ -866,6 +867,30 @@ public: friend int cmp_longlong(void *cmp_arg, packed_longlong *a,packed_longlong *b); }; + +/* + Class to represent a vector of constant DATE/DATETIME values. + Values are obtained with help of the get_datetime_value() function. + If the left item is a constant one then its value is cached in the + lval_cache variable. +*/ +class in_datetime :public in_longlong +{ +public: + THD *thd; + /* An item used to issue warnings. */ + Item *warn_item; + /* Cache for the left item. */ + Item *lval_cache; + + in_datetime(Item *warn_item_arg, uint elements) + :in_longlong(elements), thd(current_thd), warn_item(warn_item_arg), + lval_cache(0) {}; + void set(uint pos,Item *item); + byte *get_value(Item *item); + friend int cmp_longlong(void *cmp_arg, packed_longlong *a,packed_longlong *b); +}; + class in_double :public in_vector { double tmp; @@ -986,6 +1011,30 @@ public: cmp_item *make_same(); }; +/* + Compare items in the DATETIME context. + Values are obtained with help of the get_datetime_value() function. + If the left item is a constant one then its value is cached in the + lval_cache variable. +*/ +class cmp_item_datetime :public cmp_item +{ + ulonglong value; +public: + THD *thd; + /* Item used for issuing warnings. */ + Item *warn_item; + /* Cache for the left item. */ + Item *lval_cache; + + cmp_item_datetime(Item *warn_item_arg) + :thd(current_thd), warn_item(warn_item_arg), lval_cache(0) {} + void store_value(Item *item); + int cmp(Item *arg); + int compare(cmp_item *ci); + cmp_item *make_same(); +}; + class cmp_item_real :public cmp_item { double value; @@ -1020,31 +1069,6 @@ public: }; -class cmp_item_row :public cmp_item -{ - cmp_item **comparators; - uint n; -public: - cmp_item_row(): comparators(0), n(0) {} - ~cmp_item_row(); - void store_value(Item *item); - int cmp(Item *arg); - int compare(cmp_item *arg); - cmp_item *make_same(); - void store_value_by_template(cmp_item *tmpl, Item *); -}; - - -class in_row :public in_vector -{ - cmp_item_row tmp; -public: - in_row(uint elements, Item *); - ~in_row(); - void set(uint pos,Item *item); - byte *get_value(Item *item); -}; - /* cmp_item for optimized IN with row (right part string, which never be changed) @@ -1120,6 +1144,34 @@ public: CHARSET_INFO *compare_collation() { return cmp_collation.collation; } }; +class cmp_item_row :public cmp_item +{ + cmp_item **comparators; + uint n; +public: + cmp_item_row(): comparators(0), n(0) {} + ~cmp_item_row(); + void store_value(Item *item); + inline void alloc_comparators(); + int cmp(Item *arg); + int compare(cmp_item *arg); + cmp_item *make_same(); + void store_value_by_template(cmp_item *tmpl, Item *); + friend void Item_func_in::fix_length_and_dec(); +}; + + +class in_row :public in_vector +{ + cmp_item_row tmp; +public: + in_row(uint elements, Item *); + ~in_row(); + void set(uint pos,Item *item); + byte *get_value(Item *item); + friend void Item_func_in::fix_length_and_dec(); +}; + /* Functions used by where clause */ class Item_func_isnull :public Item_bool_func From 35659a285d3bf1c18798cd2819c18d3d6fca8e55 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 00:24:25 +0500 Subject: [PATCH 083/137] Fixed bug #27954. This bug affects multi-row INSERT ... ON DUPLICATE into table with PRIMARY KEY of AUTO_INCREMENT field and some additional UNIQUE indices. If the first row in multi-row INSERT contains duplicated values of UNIQUE indices, then following rows of multi-row INSERT (with either duplicated or unique key field values) may me applied to _arbitrary_ records of table as updates. This bug was introduced in 5.0. Related code was widely rewritten in 5.1, and 5.1 is already free of this problem. 4.1 was not affected too. When updating the row during INSERT ON DUPLICATE KEY UPDATE, we called restore_auto_increment(), which set next_insert_id back to 0, but we forgot to set clear_next_insert_id back to 0. restore_auto_increment() function has been fixed. sql/sql_class.h: Fixed bug #27954. Added commentary for THD::clear_next_insert_id variable. sql/handler.cc: Fixed bug #27954. When updating the row during INSERT ON DUPLICATE KEY UPDATE, we called restore_auto_increment(), which set next_insert_id back to 0, but we forgot to set clear_next_insert_id back to 0. restore_auto_increment() function has been fixed. mysql-test/t/insert_update.test: Added test case for bug #27954. mysql-test/r/insert_update.result: Added test case for bug #27954. --- mysql-test/r/insert_update.result | 22 ++++++++++++++++++++++ mysql-test/t/insert_update.test | 17 +++++++++++++++++ sql/handler.cc | 7 +++++++ sql/sql_class.h | 4 ++++ 4 files changed, 50 insertions(+) diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result index fd70fcb9084..4a3e87d9d48 100644 --- a/mysql-test/r/insert_update.result +++ b/mysql-test/r/insert_update.result @@ -336,3 +336,25 @@ id f1 0 test1 DROP TABLE t1; SET SQL_MODE=''; +CREATE TABLE t1 ( +id INT AUTO_INCREMENT PRIMARY KEY, +c1 CHAR(1) UNIQUE KEY, +cnt INT DEFAULT 1 +); +INSERT INTO t1 (c1) VALUES ('A'), ('B'), ('C'); +SELECT * FROM t1; +id c1 cnt +1 A 1 +2 B 1 +3 C 1 +INSERT INTO t1 (c1) VALUES ('A'), ('X'), ('Y'), ('Z') +ON DUPLICATE KEY UPDATE cnt=cnt+1; +SELECT * FROM t1; +id c1 cnt +1 A 2 +2 B 1 +3 C 1 +4 X 1 +5 Y 1 +6 Z 1 +DROP TABLE t1; diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test index 76df4502769..0e199dab4bd 100644 --- a/mysql-test/t/insert_update.test +++ b/mysql-test/t/insert_update.test @@ -247,3 +247,20 @@ REPLACE INTO t1 VALUES (0,"test1",null); SELECT id, f1 FROM t1; DROP TABLE t1; SET SQL_MODE=''; + +# +# Bug#27954: multi-row INSERT ... ON DUPLICATE with duplicated +# row at the first place into table with AUTO_INCREMENT and +# additional UNIQUE key. +# +CREATE TABLE t1 ( + id INT AUTO_INCREMENT PRIMARY KEY, + c1 CHAR(1) UNIQUE KEY, + cnt INT DEFAULT 1 +); +INSERT INTO t1 (c1) VALUES ('A'), ('B'), ('C'); +SELECT * FROM t1; +INSERT INTO t1 (c1) VALUES ('A'), ('X'), ('Y'), ('Z') + ON DUPLICATE KEY UPDATE cnt=cnt+1; +SELECT * FROM t1; +DROP TABLE t1; diff --git a/sql/handler.cc b/sql/handler.cc index c6c31593a5f..867ac7ff778 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1685,7 +1685,14 @@ void handler::restore_auto_increment() { THD *thd= table->in_use; if (thd->next_insert_id) + { thd->next_insert_id= thd->prev_insert_id; + if (thd->next_insert_id == 0) + { + /* we didn't generate a value, engine will be called again */ + thd->clear_next_insert_id= 0; + } + } } diff --git a/sql/sql_class.h b/sql/sql_class.h index 12d7cb2368f..7dd46e2efe7 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1431,6 +1431,10 @@ public: */ bool insert_id_used; + /* + clear_next_insert_id is set if engine was called at least once + for this statement to generate auto_increment value. + */ bool clear_next_insert_id; /* for IS NULL => = last_insert_id() fix in remove_eq_conds() */ bool substitute_null_with_insert_id; From dd3f1be8374cf8c48e74c2975fa9c6f770642da9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 00:08:00 +0400 Subject: [PATCH 084/137] Additional fix for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. mysql-test/t/type_datetime.test: Additional test case for the bug#27759. sql/item_func.h: Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. Now the Item_func_min_max::result_as_longlong() returns TRUE when LEAST() compares DATE/DATETIME values. This allows caller to obtain correct integer values through the val_int() function. --- mysql-test/t/type_datetime.test | 2 ++ sql/item_func.h | 1 + 2 files changed, 3 insertions(+) diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index d0fcf9c57de..5eb9d317a8c 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -206,6 +206,8 @@ select greatest(cast('01-01-01' as date), '01-01-02'); select least(cast('01-01-01' as date), '01-01-02') + 0; select greatest(cast('01-01-01' as date), '01-01-02') + 0; select least(cast('01-01-01' as datetime), '01-01-02') + 0; +select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); +select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal); --disable_warnings DROP PROCEDURE IF EXISTS test27759 ; --enable_warnings diff --git a/sql/item_func.h b/sql/item_func.h index 952c828b251..0443e394585 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -703,6 +703,7 @@ public: my_decimal *val_decimal(my_decimal *); void fix_length_and_dec(); enum Item_result result_type () const { return cmp_type; } + bool result_as_longlong() { return compare_as_dates; }; uint cmp_datetimes(ulonglong *value); }; From be5ff3e2ba4ddf32241348de6184be0172d34a37 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 May 2007 16:58:38 -0700 Subject: [PATCH 085/137] Adjusted results after the latest addition of test cases. --- mysql-test/r/type_datetime.result | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 0316ed7e428..8e671597bca 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -325,6 +325,12 @@ greatest(cast('01-01-01' as date), '01-01-02') + 0 select least(cast('01-01-01' as datetime), '01-01-02') + 0; least(cast('01-01-01' as datetime), '01-01-02') + 0 20010101000000 +select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); +cast(least(cast('01-01-01' as datetime), '01-01-02') as signed) +20010101000000 +select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal); +cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal) +20010101000000.00 DROP PROCEDURE IF EXISTS test27759 ; CREATE PROCEDURE test27759() BEGIN From 3962e2d47271aee3a0e115145767a2cbc25b26f8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 07:49:05 +0200 Subject: [PATCH 086/137] ndb - bug#27437 bug in interpretedupdate (used for auto-increment) that made TUPKEYREF be sent twice this was however "normally" shadowed, but made LQH crash when LCP was about to start mysql-test/r/ndb_basic.result: testcase mysql-test/t/ndb_basic.test: testcase ndb/src/kernel/blocks/dblqh/Dblqh.hpp: add extra variable to make sure TUPKEYREF is not received twice (VM_TRACE) ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: add extra variable to make sure TUPKEYREF is not received twice (VM_TRACE) ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: make sure TUPKEYREF is not sent twice in case of "error" in interpreted program --- mysql-test/r/ndb_basic.result | 6 ++++++ mysql-test/t/ndb_basic.test | 15 +++++++++++++++ ndb/src/kernel/blocks/dblqh/Dblqh.hpp | 3 +++ ndb/src/kernel/blocks/dblqh/DblqhMain.cpp | 17 +++++++++++++++++ ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp | 6 +++++- 5 files changed, 46 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result index 09c4f9b29f9..91427701c05 100644 --- a/mysql-test/r/ndb_basic.result +++ b/mysql-test/r/ndb_basic.result @@ -667,6 +667,12 @@ counter datavalue 57 newval 58 newval drop table t1; +create table t1 (a int primary key auto_increment) engine = ndb; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +insert into t1(a) values (20),(28); +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +insert into t1() values (21), (22); +drop table t1; CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; select * from t1; b diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test index 5d79d5eb9f9..5b13eab546e 100644 --- a/mysql-test/t/ndb_basic.test +++ b/mysql-test/t/ndb_basic.test @@ -606,6 +606,21 @@ select * from t1 order by counter; drop table t1; +# +# bug#27437 +connection con1; +create table t1 (a int primary key auto_increment) engine = ndb; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +connection con2; +insert into t1(a) values (20),(28); +connection con1; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +connection con2; +insert into t1() values (21), (22); +connection con1; + +drop table t1; + # # BUG#14514 Creating table with packed key fails silently # diff --git a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp index 0691e52d0ee..3c0faff7236 100644 --- a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp +++ b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp @@ -2059,6 +2059,9 @@ public: Uint8 simpleRead; Uint8 seqNoReplica; Uint8 tcNodeFailrec; +#ifdef VM_TRACE + Uint8 tupkeyref; +#endif }; /* p2c: size = 280 bytes */ typedef Ptr TcConnectionrecPtr; diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 5847e1063aa..b8ab0eec902 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -2766,6 +2766,12 @@ void Dblqh::execTUPKEYREF(Signal* signal) tcConnectptr.i = tupKeyRef->userRef; terrorCode = tupKeyRef->errorCode; ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec); + +#ifdef VM_TRACE + ndbrequire(tcConnectptr.p->tupkeyref == 0); + tcConnectptr.p->tupkeyref = 1; +#endif + switch (tcConnectptr.p->transactionState) { case TcConnectionrec::WAIT_TUP: jam(); @@ -3331,6 +3337,10 @@ void Dblqh::seizeTcrec() locTcConnectptr.p->tcTimer = cLqhTimeOutCount; locTcConnectptr.p->tableref = RNIL; locTcConnectptr.p->savePointId = 0; +#ifdef VM_TRACE + locTcConnectptr.p->tupkeyref = 0; +#endif + cfirstfreeTcConrec = nextTc; tcConnectptr = locTcConnectptr; locTcConnectptr.p->connectState = TcConnectionrec::CONNECTED; @@ -5861,6 +5871,10 @@ void Dblqh::completeUnusualLab(Signal* signal) void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr) { jam(); +#ifdef VM_TRACE + locTcConnectptr.p->tupkeyref = 0; +#endif + locTcConnectptr.p->tcTimer = 0; locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED; locTcConnectptr.p->nextTcConnectrec = cfirstfreeTcConrec; @@ -5883,6 +5897,9 @@ void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr) void Dblqh::releaseTcrecLog(Signal* signal, TcConnectionrecPtr locTcConnectptr) { jam(); +#ifdef VM_TRACE + locTcConnectptr.p->tupkeyref = 0; +#endif locTcConnectptr.p->tcTimer = 0; locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED; locTcConnectptr.p->nextTcConnectrec = cfirstfreeTcConrec; diff --git a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 15ce54e594c..a94d2f70343 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -1139,7 +1139,11 @@ Dbtup::updateStartLab(Signal* signal, regOperPtr->attrinbufLen); } else { jam(); - retValue = interpreterStartLab(signal, pagePtr, regOperPtr->pageOffset); + if (interpreterStartLab(signal, pagePtr, regOperPtr->pageOffset) == -1) + { + jam(); + return -1; + } }//if if (retValue == -1) { From 4fbd484ed5e7010559639b0607532259719c9c11 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 11:42:40 +0500 Subject: [PATCH 087/137] warning eliminated --- sql/item_func.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/item_func.cc b/sql/item_func.cc index 33521edbbd4..7e820358ff9 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2371,7 +2371,7 @@ longlong Item_func_min_max::val_int() longlong value=0; if (compare_as_dates) { - ulonglong result; + ulonglong result= 0; (void)cmp_datetimes(&result); return (longlong)result; } @@ -2400,7 +2400,7 @@ my_decimal *Item_func_min_max::val_decimal(my_decimal *dec) if (compare_as_dates) { - ulonglong value; + ulonglong value= 0; (void)cmp_datetimes(&value); ulonglong2decimal(value, dec); return dec; From ed9474993de9b073225d33020e2864d67a065a24 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 09:09:25 +0200 Subject: [PATCH 088/137] Bug #27792 query cache returns wrong result, with certain system variables - Queries in the query cache are identified by the individual characters in the query statement, the current database and the current environment expressed as a set of system variable flags. - Since the set of environment flags didn't properly describe the current environment unexpected results were returned from the query cache. - Query cache is now cleared when the variable ft_boolean_syntax is updated. - An identification flag for the variable default_week_format is added to the query cache record. Thanks to Martin Friebe who has supplied significant parts of this patch. mysql-test/r/query_cache.result: Added test case mysql-test/t/query_cache.test: Added test case sql/mysql_priv.h: - Added missing flags to reflect the significant local environment settings of the cached query. sql/set_var.cc: - Added query cache flush when system variable ft_boolean_syntax is updated since this also invalidates all cached result sets using this variable. sql/sql_cache.cc: - Added another local system variable as an identification flag for cached queries. --- mysql-test/r/query_cache.result | 52 +++++++++++++++++++++++++++++++++ mysql-test/t/query_cache.test | 46 +++++++++++++++++++++++++++++ sql/mysql_priv.h | 1 + sql/set_var.cc | 8 +++-- sql/sql_cache.cc | 2 ++ 5 files changed, 107 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 24363ea27ab..4d0c262898b 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1008,3 +1008,55 @@ Variable_name Value Qcache_hits 1 drop table t1; set GLOBAL query_cache_size=0; +create table t1 (a int); +insert into t1 values (1),(2),(3); +set GLOBAL query_cache_type=1; +set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_min_res_unit=0; +set GLOBAL query_cache_size= 100000; +reset query cache; +set LOCAL default_week_format = 0; +select week('2007-01-04'); +week('2007-01-04') +0 +select week('2007-01-04') from t1; +week('2007-01-04') +0 +0 +0 +set LOCAL default_week_format = 2; +select week('2007-01-04'); +week('2007-01-04') +53 +select week('2007-01-04') from t1; +week('2007-01-04') +53 +53 +53 +drop table t1; +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), +('Full-text indexes', 'are called collections'), +('Only MyISAM tables','support collections'), +('Function MATCH ... AGAINST()','is used to do a search'), +('Full-text search in MySQL', 'implements vector space model'); +set GLOBAL ft_boolean_syntax='+ -><()~*:""&|'; +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; +a b x +MySQL has now support for full-text search 0 +Full-text indexes are called collections 1 +Only MyISAM tables support collections 0 +Function MATCH ... AGAINST() is used to do a search 0 +Full-text search in MySQL implements vector space model 0 +set GLOBAL ft_boolean_syntax='- +><()~*:""&|'; +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; +a b x +MySQL has now support for full-text search 0 +Full-text indexes are called collections 0 +Only MyISAM tables support collections 0 +Function MATCH ... AGAINST() is used to do a search 0 +Full-text search in MySQL implements vector space model 0 +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size=default; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 3140739309e..d447df9187b 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -729,4 +729,50 @@ drop table t1; set GLOBAL query_cache_size=0; +# +# Bug #27792 query cache returns wrong result, with certain system variables +# + +create table t1 (a int); +insert into t1 values (1),(2),(3); +set GLOBAL query_cache_type=1; +set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_min_res_unit=0; +set GLOBAL query_cache_size= 100000; + +# default_week_format +reset query cache; +set LOCAL default_week_format = 0; +select week('2007-01-04'); +select week('2007-01-04') from t1; + +set LOCAL default_week_format = 2; +select week('2007-01-04'); +select week('2007-01-04') from t1; + +drop table t1; + +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), + ('Full-text indexes', 'are called collections'), + ('Only MyISAM tables','support collections'), + ('Function MATCH ... AGAINST()','is used to do a search'), + ('Full-text search in MySQL', 'implements vector space model'); + + +set GLOBAL ft_boolean_syntax='+ -><()~*:""&|'; + +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; + +# swap +/- +set GLOBAL ft_boolean_syntax='- +><()~*:""&|'; + +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; + +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size=default; + + # End of 4.1 tests diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index e5ac91e1814..6bd60280399 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -426,6 +426,7 @@ struct Query_cache_query_flags ulong sql_mode; ulong max_sort_length; ulong group_concat_max_len; + ulong default_week_format; MY_LOCALE *lc_time_names; }; #define QUERY_CACHE_FLAGS_SIZE sizeof(Query_cache_query_flags) diff --git a/sql/set_var.cc b/sql/set_var.cc index 57bb93ef4b1..520ee5c9f70 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -490,7 +490,7 @@ static sys_var_rand_seed1 sys_rand_seed1("rand_seed1"); static sys_var_rand_seed2 sys_rand_seed2("rand_seed2"); static sys_var_thd_ulong sys_default_week_format("default_week_format", - &SV::default_week_format); + &SV::default_week_format); sys_var_thd_ulong sys_group_concat_max_len("group_concat_max_len", &SV::group_concat_max_len); @@ -992,7 +992,6 @@ bool update_sys_var_str(sys_var_str *var_str, rw_lock_t *var_mutex, return 0; } - static bool sys_update_init_connect(THD *thd, set_var *var) { return update_sys_var_str(&sys_init_connect, &LOCK_sys_init_connect, var); @@ -1032,6 +1031,11 @@ static bool sys_update_ftb_syntax(THD *thd, set_var * var) { strmake(ft_boolean_syntax, var->value->str_value.c_ptr(), sizeof(ft_boolean_syntax)-1); + +#ifdef HAVE_QUERY_CACHE + query_cache.flush(); +#endif /* HAVE_QUERY_CACHE */ + return 0; } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index fc03e03dee7..ee26bda3307 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -813,6 +813,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.sql_mode= thd->variables.sql_mode; flags.max_sort_length= thd->variables.max_sort_length; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.default_week_format= thd->variables.default_week_format; flags.lc_time_names= thd->variables.lc_time_names; STRUCT_LOCK(&structure_guard_mutex); @@ -1016,6 +1017,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) flags.sql_mode= thd->variables.sql_mode; flags.max_sort_length= thd->variables.max_sort_length; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.default_week_format= thd->variables.default_week_format; flags.lc_time_names= thd->variables.lc_time_names; memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), &flags, QUERY_CACHE_FLAGS_SIZE); From 3a065ffa2672165419a3e2c9b8e65e509019c8d2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 11:16:41 +0200 Subject: [PATCH 089/137] Raise version number after cloning 5.1.18-beta --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 1b477ac13ce..6a3e882fc81 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.18-beta) +AM_INIT_AUTOMAKE(mysql, 5.1.19-beta) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 From 2c3a4641077264b54f894782170ba58129ee547f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 11:24:07 +0200 Subject: [PATCH 090/137] 4.1 -> 5.0 Manual merge for Bug #27792 mysql-test/r/query_cache.result: Added 5.0 testcase mysql-test/t/query_cache.test: Added 5.0 test case sql/mysql_priv.h: Added support for div_precision_increment sql/set_var.cc: - Added query cache flush when system variable ft_boolean_syntax is updated since this also invalidates all cached result sets using this variable. sql/sql_cache.cc: - Added the local system variable div_precision_increment as an identification flag for cached queries. --- mysql-test/r/query_cache.result | 94 +++++++++++++++++++++++++++++++++ mysql-test/t/query_cache.test | 72 +++++++++++++++++++++++++ sql/mysql_priv.h | 1 + sql/set_var.cc | 5 ++ sql/sql_cache.cc | 19 +++++-- 5 files changed, 186 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index d77745176f7..3be2a388860 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1321,3 +1321,97 @@ insert into t1(c1) select c1 from v1; drop table t1, t2, t3; drop view v1; set global query_cache_size=0; +create table t1 (a int); +insert into t1 values (1),(2),(3); +set GLOBAL query_cache_type=1; +set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_min_res_unit=0; +set GLOBAL query_cache_size= 100000; +reset query cache; +set LOCAL default_week_format = 0; +select week('2007-01-04'); +week('2007-01-04') +0 +select week('2007-01-04') from t1; +week('2007-01-04') +0 +0 +0 +select extract(WEEK FROM '2007-01-04') from t1; +extract(WEEK FROM '2007-01-04') +0 +0 +0 +set LOCAL default_week_format = 2; +select week('2007-01-04'); +week('2007-01-04') +53 +select week('2007-01-04') from t1; +week('2007-01-04') +53 +53 +53 +select extract(WEEK FROM '2007-01-04') from t1; +extract(WEEK FROM '2007-01-04') +53 +53 +53 +reset query cache; +set LOCAL div_precision_increment=2; +select 1/7; +1/7 +0.14 +select 1/7 from t1; +1/7 +0.14 +0.14 +0.14 +set LOCAL div_precision_increment=4; +select 1/7; +1/7 +0.1429 +select 1/7 from t1; +1/7 +0.1429 +0.1429 +0.1429 +drop table t1; +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), +('Full-text indexes', 'are called collections'), +('Only MyISAM tables','support collections'), +('Function MATCH ... AGAINST()','is used to do a search'), +('Full-text search in MySQL', 'implements vector space model'); +set GLOBAL ft_boolean_syntax='+ -><()~*:""&|'; +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; +a b x +MySQL has now support for full-text search 0 +Full-text indexes are called collections 1 +Only MyISAM tables support collections 0 +Function MATCH ... AGAINST() is used to do a search 0 +Full-text search in MySQL implements vector space model 0 +set GLOBAL ft_boolean_syntax='- +><()~*:""&|'; +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; +a b x +MySQL has now support for full-text search 0 +Full-text indexes are called collections 0 +Only MyISAM tables support collections 0 +Function MATCH ... AGAINST() is used to do a search 0 +Full-text search in MySQL implements vector space model 0 +create function change_global() returns integer +begin +set global ft_boolean_syntax='+ -><()~*:""&|'; +return 1; +end| +select *, change_global() from t1; +a b change_global() +MySQL has now support for full-text search 1 +Full-text indexes are called collections 1 +Only MyISAM tables support collections 1 +Function MATCH ... AGAINST() is used to do a search 1 +Full-text search in MySQL implements vector space model 1 +drop function change_global; +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size= default; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 427334805ce..1ef104f820b 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -899,3 +899,75 @@ insert into t1(c1) select c1 from v1; drop table t1, t2, t3; drop view v1; set global query_cache_size=0; + +# +# Query cache and changes to system variables +# + +create table t1 (a int); +insert into t1 values (1),(2),(3); +set GLOBAL query_cache_type=1; +set GLOBAL query_cache_limit=10000; +set GLOBAL query_cache_min_res_unit=0; +set GLOBAL query_cache_size= 100000; + +# default_week_format +reset query cache; +set LOCAL default_week_format = 0; +select week('2007-01-04'); +select week('2007-01-04') from t1; +select extract(WEEK FROM '2007-01-04') from t1; + +set LOCAL default_week_format = 2; +select week('2007-01-04'); +select week('2007-01-04') from t1; +select extract(WEEK FROM '2007-01-04') from t1; + +# div_precision_increment +reset query cache; +set LOCAL div_precision_increment=2; +select 1/7; +select 1/7 from t1; + +set LOCAL div_precision_increment=4; +select 1/7; +select 1/7 from t1; + +drop table t1; + +CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)); +INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), + ('Full-text indexes', 'are called collections'), + ('Only MyISAM tables','support collections'), + ('Function MATCH ... AGAINST()','is used to do a search'), + ('Full-text search in MySQL', 'implements vector space model'); + + +set GLOBAL ft_boolean_syntax='+ -><()~*:""&|'; + +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; + +# swap +/- +set GLOBAL ft_boolean_syntax='- +><()~*:""&|'; + +select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t1; + +# If in the future we need to cache queries with functions +# be sure not to cause dead lock if the query cache is flushed +# while inserting a query in the query cache. +delimiter |; +create function change_global() returns integer +begin + set global ft_boolean_syntax='+ -><()~*:""&|'; + return 1; +end| +delimiter ;| +select *, change_global() from t1; +drop function change_global; + +set GLOBAL query_cache_type=default; +set GLOBAL query_cache_limit=default; +set GLOBAL query_cache_min_res_unit=default; +set GLOBAL query_cache_size= default; + +# End of 5.0 tests diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index f5b22c2d004..f73b0c6cd01 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -643,6 +643,7 @@ struct Query_cache_query_flags ulong max_sort_length; ulong group_concat_max_len; ulong default_week_format; + ulong div_precision_increment; MY_LOCALE *lc_time_names; }; #define QUERY_CACHE_FLAGS_SIZE sizeof(Query_cache_query_flags) diff --git a/sql/set_var.cc b/sql/set_var.cc index c7eddcdd317..1952ae9e7c6 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1200,6 +1200,11 @@ static bool sys_update_ftb_syntax(THD *thd, set_var * var) { strmake(ft_boolean_syntax, var->value->str_value.c_ptr(), sizeof(ft_boolean_syntax)-1); + +#ifdef HAVE_QUERY_CACHE + query_cache.flush(); +#endif /* HAVE_QUERY_CACHE */ + return 0; } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 795711b34d8..96a8dc577df 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -865,10 +865,12 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.max_sort_length= thd->variables.max_sort_length; flags.lc_time_names= thd->variables.lc_time_names; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.div_precision_increment= thd->variables.div_precincrement; + flags.default_week_format= thd->variables.default_week_format; DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ -sql mode: 0x%lx, sort len: %lu, conncat len: %lu", - (int)flags.client_long_flag, +sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ +def_week_frmt: %lu", (int)flags.client_protocol_41, (int)flags.more_results_exists, flags.pkt_nr, @@ -879,7 +881,9 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu", (ulong) flags.time_zone, flags.sql_mode, flags.max_sort_length, - flags.group_concat_max_len)); + flags.group_concat_max_len, + flags.div_precision_increment, + flags.default_week_format)); /* Make InnoDB to release the adaptive hash index latch before acquiring the query cache mutex. @@ -1107,10 +1111,13 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) flags.sql_mode= thd->variables.sql_mode; flags.max_sort_length= thd->variables.max_sort_length; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.div_precision_increment= thd->variables.div_precincrement; + flags.default_week_format= thd->variables.default_week_format; flags.lc_time_names= thd->variables.lc_time_names; DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ -sql mode: 0x%lx, sort len: %lu, conncat len: %lu", +sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ +def_week_frmt: %lu", (int)flags.client_long_flag, (int)flags.client_protocol_41, (int)flags.more_results_exists, @@ -1122,7 +1129,9 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu", (ulong) flags.time_zone, flags.sql_mode, flags.max_sort_length, - flags.group_concat_max_len)); + flags.group_concat_max_len, + flags.div_precision_increment, + flags.default_week_format)); memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), &flags, QUERY_CACHE_FLAGS_SIZE); query_block = (Query_cache_block *) hash_search(&queries, (byte*) sql, From 0f67bfba50e1088cc1be1a016c1e75e05ac7bbf0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 11:56:47 +0200 Subject: [PATCH 091/137] Corrected test case for 5.1 requirements --- mysql-test/r/query_cache.result | 2 +- mysql-test/t/query_cache.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 991270670fe..8fe57a65668 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1426,7 +1426,7 @@ Full-text indexes are called collections 0 Only MyISAM tables support collections 0 Function MATCH ... AGAINST() is used to do a search 0 Full-text search in MySQL implements vector space model 0 -create function change_global() returns integer +create function change_global() returns integer deterministic begin set global ft_boolean_syntax='+ -><()~*:""&|'; return 1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index e8919ca4ee5..b878c141546 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -985,7 +985,7 @@ select *, MATCH(a,b) AGAINST("+called +collections" IN BOOLEAN MODE) as x from t # be sure not to cause dead lock if the query cache is flushed # while inserting a query in the query cache. delimiter |; -create function change_global() returns integer +create function change_global() returns integer deterministic begin set global ft_boolean_syntax='+ -><()~*:""&|'; return 1; From c02934a58d77e88005821a483ecbd5fd644e2eb1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 12:53:12 +0200 Subject: [PATCH 092/137] ndb - bug#27437 redo extra verification code so that tupkeyref is reset just before tupkeyreq ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: redo extra verification code so that tupkeyref is reset just before tupkeyreq --- ndb/src/kernel/blocks/dblqh/DblqhMain.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index b8ab0eec902..f4b99e8be2f 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -3338,7 +3338,7 @@ void Dblqh::seizeTcrec() locTcConnectptr.p->tableref = RNIL; locTcConnectptr.p->savePointId = 0; #ifdef VM_TRACE - locTcConnectptr.p->tupkeyref = 0; + locTcConnectptr.p->tupkeyref = 1; #endif cfirstfreeTcConrec = nextTc; @@ -4060,6 +4060,9 @@ void Dblqh::execACCKEYCONF(Signal* signal) tupKeyReq->tcOpIndex = tcConnectptr.p->tcOprec; tupKeyReq->savePointId = tcConnectptr.p->savePointId; +#ifdef VM_TRACE + tcConnectptr.p->tupkeyref = 0; +#endif EXECUTE_DIRECT(tup, GSN_TUPKEYREQ, signal, TupKeyReq::SignalLength); }//Dblqh::execACCKEYCONF() @@ -5872,7 +5875,7 @@ void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr) { jam(); #ifdef VM_TRACE - locTcConnectptr.p->tupkeyref = 0; + locTcConnectptr.p->tupkeyref = 1; #endif locTcConnectptr.p->tcTimer = 0; @@ -5898,7 +5901,7 @@ void Dblqh::releaseTcrecLog(Signal* signal, TcConnectionrecPtr locTcConnectptr) { jam(); #ifdef VM_TRACE - locTcConnectptr.p->tupkeyref = 0; + locTcConnectptr.p->tupkeyref = 1; #endif locTcConnectptr.p->tcTimer = 0; locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED; @@ -8356,8 +8359,11 @@ void Dblqh::nextScanConfLoopLab(Signal* signal) tupKeyReq->tcOpIndex = tcConnectptr.p->tcOprec; tupKeyReq->savePointId = tcConnectptr.p->savePointId; Uint32 blockNo = refToBlock(tcConnectptr.p->tcTupBlockref); +#ifdef VM_TRACE + tcConnectptr.p->tupkeyref = 0; +#endif EXECUTE_DIRECT(blockNo, GSN_TUPKEYREQ, signal, - TupKeyReq::SignalLength); + TupKeyReq::SignalLength); } } @@ -9479,6 +9485,9 @@ void Dblqh::copySendTupkeyReqLab(Signal* signal) tupKeyReq->tcOpIndex = tcConnectptr.p->tcOprec; tupKeyReq->savePointId = tcConnectptr.p->savePointId; Uint32 blockNo = refToBlock(tcConnectptr.p->tcTupBlockref); +#ifdef VM_TRACE + tcConnectptr.p->tupkeyref = 0; +#endif EXECUTE_DIRECT(blockNo, GSN_TUPKEYREQ, signal, TupKeyReq::SignalLength); } From efa9faf2b7da3577b67f7b558b74d6f37d71f471 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 14:59:57 +0200 Subject: [PATCH 093/137] ndb - bug#20535 set null bits on delete+insert storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: set null bits on delete+insert storage/ndb/test/ndbapi/testBasic.cpp: set null bits on delete+insert 20535 storage/ndb/test/run-test/daily-basic-tests.txt: testcase --- .../kernel/blocks/dbtup/DbtupExecQuery.cpp | 10 +++ storage/ndb/test/ndbapi/testBasic.cpp | 89 +++++++++++++++++++ .../ndb/test/run-test/daily-basic-tests.txt | 4 + 3 files changed, 103 insertions(+) diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 91bc346c071..bba894db7fd 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -1198,9 +1198,19 @@ int Dbtup::handleInsertReq(Signal* signal, if(!prevOp->is_first_operation()) org= (Tuple_header*)c_undo_buffer.get_ptr(&prevOp->m_copy_tuple_location); if (regTabPtr->need_expand()) + { expand_tuple(req_struct, sizes, org, regTabPtr, !disk_insert); + memset(req_struct->m_disk_ptr->m_null_bits+ + regTabPtr->m_offsets[DD].m_null_offset, 0xFF, + 4*regTabPtr->m_offsets[DD].m_null_words); + } else + { memcpy(dst, org, 4*regTabPtr->m_offsets[MM].m_fix_header_size); + } + memset(tuple_ptr->m_null_bits+ + regTabPtr->m_offsets[MM].m_null_offset, 0xFF, + 4*regTabPtr->m_offsets[MM].m_null_words); } if (disk_insert) diff --git a/storage/ndb/test/ndbapi/testBasic.cpp b/storage/ndb/test/ndbapi/testBasic.cpp index 705c18b55c0..5086cfc8b5b 100644 --- a/storage/ndb/test/ndbapi/testBasic.cpp +++ b/storage/ndb/test/ndbapi/testBasic.cpp @@ -1398,6 +1398,91 @@ runBug27756(NDBT_Context* ctx, NDBT_Step* step) template class Vector; +int +runBug20535(NDBT_Context* ctx, NDBT_Step* step) +{ + Uint32 i; + Ndb* pNdb = GETNDB(step); + const NdbDictionary::Table * tab = ctx->getTab(); + NdbDictionary::Dictionary * dict = pNdb->getDictionary(); + + bool null = false; + for (i = 0; igetNoOfColumns(); i++) + { + if (tab->getColumn(i)->getNullable()) + { + null = true; + break; + } + } + + if (!null) + return NDBT_OK; + + HugoTransactions hugoTrans(* tab); + hugoTrans.loadTable(pNdb, 1); + + NdbTransaction* pTrans = pNdb->startTransaction(); + NdbOperation* pOp = pTrans->getNdbOperation(tab->getName()); + pOp->deleteTuple(); + hugoTrans.equalForRow(pOp, 0); + if (pTrans->execute(NoCommit) != 0) + return NDBT_FAILED; + + pOp = pTrans->getNdbOperation(tab->getName()); + pOp->insertTuple(); + hugoTrans.equalForRow(pOp, 0); + for (i = 0; igetNoOfColumns(); i++) + { + if (!tab->getColumn(i)->getPrimaryKey() && + !tab->getColumn(i)->getNullable()) + { + hugoTrans.setValueForAttr(pOp, i, 0, 1); + } + } + + if (pTrans->execute(Commit) != 0) + return NDBT_FAILED; + + pTrans->close(); + + pTrans = pNdb->startTransaction(); + pOp = pTrans->getNdbOperation(tab->getName()); + pOp->readTuple(); + hugoTrans.equalForRow(pOp, 0); + Vector values; + for (i = 0; igetNoOfColumns(); i++) + { + if (!tab->getColumn(i)->getPrimaryKey() && + tab->getColumn(i)->getNullable()) + { + values.push_back(pOp->getValue(i)); + } + } + + if (pTrans->execute(Commit) != 0) + return NDBT_FAILED; + + null = true; + for (i = 0; iisNULL()) + { + null = false; + ndbout_c("column %s is not NULL", values[i]->getColumn()->getName()); + } + } + + pTrans->close(); + + if (null) + return NDBT_OK; + else + return NDBT_FAILED; +} + +template class Vector; + NDBT_TESTSUITE(testBasic); TESTCASE("PkInsert", "Verify that we can insert and delete from this table using PK" @@ -1676,6 +1761,10 @@ TESTCASE("Bug27756", "Verify what happens when we fill the db" ){ STEP(runBug27756); } +TESTCASE("Bug20535", + "Verify what happens when we fill the db" ){ + STEP(runBug20535); +} NDBT_TESTSUITE_END(testBasic); #if 0 diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt index 203ba4145ec..7d6830f0673 100644 --- a/storage/ndb/test/run-test/daily-basic-tests.txt +++ b/storage/ndb/test/run-test/daily-basic-tests.txt @@ -243,6 +243,10 @@ max-time: 500 cmd: testBasic args: -n Bug28073 +max-time: 500 +cmd: testBasic +args: -n Bug20535 + max-time: 500 cmd: testIndex args: -n Bug25059 -r 3000 T1 From e9315793229d8b7bedc31f1bb0a9a0d586e9a7f0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 18:30:03 +0200 Subject: [PATCH 094/137] increate hearbeat interval to avoid load related start up issues in mysql-test-run --- mysql-test/ndb/ndb_config_1_node.ini | 4 +++- mysql-test/ndb/ndb_config_2_node.ini | 4 +++- mysql-test/ndb/ndb_config_4_node.ini | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql-test/ndb/ndb_config_1_node.ini b/mysql-test/ndb/ndb_config_1_node.ini index 7b0d2829530..68533396930 100644 --- a/mysql-test/ndb/ndb_config_1_node.ini +++ b/mysql-test/ndb/ndb_config_1_node.ini @@ -13,9 +13,11 @@ TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 # -# Increase deadlock-timeout to cater for slow test-machines +# Increase timeouts to cater for slow test-machines # (possibly running several tests in parallell) # +HeartbeatIntervalDbDb= 30000 +HeartbeatIntervalDbApi= 30000 #TransactionDeadlockDetectionTimeout= 7500 [ndbd] diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index aafed28dbc6..55c9c285310 100644 --- a/mysql-test/ndb/ndb_config_2_node.ini +++ b/mysql-test/ndb/ndb_config_2_node.ini @@ -13,9 +13,11 @@ TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 # -# Increase deadlock-timeout to cater for slow test-machines +# Increase timeouts to cater for slow test-machines # (possibly running several tests in parallell) # +HeartbeatIntervalDbDb= 30000 +HeartbeatIntervalDbApi= 30000 #TransactionDeadlockDetectionTimeout= 7500 [ndbd] diff --git a/mysql-test/ndb/ndb_config_4_node.ini b/mysql-test/ndb/ndb_config_4_node.ini index 2154475aa37..779432e1660 100644 --- a/mysql-test/ndb/ndb_config_4_node.ini +++ b/mysql-test/ndb/ndb_config_4_node.ini @@ -13,9 +13,11 @@ TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 # -# Increase deadlock-timeout to cater for slow test-machines +# Increase timeouts to cater for slow test-machines # (possibly running several tests in parallell) # +HeartbeatIntervalDbDb= 30000 +HeartbeatIntervalDbApi= 30000 #TransactionDeadlockDetectionTimeout= 7500 [ndbd] From f01f1938aa920b0299c5ca03a8c48545b69af123 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 19:03:33 +0200 Subject: [PATCH 095/137] increase heartbeat interval to avoid load related start up issues in mysql-test-run BitKeeper/etc/ignore: Added libmysqld/ha_ndbcluster_cond.cc to the ignore list --- .bzrignore | 1 + mysql-test/ndb/ndb_config_1_node.ini | 5 +++-- mysql-test/ndb/ndb_config_4_node.ini | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.bzrignore b/.bzrignore index 70d966f9ccc..12555768e30 100644 --- a/.bzrignore +++ b/.bzrignore @@ -2989,3 +2989,4 @@ win/vs71cache.txt win/vs8cache.txt zlib/*.ds? zlib/*.vcproj +libmysqld/ha_ndbcluster_cond.cc diff --git a/mysql-test/ndb/ndb_config_1_node.ini b/mysql-test/ndb/ndb_config_1_node.ini index 39e758493c8..68533396930 100644 --- a/mysql-test/ndb/ndb_config_1_node.ini +++ b/mysql-test/ndb/ndb_config_1_node.ini @@ -11,12 +11,13 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 -DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory # -# Increase deadlock-timeout to cater for slow test-machines +# Increase timeouts to cater for slow test-machines # (possibly running several tests in parallell) # +HeartbeatIntervalDbDb= 30000 +HeartbeatIntervalDbApi= 30000 #TransactionDeadlockDetectionTimeout= 7500 [ndbd] diff --git a/mysql-test/ndb/ndb_config_4_node.ini b/mysql-test/ndb/ndb_config_4_node.ini index 94d58bd8efc..779432e1660 100644 --- a/mysql-test/ndb/ndb_config_4_node.ini +++ b/mysql-test/ndb/ndb_config_4_node.ini @@ -11,12 +11,13 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 -DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory # -# Increase deadlock-timeout to cater for slow test-machines +# Increase timeouts to cater for slow test-machines # (possibly running several tests in parallell) # +HeartbeatIntervalDbDb= 30000 +HeartbeatIntervalDbApi= 30000 #TransactionDeadlockDetectionTimeout= 7500 [ndbd] From 738b2dd836a941b2702c20f79371af61213b0f6f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 19:07:36 +0200 Subject: [PATCH 096/137] correcting previous commit --- mysql-test/ndb/ndb_config_1_node.ini | 1 + mysql-test/ndb/ndb_config_4_node.ini | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql-test/ndb/ndb_config_1_node.ini b/mysql-test/ndb/ndb_config_1_node.ini index 68533396930..787bf82d391 100644 --- a/mysql-test/ndb/ndb_config_1_node.ini +++ b/mysql-test/ndb/ndb_config_1_node.ini @@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 +DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory # # Increase timeouts to cater for slow test-machines diff --git a/mysql-test/ndb/ndb_config_4_node.ini b/mysql-test/ndb/ndb_config_4_node.ini index 779432e1660..d7c66cf177a 100644 --- a/mysql-test/ndb/ndb_config_4_node.ini +++ b/mysql-test/ndb/ndb_config_4_node.ini @@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes TimeBetweenGlobalCheckpoints= 500 NoOfFragmentLogFiles= 3 +DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory # # Increase timeouts to cater for slow test-machines From a15fe8d972c7feb1c8eb940f8cd43c75f1256896 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 May 2007 22:28:24 +0400 Subject: [PATCH 097/137] item_cmpfunc.cc, type_datetime.result, type_datetime.test, item_cmpfunc.h: After merge fix. sql/item_cmpfunc.cc: After merge fix. sql/item_cmpfunc.h: After merge fix. mysql-test/r/type_datetime.result: After merge fix. mysql-test/t/type_datetime.test: After merge fix. --- mysql-test/r/type_datetime.result | 4 +- mysql-test/t/type_datetime.test | 2 +- sql/item_cmpfunc.cc | 208 +++++++++++++++--------------- sql/item_cmpfunc.h | 34 +---- 4 files changed, 110 insertions(+), 138 deletions(-) diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index e2350a13e46..e1be32aa7eb 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -328,8 +328,8 @@ least(cast('01-01-01' as datetime), '01-01-02') + 0 select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); cast(least(cast('01-01-01' as datetime), '01-01-02') as signed) 20010101000000 -select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal); -cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal) +select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(16,2)); +cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(16,2)) 20010101000000.00 DROP PROCEDURE IF EXISTS test27759 ; CREATE PROCEDURE test27759() diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index f434d5b77e4..7689f16baa4 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -207,7 +207,7 @@ select least(cast('01-01-01' as date), '01-01-02') + 0; select greatest(cast('01-01-01' as date), '01-01-02') + 0; select least(cast('01-01-01' as datetime), '01-01-02') + 0; select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); -select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal); +select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(16,2)); --disable_warnings DROP PROCEDURE IF EXISTS test27759 ; --enable_warnings diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 010380dc62d..2e6081ba5f8 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -3238,7 +3238,13 @@ void Item_func_in::fix_length_and_dec() /* TRUE <=> arguments values will be compared as DATETIMEs. */ bool compare_as_datetime= FALSE; Item *date_arg= 0; - + uint found_types= 0; + uint type_cnt= 0, i; + Item_result cmp_type= STRING_RESULT; + left_result_type= args[0]->result_type(); + if (!(found_types= collect_cmp_types(args, arg_count))) + return; + for (arg= args + 1, arg_end= args + arg_count; arg != arg_end ; arg++) { if (!arg[0]->const_item()) @@ -3247,87 +3253,6 @@ void Item_func_in::fix_length_and_dec() break; } } - /* - When comparing rows create the row comparator object beforehand to ease - the DATETIME comparison detection procedure. - */ - if (cmp_type == ROW_RESULT) - { - cmp_item_row *cmp= 0; - if (const_itm && !nulls_in_row()) - { - array= new in_row(arg_count-1, 0); - cmp= &((in_row*)array)->tmp; - } - else - { - if (!(cmp= new cmp_item_row)) - return; - in_item= cmp; - } - cmp->n= args[0]->cols(); - cmp->alloc_comparators(); - } - /* All DATE/DATETIME fields/functions has the STRING result type. */ - if (cmp_type == STRING_RESULT || cmp_type == ROW_RESULT) - { - uint col, cols= args[0]->cols(); - - for (col= 0; col < cols; col++) - { - bool skip_column= FALSE; - /* - Check that all items to be compared has the STRING result type and at - least one of them is a DATE/DATETIME item. - */ - for (arg= args, arg_end= args + arg_count; arg != arg_end ; arg++) - { - Item *itm= ((cmp_type == STRING_RESULT) ? arg[0] : - arg[0]->element_index(col)); - if (itm->result_type() != STRING_RESULT) - { - skip_column= TRUE; - break; - } - else if (itm->is_datetime()) - { - datetime_found= TRUE; - /* - Internally all DATE/DATETIME values are converted to the DATETIME - type. So try to find a DATETIME item to issue correct warnings. - */ - if (!date_arg) - date_arg= itm; - else if (itm->field_type() == MYSQL_TYPE_DATETIME) - { - date_arg= itm; - /* All arguments are already checked to have the STRING result. */ - if (cmp_type == STRING_RESULT) - break; - } - } - } - if (skip_column) - continue; - if (datetime_found) - { - if (cmp_type == ROW_RESULT) - { - cmp_item **cmp= 0; - if (array) - cmp= ((in_row*)array)->tmp.comparators + col; - else - cmp= ((cmp_item_row*)in_item)->comparators + col; - *cmp= new cmp_item_datetime(date_arg); - /* Reset variables for the next column. */ - date_arg= 0; - datetime_found= FALSE; - } - else - compare_as_datetime= TRUE; - } - } - } for (i= 0; i <= (uint)DECIMAL_RESULT; i++) { if (found_types & 1 << i) @@ -3344,7 +3269,90 @@ void Item_func_in::fix_length_and_dec() return; arg_types_compatible= TRUE; } + if (type_cnt == 1) + { + /* + When comparing rows create the row comparator object beforehand to ease + the DATETIME comparison detection procedure. + */ + if (cmp_type == ROW_RESULT) + { + cmp_item_row *cmp= 0; + if (const_itm && !nulls_in_row()) + { + array= new in_row(arg_count-1, 0); + cmp= &((in_row*)array)->tmp; + } + else + { + if (!(cmp= new cmp_item_row)) + return; + cmp_items[ROW_RESULT]= cmp; + } + cmp->n= args[0]->cols(); + cmp->alloc_comparators(); + } + /* All DATE/DATETIME fields/functions has the STRING result type. */ + if (cmp_type == STRING_RESULT || cmp_type == ROW_RESULT) + { + uint col, cols= args[0]->cols(); + for (col= 0; col < cols; col++) + { + bool skip_column= FALSE; + /* + Check that all items to be compared has the STRING result type and at + least one of them is a DATE/DATETIME item. + */ + for (arg= args, arg_end= args + arg_count; arg != arg_end ; arg++) + { + Item *itm= ((cmp_type == STRING_RESULT) ? arg[0] : + arg[0]->element_index(col)); + if (itm->result_type() != STRING_RESULT) + { + skip_column= TRUE; + break; + } + else if (itm->is_datetime()) + { + datetime_found= TRUE; + /* + Internally all DATE/DATETIME values are converted to the DATETIME + type. So try to find a DATETIME item to issue correct warnings. + */ + if (!date_arg) + date_arg= itm; + else if (itm->field_type() == MYSQL_TYPE_DATETIME) + { + date_arg= itm; + /* All arguments are already checked to have the STRING result. */ + if (cmp_type == STRING_RESULT) + break; + } + } + } + if (skip_column) + continue; + if (datetime_found) + { + if (cmp_type == ROW_RESULT) + { + cmp_item **cmp= 0; + if (array) + cmp= ((in_row*)array)->tmp.comparators + col; + else + cmp= ((cmp_item_row*)cmp_items[ROW_RESULT])->comparators + col; + *cmp= new cmp_item_datetime(date_arg); + /* Reset variables for the next column. */ + date_arg= 0; + datetime_found= FALSE; + } + else + compare_as_datetime= TRUE; + } + } + } + } /* Row item with NULLs inside can return NULL or FALSE => they can't be processed as static @@ -3424,33 +3432,25 @@ void Item_func_in::fix_length_and_dec() } else { - if (in_item) - { - /* - The row comparator was created at the beginning but only DATETIME - items comparators were initialized. Call store_value() to setup - others. - */ - in_item->store_value(args[0]); - } - else if (compare_as_datetime) - in_item= new cmp_item_datetime(date_arg); + if (compare_as_datetime) + cmp_items[STRING_RESULT]= new cmp_item_datetime(date_arg); else { - for (i= 0; i <= (uint) DECIMAL_RESULT; i++) - { - if (found_types & (1 << i) && !cmp_items[i]) + for (i= 0; i <= (uint) DECIMAL_RESULT; i++) { - if ((Item_result)i == STRING_RESULT && - agg_arg_charsets(cmp_collation, args, arg_count, MY_COLL_CMP_CONV, 1)) - return; - if (!(cmp_items[i]= - cmp_item::get_comparator((Item_result)i, - cmp_collation.collation))) - return; + if (found_types & (1 << i) && !cmp_items[i]) + { + if ((Item_result)i == STRING_RESULT && + agg_arg_charsets(cmp_collation, args, arg_count, + MY_COLL_CMP_CONV, 1)) + return; + if (!cmp_items[i] && !(cmp_items[i]= + cmp_item::get_comparator((Item_result)i, + cmp_collation.collation))) + return; + } } } - } } max_length= 1; } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 2f45fcfb23b..8db962a4e2c 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -1186,7 +1186,7 @@ public: */ bool arg_types_compatible; Item_result left_result_type; - cmp_item *cmp_items[5]; /* One cmp_item for each result type */ + cmp_item *cmp_items[6]; /* One cmp_item for each result type */ DTCollation cmp_collation; Item_func_in(List &list) @@ -1207,7 +1207,7 @@ public: Item_int_func::cleanup(); delete array; array= 0; - for (i= 0; i <= (uint)DECIMAL_RESULT; i++) + for (i= 0; i <= (uint)DECIMAL_RESULT + 1; i++) { delete cmp_items[i]; cmp_items[i]= 0; @@ -1251,35 +1251,7 @@ public: void set(uint pos,Item *item); byte *get_value(Item *item); friend void Item_func_in::fix_length_and_dec(); - Item_resul result_type() { return ROW_RESULT; }; -}; - -class cmp_item_row :public cmp_item -{ - cmp_item **comparators; - uint n; -public: - cmp_item_row(): comparators(0), n(0) {} - ~cmp_item_row(); - void store_value(Item *item); - inline void alloc_comparators(); - int cmp(Item *arg); - int compare(cmp_item *arg); - cmp_item *make_same(); - void store_value_by_template(cmp_item *tmpl, Item *); - friend void Item_func_in::fix_length_and_dec(); -}; - - -class in_row :public in_vector -{ - cmp_item_row tmp; -public: - in_row(uint elements, Item *); - ~in_row(); - void set(uint pos,Item *item); - byte *get_value(Item *item); - friend void Item_func_in::fix_length_and_dec(); + Item_result result_type() { return ROW_RESULT; }; }; /* Functions used by where clause */ From 80788a3462c18d5c603ee4badb2c51e7f87205ae Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 00:23:16 +0400 Subject: [PATCH 098/137] Bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a TIMESTAMP field when no value has been provided. The LOAD DATA sets the current time in the TIMESTAMP field with CURRENT_TIMESTAMP default value when the field is detected as a null. But when the LOAD DATA command loads data from a file that doesn't contain enough data for all fields then the rest of fields are simply set to null without any check. This leads to no value being inserted to such TIMESTAMP field. Now the read_sep_field() and the read_fixed_length() functions set current time to the TIMESTAMP field with CURRENT_TIMESTAMP default value in all cases when a NULL value is loaded to the field. mysql-test/t/loaddata.test: Added a test case for the bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a TIMESTAMP field when no value has been provided. mysql-test/r/loaddata.result: Added a test case for the bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a TIMESTAMP field when no value has been provided. sql/sql_load.cc: Bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a TIMESTAMP field when no value has been provided. Now the read_sep_field() and the read_fixed_length() functions set current time to the TIMESTAMP field with CURRENT_TIMESTAMP default value in all cases when a NULL value is loaded to the field. --- mysql-test/r/loaddata.result | 19 +++++++++++++++++++ mysql-test/t/loaddata.test | 26 ++++++++++++++++++++++++++ sql/sql_load.cc | 4 ++++ 3 files changed, 49 insertions(+) diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0478e48025f..f66aa78377d 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -165,3 +165,22 @@ f2 2 SET @@SQL_MODE=@OLD_SQL_MODE; drop table t1,t2; +create table t1(f1 int, f2 timestamp not null default current_timestamp); +create table t2(f1 int); +insert into t2 values(1),(2); +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 2 doesn't contain data for all columns +select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +f1 +1 +2 +delete from t1; +Warnings: +Warning 1261 Row 1 doesn't contain data for all columns +Warning 1261 Row 2 doesn't contain data for all columns +select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +f1 +1 +2 +drop table t1,t2; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index e6788cd7798..171479163fe 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -152,4 +152,30 @@ select * from t2; --exec rm $MYSQLTEST_VARDIR/tmp/t1 SET @@SQL_MODE=@OLD_SQL_MODE; drop table t1,t2; + +# +# Bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a +# TIMESTAMP field when no value has been provided. +# +create table t1(f1 int, f2 timestamp not null default current_timestamp); +create table t2(f1 int); +insert into t2 values(1),(2); +disable_query_log; +eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1; +enable_query_log; +select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +--exec rm $MYSQLTEST_VARDIR/tmp/t2 +delete from t1; +disable_query_log; +eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2' +FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n' +FROM t2; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1 +FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; +enable_query_log; +select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +--exec rm $MYSQLTEST_VARDIR/tmp/t2 +drop table t1,t2; + # End of 5.0 tests diff --git a/sql/sql_load.cc b/sql/sql_load.cc index ee6d2d0a572..d14e165a788 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -585,6 +585,8 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_TOO_FEW_RECORDS, ER(ER_WARN_TOO_FEW_RECORDS), thd->row_count); + if (!field->maybe_null() && field->type() == FIELD_TYPE_TIMESTAMP) + ((Field_timestamp*) field)->set_time(); } else { @@ -770,6 +772,8 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, thd->row_count); DBUG_RETURN(1); } + if (!field->maybe_null() && field->type() == FIELD_TYPE_TIMESTAMP) + ((Field_timestamp*) field)->set_time(); /* QQ: We probably should not throw warning for each field. But how about intention to always have the same number From 643cb9b8f30c8028403d5b38d6c6f65cf902e5a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 10:22:26 +0200 Subject: [PATCH 099/137] Bug #28287 Sign problem in test "ndb_restore_print" - some platforms do strange things with char... use Int8 to be sure of signedness --- ndb/include/ndbapi/NdbRecAttr.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp index f5777cdddb3..92cd5706a8d 100644 --- a/ndb/include/ndbapi/NdbRecAttr.hpp +++ b/ndb/include/ndbapi/NdbRecAttr.hpp @@ -164,7 +164,7 @@ public: * * @return Char value. */ - char char_value() const; + Int8 char_value() const; /** * Get value stored in NdbRecAttr object. @@ -340,10 +340,10 @@ NdbRecAttr::short_value() const } inline -char +Int8 NdbRecAttr::char_value() const { - return *(char*)theRef; + return *(Int8*)theRef; } inline From ba9657bcc60270cbda65f3b44933bb92f31c599f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 14:46:11 +0400 Subject: [PATCH 100/137] loaddata.result, loaddata.test: A test case is corrected. mysql-test/t/loaddata.test: A test case is corrected. mysql-test/r/loaddata.result: A test case is corrected. --- mysql-test/r/loaddata.result | 4 ++-- mysql-test/t/loaddata.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index f66aa78377d..a02aaccf8f6 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -171,7 +171,7 @@ insert into t2 values(1),(2); Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 2 doesn't contain data for all columns -select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; f1 1 2 @@ -179,7 +179,7 @@ delete from t1; Warnings: Warning 1261 Row 1 doesn't contain data for all columns Warning 1261 Row 2 doesn't contain data for all columns -select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; f1 1 2 diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 171479163fe..2757a37b881 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -164,7 +164,7 @@ disable_query_log; eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2; eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1; enable_query_log; -select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; --exec rm $MYSQLTEST_VARDIR/tmp/t2 delete from t1; disable_query_log; @@ -174,7 +174,7 @@ FROM t2; eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1 FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'; enable_query_log; -select f1 from t1 where f2 <> '0000-00-00 00:00:00'; +select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; --exec rm $MYSQLTEST_VARDIR/tmp/t2 drop table t1,t2; From a3b65091f0c3bba211460fbff7536b44f5fb6301 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 12:51:37 +0200 Subject: [PATCH 101/137] Bug #27292 restarting a data node makes sql nodes log event buffer status every few seconds --- sql/ha_ndbcluster_binlog.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 25a9ccdcb87..e34421b74d6 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -3808,6 +3808,17 @@ restart: res= i_ndb->pollEvents(tot_poll_wait, &gci); tot_poll_wait= 0; } + else + { + /* + Just consume any events, not used if no binlogging + e.g. node failure events + */ + Uint64 tmp_gci; + if (i_ndb->pollEvents(0, &tmp_gci)) + while (i_ndb->nextEvent()) + ; + } int schema_res= s_ndb->pollEvents(tot_poll_wait, &schema_gci); ndb_latest_received_binlog_epoch= gci; From 82b7c54338a3465790e4e64a647e82b9d7ea59b6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 17:27:14 +0500 Subject: [PATCH 102/137] Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect Missing check for overflow added to the Item_decimal_typecast::val_decimal include/decimal.h: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect decimal_intg() declaration mysql-test/r/cast.result: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect result fixed mysql-test/r/type_newdecimal.result: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect test result mysql-test/t/type_newdecimal.test: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect test case added sql/item_func.cc: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect now we check for possible ovreflow in Item_decimal_typecast::val_decimal sql/my_decimal.h: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect my_decimal_intg() implemented strings/decimal.c: Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect decimal_intg() implemented --- include/decimal.h | 1 + mysql-test/r/cast.result | 4 +++- mysql-test/r/type_newdecimal.result | 35 +++++++++++++++++++++++++++++ mysql-test/t/type_newdecimal.test | 19 ++++++++++++++++ sql/item_func.cc | 23 +++++++++++++++++++ sql/my_decimal.h | 8 +++++++ strings/decimal.c | 8 +++++++ 7 files changed, 97 insertions(+), 1 deletion(-) diff --git a/include/decimal.h b/include/decimal.h index 56962009025..c5385b58658 100644 --- a/include/decimal.h +++ b/include/decimal.h @@ -47,6 +47,7 @@ int decimal_bin_size(int precision, int scale); int decimal_result_size(decimal_t *from1, decimal_t *from2, char op, int param); +int decimal_intg(decimal_t *from); int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to); int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to); int decimal_cmp(decimal_t *from1, decimal_t *from2); diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 454a3766572..c0dab1c3293 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -378,7 +378,9 @@ create table t1(s1 time); insert into t1 values ('11:11:11'); select cast(s1 as decimal(7,2)) from t1; cast(s1 as decimal(7,2)) -111111.00 +99999.99 +Warnings: +Error 1264 Out of range value adjusted for column 'cast(s1 as decimal(7,2))' at row 1 drop table t1; CREATE TABLE t1 (v varchar(10), tt tinytext, t text, mt mediumtext, lt longtext); diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index c103de81bd7..cbcab126439 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1430,4 +1430,39 @@ select * from t1; a 123456789012345678 drop table t1; +select cast(11.1234 as DECIMAL(3,2)); +cast(11.1234 as DECIMAL(3,2)) +9.99 +Warnings: +Error 1264 Out of range value adjusted for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +select * from (select cast(11.1234 as DECIMAL(3,2))) t; +cast(11.1234 as DECIMAL(3,2)) +9.99 +Warnings: +Error 1264 Out of range value adjusted for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +select cast(a as DECIMAL(3,2)) +from (select 11.1233 as a +UNION select 11.1234 +UNION select 12.1234 +) t; +cast(a as DECIMAL(3,2)) +9.99 +9.99 +9.99 +Warnings: +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +select cast(a as DECIMAL(3,2)), count(*) +from (select 11.1233 as a +UNION select 11.1234 +UNION select 12.1234 +) t group by 1; +cast(a as DECIMAL(3,2)) count(*) +9.99 3 +Warnings: +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 End of 5.0 tests diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 4c6098d2121..a7906be79d4 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1130,4 +1130,23 @@ alter table t1 modify column a decimal(19); select * from t1; drop table t1; +# +# Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect +# + +select cast(11.1234 as DECIMAL(3,2)); +select * from (select cast(11.1234 as DECIMAL(3,2))) t; + +select cast(a as DECIMAL(3,2)) + from (select 11.1233 as a + UNION select 11.1234 + UNION select 12.1234 + ) t; + +select cast(a as DECIMAL(3,2)), count(*) + from (select 11.1233 as a + UNION select 11.1234 + UNION select 12.1234 + ) t group by 1; + --echo End of 5.0 tests diff --git a/sql/item_func.cc b/sql/item_func.cc index e761cf7fb43..382e197acfe 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1050,9 +1050,32 @@ longlong Item_decimal_typecast::val_int() my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec) { my_decimal tmp_buf, *tmp= args[0]->val_decimal(&tmp_buf); + bool sign; if ((null_value= args[0]->null_value)) return NULL; my_decimal_round(E_DEC_FATAL_ERROR, tmp, decimals, FALSE, dec); + sign= dec->sign(); + if (unsigned_flag) + { + if (sign) + { + my_decimal_set_zero(dec); + goto err; + } + } + if (max_length - 2 - decimals < (uint) my_decimal_intg(dec)) + { + max_my_decimal(dec, max_length - 2, decimals); + dec->sign(sign); + goto err; + } + return dec; + +err: + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_WARN_DATA_OUT_OF_RANGE, + ER(ER_WARN_DATA_OUT_OF_RANGE), + name, 1); return dec; } diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 45270150d22..731a3bd505c 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -387,5 +387,13 @@ int my_decimal_cmp(const my_decimal *a, const my_decimal *b) return decimal_cmp((decimal_t*) a, (decimal_t*) b); } + +inline +int my_decimal_intg(const my_decimal *a) +{ + return decimal_intg((decimal_t*) a); +} + + #endif /*my_decimal_h*/ diff --git a/strings/decimal.c b/strings/decimal.c index ea92174bfc8..65db68b1b59 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -1911,6 +1911,14 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to) return error; } +int decimal_intg(decimal_t *from) +{ + int res; + dec1 *tmp_res; + tmp_res= remove_leading_zeroes(from, &res); + return res; +} + int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to) { if (likely(from1->sign == from2->sign)) From 7ef22d8d22ee46ca69026563dbdc9bcccf5e7524 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 14:31:22 +0200 Subject: [PATCH 103/137] Bug #28287 Sign problem in test "ndb_restore_print" - corrected previous patch - some platforms do strange things with char... use Int8 to be sure of signedness --- ndb/include/ndbapi/NdbRecAttr.hpp | 32 +++++++++++++++++++++++++++++-- ndb/src/ndbapi/NdbRecAttr.cpp | 6 +++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp index 92cd5706a8d..9679d3995d3 100644 --- a/ndb/include/ndbapi/NdbRecAttr.hpp +++ b/ndb/include/ndbapi/NdbRecAttr.hpp @@ -164,7 +164,14 @@ public: * * @return Char value. */ - Int8 char_value() const; + char char_value() const; + + /** + * Get value stored in NdbRecAttr object. + * + * @return Int8 value. + */ + Int8 int8_value() const; /** * Get value stored in NdbRecAttr object. @@ -201,6 +208,13 @@ public: */ Uint8 u_char_value() const; + /** + * Get value stored in NdbRecAttr object. + * + * @return Uint8 value. + */ + Uint8 u_8_value() const; + /** * Get value stored in NdbRecAttr object. * @@ -340,8 +354,15 @@ NdbRecAttr::short_value() const } inline -Int8 +char NdbRecAttr::char_value() const +{ + return *(char*)theRef; +} + +inline +Int8 +NdbRecAttr::int8_value() const { return *(Int8*)theRef; } @@ -367,6 +388,13 @@ NdbRecAttr::u_char_value() const return *(Uint8*)theRef; } +inline +Uint8 +NdbRecAttr::u_8_value() const +{ + return *(Uint8*)theRef; +} + inline void NdbRecAttr::release() diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp index 996c0256baa..8de163d1c22 100644 --- a/ndb/src/ndbapi/NdbRecAttr.cpp +++ b/ndb/src/ndbapi/NdbRecAttr.cpp @@ -272,7 +272,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r, out << r.u_short_value(); break; case NdbDictionary::Column::Tinyunsigned: - out << (unsigned) r.u_char_value(); + out << (unsigned) r.u_8_value(); break; case NdbDictionary::Column::Bigint: out << r.int64_value(); @@ -287,7 +287,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r, out << r.short_value(); break; case NdbDictionary::Column::Tinyint: - out << (int) r.char_value(); + out << (int) r.int8_value(); break; case NdbDictionary::Column::Binary: if (!f.hex_format) @@ -413,7 +413,7 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r, break; case NdbDictionary::Column::Year: { - uint year = 1900 + r.u_char_value(); + uint year = 1900 + r.u_8_value(); char buf[40]; sprintf(buf, "%04d", year); out << buf; From 198a7991c0738ea4ffbca828aa683020bb6243be Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 May 2007 15:03:01 +0200 Subject: [PATCH 104/137] enable setting api reg req frequency to be higher than heartbeat setting to ensure we have reasonably up-to-date info from ndb nodes + do this for management server --- ndb/src/mgmsrv/MgmtSrvr.cpp | 10 ++++++++++ ndb/src/ndbapi/ClusterMgr.cpp | 13 ++++--------- ndb/src/ndbapi/ClusterMgr.hpp | 2 ++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index 3d7eb5bd4f1..409694fead1 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -627,6 +627,16 @@ MgmtSrvr::start(BaseString &error_string) ndbout_c("This is probably a bug."); } + /* + set api reg req frequency quite high: + + 100 ms interval to make sure we have fairly up-to-date + info from the nodes. This to make sure that this info + is not dependent on heart beat settings in the + configuration + */ + theFacade->theClusterMgr->set_max_api_reg_req_interval(100); + TransporterRegistry *reg = theFacade->get_registry(); for(unsigned int i=0;im_transporter_interface.size();i++) { BaseString msg; diff --git a/ndb/src/ndbapi/ClusterMgr.cpp b/ndb/src/ndbapi/ClusterMgr.cpp index 7ab3ee07197..d3946dddfb7 100644 --- a/ndb/src/ndbapi/ClusterMgr.cpp +++ b/ndb/src/ndbapi/ClusterMgr.cpp @@ -68,6 +68,7 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade): clusterMgrThreadMutex = NdbMutex_Create(); waitForHBCond= NdbCondition_Create(); waitingForHB= false; + m_max_api_reg_req_interval= 0xFFFFFFFF; // MAX_INT noOfAliveNodes= 0; noOfConnectedNodes= 0; theClusterMgrThread= 0; @@ -251,7 +252,7 @@ ClusterMgr::threadMain( ){ * Start of Secure area for use of Transporter */ theFacade.lock_mutex(); - for (int i = 1; i < MAX_NODES; i++){ + for (int i = 1; i < MAX_NDB_NODES; i++){ /** * Send register request (heartbeat) to all available nodes * at specified timing intervals @@ -272,7 +273,8 @@ ClusterMgr::threadMain( ){ } theNode.hbCounter += timeSlept; - if (theNode.hbCounter >= theNode.hbFrequency) { + if (theNode.hbCounter >= m_max_api_reg_req_interval || + theNode.hbCounter >= theNode.hbFrequency) { /** * It is now time to send a new Heartbeat */ @@ -281,13 +283,6 @@ ClusterMgr::threadMain( ){ theNode.hbCounter = 0; } - /** - * If the node is of type REP, - * then the receiver of the signal should be API_CLUSTERMGR - */ - if (theNode.m_info.m_type == NodeInfo::REP) { - signal.theReceiversBlockNumber = API_CLUSTERMGR; - } #ifdef DEBUG_REG ndbout_c("ClusterMgr: Sending API_REGREQ to node %d", (int)nodeId); #endif diff --git a/ndb/src/ndbapi/ClusterMgr.hpp b/ndb/src/ndbapi/ClusterMgr.hpp index f5d84fee01d..467b18f2330 100644 --- a/ndb/src/ndbapi/ClusterMgr.hpp +++ b/ndb/src/ndbapi/ClusterMgr.hpp @@ -50,6 +50,7 @@ public: void startThread(); void forceHB(); + void set_max_api_reg_req_interval(unsigned int millisec) { m_max_api_reg_req_interval = millisec; } private: void threadMain(); @@ -83,6 +84,7 @@ public: Uint32 m_connect_count; private: + Uint32 m_max_api_reg_req_interval; Uint32 noOfAliveNodes; Uint32 noOfConnectedNodes; Node theNodes[MAX_NODES]; From f2a52dd0f021b02177c10443cb1ee6b7ad20281a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 00:17:21 +0500 Subject: [PATCH 105/137] Bug #27921 View ignores precision for CAST() Item_decimal_typecast::print properly implemented mysql-test/r/view.result: Bug #27921 View ignores precision for CAST() test result mysql-test/t/view.test: Bug #27921 View ignores precision for CAST() test case sql/field.cc: zero decimals handling unified sql/item_create.cc: Bug #27921 View ignores precision for CAST() create_func_cast parameters changed, zero precision handling unified sql/item_create.h: Bug #27921 View ignores precision for CAST() create_func_cast parameters changed sql/item_func.cc: Bug #27921 View ignores precision for CAST() Item_decimal_typecast::print properly implemented sql/item_func.h: Bug #27921 View ignores precision for CAST() max_length counting fixed sql/my_decimal.h: Bug #27921 View ignores precision for CAST() my_decimal_trim() implemented to unify zero precision handling sql/sql_yacc.yy: Bug #27921 View ignores precision for CAST() create_func_cast calls simplified --- mysql-test/r/view.result | 15 ++++++++++++++- mysql-test/t/view.test | 12 ++++++++++++ sql/field.cc | 3 +-- sql/item_create.cc | 16 +++++++++++----- sql/item_create.h | 3 ++- sql/item_func.cc | 19 ++++++++++++++++++- sql/item_func.h | 2 +- sql/my_decimal.h | 13 +++++++++++++ sql/sql_yacc.yy | 12 +++--------- 9 files changed, 75 insertions(+), 20 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 70dd6b2550f..8d9d802949d 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1789,7 +1789,7 @@ drop table t1; create view v1 as select cast(1 as decimal); select * from v1; cast(1 as decimal) -1.00 +1 drop view v1; create table t1(f1 int); create table t2(f2 int); @@ -3354,4 +3354,17 @@ id select_type table type possible_keys key key_len ref rows Extra NULL UNION RESULT ALL NULL NULL NULL NULL NULL Using filesort DROP VIEW v1; DROP TABLE t1; +CREATE VIEW v1 AS SELECT CAST( 1.23456789 AS DECIMAL( 7,5 ) ) AS col; +SELECT * FROM v1; +col +1.23457 +DESCRIBE v1; +Field Type Null Key Default Extra +col decimal(7,5) NO 0.00000 +DROP VIEW v1; +CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; +SHOW CREATE VIEW v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(1.23456789 as decimal(8,0)) AS `col` +DROP VIEW v1; End of 5.0 tests. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index e5bf9de13eb..3275ba0a687 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3221,4 +3221,16 @@ EXPLAIN SELECT * FROM t1 UNION SELECT * FROM v1 ORDER BY a; DROP VIEW v1; DROP TABLE t1; +# +# Bug #27921 View ignores precision for CAST() +# +CREATE VIEW v1 AS SELECT CAST( 1.23456789 AS DECIMAL( 7,5 ) ) AS col; +SELECT * FROM v1; +DESCRIBE v1; +DROP VIEW v1; + +CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; +SHOW CREATE VIEW v1; +DROP VIEW v1; + --echo End of 5.0 tests. diff --git a/sql/field.cc b/sql/field.cc index b2def4ca8d2..d2e72371bc1 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -8426,8 +8426,7 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type, case FIELD_TYPE_NULL: break; case FIELD_TYPE_NEWDECIMAL: - if (!fld_length && !decimals) - length= 10; + my_decimal_trim(&length, &decimals); if (length > DECIMAL_MAX_PRECISION) { my_error(ER_TOO_BIG_PRECISION, MYF(0), length, fld_name, diff --git a/sql/item_create.cc b/sql/item_create.cc index c1a81da0285..c4008d36aae 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -445,11 +445,13 @@ Item *create_load_file(Item* a) } -Item *create_func_cast(Item *a, Cast_target cast_type, int len, int dec, +Item *create_func_cast(Item *a, Cast_target cast_type, + const char *c_len, const char *c_dec, CHARSET_INFO *cs) { Item *res; - int tmp_len; + ulong len; + uint dec; LINT_INIT(res); switch (cast_type) { @@ -460,15 +462,18 @@ Item *create_func_cast(Item *a, Cast_target cast_type, int len, int dec, case ITEM_CAST_TIME: res= new Item_time_typecast(a); break; case ITEM_CAST_DATETIME: res= new Item_datetime_typecast(a); break; case ITEM_CAST_DECIMAL: - tmp_len= (len>0) ? len : 10; - if (tmp_len < dec) + len= c_len ? atoi(c_len) : 0; + dec= c_dec ? atoi(c_dec) : 0; + my_decimal_trim(&len, &dec); + if (len < dec) { my_error(ER_M_BIGGER_THAN_D, MYF(0), ""); return 0; } - res= new Item_decimal_typecast(a, tmp_len, dec ? dec : 2); + res= new Item_decimal_typecast(a, len, dec); break; case ITEM_CAST_CHAR: + len= c_len ? atoi(c_len) : -1; res= new Item_char_typecast(a, len, cs ? cs : current_thd->variables.collation_connection); break; @@ -476,6 +481,7 @@ Item *create_func_cast(Item *a, Cast_target cast_type, int len, int dec, return res; } + Item *create_func_is_free_lock(Item* a) { current_thd->lex->uncacheable(UNCACHEABLE_SIDEEFFECT); diff --git a/sql/item_create.h b/sql/item_create.h index 2ff849263c6..46b209b3e49 100644 --- a/sql/item_create.h +++ b/sql/item_create.h @@ -27,7 +27,8 @@ Item *create_func_bit_length(Item* a); Item *create_func_coercibility(Item* a); Item *create_func_ceiling(Item* a); Item *create_func_char_length(Item* a); -Item *create_func_cast(Item *a, Cast_target cast_type, int len, int dec, +Item *create_func_cast(Item *a, Cast_target cast_type, + const char *len, const char *dec, CHARSET_INFO *cs); Item *create_func_connection_id(void); Item *create_func_conv(Item* a, Item *b, Item *c); diff --git a/sql/item_func.cc b/sql/item_func.cc index e761cf7fb43..aa04e4176d6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1059,9 +1059,26 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec) void Item_decimal_typecast::print(String *str) { + char len_buf[20*3 + 1]; + char *end; + CHARSET_INFO *cs= str->charset(); + + uint precision= my_decimal_length_to_precision(max_length, decimals, + unsigned_flag); str->append(STRING_WITH_LEN("cast(")); args[0]->print(str); - str->append(STRING_WITH_LEN(" as decimal)")); + str->append(STRING_WITH_LEN(" as decimal(")); + + end=int10_to_str(precision, len_buf,10); + str->append(len_buf, (uint32) (end - len_buf)); + + str->append(','); + + end=int10_to_str(decimals, len_buf,10); + str->append(len_buf, (uint32) (end - len_buf)); + + str->append(')'); + str->append(')'); } diff --git a/sql/item_func.h b/sql/item_func.h index 952c828b251..597728cea6d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -331,8 +331,8 @@ class Item_decimal_typecast :public Item_func public: Item_decimal_typecast(Item *a, int len, int dec) :Item_func(a) { - max_length= len + 2; decimals= dec; + max_length= my_decimal_precision_to_length(len, dec, unsigned_flag); } String *val_str(String *str); double val_real(); diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 45270150d22..a30dceab19d 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -387,5 +387,18 @@ int my_decimal_cmp(const my_decimal *a, const my_decimal *b) return decimal_cmp((decimal_t*) a, (decimal_t*) b); } + +inline +void my_decimal_trim(ulong *precision, uint *scale) +{ + if (!(*precision) && !(*scale)) + { + *precision= 10; + *scale= 0; + return; + } +} + + #endif /*my_decimal_h*/ diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 4a50a602121..0bb5f6a5e25 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4699,15 +4699,12 @@ simple_expr: | ASCII_SYM '(' expr ')' { $$= new Item_func_ascii($3); } | BINARY simple_expr %prec NEG { - $$= create_func_cast($2, ITEM_CAST_CHAR, -1, 0, &my_charset_bin); + $$= create_func_cast($2, ITEM_CAST_CHAR, NULL, NULL, &my_charset_bin); } | CAST_SYM '(' expr AS cast_type ')' { LEX *lex= Lex; - $$= create_func_cast($3, $5, - lex->length ? atoi(lex->length) : -1, - lex->dec ? atoi(lex->dec) : 0, - lex->charset); + $$= create_func_cast($3, $5, lex->length, lex->dec, lex->charset); if (!$$) MYSQL_YYABORT; } @@ -4715,10 +4712,7 @@ simple_expr: { $$= new Item_func_case(* $3, $2, $4 ); } | CONVERT_SYM '(' expr ',' cast_type ')' { - $$= create_func_cast($3, $5, - Lex->length ? atoi(Lex->length) : -1, - Lex->dec ? atoi(Lex->dec) : 0, - Lex->charset); + $$= create_func_cast($3, $5, Lex->length, Lex->dec, Lex->charset); if (!$$) MYSQL_YYABORT; } From a6da564a1d15925780f45d4bef439d4ae548f70d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 08:14:53 +0500 Subject: [PATCH 106/137] bug 27921 (Views ignore precision for CAST) test result fixed --- mysql-test/r/cast.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 454a3766572..15fa05da384 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -103,7 +103,7 @@ Warnings: Warning 1292 Truncated incorrect DOUBLE value: 'a' select 10.0+cast('a' as decimal); 10.0+cast('a' as decimal) -10.00 +10.0 Warnings: Warning 1292 Truncated incorrect DECIMAL value: 'a' select 10E+0+'a'; @@ -386,7 +386,7 @@ INSERT INTO t1 VALUES ('1.01', '2.02', '3.03', '4.04', '5.05'); SELECT CAST(v AS DECIMAL), CAST(tt AS DECIMAL), CAST(t AS DECIMAL), CAST(mt AS DECIMAL), CAST(lt AS DECIMAL) from t1; CAST(v AS DECIMAL) CAST(tt AS DECIMAL) CAST(t AS DECIMAL) CAST(mt AS DECIMAL) CAST(lt AS DECIMAL) -1.01 2.02 3.03 4.04 5.05 +1 2 3 4 5 DROP TABLE t1; select cast(NULL as decimal(6)) as t1; t1 From 184cc3b5fa723e81236c34a2e60c1b5fc0a37406 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 00:06:24 -0700 Subject: [PATCH 107/137] Fixed bug #28189: in some rare cases optimizer preferred a more expensive ref access to a less expensive range access. This occurred only with InnoDB tables. mysql-test/r/innodb_mysql.result: Added a test case for bug #28189. mysql-test/t/innodb_mysql.test: Added a test case for bug #28189. --- mysql-test/r/innodb_mysql.result | 52 ++++++++++++++++++++++++++++++ mysql-test/t/innodb_mysql.test | 54 ++++++++++++++++++++++++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 107 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 009ae8776c3..48e01d8dd6f 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -544,4 +544,56 @@ id c counter 3 b 2 4 a 2 drop table t1; +CREATE TABLE t1( +id int AUTO_INCREMENT PRIMARY KEY, +stat_id int NOT NULL, +acct_id int DEFAULT NULL, +INDEX idx1 (stat_id, acct_id), +INDEX idx2 (acct_id) +) ENGINE=MyISAM; +CREATE TABLE t2( +id int AUTO_INCREMENT PRIMARY KEY, +stat_id int NOT NULL, +acct_id int DEFAULT NULL, +INDEX idx1 (stat_id, acct_id), +INDEX idx2 (acct_id) +) ENGINE=InnoDB; +INSERT INTO t1(stat_id,acct_id) VALUES +(1,759), (2,831), (3,785), (4,854), (1,921), +(1,553), (2,589), (3,743), (2,827), (2,545), +(4,779), (4,783), (1,597), (1,785), (4,832), +(1,741), (1,833), (3,788), (2,973), (1,907); +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +UPDATE t1 SET acct_id=785 +WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +40960 +SELECT COUNT(*) FROM t1 WHERE acct_id=785; +COUNT(*) +8702 +EXPLAIN SELECT COUNT(*) FROM t1 WHERE stat_id IN (1,3) AND acct_id=785; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx1,idx2 idx1 9 NULL 2 Using where; Using index +INSERT INTO t2 SELECT * FROM t1; +OPTIMIZE TABLE t2; +Table Op Msg_type Msg_text +test.t2 optimize status OK +EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range idx1,idx2 idx1 9 NULL 2 Using where; Using index +DROP TABLE t1,t2; End of 5.0 tests diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index c9e1de8c3ab..90f9047291c 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -518,4 +518,58 @@ select * from t1; drop table t1; +# +# Bug #28189: optimizer erroniously prefers ref access to range access +# for an InnoDB table +# + +CREATE TABLE t1( + id int AUTO_INCREMENT PRIMARY KEY, + stat_id int NOT NULL, + acct_id int DEFAULT NULL, + INDEX idx1 (stat_id, acct_id), + INDEX idx2 (acct_id) +) ENGINE=MyISAM; + +CREATE TABLE t2( + id int AUTO_INCREMENT PRIMARY KEY, + stat_id int NOT NULL, + acct_id int DEFAULT NULL, + INDEX idx1 (stat_id, acct_id), + INDEX idx2 (acct_id) +) ENGINE=InnoDB; + +INSERT INTO t1(stat_id,acct_id) VALUES + (1,759), (2,831), (3,785), (4,854), (1,921), + (1,553), (2,589), (3,743), (2,827), (2,545), + (4,779), (4,783), (1,597), (1,785), (4,832), + (1,741), (1,833), (3,788), (2,973), (1,907); + +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1; +UPDATE t1 SET acct_id=785 + WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id); +OPTIMIZE TABLE t1; + +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t1 WHERE acct_id=785; + +EXPLAIN SELECT COUNT(*) FROM t1 WHERE stat_id IN (1,3) AND acct_id=785; + +INSERT INTO t2 SELECT * FROM t1; +OPTIMIZE TABLE t2; + +EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785; + +DROP TABLE t1,t2; + --echo End of 5.0 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 3a480c01ac1..967322600a7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4189,7 +4189,7 @@ best_access_path(JOIN *join, !(s->quick && best_key && s->quick->index == best_key->key && // (2) best_max_key_part >= s->table->quick_key_parts[best_key->key]) &&// (2) !((s->table->file->table_flags() & HA_TABLE_SCAN_ON_INDEX) && // (3) - ! s->table->used_keys.is_clear_all() && best_key) && // (3) + ! s->table->used_keys.is_clear_all() && best_key && !s->quick) &&// (3) !(s->table->force_index && best_key && !s->quick)) // (4) { // Check full join ha_rows rnd_records= s->found_records; From f1dbb95b1e7321d8f67a88a4a526d84f14b61c6b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 16:22:38 +0500 Subject: [PATCH 108/137] bigint.test made ps-protocol consistent mysql-test/r/bigint.result: test result fixed mysql-test/t/bigint.test: testcase made ps-protocol consistent --- mysql-test/r/bigint.result | 20 ++++++++++---------- mysql-test/t/bigint.test | 10 ++++++---- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 7d105cae19d..a70c6b3df7d 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -352,13 +352,13 @@ select c1 mod 50 as result from t1; result 6 drop table t1; -select -9223372036854775808 bi; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def bi 8 20 20 N 32897 0 63 -bi --9223372036854775808 -select -9223372036854775809 bi; -Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def bi 246 20 20 N 129 0 63 -bi --9223372036854775809 +create table t1 select -9223372036854775808 bi; +describe t1; +Field Type Null Key Default Extra +bi bigint(20) NO 0 +drop table t1; +create table t1 select -9223372036854775809 bi; +describe t1; +Field Type Null Key Default Extra +bi decimal(19,0) NO 0 +drop table t1; diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 47e3df74a7e..c2c6f895545 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -289,7 +289,9 @@ select c1 mod 50 as result from t1; drop table t1; # Bug #28005 Partitions: can't use -9223372036854775808 ---enable_metadata -select -9223372036854775808 bi; -select -9223372036854775809 bi; ---disable_metadata +create table t1 select -9223372036854775808 bi; +describe t1; +drop table t1; +create table t1 select -9223372036854775809 bi; +describe t1; +drop table t1; From d12a8413e37482307da04a2324d69e38800fb004 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 16:18:01 +0400 Subject: [PATCH 109/137] No semantical change. Move checks of compatibility of requested lock type and requested table operation from mysql_insert into a separate function. sql/sql_insert.cc: Cleanup: move a number of locking related checks from mysql_insert to a separate function. Add comments. --- sql/sql_insert.cc | 176 +++++++++++++++++++++++++++++++++------------- 1 file changed, 126 insertions(+), 50 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index f1d86224adb..1154e98475d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -401,6 +401,79 @@ void mark_fields_used_by_triggers_for_insert_stmt(THD *thd, TABLE *table, } +/** + Upgrade table-level lock of INSERT statement to TL_WRITE if + a more concurrent lock is infeasible for some reason. This is + necessary for engines without internal locking support (MyISAM). + An engine with internal locking implementation might later + downgrade the lock in handler::store_lock() method. +*/ + +void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, + enum_duplicates duplic, + bool is_multi_insert) +{ + if (duplic == DUP_UPDATE || + duplic == DUP_REPLACE && *lock_type == TL_WRITE_CONCURRENT_INSERT) + { + *lock_type= TL_WRITE; + return; + } + + if (*lock_type == TL_WRITE_DELAYED) + { +#ifdef EMBEDDED_LIBRARY + /* No auxiliary threads in the embedded server. */ + *lock_type= TL_WRITE; + return; +#else + /* + We do not use delayed threads if: + - we're running in the safe mode or skip-new - the feature + is disabled in these modes + - we're running this query in statement level replication, + on a replication slave - because we must ensure serial + execution of queries on the slave + - it is INSERT .. ON DUPLICATE KEY UPDATE - in this case the + insert cannot be concurrent + */ + if (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE) || + thd->slave_thread || + thd->variables.max_insert_delayed_threads == 0) + { + *lock_type= TL_WRITE; + return; + } +#endif + bool log_on= (thd->options & OPTION_BIN_LOG || + ! (thd->security_ctx->master_access & SUPER_ACL)); + if (log_on && mysql_bin_log.is_open() && is_multi_insert) + { + /* + Statement-based binary logging does not work in this case, because: + a) two concurrent statements may have their rows intermixed in the + queue, leading to autoincrement replication problems on slave (because + the values generated used for one statement don't depend only on the + value generated for the first row of this statement, so are not + replicable) + b) if first row of the statement has an error the full statement is + not binlogged, while next rows of the statement may be inserted. + c) if first row succeeds, statement is binlogged immediately with a + zero error code (i.e. "no error"), if then second row fails, query + will fail on slave too and slave will stop (wrongly believing that the + master got no error). + So we fall back to non-delayed INSERT. + */ + *lock_type= TL_WRITE; + } + } +} + + +/** + INSERT statement implementation +*/ + bool mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, List &values_list, @@ -436,58 +509,31 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, DBUG_ENTER("mysql_insert"); /* - in safe mode or with skip-new change delayed insert to be regular - if we are told to replace duplicates, the insert cannot be concurrent - delayed insert changed to regular in slave thread - */ -#ifdef EMBEDDED_LIBRARY - if (lock_type == TL_WRITE_DELAYED) - lock_type=TL_WRITE; -#else - if ((lock_type == TL_WRITE_DELAYED && - ((specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) || - thd->slave_thread || !thd->variables.max_insert_delayed_threads)) || - (lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE) || - (duplic == DUP_UPDATE)) - lock_type=TL_WRITE; -#endif - if ((lock_type == TL_WRITE_DELAYED) && - log_on && mysql_bin_log.is_open() && - (values_list.elements > 1)) + Upgrade lock type if the requested lock is incompatible with + the current connection mode or table operation. + */ + upgrade_lock_type(thd, &table_list->lock_type, duplic, + values_list.elements > 1); + lock_type= table_list->lock_type; + + /* + We can't write-delayed into a table locked with LOCK TABLES: + this will lead to a deadlock, since the delayed thread will + never be able to get a lock on the table. QQQ: why not + upgrade the lock here instead? + */ + if (lock_type == TL_WRITE_DELAYED && thd->locked_tables && + find_locked_table(thd, table_list->db, table_list->table_name)) { - /* - Statement-based binary logging does not work in this case, because: - a) two concurrent statements may have their rows intermixed in the - queue, leading to autoincrement replication problems on slave (because - the values generated used for one statement don't depend only on the - value generated for the first row of this statement, so are not - replicable) - b) if first row of the statement has an error the full statement is - not binlogged, while next rows of the statement may be inserted. - c) if first row succeeds, statement is binlogged immediately with a - zero error code (i.e. "no error"), if then second row fails, query - will fail on slave too and slave will stop (wrongly believing that the - master got no error). - So we fallback to non-delayed INSERT. - */ - lock_type= TL_WRITE; + my_error(ER_DELAYED_INSERT_TABLE_LOCKED, MYF(0), + table_list->table_name); + DBUG_RETURN(TRUE); } - table_list->lock_type= lock_type; #ifndef EMBEDDED_LIBRARY if (lock_type == TL_WRITE_DELAYED) { res= 1; - if (thd->locked_tables) - { - DBUG_ASSERT(table_list->db); /* Must be set in the parser */ - if (find_locked_table(thd, table_list->db, table_list->table_name)) - { - my_error(ER_DELAYED_INSERT_TABLE_LOCKED, MYF(0), - table_list->table_name); - DBUG_RETURN(TRUE); - } - } if ((table= delayed_get_table(thd,table_list)) && !thd->is_fatal_error) { /* @@ -1460,6 +1506,12 @@ public: } }; +/** + delayed_insert - context of a thread responsible for delayed insert + into one table. When processing delayed inserts, we create an own + thread for every distinct table. Later on all delayed inserts directed + into that table are handled by a dedicated thread. +*/ class delayed_insert :public ilink { uint locks_in_memory; @@ -1551,6 +1603,12 @@ public: I_List delayed_threads; +/** + Return an instance of delayed insert thread that can handle + inserts into a given table, if it exists. Otherwise return NULL. +*/ + +static delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) { thd->proc_info="waiting for delay_list"; @@ -1571,6 +1629,18 @@ delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) } +/** + Attempt to find or create a delayed insert thread to handle inserts + into this table. + + @return Return an instance of the table in the delayed thread + @retval NULL too many delayed threads OR + this thread ran out of resources OR + a newly created delayed insert thread ran out of resources OR + the delayed insert thread failed to open the table. + In the last three cases an error is set in THD. +*/ + static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) { int error; @@ -1679,11 +1749,17 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) } -/* - As we can't let many threads modify the same TABLE structure, we create - an own structure for each tread. This includes a row buffer to save the - column values and new fields that points to the new row buffer. - The memory is allocated in the client thread and is freed automaticly. +/** + As we can't let many client threads modify the same TABLE + structure of the dedicated delayed insert thread, we create an + own structure for each client thread. This includes a row + buffer to save the column values and new fields that point to + the new row buffer. The memory is allocated in the client + thread and is freed automatically. + + @pre This function is called from the client thread. Delayed + insert thread mutex must be acquired before invoking this + function. */ TABLE *delayed_insert::get_local_table(THD* client_thd) From 50aa9d2bb2bced9d92f4f95fc5e9870836d58305 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 14:54:55 +0200 Subject: [PATCH 110/137] Corrected merge error; missing line in debug statement. --- sql/sql_cache.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 96a8dc577df..33d658ce6a1 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -871,6 +871,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ def_week_frmt: %lu", + (int)flags.client_long_flag, (int)flags.client_protocol_41, (int)flags.more_results_exists, flags.pkt_nr, From 00c535b91bcfd411d7749c3fa6dc37d6cbdb19d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 15:03:38 +0200 Subject: [PATCH 111/137] Fixed error from merge misstake; missing line in debug statement. --- sql/sql_cache.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 867cf2f800e..311bbfafb03 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -874,6 +874,7 @@ long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ def_week_frmt: %lu", + (int)flags.client_long_flag, (int)flags.client_protocol_41, (int)flags.result_in_binary_protocol, (int)flags.more_results_exists, From 30184f9624b93b12844f2076ae6b113a0cf1d619 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 May 2007 18:27:36 +0400 Subject: [PATCH 112/137] Follow the coding style with class names. sql/sql_insert.cc: delayed_insert -> Delayed_insert --- sql/sql_class.h | 4 ++-- sql/sql_insert.cc | 46 +++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 7f195d5a048..ad9315ae5eb 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -495,7 +495,7 @@ public: }; -class delayed_insert; +class Delayed_insert; class select_result; #define THD_SENTRY_MAGIC 0xfeedd1ff @@ -1248,7 +1248,7 @@ public: time_t start_time,time_after_lock,user_time; time_t connect_time,thr_create_time; // track down slow pthread_create thr_lock_type update_lock_default; - delayed_insert *di; + Delayed_insert *di; /* <> 0 if we are inside of trigger or stored function. */ uint in_sub_stmt; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 1154e98475d..db4c2f64d6a 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -29,7 +29,7 @@ waited for to open and lock the table. If accessing the thread succeeded, in - delayed_insert::get_local_table() the table of the thread is copied + Delayed_insert::get_local_table() the table of the thread is copied for local use. A copy is required because the normal insert logic works on a target table, but the other threads table object must not be used. The insert logic uses the record buffer to create a record. @@ -1507,13 +1507,13 @@ public: }; /** - delayed_insert - context of a thread responsible for delayed insert + Delayed_insert - context of a thread responsible for delayed insert into one table. When processing delayed inserts, we create an own thread for every distinct table. Later on all delayed inserts directed into that table are handled by a dedicated thread. */ -class delayed_insert :public ilink { +class Delayed_insert :public ilink { uint locks_in_memory; public: THD thd; @@ -1527,7 +1527,7 @@ public: ulong group_count; TABLE_LIST table_list; // Argument - delayed_insert() + Delayed_insert() :locks_in_memory(0), table(0),tables_in_use(0),stacked_inserts(0), status(0), dead(0), group_count(0) @@ -1552,7 +1552,7 @@ public: delayed_insert_threads++; VOID(pthread_mutex_unlock(&LOCK_thread_count)); } - ~delayed_insert() + ~Delayed_insert() { /* The following is not really needed, but just for safety */ delayed_row *row; @@ -1600,7 +1600,7 @@ public: }; -I_List delayed_threads; +I_List delayed_threads; /** @@ -1609,12 +1609,12 @@ I_List delayed_threads; */ static -delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) +Delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) { thd->proc_info="waiting for delay_list"; pthread_mutex_lock(&LOCK_delayed_insert); // Protect master list - I_List_iterator it(delayed_threads); - delayed_insert *tmp; + I_List_iterator it(delayed_threads); + Delayed_insert *tmp; while ((tmp=it++)) { if (!strcmp(tmp->thd.db,table_list->db) && @@ -1633,7 +1633,7 @@ delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) Attempt to find or create a delayed insert thread to handle inserts into this table. - @return Return an instance of the table in the delayed thread + @return Return a local copy of the table in the delayed thread @retval NULL too many delayed threads OR this thread ran out of resources OR a newly created delayed insert thread ran out of resources OR @@ -1644,7 +1644,7 @@ delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) { int error; - delayed_insert *tmp; + Delayed_insert *tmp; TABLE *table; DBUG_ENTER("delayed_get_table"); @@ -1668,9 +1668,9 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) */ if (! (tmp= find_handler(thd, table_list))) { - if (!(tmp=new delayed_insert())) + if (!(tmp=new Delayed_insert())) { - my_error(ER_OUTOFMEMORY,MYF(0),sizeof(delayed_insert)); + my_error(ER_OUTOFMEMORY,MYF(0),sizeof(Delayed_insert)); goto err1; } pthread_mutex_lock(&LOCK_thread_count); @@ -1762,12 +1762,12 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) function. */ -TABLE *delayed_insert::get_local_table(THD* client_thd) +TABLE *Delayed_insert::get_local_table(THD* client_thd) { my_ptrdiff_t adjust_ptrs; Field **field,**org_field, *found_next_number_field; TABLE *copy; - DBUG_ENTER("delayed_insert::get_local_table"); + DBUG_ENTER("Delayed_insert::get_local_table"); /* First request insert thread to get a lock */ status=1; @@ -1875,7 +1875,7 @@ static int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic, bool igno char *query, uint query_length, bool log_on) { delayed_row *row=0; - delayed_insert *di=thd->di; + Delayed_insert *di=thd->di; DBUG_ENTER("write_delayed"); thd->proc_info="waiting for handler insert"; @@ -1943,7 +1943,7 @@ static int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic, bool igno static void end_delayed_insert(THD *thd) { DBUG_ENTER("end_delayed_insert"); - delayed_insert *di=thd->di; + Delayed_insert *di=thd->di; pthread_mutex_lock(&di->mutex); DBUG_PRINT("info",("tables in use: %d",di->tables_in_use)); if (!--di->tables_in_use || di->thd.killed) @@ -1962,8 +1962,8 @@ void kill_delayed_threads(void) { VOID(pthread_mutex_lock(&LOCK_delayed_insert)); // For unlink from list - I_List_iterator it(delayed_threads); - delayed_insert *tmp; + I_List_iterator it(delayed_threads); + Delayed_insert *tmp; while ((tmp=it++)) { tmp->thd.killed= THD::KILL_CONNECTION; @@ -1995,7 +1995,7 @@ void kill_delayed_threads(void) pthread_handler_t handle_delayed_insert(void *arg) { - delayed_insert *di=(delayed_insert*) arg; + Delayed_insert *di=(Delayed_insert*) arg; THD *thd= &di->thd; pthread_detach_this_thread(); @@ -2231,7 +2231,7 @@ static void free_delayed_insert_blobs(register TABLE *table) } -bool delayed_insert::handle_inserts(void) +bool Delayed_insert::handle_inserts(void) { int error; ulong max_rows; @@ -3152,8 +3152,8 @@ void select_create::abort() #ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION template class List_iterator_fast; #ifndef EMBEDDED_LIBRARY -template class I_List; -template class I_List_iterator; +template class I_List; +template class I_List_iterator; template class I_List; #endif /* EMBEDDED_LIBRARY */ #endif /* HAVE_EXPLICIT_TEMPLATE_INSTANTIATION */ From 361905687e473a71083c5d3c69f3b939943cce7c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 03:17:05 +0500 Subject: [PATCH 113/137] Fixed bug #28000. Bug occurs in INSERT IGNORE ... SELECT ... ON DUPLICATE KEY UPDATE statements, when SELECT returns duplicated values and UPDATE clause tries to assign NULL values to NOT NULL fields. NOTE: By current design MySQL server treats INSERT IGNORE ... ON DUPLICATE statements as INSERT ... ON DUPLICATE with update of duplicated records, but MySQL manual lacks this information. After this fix such behaviour becomes legalized. The write_record() function was returning error values even within INSERT IGNORE, because ignore_errors parameter of the fill_record_n_invoke_before_triggers() function call was always set to FALSE. FALSE is replaced by info->ignore. sql/sql_insert.cc: Fixed bug #28000: The write_record() function was returning error values even within INSERT IGNORE, because ignore_errors parameter of the fill_record_n_invoke_before_triggers() function call was always set to FALSE. FALSE is replaced by info->ignore. mysql-test/t/insert_update.test: Added test case for bug #28000. mysql-test/r/insert_update.result: Added test case for bug #28000. --- mysql-test/r/insert_update.result | 35 +++++++++++++++++++++++++++++++ mysql-test/t/insert_update.test | 26 +++++++++++++++++++++++ sql/sql_insert.cc | 3 ++- 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result index 4a3e87d9d48..375961292a3 100644 --- a/mysql-test/r/insert_update.result +++ b/mysql-test/r/insert_update.result @@ -358,3 +358,38 @@ id c1 cnt 5 Y 1 6 Z 1 DROP TABLE t1; +CREATE TABLE t1 ( +id INT AUTO_INCREMENT PRIMARY KEY, +c1 INT NOT NULL, +cnt INT DEFAULT 1 +); +INSERT INTO t1 (id,c1) VALUES (1,10); +SELECT * FROM t1; +id c1 cnt +1 10 1 +CREATE TABLE t2 (id INT, c1 INT); +INSERT INTO t2 VALUES (1,NULL), (2,2); +INSERT INTO t1 (id,c1) SELECT 1,NULL +ON DUPLICATE KEY UPDATE c1=NULL; +ERROR 23000: Column 'c1' cannot be null +SELECT * FROM t1; +id c1 cnt +1 10 1 +INSERT IGNORE INTO t1 (id,c1) SELECT 1,NULL +ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; +Warnings: +Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1 +Error 1048 Column 'c1' cannot be null +SELECT * FROM t1; +id c1 cnt +1 0 2 +INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2 +ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; +Warnings: +Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1 +Error 1048 Column 'c1' cannot be null +SELECT * FROM t1; +id c1 cnt +1 0 3 +2 2 1 +DROP TABLE t1; diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test index 0e199dab4bd..725fbdb25d7 100644 --- a/mysql-test/t/insert_update.test +++ b/mysql-test/t/insert_update.test @@ -264,3 +264,29 @@ INSERT INTO t1 (c1) VALUES ('A'), ('X'), ('Y'), ('Z') ON DUPLICATE KEY UPDATE cnt=cnt+1; SELECT * FROM t1; DROP TABLE t1; + +# +# Bug#28000: INSERT IGNORE ... SELECT ... ON DUPLICATE +# with erroneous UPDATE: NOT NULL field with NULL value. +# +CREATE TABLE t1 ( + id INT AUTO_INCREMENT PRIMARY KEY, + c1 INT NOT NULL, + cnt INT DEFAULT 1 +); +INSERT INTO t1 (id,c1) VALUES (1,10); +SELECT * FROM t1; +CREATE TABLE t2 (id INT, c1 INT); +INSERT INTO t2 VALUES (1,NULL), (2,2); +--error 1048 +INSERT INTO t1 (id,c1) SELECT 1,NULL + ON DUPLICATE KEY UPDATE c1=NULL; +SELECT * FROM t1; +INSERT IGNORE INTO t1 (id,c1) SELECT 1,NULL + ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; +SELECT * FROM t1; +INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2 + ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; +SELECT * FROM t1; + +DROP TABLE t1; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index f1d86224adb..5f54bc2b43b 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1258,7 +1258,8 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) DBUG_ASSERT(info->update_fields->elements == info->update_values->elements); if (fill_record_n_invoke_before_triggers(thd, *info->update_fields, - *info->update_values, 0, + *info->update_values, + info->ignore, table->triggers, TRG_EVENT_UPDATE)) goto before_trg_err; From d4b87344622536cf21ab6260abb2f9b2c8a0be61 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 18:19:47 +0500 Subject: [PATCH 114/137] merging fixes mysql-test/t/view.test: merging fix sql/item_create.cc: merging fix sql/my_decimal.cc: merging fix sql/my_decimal.h: merging fix --- mysql-test/t/view.test | 12 ++++++++++++ sql/item_create.cc | 3 ++- sql/my_decimal.cc | 11 +++++++++++ sql/my_decimal.h | 10 +--------- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index a599f948c1e..51c862f692d 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3213,6 +3213,18 @@ EXPLAIN SELECT * FROM t1 UNION SELECT * FROM v1 ORDER BY a; DROP VIEW v1; DROP TABLE t1; +# +# Bug #27921 View ignores precision for CAST() +# +CREATE VIEW v1 AS SELECT CAST( 1.23456789 AS DECIMAL( 7,5 ) ) AS col; +SELECT * FROM v1; +DESCRIBE v1; +DROP VIEW v1; + +CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col; +SHOW CREATE VIEW v1; +DROP VIEW v1; + --echo End of 5.0 tests. # diff --git a/sql/item_create.cc b/sql/item_create.cc index c40c7a4de6c..29d2b8fe3b3 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -3947,6 +3947,7 @@ Create_func_master_pos_wait::create_native(THD *thd, LEX_STRING name, my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str); break; } + } return func; } @@ -4972,7 +4973,7 @@ find_qualified_function_builder(THD *thd) Item * -create_func_cast(Item *a, Cast_target cast_type, +create_func_cast(THD *thd, Item *a, Cast_target cast_type, const char *c_len, const char *c_dec, CHARSET_INFO *cs) { diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc index 7b2d271639f..8823fac3393 100644 --- a/sql/my_decimal.cc +++ b/sql/my_decimal.cc @@ -208,6 +208,17 @@ my_decimal *date2my_decimal(MYSQL_TIME *ltime, my_decimal *dec) } +void my_decimal_trim(ulong *precision, uint *scale) +{ + if (!(*precision) && !(*scale)) + { + *precision= 10; + *scale= 0; + return; + } +} + + #ifndef DBUG_OFF /* routines for debugging print */ diff --git a/sql/my_decimal.h b/sql/my_decimal.h index b349fc3f62e..17eb75cfdc5 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -395,15 +395,7 @@ int my_decimal_intg(const my_decimal *a) } -void my_decimal_trim(ulong *precision, uint *scale) -{ - if (!(*precision) && !(*scale)) - { - *precision= 10; - *scale= 0; - return; - } -} +void my_decimal_trim(ulong *precision, uint *scale); #endif /*my_decimal_h*/ From a0567199b118f14ec346249d91aabe2ee5d99354 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 17:26:12 +0400 Subject: [PATCH 115/137] Cleanup: now that we have Lex_input_stream, finish the transition by moving yet another relevant flag to it from struct LEX. mysql-test/r/ps.result: Update result. mysql-test/r/ps_1general.result: Update result. mysql-test/t/ps.test: New error code. mysql-test/t/ps_1general.test: New error code. sql/sql_lex.cc: Move stmt_prepare_mode to Lex_input_stream. sql/sql_lex.h: Move stmt_prepare_mode to class Lex_input_stream sql/sql_prepare.cc: Move stmt_prepare_mode to Lex_input_stream sql/sql_yacc.yy: Remove dead code. --- mysql-test/r/ps.result | 6 +++--- mysql-test/r/ps_1general.result | 6 +++--- mysql-test/t/ps.test | 6 +++--- mysql-test/t/ps_1general.test | 6 +++--- sql/sql_lex.cc | 8 ++++---- sql/sql_lex.h | 10 +++++----- sql/sql_prepare.cc | 5 ++++- sql/sql_yacc.yy | 15 --------------- 8 files changed, 25 insertions(+), 37 deletions(-) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 20bff6bda1c..96abff8d7f6 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -26,11 +26,11 @@ ERROR HY000: Unknown prepared statement handler (no_such_statement) given to DEA execute stmt1; ERROR HY000: Incorrect arguments to EXECUTE prepare stmt2 from 'prepare nested_stmt from "select 1"'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"select 1"' at line 1 +ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt2 from 'execute stmt1'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt1' at line 1 +ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt2 from 'deallocate prepare z'; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'z' at line 1 +ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from 'insert into t1 values (?,?)'; set @arg1=5, @arg2='five'; execute stmt3 using @arg1, @arg2; diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index ac8ae6def9f..df4ec793325 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -391,11 +391,11 @@ drop table t5 ; deallocate prepare stmt_do ; deallocate prepare stmt_set ; prepare stmt1 from ' prepare stmt2 from '' select 1 '' ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' select 1 '' at line 1 +ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' execute stmt2 ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt2' at line 1 +ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt1 from ' deallocate prepare never_prepared ' ; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'never_prepared' at line 1 +ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt4 from ' use test ' ; ERROR HY000: This command is not supported in the prepared statement protocol yet prepare stmt3 from ' create database mysqltest '; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 3fbcf84a1f9..6c93ae25045 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -33,13 +33,13 @@ deallocate prepare no_such_statement; execute stmt1; # Nesting ps commands is not allowed: ---error 1064 +--error ER_UNSUPPORTED_PS prepare stmt2 from 'prepare nested_stmt from "select 1"'; ---error 1064 +--error ER_UNSUPPORTED_PS prepare stmt2 from 'execute stmt1'; ---error 1064 +--error ER_UNSUPPORTED_PS prepare stmt2 from 'deallocate prepare z'; # PS insert diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index d4e6a62c09e..2e7fea2ff3d 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -416,11 +416,11 @@ deallocate prepare stmt_do ; deallocate prepare stmt_set ; ## nonsense like prepare of prepare,execute or deallocate ---error 1064 +--error ER_UNSUPPORTED_PS prepare stmt1 from ' prepare stmt2 from '' select 1 '' ' ; ---error 1064 +--error ER_UNSUPPORTED_PS prepare stmt1 from ' execute stmt2 ' ; ---error 1064 +--error ER_UNSUPPORTED_PS prepare stmt1 from ' deallocate prepare never_prepared ' ; ## switch the database connection diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 6a44a883b51..7bcdc499011 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -123,7 +123,8 @@ Lex_input_stream::Lex_input_stream(THD *thd, buf(buffer), next_state(MY_LEX_START), found_semicolon(NULL), - ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE)) + ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE)), + stmt_prepare_mode(FALSE) { } @@ -172,7 +173,6 @@ void lex_start(THD *thd) lex->describe= 0; lex->subqueries= FALSE; lex->view_prepare_mode= FALSE; - lex->stmt_prepare_mode= FALSE; lex->derived_tables= 0; lex->lock_option= TL_READ; lex->safe_to_cache_query= 1; @@ -586,7 +586,7 @@ int MYSQLlex(void *arg, void *yythd) its value in a query for the binlog, the query must stay grammatically correct. */ - else if (c == '?' && lex->stmt_prepare_mode && !ident_map[yyPeek()]) + else if (c == '?' && lip->stmt_prepare_mode && !ident_map[yyPeek()]) return(PARAM_MARKER); return((int) c); @@ -989,7 +989,7 @@ int MYSQLlex(void *arg, void *yythd) if (yyPeek()) { if ((thd->client_capabilities & CLIENT_MULTI_STATEMENTS) && - !lex->stmt_prepare_mode) + !lip->stmt_prepare_mode) { lex->safe_to_cache_query= 0; lip->found_semicolon= lip->ptr; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index d07de73d5b9..d34124095d3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -954,6 +954,11 @@ public: /** SQL_MODE = IGNORE_SPACE. */ bool ignore_space; + /* + TRUE if we're parsing a prepared statement: in this mode + we should allow placeholders and disallow multi-statements. + */ + bool stmt_prepare_mode; }; @@ -1082,11 +1087,6 @@ typedef struct st_lex : public Query_tables_list to an .frm file. We need this definition to stay untouched. */ bool view_prepare_mode; - /* - TRUE if we're parsing a prepared statement: in this mode - we should allow placeholders and disallow multistatements. - */ - bool stmt_prepare_mode; bool safe_to_cache_query; bool subqueries, ignore; st_parsing_options parsing_options; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index d3cc3613b4a..9c41ee57a21 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1762,6 +1762,9 @@ static bool check_prepared_statement(Prepared_statement *stmt, case SQLCOM_OPTIMIZE: break; + case SQLCOM_PREPARE: + case SQLCOM_EXECUTE: + case SQLCOM_DEALLOCATE_PREPARE: default: /* All other statements are not supported yet. */ my_message(ER_UNSUPPORTED_PS, ER(ER_UNSUPPORTED_PS), MYF(0)); @@ -2801,10 +2804,10 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) thd->stmt_arena= this; Lex_input_stream lip(thd, thd->query, thd->query_length); + lip.stmt_prepare_mode= TRUE; thd->m_lip= &lip; lex_start(thd); lex->safe_to_cache_query= FALSE; - lex->stmt_prepare_mode= TRUE; int err= MYSQLparse((void *)thd); error= err || thd->is_fatal_error || diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 390a991c7b6..847d4df6935 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1276,11 +1276,6 @@ deallocate: { THD *thd=YYTHD; LEX *lex= thd->lex; - if (lex->stmt_prepare_mode) - { - my_parse_error(ER(ER_SYNTAX_ERROR)); - MYSQL_YYABORT; - } lex->sql_command= SQLCOM_DEALLOCATE_PREPARE; lex->prepared_stmt_name= $3; }; @@ -1296,11 +1291,6 @@ prepare: { THD *thd=YYTHD; LEX *lex= thd->lex; - if (lex->stmt_prepare_mode) - { - my_parse_error(ER(ER_SYNTAX_ERROR)); - MYSQL_YYABORT; - } lex->sql_command= SQLCOM_PREPARE; lex->prepared_stmt_name= $2; }; @@ -1326,11 +1316,6 @@ execute: { THD *thd=YYTHD; LEX *lex= thd->lex; - if (lex->stmt_prepare_mode) - { - my_parse_error(ER(ER_SYNTAX_ERROR)); - MYSQL_YYABORT; - } lex->sql_command= SQLCOM_EXECUTE; lex->prepared_stmt_name= $2; } From 8bbe6f23db9e4c2bc4e4240751caf62588ab4f50 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 20:56:22 +0500 Subject: [PATCH 116/137] merging fixes mysql-test/r/type_datetime.result: result fixed mysql-test/t/type_datetime.test: testcase fixed sql/item_func.cc: my_decimal_length_to_precision used sql/my_decimal.h: merging fix --- mysql-test/r/type_datetime.result | 4 ++-- mysql-test/t/type_datetime.test | 2 +- sql/item_func.cc | 9 ++++++--- sql/my_decimal.h | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 8e671597bca..b45ddd597c4 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -328,8 +328,8 @@ least(cast('01-01-01' as datetime), '01-01-02') + 0 select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); cast(least(cast('01-01-01' as datetime), '01-01-02') as signed) 20010101000000 -select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal); -cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal) +select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(20,2)); +cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(20,2)) 20010101000000.00 DROP PROCEDURE IF EXISTS test27759 ; CREATE PROCEDURE test27759() diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index 5eb9d317a8c..c111f2f02cf 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -207,7 +207,7 @@ select least(cast('01-01-01' as date), '01-01-02') + 0; select greatest(cast('01-01-01' as date), '01-01-02') + 0; select least(cast('01-01-01' as datetime), '01-01-02') + 0; select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); -select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal); +select cast(least(cast('01-01-01' as datetime), '01-01-02') as decimal(20,2)); --disable_warnings DROP PROCEDURE IF EXISTS test27759 ; --enable_warnings diff --git a/sql/item_func.cc b/sql/item_func.cc index 7659494f624..c0a9647e382 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1051,6 +1051,8 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec) { my_decimal tmp_buf, *tmp= args[0]->val_decimal(&tmp_buf); bool sign; + uint precision; + if ((null_value= args[0]->null_value)) return NULL; my_decimal_round(E_DEC_FATAL_ERROR, tmp, decimals, FALSE, dec); @@ -1063,9 +1065,11 @@ my_decimal *Item_decimal_typecast::val_decimal(my_decimal *dec) goto err; } } - if (max_length - 2 - decimals < (uint) my_decimal_intg(dec)) + precision= my_decimal_length_to_precision(max_length, + decimals, unsigned_flag); + if (precision - decimals < (uint) my_decimal_intg(dec)) { - max_my_decimal(dec, max_length - 2, decimals); + max_my_decimal(dec, precision, decimals); dec->sign(sign); goto err; } @@ -1084,7 +1088,6 @@ void Item_decimal_typecast::print(String *str) { char len_buf[20*3 + 1]; char *end; - CHARSET_INFO *cs= str->charset(); uint precision= my_decimal_length_to_precision(max_length, decimals, unsigned_flag); diff --git a/sql/my_decimal.h b/sql/my_decimal.h index b19d6e40cb4..9558b00f0cf 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -395,6 +395,7 @@ int my_decimal_intg(const my_decimal *a) } +inline void my_decimal_trim(ulong *precision, uint *scale) { if (!(*precision) && !(*scale)) From c5a82455966e729219d164941f1461bb01a26290 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 20:33:13 +0400 Subject: [PATCH 117/137] Fix for: Bug #20662 "Infinite loop in CREATE TABLE IF NOT EXISTS ... SELECT with locked tables" Bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" Bug #24738 "CREATE TABLE ... SELECT is not isolated properly" Bug #24508 "Inconsistent results of CREATE TABLE ... SELECT when temporary table exists" Deadlock occured when one tried to execute CREATE TABLE IF NOT EXISTS ... SELECT statement under LOCK TABLES which held read lock on target table. Attempt to execute the same statement for already existing target table with triggers caused server crashes. Also concurrent execution of CREATE TABLE ... SELECT statement and other statements involving target table suffered from various races (some of which might've led to deadlocks). Finally, attempt to execute CREATE TABLE ... SELECT in case when a temporary table with same name was already present led to the insertion of data into this temporary table and creation of empty non-temporary table. All above problems stemmed from the old implementation of CREATE TABLE ... SELECT in which we created, opened and locked target table without any special protection in a separate step and not with the rest of tables used by this statement. This underminded deadlock-avoidance approach used in server and created window for races. It also excluded target table from prelocking causing problems with trigger execution. The patch solves these problems by implementing new approach to handling of CREATE TABLE ... SELECT for base tables. We try to open and lock table to be created at the same time as the rest of tables used by this statement. If such table does not exist at this moment we create and place in the table cache special placeholder for it which prevents its creation or any other usage by other threads. We still use old approach for creation of temporary tables. Also note that we decided to postpone introduction of some tests for concurrent behaviour of CREATE TABLE ... SELECT till 5.1. The main reason for this is absence in 5.0 ability to set @@debug variable at runtime, which can be circumvented only by using several test files with individual .opt files. Since the latter is likely to slowdown test-suite unnecessary we chose not to push this tests into 5.0, but run them manually for this version and later push their optimized version into 5.1 mysql-test/r/create.result: Extended test coverage for CREATE TABLE ... SELECT. In particular added tests for bug #24508 "Inconsistent results of CREATE TABLE ... SELECT when temporary table exists" and bug #20662 "Infinite loop in CREATE TABLE IF NOT EXISTS ... SELECT with locked tables". mysql-test/r/trigger.result: Added test case for bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" mysql-test/t/create.test: Extended test coverage for CREATE TABLE ... SELECT. In particular added tests for bug #24508 "Inconsistent results of CREATE TABLE ... SELECT when temporary table exists" and bug #20662 "Infinite loop in CREATE TABLE IF NOT EXISTS ... SELECT with locked tables". mysql-test/t/trigger.test: Added test case for bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" sql/lock.cc: Now for creation of name-lock placeholder in lock_table_name() we use auxiliary function table_cache_insert_placeholder(). sql/mysql_priv.h: Made build_table_path() function available outside of sql_table.cc file. reopen_name_locked_table() now has 3rd argument which controls linking in of table being opened into THD::open_tables (this is useful in cases when placeholder used for name-locking is already linked into this list). Added declaration of auxiliary function table_cache_insert_placeholder() which is used for creation of table placeholders for name-locking. Added declaration of table_cache_has_open_placeholder() function which can be used for checking if table cache contains an open placeholder for the table and if this placeholder was created by another thread. (This function is needed only in 5.0 where we use it in various versions of CREATE TABLE in order to protect it from concurrent CREATE TABLE ... SELECT operations for the table. Starting from 5.1 we use different approach so it is going to be removed there). Made close_old_data_files() static within sql_base.cc file. Added auxiliary drop_open_table() routine. Moved declaration of refresh_version to table.h header to make it accessible from inline methods of TABLE class. MYSQL_OPEN_IGNORE_LOCKED_TABLES flag is no longer used. Instead MYSQL_OPEN_TEMPORARY_ONLY option was added. sql/sql_base.cc: Added support for the new approach to the handling of CREATE TABLE ... SELECT for base tables. Now we try to open and lock table to be created at the same time as the rest of tables used by this statement. If such table does not exist at this moment we create and place in the table cache special placeholder for it which prevents its creation or any other usage by other threads. Note significant distinctions of this placeholder from the placeholder used for normal name-lock: 1) It is treated like open table by other name-locks so it does not allow name-lock taking operations like DROP TABLE or RENAME TABLE to proceed. 2) it is linked into THD::open_tables list and automatically removed during close_thread_tables() call. open_tables(): Implemented logic described above. To do this added auxiliary check_if_table_exists() function. Removed support for MYSQL_OPEN_IGNORE_LOCKED_TABLES option which is no longer used. Added MYSQL_OPEN_TEMPORARY_ONLY which is used to restrict search for temporary tables only. close_cached_tables()/close_thread_table()/reopen_tables()/ close_old_data_files()/table_is_used()/remove_table_from_cache(): Added support for open placeholders (note that we also use them when we need to re-open tables during flush). Added auxiliary drop_open_table() routine. reopen_name_locked_table(): Now has 3rd argument which controls linking in of table being opened into THD::open_tables (this is useful in cases when placeholder used for name-locking is already linked into this list). Added auxiliary table_cache_insert_placeholder() routine which simplifies creation of placeholders used for name-locking. Added table_cache_has_open_placeholder() function which can be used for checking if table cache contains an open placeholder for the table and if this placeholder was created by another thread. (This function is needed only in 5.0 where we use it in various versions of CREATE TABLE in order to protect it from concurrent CREATE TABLE ... SELECT operations for the table. Starting from 5.1 we use different approach so it is going to be removed there). sql/sql_handler.cc: Adjusted mysql_ha_mark_tables_for_reopen() routine to properly handle placeholders which now can be linked into open tables list. sql/sql_insert.cc: Introduced new approach to handling of base tables in CREATE TABLE ... SELECT statement. Now we try to open and lock table to be created at the same time as the rest of tables used by this statement. If such table does not exist at this moment we create and place in the table cache special placeholder for it which prevents its creation or any other usage by other threads. By doing this we avoid races which existed with previous approach in which we created, opened and locked target in separate step without any special protection. This also allows properly calculate prelocking set in cases when target table already exists and has some on insert triggers. Note that we don't employ the same approach for temporary tables (this is okay as such tables are unaffected by other threads). Changed create_table_from_items() and select_create methods to implement this approach. sql/sql_parse.cc: The new approach to handling of CREATE TABLE ... SELECT for base tables assumes that all tables (including table to be created) are opened and (or) locked at the same time. So in cases when we create base table we have to pass to open_and_lock_tables() table list which includes target table. sql/sql_prepare.cc: The new approach to handling of CREATE TABLE ... SELECT for base tables assumes that all tables (including table to be created) are opened and (or) locked at the same time. So in cases when we create base table we have to pass to open_and_lock_tables() table list which includes target table. sql/sql_table.cc: Now mysql_create_table_internal(), mysql_create_like_table() and mysql_alter_table() not only check that destination table doesn't exist on disk but also check that there is no create placeholder in table cache for it (i.e. there is no CREATE TABLE ... SELECT operation in progress for it). Note that starting from 5.1 we use different approach in order to to protect CREATE TABLE ... SELECT from concurrent CREATE TABLE (ALTER TABLE ... RENAME) operations, the latter simply take name-locks on table before its creation (on target table name before renaming). Also made build_table_path() available from other files and asjusted calls to reopen_name_locked_table(), which now takes extra argument, which controls linking of open table into THD::open_tables list. sql/sql_trigger.cc: reopen_name_locked_tables() now has one more argument which controls linking of opened table into the THD::open_tables list. sql/sql_yacc.yy: The new approach to handling of CREATE TABLE ... SELECT statement for base tables assumes that all tables including table to be created are open and (or) locked at the same time. Therefore we need to set correct lock for target table. sql/table.h: Moved declaration of refresh_version variable from mysql_priv.h to make it accessible from inline methods of TABLE class. Renamed TABLE::locked_by_flush member to open_placeholder since now it is also used for taking exclusive name-lock and not only by flush. Introduced TABLE::is_name_opened() helper method which can be used to distinguish TABLE instances corresponding to open tables or placeholders for them from closed instances (e.g. due to their old version). Also introduced TABLE::needs_reopen_or_name_lock() helper which allows to check if TABLE instance corresponds to outdated version of table or to name-lock placeholder. Introduced TABLE_LIST::create member which marks elements of table list corresponds to the table to be created. Adjusted TABLE_LIST::placeholder() method to take into account name-lock placeholders for tables to be created (this, for example, allows to properly handle such placeholders in lock_tables()). --- mysql-test/r/create.result | 94 ++++++++ mysql-test/r/trigger.result | 35 +++ mysql-test/t/create.test | 111 ++++++++++ mysql-test/t/trigger.test | 26 +++ sql/lock.cc | 31 +-- sql/mysql_priv.h | 16 +- sql/sql_base.cc | 420 +++++++++++++++++++++++++++++++++--- sql/sql_handler.cc | 25 ++- sql/sql_insert.cc | 182 +++++++++------- sql/sql_parse.cc | 12 +- sql/sql_prepare.cc | 15 +- sql/sql_table.cc | 88 ++++++-- sql/sql_trigger.cc | 2 +- sql/sql_yacc.yy | 4 +- sql/table.h | 40 +++- 15 files changed, 918 insertions(+), 183 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index afa005e74c0..e1262c7d2c2 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -769,6 +769,100 @@ t1 CREATE TABLE `t1` ( `i` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295 drop table t1; +create table t1 select * from t2; +ERROR 42S02: Table 'test.t2' doesn't exist +create table t1 select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce' +create table t1 (primary key(a)) select "b" as b; +ERROR 42000: Key column 'a' doesn't exist in table +create table t1 (a int); +create table if not exists t1 select 1 as a, 2 as b; +ERROR 21S01: Column count doesn't match value count at row 1 +drop table t1; +create table t1 (primary key (a)) (select 1 as a) union all (select 1 as a); +ERROR 23000: Duplicate entry '1' for key 1 +create table t1 (i int); +create table t1 select 1 as i; +ERROR 42S01: Table 't1' already exists +create table if not exists t1 select 1 as i; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +i +1 +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce' +select * from t1; +i +1 +alter table t1 add primary key (i); +create table if not exists t1 (select 2 as i) union all (select 2 as i); +ERROR 23000: Duplicate entry '2' for key 1 +select * from t1; +i +1 +2 +drop table t1; +create temporary table t1 (j int); +create table if not exists t1 select 1; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +j +1 +drop temporary table t1; +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table t1; +ERROR 42S02: Unknown table 't1' +create table t1 (i int); +insert into t1 values (1), (2); +lock tables t1 read; +create table t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +create table if not exists t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables; +create table t2 (j int); +lock tables t1 read; +create table t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +create table if not exists t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables; +lock table t1 read, t2 read; +create table t2 select * from t1; +ERROR HY000: Table 't2' was locked with a READ lock and can't be updated +create table if not exists t2 select * from t1; +ERROR HY000: Table 't2' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 read, t2 write; +create table t2 select * from t1; +ERROR 42S01: Table 't2' already exists +create table if not exists t2 select * from t1; +Warnings: +Note 1050 Table 't2' already exists +select * from t1; +i +1 +2 +unlock tables; +drop table t2; +lock tables t1 read; +create temporary table t2 select * from t1; +create temporary table if not exists t2 select * from t1; +Warnings: +Note 1050 Table 't2' already exists +select * from t2; +i +1 +2 +1 +2 +unlock tables; +drop table t1, t2; create table t1 (upgrade int); drop table t1; End of 5.0 tests diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 0a0be41927a..3e6a901dc00 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1414,4 +1414,39 @@ id val DROP TRIGGER trg27006_a_insert; DROP TRIGGER trg27006_a_update; drop table t1,t2; +drop table if exists t1, t2, t3; +create table t1 (i int); +create trigger t1_bi before insert on t1 for each row set new.i = 7; +create trigger t1_ai after insert on t1 for each row set @a := 7; +create table t2 (j int); +insert into t2 values (1), (2); +set @a:=""; +create table if not exists t1 select * from t2; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +i +7 +7 +select @a; +@a +7 +drop trigger t1_bi; +drop trigger t1_ai; +create table t3 (isave int); +create trigger t1_bi before insert on t1 for each row insert into t3 values (new.i); +create table if not exists t1 select * from t2; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +i +7 +7 +1 +2 +select * from t3; +isave +1 +2 +drop table t1, t2, t3; End of 5.0 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index ba5f56e12b1..35198c793b8 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -669,6 +669,117 @@ alter table t1 max_rows=100000000000; show create table t1; drop table t1; + +# +# Tests for errors happening at various stages of CREATE TABLES ... SELECT +# +# (Also checks that it behaves atomically in the sense that in case +# of error it is automatically dropped if it has not existed before.) +# +# Error during open_and_lock_tables() of tables +--error ER_NO_SUCH_TABLE +create table t1 select * from t2; +# Rather special error which also caught during open tables pahse +--error ER_UPDATE_TABLE_USED +create table t1 select * from t1; +# Error which happens before select_create::prepare() +--error ER_CANT_AGGREGATE_2COLLATIONS +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +# Error during table creation +--error ER_KEY_COLUMN_DOES_NOT_EXITS +create table t1 (primary key(a)) select "b" as b; +# Error in select_create::prepare() which is not related to table creation +create table t1 (a int); +--error ER_WRONG_VALUE_COUNT_ON_ROW +create table if not exists t1 select 1 as a, 2 as b; +drop table t1; +# Finally error which happens during insert +--error ER_DUP_ENTRY +create table t1 (primary key (a)) (select 1 as a) union all (select 1 as a); +# What happens if table already exists ? +create table t1 (i int); +--error ER_TABLE_EXISTS_ERROR +create table t1 select 1 as i; +create table if not exists t1 select 1 as i; +select * from t1; +# Error before select_create::prepare() +--error ER_CANT_AGGREGATE_2COLLATIONS +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +select * from t1; +# Error which happens during insertion of rows +alter table t1 add primary key (i); +--error ER_DUP_ENTRY +create table if not exists t1 (select 2 as i) union all (select 2 as i); +select * from t1; +drop table t1; + + +# Base vs temporary tables dillema (a.k.a. bug#24508 "Inconsistent +# results of CREATE TABLE ... SELECT when temporary table exists"). +# In this situation we either have to create non-temporary table and +# insert data in it or insert data in temporary table without creation +# of permanent table. Since currently temporary tables always shadow +# permanent tables we adopt second approach. +create temporary table t1 (j int); +create table if not exists t1 select 1; +select * from t1; +drop temporary table t1; +--error ER_NO_SUCH_TABLE +select * from t1; +--error ER_BAD_TABLE_ERROR +drop table t1; + + +# +# CREATE TABLE ... SELECT and LOCK TABLES +# +# There is little sense in using CREATE TABLE ... SELECT under +# LOCK TABLES as it mostly does not work. At least we check that +# the server doesn't crash, hang and produces sensible errors. +# Includes test for bug #20662 "Infinite loop in CREATE TABLE +# IF NOT EXISTS ... SELECT with locked tables". +create table t1 (i int); +insert into t1 values (1), (2); +lock tables t1 read; +--error ER_TABLE_NOT_LOCKED +create table t2 select * from t1; +--error ER_TABLE_NOT_LOCKED +create table if not exists t2 select * from t1; +unlock tables; +create table t2 (j int); +lock tables t1 read; +--error ER_TABLE_NOT_LOCKED +create table t2 select * from t1; +# This should not be ever allowed as it will undermine +# lock-all-at-once approach +--error ER_TABLE_NOT_LOCKED +create table if not exists t2 select * from t1; +unlock tables; +lock table t1 read, t2 read; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create table t2 select * from t1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create table if not exists t2 select * from t1; +unlock tables; +lock table t1 read, t2 write; +--error ER_TABLE_EXISTS_ERROR +create table t2 select * from t1; +# This is the only case which really works. +create table if not exists t2 select * from t1; +select * from t1; +unlock tables; +drop table t2; + +# OTOH CREATE TEMPORARY TABLE ... SELECT should work +# well under LOCK TABLES. +lock tables t1 read; +create temporary table t2 select * from t1; +create temporary table if not exists t2 select * from t1; +select * from t2; +unlock tables; +drop table t1, t2; + + # # Bug#21772: can not name a column 'upgrade' when create a table # diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index a01efba11db..82de4dac111 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -1737,4 +1737,30 @@ DROP TRIGGER trg27006_a_insert; DROP TRIGGER trg27006_a_update; drop table t1,t2; +# +# Bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" +# + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings +create table t1 (i int); +create trigger t1_bi before insert on t1 for each row set new.i = 7; +create trigger t1_ai after insert on t1 for each row set @a := 7; +create table t2 (j int); +insert into t2 values (1), (2); +set @a:=""; +create table if not exists t1 select * from t2; +select * from t1; +select @a; +# Let us check that trigger that involves table also works ok. +drop trigger t1_bi; +drop trigger t1_ai; +create table t3 (isave int); +create trigger t1_bi before insert on t1 for each row insert into t3 values (new.i); +create table if not exists t1 select * from t2; +select * from t1; +select * from t3; +drop table t1, t2, t3; + --echo End of 5.0 tests diff --git a/sql/lock.cc b/sql/lock.cc index 233d12d9cc4..9298b33b4d2 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -853,7 +853,6 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list) TABLE *table; char key[MAX_DBKEY_LENGTH]; char *db= table_list->db; - int table_in_key_offset; uint key_length; HASH_SEARCH_STATE state; DBUG_ENTER("lock_table_name"); @@ -861,10 +860,8 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list) safe_mutex_assert_owner(&LOCK_open); - table_in_key_offset= strmov(key, db) - key + 1; - key_length= (uint)(strmov(key + table_in_key_offset, table_list->table_name) - - key) + 1; - + key_length= (uint)(strmov(strmov(key, db) + 1, table_list->table_name) - + key) + 1; /* Only insert the table if we haven't insert it already */ for (table=(TABLE*) hash_first(&open_cache, (byte*)key, key_length, &state); @@ -873,29 +870,11 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list) if (table->in_use == thd) DBUG_RETURN(0); - /* - Create a table entry with the right key and with an old refresh version - Note that we must use my_malloc() here as this is freed by the table - cache - */ - if (!(table= (TABLE*) my_malloc(sizeof(*table)+key_length, - MYF(MY_WME | MY_ZEROFILL)))) + if (!(table= table_cache_insert_placeholder(thd, key, key_length))) DBUG_RETURN(-1); - table->s= &table->share_not_to_be_used; - memcpy((table->s->table_cache_key= (char*) (table+1)), key, key_length); - table->s->db= table->s->table_cache_key; - table->s->table_name= table->s->table_cache_key + table_in_key_offset; - table->s->key_length=key_length; - table->in_use=thd; - table->locked_by_name=1; - table_list->table=table; - if (my_hash_insert(&open_cache, (byte*) table)) - { - my_free((gptr) table,MYF(0)); - DBUG_RETURN(-1); - } - + table_list->table= table; + /* Return 1 if table is in use */ DBUG_RETURN(test(remove_table_from_cache(thd, db, table_list->table_name, RTFC_NO_FLAG))); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 868f3584448..37a5fc31f1d 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -674,6 +674,8 @@ struct Query_cache_query_flags #define query_cache_invalidate_by_MyISAM_filename_ref NULL #endif /*HAVE_QUERY_CACHE*/ +uint build_table_path(char *buff, size_t bufflen, const char *db, + const char *table, const char *ext); bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent); bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create); bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent); @@ -856,12 +858,14 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create); TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT* mem, bool *refresh, uint flags); -bool reopen_name_locked_table(THD* thd, TABLE_LIST* table); +bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list, bool link_in); +TABLE *table_cache_insert_placeholder(THD *thd, const char *key, + uint key_length); +bool table_cache_has_open_placeholder(THD *thd, const char *db, + const char *table_name); TABLE *find_locked_table(THD *thd, const char *db,const char *table_name); bool reopen_table(TABLE *table,bool locked); bool reopen_tables(THD *thd,bool get_locks,bool in_refresh); -void close_old_data_files(THD *thd, TABLE *table, bool abort_locks, - bool send_refresh); bool close_data_tables(THD *thd,const char *db, const char *table_name); bool wait_for_tables(THD *thd); bool table_is_used(TABLE *table, bool wait_for_name_lock); @@ -1017,6 +1021,8 @@ void add_join_natural(TABLE_LIST *a,TABLE_LIST *b,List *using_fields, SELECT_LEX *lex); bool add_proc_to_list(THD *thd, Item *item); TABLE *unlink_open_table(THD *thd,TABLE *list,TABLE *find); +void drop_open_table(THD *thd, TABLE *table, const char *db_name, + const char *table_name); void update_non_unique_table_error(TABLE_LIST *update, const char *operation, TABLE_LIST *duplicate); @@ -1269,7 +1275,7 @@ extern double log_01[32]; extern ulonglong log_10_int[20]; extern ulonglong keybuff_size; extern ulonglong thd_startup_options; -extern ulong refresh_version,flush_version, thread_id; +extern ulong flush_version, thread_id; extern ulong binlog_cache_use, binlog_cache_disk_use; extern ulong aborted_threads,aborted_connects; extern ulong delayed_insert_timeout; @@ -1443,7 +1449,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count, #define MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK 0x0001 #define MYSQL_LOCK_IGNORE_FLUSH 0x0002 #define MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN 0x0004 -#define MYSQL_OPEN_IGNORE_LOCKED_TABLES 0x0008 +#define MYSQL_OPEN_TEMPORARY_ONLY 0x0008 void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock); void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 6e6611d54d2..db4491a19ae 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -94,6 +94,8 @@ static bool open_new_frm(THD *thd, const char *path, const char *alias, uint db_stat, uint prgflag, uint ha_open_flags, TABLE *outparam, TABLE_LIST *table_desc, MEM_ROOT *mem_root); +static void close_old_data_files(THD *thd, TABLE *table, bool morph_locks, + bool send_refresh); extern "C" byte *table_cache_key(const byte *record,uint *length, my_bool not_used __attribute__((unused))) @@ -374,7 +376,21 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh, for (uint idx=0 ; idx < open_cache.records ; idx++) { TABLE *table=(TABLE*) hash_element(&open_cache,idx); - if ((table->s->version) < refresh_version && table->db_stat) + /* + Note that we wait here only for tables which are actually open, and + not for placeholders with TABLE::open_placeholder set. Waiting for + latter will cause deadlock in the following scenario, for example: + + conn1: lock table t1 write; + conn2: lock table t2 write; + conn1: flush tables; + conn2: flush tables; + + It also does not make sense to wait for those of placeholders that + are employed by CREATE TABLE as in this case table simply does not + exist yet. + */ + if (table->needs_reopen_or_name_lock() && table->db_stat) { found=1; DBUG_PRINT("signal", ("Waiting for COND_refresh")); @@ -616,10 +632,10 @@ bool close_thread_table(THD *thd, TABLE **table_ptr) TABLE *table= *table_ptr; DBUG_ENTER("close_thread_table"); DBUG_ASSERT(table->key_read == 0); - DBUG_ASSERT(table->file->inited == handler::NONE); + DBUG_ASSERT(!table->file || table->file->inited == handler::NONE); *table_ptr=table->next; - if (table->s->version != refresh_version || + if (table->needs_reopen_or_name_lock() || thd->version != refresh_version || !table->db_stat) { VOID(hash_delete(&open_cache,(byte*) table)); @@ -627,6 +643,12 @@ bool close_thread_table(THD *thd, TABLE **table_ptr) } else { + /* + Open placeholders have TABLE::db_stat set to 0, so they should be + handled by the first alternative. + */ + DBUG_ASSERT(!table->open_placeholder); + if (table->s->flush_version != flush_version) { table->s->flush_version= flush_version; @@ -1114,6 +1136,43 @@ TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find) } +/** + @brief Auxiliary routine which closes and drops open table. + + @param thd Thread handle + @param table TABLE object for table to be dropped + @param db_name Name of database for this table + @param table_name Name of this table + + @note This routine assumes that table to be closed is open only + by calling thread so we needn't wait until other threads + will close the table. Also unless called under implicit or + explicit LOCK TABLES mode it assumes that table to be + dropped is already unlocked. In the former case it will + also remove lock on the table. But one should not rely on + this behaviour as it may change in future. +*/ + +void drop_open_table(THD *thd, TABLE *table, const char *db_name, + const char *table_name) +{ + if (table->s->tmp_table) + close_temporary_table(thd, db_name, table_name); + else + { + enum db_type table_type= table->s->db_type; + VOID(pthread_mutex_lock(&LOCK_open)); + /* + unlink_open_table() also tells threads waiting for refresh or close + that something has happened. + */ + thd->open_tables= unlink_open_table(thd, thd->open_tables, table); + quick_rm_table(table_type, db_name, table_name); + VOID(pthread_mutex_unlock(&LOCK_open)); + } +} + + /* When we call the following function we must have a lock on LOCK_open ; This lock will be unlocked on return. @@ -1152,6 +1211,11 @@ void wait_for_refresh(THD *thd) table_list TABLE_LIST object for table to be open, TABLE_LIST::table member should point to TABLE object which was used for name-locking. + link_in TRUE - if TABLE object for table to be opened should be + linked into THD::open_tables list. + FALSE - placeholder used for name-locking is already in + this list so we only need to preserve TABLE::next + pointer. NOTE This function assumes that its caller already acquired LOCK_open mutex. @@ -1161,7 +1225,7 @@ void wait_for_refresh(THD *thd) TRUE - Error */ -bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) +bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list, bool link_in) { TABLE *table= table_list->table; TABLE_SHARE *share; @@ -1199,12 +1263,33 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) share= table->s; share->db= share->table_cache_key; share->key_length=key_length; + /* + We want to prevent other connections from opening this table until end + of statement as it is likely that modifications of table's metadata are + not yet finished (for example CREATE TRIGGER have to change .TRG file, + or we might want to drop table if CREATE TABLE ... SELECT fails). + This also allows us to assume that no other connection will sneak in + before we will get table-level lock on this table. + */ share->version=0; share->flush_version=0; table->in_use = thd; check_unused(); - table->next = thd->open_tables; - thd->open_tables = table; + + if (link_in) + { + table->next= thd->open_tables; + thd->open_tables= table; + } + else + { + /* + TABLE object should be already in THD::open_tables list so we just + need to set TABLE::next correctly. + */ + table->next= orig_table.next; + } + table->tablenr=thd->current_tablenr++; table->used_fields=0; table->const_table=0; @@ -1216,6 +1301,167 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) } +/** + @brief Create and insert into table cache placeholder for table + which will prevent its opening (or creation) (a.k.a lock + table name). + + @param thd Thread context + @param key Table cache key for name to be locked + @param key_length Table cache key length + + @return Pointer to TABLE object used for name locking or 0 in + case of failure. +*/ + +TABLE *table_cache_insert_placeholder(THD *thd, const char *key, + uint key_length) +{ + TABLE *table; + char *key_buff; + DBUG_ENTER("table_cache_insert_placeholder"); + + safe_mutex_assert_owner(&LOCK_open); + + /* + Create a table entry with the right key and with an old refresh version + Note that we must use my_multi_malloc() here as this is freed by the + table cache + */ + if (!my_multi_malloc(MYF(MY_WME | MY_ZEROFILL), + &table, sizeof(*table), + &key_buff, key_length, + NULL)) + DBUG_RETURN(NULL); + + table->s= &table->share_not_to_be_used; + memcpy(key_buff, key, key_length); + table->s->table_cache_key= key_buff; + table->s->db= table->s->table_cache_key; + table->s->table_name= table->s->table_cache_key + strlen(table->s->db) + 1; + table->s->key_length= key_length; + table->in_use= thd; + table->locked_by_name= 1; + + if (my_hash_insert(&open_cache, (byte*)table)) + { + my_free((gptr) table, MYF(0)); + DBUG_RETURN(NULL); + } + + DBUG_RETURN(table); +} + + +/** + @brief Check if table cache contains an open placeholder for the + table and if this placeholder was created by another thread. + + @param thd Thread context + @param db Name of database for table in question + @param table_name Table name + + @note The presence of open placeholder indicates that either some + other thread is trying to create table in question and obtained + an exclusive name-lock on it or that this table already exists + and is being flushed at the moment. + + @note One should acquire LOCK_open mutex before calling this function. + + @note This function is a hack which was introduced in 5.0 only to + minimize code changes. It doesn't present in 5.1. + + @retval TRUE Table cache contains open placeholder for the table + which was created by some other thread. + @retval FALSE Otherwise. +*/ + +bool table_cache_has_open_placeholder(THD *thd, const char *db, + const char *table_name) +{ + char key[MAX_DBKEY_LENGTH]; + uint key_length; + HASH_SEARCH_STATE state; + TABLE *search; + DBUG_ENTER("table_cache_has_open_placeholder"); + + safe_mutex_assert_owner(&LOCK_open); + + key_length=(uint) (strmov(strmov(key,db)+1,table_name)-key)+1; + for (search= (TABLE*) hash_first(&open_cache, (byte*) key, key_length, + &state); + search ; + search= (TABLE*) hash_next(&open_cache, (byte*) key, key_length, + &state)) + { + if (search->in_use == thd) + continue; + if (search->open_placeholder) + DBUG_RETURN(1); + } + DBUG_RETURN(0); +} + + +/** + @brief Check that table exists on disk or in some storage engine. + + @param thd Thread context + @param table Table list element + @param exists[out] Out parameter which is set to TRUE if table + exists and to FALSE otherwise. + + @note This function assumes that caller owns LOCK_open mutex. + It also assumes that the fact that there are no name-locks + on the table was checked beforehand. + + @note If there is no .FRM file for the table but it exists in one + of engines (e.g. it was created on another node of NDB cluster) + this function will fetch and create proper .FRM file for it. + + @retval TRUE Some error occured + @retval FALSE No error. 'exists' out parameter set accordingly. +*/ + +bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists) +{ + char path[FN_REFLEN]; + int rc; + DBUG_ENTER("check_if_table_exists"); + + safe_mutex_assert_owner(&LOCK_open); + + *exists= TRUE; + + build_table_path(path, sizeof(path), table->db, table->table_name, reg_ext); + + if (!access(path, F_OK)) + DBUG_RETURN(FALSE); + + /* .FRM file doesn't exist. Check if some engine can provide it. */ + + rc= ha_create_table_from_engine(thd, table->db, table->table_name); + + if (rc < 0) + { + /* Table does not exists in engines as well. */ + *exists= FALSE; + DBUG_RETURN(FALSE); + } + else if (!rc) + { + /* Table exists in some engine and .FRM for it was created. */ + DBUG_RETURN(FALSE); + } + else /* (rc > 0) */ + { + my_printf_error(ER_UNKNOWN_ERROR, "Failed to open '%-.64s', error while " + "unpacking from engine", MYF(0), table->table_name); + DBUG_RETURN(TRUE); + } +} + + /* Open a table. @@ -1231,12 +1477,17 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) MYSQL_LOCK_IGNORE_FLUSH - Open table even if someone has done a flush or namelock on it. No version number checking is done. - MYSQL_OPEN_IGNORE_LOCKED_TABLES - Open table - ignoring set of locked tables and prelocked mode. + MYSQL_OPEN_TEMPORARY_ONLY - Open only temporary + table not the base table or view. IMPLEMENTATION Uses a cache of open tables to find a table not in use. + If table list element for the table to be opened has "create" flag + set and table does not exist, this function will automatically insert + a placeholder for exclusive name lock into the open tables cache and + will return the TABLE instance that corresponds to this placeholder. + RETURN NULL Open failed. If refresh is set then one should close all other tables and retry the open. @@ -1305,6 +1556,12 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, } } + if (flags & MYSQL_OPEN_TEMPORARY_ONLY) + { + my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, table_list->table_name); + DBUG_RETURN(0); + } + /* The table is not temporary - if we're in pre-locked or LOCK TABLES mode, let's try to find the requested table in the list of pre-opened @@ -1312,8 +1569,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, open not pre-opened tables in pre-locked/LOCK TABLES mode. TODO: move this block into a separate function. */ - if (!(flags & MYSQL_OPEN_IGNORE_LOCKED_TABLES) && - (thd->locked_tables || thd->prelocked_mode)) + if (thd->locked_tables || thd->prelocked_mode) { // Using table locks TABLE *best_table= 0; int best_distance= INT_MIN; @@ -1495,7 +1751,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, c1: name lock t2; -- blocks c2: open t1; -- blocks */ - if (table->s->version != refresh_version) + if (table->needs_reopen_or_name_lock()) { DBUG_PRINT("note", ("Found table '%s.%s' with different refresh version", @@ -1507,6 +1763,14 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, continue; } + /* Avoid self-deadlocks by detecting self-dependencies. */ + if (table->open_placeholder && table->in_use == thd) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + my_error(ER_UPDATE_TABLE_USED, MYF(0), table->s->table_name); + DBUG_RETURN(0); + } + /* Back off, part 1: mark the table as "unused" for the purpose of name-locking by setting table->db_stat to 0. Do @@ -1523,6 +1787,14 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, and wait till the operation is complete: when any operation that juggles with table->s->version completes, it broadcasts COND_refresh condition variable. + If 'old' table we met is in use by current thread we return + without waiting since in this situation it's this thread + which is responsible for broadcasting on COND_refresh + (and this was done already in close_old_data_files()). + Good example of such situation is when we have statement + that needs two instances of table and FLUSH TABLES comes + after we open first instance but before we open second + instance. */ if (table->in_use != thd) { @@ -1564,6 +1836,40 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, while (open_cache.records > table_cache_size && unused_tables) VOID(hash_delete(&open_cache,(byte*) unused_tables)); /* purecov: tested */ + if (table_list->create) + { + bool exists; + + if (check_if_table_exists(thd, table_list, &exists)) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(NULL); + } + + if (!exists) + { + /* + Table to be created, so we need to create placeholder in table-cache. + */ + if (!(table= table_cache_insert_placeholder(thd, key, key_length))) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(NULL); + } + /* + Link placeholder to the open tables list so it will be automatically + removed once tables are closed. Also mark it so it won't be ignored + by other trying to take name-lock. + */ + table->open_placeholder= 1; + table->next= thd->open_tables; + thd->open_tables= table; + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(table); + } + /* Table exists. Let us try to open it. */ + } + /* make a new table */ if (!(table=(TABLE*) my_malloc(sizeof(*table),MYF(MY_WME)))) { @@ -1794,9 +2100,24 @@ bool close_data_tables(THD *thd,const char *db, const char *table_name) } -/* - Reopen all tables with closed data files - One should have lock on LOCK_open when calling this +/** + @brief Reopen all tables with closed data files. + + @param thd Thread context + @param get_locks Should we get locks after reopening tables ? + @param in_refresh Are we in FLUSH TABLES ? TODO: It seems that + we can remove this parameter. + + @note Since this function can't properly handle prelocking and + create placeholders it should be used in very special + situations like FLUSH TABLES or ALTER TABLE. In general + case one should just repeat open_tables()/lock_tables() + combination when one needs tables to be reopened (for + example see open_and_lock_tables()). + + @note One should have lock on LOCK_open when calling this. + + @return FALSE in case of success, TRUE - otherwise. */ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh) @@ -1841,7 +2162,7 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh) if (in_refresh) { table->s->version=0; - table->locked_by_flush=0; + table->open_placeholder= 0; } } } @@ -1867,35 +2188,71 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh) DBUG_RETURN(error); } -/* - Close handlers for tables in list, but leave the TABLE structure - intact so that we can re-open these quickly - abort_locks is set if called from flush_tables. + +/** + @brief Close handlers for tables in list, but leave the TABLE structure + intact so that we can re-open these quickly. + + @param thd Thread context + @param table Head of the list of TABLE objects + @param morph_locks TRUE - remove locks which we have on tables being closed + but ensure that no DML or DDL will sneak in before + we will re-open the table (i.e. temporarily morph + our table-level locks into name-locks). + FALSE - otherwise + @param send_refresh Should we awake waiters even if we didn't close any tables? */ -void close_old_data_files(THD *thd, TABLE *table, bool abort_locks, +void close_old_data_files(THD *thd, TABLE *table, bool morph_locks, bool send_refresh) { DBUG_ENTER("close_old_data_files"); bool found=send_refresh; for (; table ; table=table->next) { - if (table->s->version != refresh_version) + if (table->needs_reopen_or_name_lock()) { found=1; - if (!abort_locks) // If not from flush tables + /* + Note that it is safe to update version even for open placeholders + as later in this function we reset TABLE::open_placeholder and thus + effectively remove them from the table cache. + */ + if (!morph_locks) // If not from flush tables table->s->version= refresh_version; // Let other threads use table if (table->db_stat) { - if (abort_locks) - { - mysql_lock_abort(thd,table); // Close waiting threads - mysql_lock_remove(thd, thd->locked_tables,table); - table->locked_by_flush=1; // Will be reopened with locks - } + if (morph_locks) + { + /* + Wake up threads waiting for table-level lock on this table + so they won't sneak in when we will temporarily remove our + lock on it. This will also give them a chance to close their + instances of this table. + */ + mysql_lock_abort(thd, table); + mysql_lock_remove(thd, thd->locked_tables, table); + /* + We want to protect the table from concurrent DDL operations + (like RENAME TABLE) until we will re-open and re-lock it. + */ + table->open_placeholder= 1; + } table->file->close(); table->db_stat=0; } + else if (table->open_placeholder) + { + /* + We come here only in close-for-back-off scenario. So we have to + "close" create placeholder here to avoid deadlocks (for example, + in case of concurrent execution of CREATE TABLE t1 SELECT * FROM t2 + and RENAME TABLE t2 TO t1). In close-for-re-open scenario we will + probably want to let it stay. + */ + DBUG_ASSERT(!morph_locks); + table->open_placeholder= 0; + } } } if (found) @@ -1923,9 +2280,8 @@ bool table_is_used(TABLE *table, bool wait_for_name_lock) search= (TABLE*) hash_next(&open_cache, (byte*) key, key_length, &state)) { - if (search->locked_by_flush || - search->locked_by_name && wait_for_name_lock || - search->db_stat && search->s->version < refresh_version) + if (search->locked_by_name && wait_for_name_lock || + search->is_name_opened() && search->needs_reopen_or_name_lock()) return 1; // Table is used } } while ((table=table->next)); @@ -5661,7 +6017,7 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name, else if (in_use != thd) { in_use->some_tables_deleted=1; - if (table->db_stat) + if (table->is_name_opened()) { DBUG_PRINT("info", ("Found another active instance of the table")); result=1; diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index d1a5ab7dfa8..e1318aa2736 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -670,7 +670,7 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags, while (*table_ptr) { if ((mode_flags & MYSQL_HA_FLUSH_ALL) || - ((*table_ptr)->s->version != refresh_version)) + (*table_ptr)->needs_reopen_or_name_lock()) { /* The first time it is required, lock for close_thread_table(). */ if (! did_lock && ! is_locked) @@ -771,15 +771,22 @@ void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table) safe_mutex_assert_owner(&LOCK_open); for (; table; table= table->next) { - TABLE_LIST *hash_tables; - if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash, - (byte*) table->alias, - strlen(table->alias) + 1))) + /* + Some elements in open table list, for example placeholders used for + name-locking, can have alias set to 0. + */ + if (table->alias) { - /* Mark table as ready for reopen. */ - hash_tables->table= NULL; - /* End open index/table scans. */ - table->file->ha_index_or_rnd_end(); + TABLE_LIST *hash_tables; + if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash, + (byte*) table->alias, + strlen(table->alias) + 1))) + { + /* Mark table as ready for reopen. */ + hash_tables->table= NULL; + /* End open index/table scans. */ + table->file->ha_index_or_rnd_end(); + } } } DBUG_VOID_RETURN; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index f1d86224adb..4ba820ddefd 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2179,7 +2179,7 @@ bool delayed_insert::handle_inserts(void) thd.proc_info="insert"; max_rows= delayed_insert_limit; - if (thd.killed || table->s->version != refresh_version) + if (thd.killed || table->needs_reopen_or_name_lock()) { thd.killed= THD::KILL_CONNECTION; max_rows= ~(ulong)0; // Do as much as possible @@ -2791,8 +2791,8 @@ bool select_insert::send_eof() ***************************************************************************/ /* - Create table from lists of fields and items (or open existing table - with same name). + Create table from lists of fields and items (or just return TABLE + object for pre-opened existing table). SYNOPSIS create_table_from_items() @@ -2807,18 +2807,24 @@ bool select_insert::send_eof() of fields for the table (corresponding fields will be added to the end of alter_info->create_list) lock out Pointer to the MYSQL_LOCK object for table created - (open) will be returned in this parameter. Since - this table is not included in THD::lock caller is - responsible for explicitly unlocking this table. + (or open temporary table) will be returned in this + parameter. Since this table is not included in + THD::lock caller is responsible for explicitly + unlocking this table. NOTES - If 'create_info->options' bitmask has HA_LEX_CREATE_IF_NOT_EXISTS - flag and table with name provided already exists then this function will - simply open existing table. - Also note that create, open and lock sequence in this function is not - atomic and thus contains gap for deadlock and can cause other troubles. - Since this function contains some logic specific to CREATE TABLE ... SELECT - it should be changed before it can be used in other contexts. + This function behaves differently for base and temporary tables: + - For base table we assume that either table exists and was pre-opened + and locked at open_and_lock_tables() stage (and in this case we just + emit error or warning and return pre-opened TABLE object) or special + placeholder was put in table cache that guarantees that this table + won't be created or opened until the placeholder will be removed + (so there is an exclusive lock on this table). + - We don't pre-open existing temporary table, instead we either open + or create and then open table in this function. + + Since this function contains some logic specific to CREATE TABLE ... + SELECT it should be changed before it can be used in other contexts. RETURN VALUES non-zero Pointer to TABLE object for table created or opened @@ -2841,6 +2847,25 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, bool not_used; DBUG_ENTER("create_table_from_items"); + DBUG_EXECUTE_IF("sleep_create_select_before_check_if_exists", my_sleep(6000000);); + + if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE) && + create_table->table->db_stat) + { + /* Table already exists and was open at open_and_lock_tables() stage. */ + if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + { + create_info->table_existed= 1; // Mark that table existed + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR), + create_table->table_name); + DBUG_RETURN(create_table->table); + } + + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name); + DBUG_RETURN(0); + } + tmp_table.alias= 0; tmp_table.timestamp_field= 0; tmp_table.s= &tmp_table.share_not_to_be_used; @@ -2869,8 +2894,15 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, cr_field->flags &= ~NOT_NULL_FLAG; alter_info->create_list.push_back(cr_field); } + + DBUG_EXECUTE_IF("sleep_create_select_before_create", my_sleep(6000000);); + /* - create and lock table + Create and lock table. + + Note that we either creating (or opening existing) temporary table or + creating base table on which name we have exclusive lock. So code below + should not cause deadlocks or races. We don't log the statement, it will be logged later. @@ -2880,59 +2912,70 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, don't want to delete from it) 2) it would be written before the CREATE TABLE, which is a wrong order. So we keep binary logging disabled when we open_table(). - NOTE: By locking table which we just have created (or for which we just have - have found that it already exists) separately from other tables used by the - statement we create potential window for deadlock. - TODO: create and open should be done atomic ! */ { tmp_disable_binlog(thd); if (!mysql_create_table(thd, create_table->db, create_table->table_name, create_info, alter_info, 0, select_field_count)) { - /* - If we are here in prelocked mode we either create temporary table - or prelocked mode is caused by the SELECT part of this statement. - */ - DBUG_ASSERT(!thd->prelocked_mode || - create_info->options & HA_LEX_CREATE_TMP_TABLE || - thd->lex->requires_prelocking()); - /* - NOTE: We don't want to ignore set of locked tables here if we are - under explicit LOCK TABLES since it will open gap for deadlock - too wide (and also is not backward compatible). - */ - if (! (table= open_table(thd, create_table, thd->mem_root, (bool*) 0, - (MYSQL_LOCK_IGNORE_FLUSH | - ((thd->prelocked_mode == PRELOCKED) ? - MYSQL_OPEN_IGNORE_LOCKED_TABLES:0))))) - quick_rm_table(create_info->db_type, create_table->db, - table_case_name(create_info, create_table->table_name)); + if (create_info->table_existed && + !(create_info->options & HA_LEX_CREATE_TMP_TABLE)) + { + /* + This means that someone created table underneath server + or it was created via different mysqld front-end to the + cluster. We don't have much options but throw an error. + */ + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name); + DBUG_RETURN(0); + } + + DBUG_EXECUTE_IF("sleep_create_select_before_open", my_sleep(6000000);); + + if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE)) + { + VOID(pthread_mutex_lock(&LOCK_open)); + if (reopen_name_locked_table(thd, create_table, FALSE)) + { + quick_rm_table(create_info->db_type, create_table->db, + table_case_name(create_info, + create_table->table_name)); + } + else + table= create_table->table; + VOID(pthread_mutex_unlock(&LOCK_open)); + } + else + { + if (!(table= open_table(thd, create_table, thd->mem_root, (bool*) 0, + MYSQL_OPEN_TEMPORARY_ONLY)) && + !create_info->table_existed) + { + /* + This shouldn't happen as creation of temporary table should make + it preparable for open. But let us do close_temporary_table() here + just in case. + */ + close_temporary_table(thd, create_table->db, create_table->table_name); + } + } } reenable_binlog(thd); if (!table) // open failed DBUG_RETURN(0); } - /* - FIXME: What happens if trigger manages to be created while we are - obtaining this lock ? May be it is sensible just to disable - trigger execution in this case ? Or will MYSQL_LOCK_IGNORE_FLUSH - save us from that ? - */ + DBUG_EXECUTE_IF("sleep_create_select_before_lock", my_sleep(6000000);); + table->reginfo.lock_type=TL_WRITE; if (! ((*lock)= mysql_lock_tables(thd, &table, 1, MYSQL_LOCK_IGNORE_FLUSH, ¬_used))) { - VOID(pthread_mutex_lock(&LOCK_open)); - hash_delete(&open_cache,(byte*) table); - VOID(pthread_mutex_unlock(&LOCK_open)); - quick_rm_table(create_info->db_type, create_table->db, - table_case_name(create_info, create_table->table_name)); + if (!create_info->table_existed) + drop_open_table(thd, table, create_table->db, create_table->table_name); DBUG_RETURN(0); } - table->file->extra(HA_EXTRA_WRITE_CACHE); DBUG_RETURN(table); } @@ -2983,8 +3026,10 @@ select_create::prepare(List &values, SELECT_LEX_UNIT *u) (thd->variables.sql_mode & (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES))); - DBUG_RETURN(check_that_all_fields_are_given_values(thd, table, - table_list)); + if (check_that_all_fields_are_given_values(thd, table, table_list)) + DBUG_RETURN(1); + table->file->extra(HA_EXTRA_WRITE_CACHE); + DBUG_RETURN(0); } @@ -3016,31 +3061,18 @@ bool select_create::send_eof() { table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); - VOID(pthread_mutex_lock(&LOCK_open)); - mysql_unlock_tables(thd, lock); - /* - TODO: - Check if we can remove the following two rows. - We should be able to just keep the table in the table cache. - */ - if (!table->s->tmp_table) + if (lock) { - ulong version= table->s->version; - hash_delete(&open_cache,(byte*) table); - /* Tell threads waiting for refresh that something has happened */ - if (version != refresh_version) - broadcast_refresh(); + mysql_unlock_tables(thd, lock); + lock= 0; } - lock=0; - table=0; - VOID(pthread_mutex_unlock(&LOCK_open)); } return tmp; } + void select_create::abort() { - VOID(pthread_mutex_lock(&LOCK_open)); if (lock) { mysql_unlock_tables(thd, lock); @@ -3050,22 +3082,10 @@ void select_create::abort() { table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); - enum db_type table_type=table->s->db_type; - if (!table->s->tmp_table) - { - ulong version= table->s->version; - hash_delete(&open_cache,(byte*) table); - if (!create_info->table_existed) - quick_rm_table(table_type, create_table->db, create_table->table_name); - /* Tell threads waiting for refresh that something has happened */ - if (version != refresh_version) - broadcast_refresh(); - } - else if (!create_info->table_existed) - close_temporary_table(thd, create_table->db, create_table->table_name); + if (!create_info->table_existed) + drop_open_table(thd, table, create_table->db, create_table->table_name); table=0; } - VOID(pthread_mutex_unlock(&LOCK_open)); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 30abb7c2c0a..4ce0dc43144 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3014,7 +3014,13 @@ mysql_execute_command(THD *thd) select_lex->options|= SELECT_NO_UNLOCK; unit->set_limit(select_lex); - if (!(res= open_and_lock_tables(thd, select_tables))) + if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + { + lex->link_first_table_back(create_table, link_to_local); + create_table->create= TRUE; + } + + if (!(res= open_and_lock_tables(thd, lex->query_tables))) { /* Is table which we are changing used somewhere in other parts @@ -3023,6 +3029,7 @@ mysql_execute_command(THD *thd) if (!(create_info.options & HA_LEX_CREATE_TMP_TABLE)) { TABLE_LIST *duplicate; + create_table= lex->unlink_first_table(&link_to_local); if ((duplicate= unique_table(thd, create_table, select_tables, 0))) { update_non_unique_table_error(create_table, "CREATE", duplicate); @@ -3066,6 +3073,9 @@ mysql_execute_command(THD *thd) delete sel_result; } } + else if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + create_table= lex->unlink_first_table(&link_to_local); + } else { diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index d3cc3613b4a..fcd70ad92ff 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1491,8 +1491,21 @@ static bool mysql_test_create_table(Prepared_statement *stmt) if (select_lex->item_list.elements) { + if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + { + lex->link_first_table_back(create_table, link_to_local); + create_table->create= TRUE; + } + + if (open_and_lock_tables(stmt->thd, lex->query_tables)) + DBUG_RETURN(TRUE); + + if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + create_table= lex->unlink_first_table(&link_to_local); + select_lex->context.resolve_in_select_list= TRUE; - res= select_like_stmt_test_with_open_n_lock(stmt, tables, 0, 0); + + res= select_like_stmt_test(stmt, 0, 0); } /* put tables back for PS rexecuting */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 42d59a10712..079cc0d6456 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -62,8 +62,8 @@ static void set_tmp_file_path(char *buf, size_t bufsize, THD *thd); # Size of path */ -static uint build_table_path(char *buff, size_t bufflen, const char *db, - const char *table, const char *ext) +uint build_table_path(char *buff, size_t bufflen, const char *db, + const char *table, const char *ext) { strxnmov(buff, bufflen-1, mysql_data_home, "/", db, "/", table, ext, NullS); @@ -1722,7 +1722,14 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name, VOID(pthread_mutex_lock(&LOCK_open)); if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE)) { - if (!access(path,F_OK)) + /* + Inspecting table cache for placeholders created by concurrent + CREATE TABLE ... SELECT statements to avoid interfering with them + is 5.0-only solution. Starting from 5.1 we solve this problem by + obtaining name-lock on the table to be created first. + */ + if (table_cache_has_open_placeholder(thd, db, table_name) || + !access(path, F_OK)) { if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) goto warn; @@ -2051,7 +2058,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table, to finish the restore in the handler later on */ pthread_mutex_lock(&LOCK_open); - if (reopen_name_locked_table(thd, table)) + if (reopen_name_locked_table(thd, table, TRUE)) { unlock_table_name(thd, table); pthread_mutex_unlock(&LOCK_open); @@ -2158,7 +2165,7 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list, to finish the repair in the handler later on. */ pthread_mutex_lock(&LOCK_open); - if (reopen_name_locked_table(thd, table_list)) + if (reopen_name_locked_table(thd, table_list, TRUE)) { unlock_table_name(thd, table_list); pthread_mutex_unlock(&LOCK_open); @@ -2803,10 +2810,24 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, } else { + bool exists; strxmov(dst_path, mysql_data_home, "/", db, "/", table_name, reg_ext, NullS); fn_format(dst_path, dst_path, "", "", MYF(MY_UNPACK_FILENAME)); - if (!access(dst_path, F_OK)) + + /* + Note that this critical section should actually cover most + of mysql_create_like_table() function. See bugs #18950 and + #23667 for more information. + Also note that starting from 5.1 we obtain name-lock on + target table instead of inspecting table cache for presence + of open placeholders (see comment in mysql_create_table()). + */ + pthread_mutex_lock(&LOCK_open); + exists= (table_cache_has_open_placeholder(thd, db, table_name) || + !access(dst_path, F_OK)); + pthread_mutex_unlock(&LOCK_open); + if (exists) goto table_exists; } @@ -3160,9 +3181,14 @@ view_err: else { char dir_buff[FN_REFLEN]; + bool exists; strxnmov(dir_buff, FN_REFLEN, mysql_real_data_home, new_db, NullS); - if (!access(fn_format(new_name_buff,new_name_buff,dir_buff,reg_ext,0), - F_OK)) + VOID(pthread_mutex_lock(&LOCK_open)); + exists= (table_cache_has_open_placeholder(thd, new_db, new_name) || + !access(fn_format(new_name_buff, new_name_buff, dir_buff, + reg_ext, 0), F_OK)); + VOID(pthread_mutex_unlock(&LOCK_open)); + if (exists) { /* Table will be closed in do_command() */ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias); @@ -3247,8 +3273,22 @@ view_err: if (!error && (new_name != table_name || new_db != db)) { thd->proc_info="rename"; - /* Then do a 'simple' rename of the table */ - if (!access(new_name_buff,F_OK)) + /* + Then do a 'simple' rename of the table. First we need to close all + instances of 'source' table. + */ + close_cached_table(thd, table); + /* + Then, we want check once again that target table does not exist. + Note that we can't fully rely on results of previous check since + no lock was taken on target table during it. We also can't do this + before calling close_cached_table() as the latter temporarily + releases LOCK_open mutex. + Also note that starting from 5.1 we use approach with obtaining + of name-lock on target table. + */ + if (table_cache_has_open_placeholder(thd, new_db, new_name) || + !access(new_name_buff,F_OK)) { my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name); error= -1; @@ -3256,7 +3296,6 @@ view_err: else { *fn_ext(new_name)=0; - close_cached_table(thd, table); if (mysql_rename_table(old_db_type,db,table_name,new_db,new_alias)) error= -1; else if (Table_triggers_list::change_table_name(thd, db, table_name, @@ -3806,17 +3845,6 @@ view_err: current_pid, thd->thread_id); if (lower_case_table_names) my_casedn_str(files_charset_info, old_name); - if (new_name != table_name || new_db != db) - { - if (!access(new_name_buff,F_OK)) - { - error=1; - my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name_buff); - VOID(quick_rm_table(new_db_type,new_db,tmp_name)); - VOID(pthread_mutex_unlock(&LOCK_open)); - goto err; - } - } #if (!defined( __WIN__) && !defined( __EMX__) && !defined( OS2)) if (table->file->has_transactions()) @@ -3835,6 +3863,22 @@ view_err: table->file->extra(HA_EXTRA_FORCE_REOPEN); // Don't use this file anymore #endif + if (new_name != table_name || new_db != db) + { + /* + Check that there is no table with target name. See the + comment describing code for 'simple' ALTER TABLE ... RENAME. + */ + if (table_cache_has_open_placeholder(thd, new_db, new_name) || + !access(new_name_buff,F_OK)) + { + error=1; + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name_buff); + VOID(quick_rm_table(new_db_type,new_db,tmp_name)); + VOID(pthread_mutex_unlock(&LOCK_open)); + goto err; + } + } error=0; if (!need_copy_table) diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 26b557a8247..cf6db22fbcb 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -271,7 +271,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) /* We also don't allow creation of triggers on views. */ tables->required_type= FRMTYPE_TABLE; - if (reopen_name_locked_table(thd, tables)) + if (reopen_name_locked_table(thd, tables, TRUE)) { unlock_table_name(thd, tables); goto end; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 390a991c7b6..12d35d5edd3 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1489,9 +1489,7 @@ create: lex->sql_command= SQLCOM_CREATE_TABLE; if (!lex->select_lex.add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING, - (using_update_log ? - TL_READ_NO_INSERT: - TL_READ))) + TL_WRITE)) MYSQL_YYABORT; lex->alter_info.reset(); lex->col_list.empty(); diff --git a/sql/table.h b/sql/table.h index 61232a39f0e..da2c90ab212 100644 --- a/sql/table.h +++ b/sql/table.h @@ -188,6 +188,8 @@ typedef struct st_table_share } TABLE_SHARE; +extern ulong refresh_version; + /* Information for one open table */ struct st_table { @@ -268,7 +270,24 @@ struct st_table { my_bool force_index; my_bool distinct,const_table,no_rows; my_bool key_read, no_keyread; - my_bool locked_by_flush; + /* + Placeholder for an open table which prevents other connections + from taking name-locks on this table. Typically used with + TABLE_SHARE::version member to take an exclusive name-lock on + this table name -- a name lock that not only prevents other + threads from opening the table, but also blocks other name + locks. This is achieved by: + - setting open_placeholder to 1 - this will block other name + locks, as wait_for_locked_table_name will be forced to wait, + see table_is_used for details. + - setting version to 0 - this will force other threads to close + the instance of this table and wait (this is the same approach + as used for usual name locks). + An exclusively name-locked table currently can have no handler + object associated with it (db_stat is always 0), but please do + not rely on that. + */ + my_bool open_placeholder; my_bool locked_by_name; my_bool fulltext_searched; my_bool no_cache; @@ -291,6 +310,13 @@ struct st_table { bool fill_item_list(List *item_list) const; void reset_item_list(List *item_list) const; + /* Is table open or should be treated as such by name-locking? */ + inline bool is_name_opened() { return db_stat || open_placeholder; } + /* + Is this instance of the table should be reopen or represents a name-lock? + */ + inline bool needs_reopen_or_name_lock() + { return s->version != refresh_version; } }; enum enum_schema_table_state @@ -648,6 +674,12 @@ typedef struct st_table_list used for implicit LOCK TABLES only and won't be used in real statement. */ bool prelocking_placeholder; + /* + This TABLE_LIST object corresponds to the table to be created + so it is possible that it does not exist (used in CREATE TABLE + ... SELECT implementation). + */ + bool create; enum enum_schema_table_state schema_table_state; void calc_md5(char *buffer); @@ -655,7 +687,11 @@ typedef struct st_table_list int view_check_option(THD *thd, bool ignore_failure); bool setup_underlying(THD *thd); void cleanup_items(); - bool placeholder() {return derived || view || schema_table || !table; } + bool placeholder() + { + return derived || view || schema_table || create && !table->db_stat || + !table; + } void print(THD *thd, String *str); bool check_single_table(st_table_list **table, table_map map, st_table_list *view); From d46c8ce6347783e86f5579187a98816306a83597 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 21:51:03 +0400 Subject: [PATCH 118/137] Fix for: Bug #20662 "Infinite loop in CREATE TABLE IF NOT EXISTS ... SELECT with locked tables" Bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" Bug #24738 "CREATE TABLE ... SELECT is not isolated properly" Bug #24508 "Inconsistent results of CREATE TABLE ... SELECT when temporary table exists" Deadlock occured when one tried to execute CREATE TABLE IF NOT EXISTS ... SELECT statement under LOCK TABLES which held read lock on target table. Attempt to execute the same statement for already existing target table with triggers caused server crashes. Also concurrent execution of CREATE TABLE ... SELECT statement and other statements involving target table suffered from various races (some of which might've led to deadlocks). Finally, attempt to execute CREATE TABLE ... SELECT in case when a temporary table with same name was already present led to the insertion of data into this temporary table and creation of empty non-temporary table. All above problems stemmed from the old implementation of CREATE TABLE ... SELECT in which we created, opened and locked target table without any special protection in a separate step and not with the rest of tables used by this statement. This underminded deadlock-avoidance approach used in server and created window for races. It also excluded target table from prelocking causing problems with trigger execution. The patch solves these problems by implementing new approach to handling of CREATE TABLE ... SELECT for base tables. We try to open and lock table to be created at the same time as the rest of tables used by this statement. If such table does not exist at this moment we create and place in the table cache special placeholder for it which prevents its creation or any other usage by other threads. We still use old approach for creation of temporary tables. Note that we have separate fix for 5.0 since there we use slightly different less intrusive approach. mysql-test/r/create.result: Extended test coverage for CREATE TABLE ... SELECT. In particular added tests for bug #24508 "Inconsistent results of CREATE TABLE ... SELECT when temporary table exists" and bug #20662 "Infinite loop in CREATE TABLE IF NOT EXISTS ... SELECT with locked tables". mysql-test/r/trigger.result: Added test case for bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" mysql-test/t/create.test: Extended test coverage for CREATE TABLE ... SELECT. In particular added tests for bug #24508 "Inconsistent results of CREATE TABLE ... SELECT when temporary table exists" and bug #20662 "Infinite loop in CREATE TABLE IF NOT EXISTS ... SELECT with locked tables". mysql-test/t/trigger.test: Added test case for bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" sql/lock.cc: Now for creation of name-lock placeholder lock_table_name() uses auxiliary function table_cache_insert_placeholder(). sql/mysql_priv.h: Removed declaration of non-existing build_table_path() routine. The former mysql_create_table_internal() was renamed to mysql_create_table_no_lock() and now exposed to other modules to give them opportunity of creation of tables in cases when name-lock is already obtained. reopen_name_locked_table() now has 3rd argument which controls linking in of table being opened into THD::open_tables (this is useful in cases when placeholder used for name-locking is already linked into this list). Added declaration of auxiliary function table_cache_insert_placeholder() which is used for creation of table placeholders for name-locking. Added declaration of lock_table_name_if_not_cached() which can be used to take an exclusive name-lock on table if there are no records for it in table cache. Changed signature of unlink_open_table() function to simplify its use and make it useful for table placeholders and tables that are only open. Added auxiliary drop_open_table() routine. Moved declaration of refresh_version to table.h header to make it accessible from inline methods of TABLE class. MYSQL_OPEN_IGNORE_LOCKED_TABLES flag is no longer used. Instead MYSQL_OPEN_TEMPORARY_ONLY option was added. sql/sql_base.cc: Added support for the new approach to the handling of CREATE TABLE ... SELECT for base tables. Now we try to open and lock table to be created at the same time as the rest of tables used by this statement. If such table does not exist at this moment we create and place in the table cache special placeholder for it which prevents its creation or any other usage by other threads. Note significant distinctions of this placeholder from the placeholder used for normal name-lock: 1) It is treated like open table by other name-locks so it does not allow name-lock taking operations like DROP TABLE or RENAME TABLE to proceed. 2) it is linked into THD::open_tables list and automatically removed during close_thread_tables() call open_tables(): Implemented logic described above. To do this added auxiliary check_if_table_exists() function. Removed support for MYSQL_OPEN_IGNORE_LOCKED_TABLES option which is no longer used. Added MYSQL_OPEN_TEMPORARY_ONLY which is used to restrict search for temporary tables only. close_cached_tables()/close_thread_table()/reopen_tables()/ close_old_data_files()/table_is_used()/remove_table_from_cache(): Added support for open placeholders (note that we also use them when we need to re-open tables during flush). unlink_open_table(): Changed function signature to simplify its use and to make useful for open placeholders and tables which are only open and not locked. Added auxiliary drop_open_table() routine. reopen_name_locked_table(): Now has 3rd argument which controls linking in of table being opened into THD::open_tables (this is useful in cases when placeholder used for name-locking is already linked into this list). Added auxiliary table_cache_insert_placeholder() routine which simplifies creation of placeholders used for name-locking. Added lock_table_name_if_not_cached() which can be used to take an exclusive name-lock on table if there are no records for it in table cache. sql/sql_handler.cc: Adjusted mysql_ha_mark_tables_for_reopen() routine to properly handle placeholders which now can be linked into open tables list. sql/sql_insert.cc: Introduced new approach to handling of base tables in CREATE TABLE ... SELECT statement. Now we try to open and lock table to be created at the same time as the rest of tables used by this statement. If such table does not exist at this moment we create and place in the table cache special placeholder for it which prevents its creation or any other usage by other threads. By doing this we avoid races which existed with previous approach in which we created, opened and locked target in separate step without any special protection. This also allows properly calculate prelocking set in cases when target table already exists and has some on insert triggers. Note that we don't employ the same approach for temporary tables (this is okay as such tables are unaffected by other threads). Changed create_table_from_items() and methods of select_create class to implement this approach. sql/sql_parse.cc: The new approach to handling of CREATE TABLE ... SELECT for base tables assumes that all tables (including table to be created) are opened and (or) locked at the same time. So in cases when we create base table we have to pass to open_and_lock_tables() table list which includes target table. sql/sql_prepare.cc: The new approach to handling of CREATE TABLE ... SELECT for base tables assumes that all tables (including table to be created) are opened and (or) locked at the same time. So in cases when we create base table we have to pass to open_and_lock_tables() table list which includes target table. sql/sql_table.cc: Changed mysql_create_table(), mysql_create_like_table() and mysql_alter_table() (in rename case) to obtain exclusive name-lock on the non-temporary table which is going to be created (to which we going to rename). This ensures that not only destination table doesn't exist on disk but also that there are no placeholder in table cache for it (i.e. there is no CREATE TABLE ... SELECT operation in progress for it). Note that to avoid deadlocks while taking these name-locks this code assumes that existence of any record for table in table cache (even name-lock) means that table exists. Altough such check can lead to false positives these should occur only in case of highly concurrent DDL operations on the table and should not break binary logging. Renamed mysql_create_table_internal() to mysql_create_table_no_lock() and made it accessible from other files to give them ability to create table in situation when name-lock is already obtained or not relevant. Adjusted calls to reopen_name_locked_table(), which now takes extra argument, which controls linking of open table into THD::open_tables list. Removed redundant setting of table's 'version' field before calls to close_cached_table(). This function will set it to 0 itself anyway. sql/sql_trigger.cc: reopen_name_locked_tables() now has one more argument which controls linking of opened table into the THD::open_tables list. sql/sql_yacc.yy: The new approach to handling of CREATE TABLE ... SELECT statement for base tables assumes that all tables including table to be created are open and (or) locked at the same time. Therefore we need to set correct lock for target table. sql/table.h: Moved declaration of refresh_version variable from mysql_priv.h to make it accessible from inline methods of TABLE class. Renamed TABLE::locked_by_flush member to open_placeholder since now it is also used for taking exclusive name-lock and not only by flush. Introduced TABLE::is_name_opened() helper method which can be used to distinguish TABLE instances corresponding to open tables or placeholders for them from closed instances (e.g. due to their old version). Also introduced TABLE::needs_reopen_or_name_lock() helper which allows to check if TABLE instance corresponds to outdated version of table or to name-lock placeholder. Introduced TABLE_LIST::create member which marks elements of table list corresponds to the table to be created. Adjusted TABLE_LIST::placeholder() method to take into account name-lock placeholders for tables to be created (this, for example, allows to properly handle such placeholders in lock_tables()). Finally, moved currently unused TABLE::open_next/open_prev members under ifdef NOT_YET. mysql-test/r/create_select-big.result: New BitKeeper file ``mysql-test/r/create_select-big.result'' mysql-test/t/create_select-big.test: New BitKeeper file ``mysql-test/t/create_select-big.test'' --- mysql-test/r/create.result | 94 ++++++ mysql-test/r/create_select-big.result | 164 ++++++++++ mysql-test/r/trigger.result | 35 ++ mysql-test/t/create.test | 112 +++++++ mysql-test/t/create_select-big.test | 268 +++++++++++++++ mysql-test/t/trigger.test | 26 ++ sql/lock.cc | 26 +- sql/mysql_priv.h | 22 +- sql/sql_base.cc | 449 +++++++++++++++++++++++--- sql/sql_handler.cc | 25 +- sql/sql_insert.cc | 179 +++++----- sql/sql_parse.cc | 18 +- sql/sql_prepare.cc | 15 +- sql/sql_table.cc | 228 ++++++++----- sql/sql_trigger.cc | 2 +- sql/sql_yacc.yy | 4 +- sql/table.h | 43 ++- 17 files changed, 1465 insertions(+), 245 deletions(-) create mode 100644 mysql-test/r/create_select-big.result create mode 100644 mysql-test/t/create_select-big.test diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index c7f8ba17930..ef22b21e9fb 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -782,6 +782,100 @@ t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295 drop table t1; +create table t1 select * from t2; +ERROR 42S02: Table 'test.t2' doesn't exist +create table t1 select * from t1; +ERROR HY000: You can't specify target table 't1' for update in FROM clause +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce' +create table t1 (primary key(a)) select "b" as b; +ERROR 42000: Key column 'a' doesn't exist in table +create table t1 (a int); +create table if not exists t1 select 1 as a, 2 as b; +ERROR 21S01: Column count doesn't match value count at row 1 +drop table t1; +create table t1 (primary key (a)) (select 1 as a) union all (select 1 as a); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +create table t1 (i int); +create table t1 select 1 as i; +ERROR 42S01: Table 't1' already exists +create table if not exists t1 select 1 as i; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +i +1 +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +ERROR HY000: Illegal mix of collations (latin1_swedish_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'coalesce' +select * from t1; +i +1 +alter table t1 add primary key (i); +create table if not exists t1 (select 2 as i) union all (select 2 as i); +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +select * from t1; +i +1 +2 +drop table t1; +create temporary table t1 (j int); +create table if not exists t1 select 1; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +j +1 +drop temporary table t1; +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist +drop table t1; +ERROR 42S02: Unknown table 't1' +create table t1 (i int); +insert into t1 values (1), (2); +lock tables t1 read; +create table t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +create table if not exists t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables; +create table t2 (j int); +lock tables t1 read; +create table t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +create table if not exists t2 select * from t1; +ERROR HY000: Table 't2' was not locked with LOCK TABLES +unlock tables; +lock table t1 read, t2 read; +create table t2 select * from t1; +ERROR HY000: Table 't2' was locked with a READ lock and can't be updated +create table if not exists t2 select * from t1; +ERROR HY000: Table 't2' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 read, t2 write; +create table t2 select * from t1; +ERROR 42S01: Table 't2' already exists +create table if not exists t2 select * from t1; +Warnings: +Note 1050 Table 't2' already exists +select * from t1; +i +1 +2 +unlock tables; +drop table t2; +lock tables t1 read; +create temporary table t2 select * from t1; +create temporary table if not exists t2 select * from t1; +Warnings: +Note 1050 Table 't2' already exists +select * from t2; +i +1 +2 +1 +2 +unlock tables; +drop table t1, t2; create table t1 (upgrade int); drop table t1; End of 5.0 tests diff --git a/mysql-test/r/create_select-big.result b/mysql-test/r/create_select-big.result new file mode 100644 index 00000000000..1c393bd2224 --- /dev/null +++ b/mysql-test/r/create_select-big.result @@ -0,0 +1,164 @@ +drop table if exists t1,t2,t3,t4,t5; +set session debug="+d,sleep_create_select_before_create"; +create table t1 select 1 as i;; +create table t1 (j char(5)); +ERROR 42S01: Table 't1' already exists +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select 1 as i;; +create table t1 select "Test" as j; +ERROR 42S01: Table 't1' already exists +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t3 (j char(5)); +create table t1 select 1 as i;; +create table t1 like t3; +ERROR 42S01: Table 't1' already exists +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select 1 as i;; +rename table t3 to t1; +ERROR 42S01: Table 't1' already exists +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select 1 as i;; +alter table t3 rename to t1; +ERROR 42S01: Table 't1' already exists +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select 1 as i;; +alter table t3 rename to t1, add k int; +ERROR 42S01: Table 't1' already exists +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1, t3; +set session debug="-d,sleep_create_select_before_create:+d,sleep_create_select_before_open"; +create table t1 select 1 as i;; +drop table t1; +create table t1 select 1 as i;; +rename table t1 to t2; +drop table t2; +create table t1 select 1 as i;; +select * from t1; +i +1 +drop table t1; +create table t1 select 1 as i;; +insert into t1 values (2); +select * from t1; +i +1 +2 +drop table t1; +set @a:=0; +create table t1 select 1 as i;; +create trigger t1_bi before insert on t1 for each row set @a:=1; +select @a; +@a +0 +drop table t1; +set session debug="-d,sleep_create_select_before_open:+d,sleep_create_select_before_lock"; +create table t1 select 1 as i;; +drop table t1; +create table t1 select 1 as i;; +rename table t1 to t2; +drop table t2; +create table t1 select 1 as i;; +select * from t1; +i +1 +drop table t1; +create table t1 select 1 as i;; +insert into t1 values (2); +select * from t1; +i +1 +2 +drop table t1; +set @a:=0; +create table t1 select 1 as i;; +create trigger t1_bi before insert on t1 for each row set @a:=1; +select @a; +@a +0 +drop table t1; +set session debug="-d,sleep_create_select_before_lock:+d,sleep_create_select_before_check_if_exists"; +create table t1 (i int); +create table if not exists t1 select 1 as i;; +drop table t1; +Warnings: +Note 1050 Table 't1' already exists +create table t1 (i int); +set @a:=0; +create table if not exists t1 select 1 as i;; +create trigger t1_bi before insert on t1 for each row set @a:=1; +Warnings: +Note 1050 Table 't1' already exists +select @a; +@a +0 +select * from t1; +i +1 +drop table t1; +set session debug="-d,sleep_create_select_before_check_if_exists"; +create table t2 (a int); +create table t4 (b int); +lock table t4 write; +select 1; +1 +1 +create table t3 as select * from t4;; +create table t1 select * from t2, t3;; +unlock tables; +select * from t1; +a b +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1, t3; +lock table t4 read; +select 1; +1 +1 +rename table t4 to t3;; +create table if not exists t1 select 1 as i from t2, t3;; +create table t5 (j int); +rename table t5 to t1; +unlock tables; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +j +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `j` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1, t2, t3; diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index c24f7b6b06f..15c325aba52 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1414,4 +1414,39 @@ id val DROP TRIGGER trg27006_a_insert; DROP TRIGGER trg27006_a_update; drop table t1,t2; +drop table if exists t1, t2, t3; +create table t1 (i int); +create trigger t1_bi before insert on t1 for each row set new.i = 7; +create trigger t1_ai after insert on t1 for each row set @a := 7; +create table t2 (j int); +insert into t2 values (1), (2); +set @a:=""; +create table if not exists t1 select * from t2; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +i +7 +7 +select @a; +@a +7 +drop trigger t1_bi; +drop trigger t1_ai; +create table t3 (isave int); +create trigger t1_bi before insert on t1 for each row insert into t3 values (new.i); +create table if not exists t1 select * from t2; +Warnings: +Note 1050 Table 't1' already exists +select * from t1; +i +7 +7 +1 +2 +select * from t3; +isave +1 +2 +drop table t1, t2, t3; End of 5.0 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 5fca63a295c..243cdea009e 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -673,6 +673,117 @@ alter table t1 max_rows=100000000000; show create table t1; drop table t1; + +# +# Tests for errors happening at various stages of CREATE TABLES ... SELECT +# +# (Also checks that it behaves atomically in the sense that in case +# of error it is automatically dropped if it has not existed before.) +# +# Error during open_and_lock_tables() of tables +--error ER_NO_SUCH_TABLE +create table t1 select * from t2; +# Rather special error which also caught during open tables pahse +--error ER_UPDATE_TABLE_USED +create table t1 select * from t1; +# Error which happens before select_create::prepare() +--error ER_CANT_AGGREGATE_2COLLATIONS +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +# Error during table creation +--error ER_KEY_COLUMN_DOES_NOT_EXITS +create table t1 (primary key(a)) select "b" as b; +# Error in select_create::prepare() which is not related to table creation +create table t1 (a int); +--error ER_WRONG_VALUE_COUNT_ON_ROW +create table if not exists t1 select 1 as a, 2 as b; +drop table t1; +# Finally error which happens during insert +--error ER_DUP_ENTRY_WITH_KEY_NAME +create table t1 (primary key (a)) (select 1 as a) union all (select 1 as a); +# What happens if table already exists ? +create table t1 (i int); +--error ER_TABLE_EXISTS_ERROR +create table t1 select 1 as i; +create table if not exists t1 select 1 as i; +select * from t1; +# Error before select_create::prepare() +--error ER_CANT_AGGREGATE_2COLLATIONS +create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin); +select * from t1; +# Error which happens during insertion of rows +alter table t1 add primary key (i); +--error ER_DUP_ENTRY_WITH_KEY_NAME +create table if not exists t1 (select 2 as i) union all (select 2 as i); +select * from t1; +drop table t1; + + +# Base vs temporary tables dillema (a.k.a. bug#24508 "Inconsistent +# results of CREATE TABLE ... SELECT when temporary table exists"). +# In this situation we either have to create non-temporary table and +# insert data in it or insert data in temporary table without creation +# of permanent table. Since currently temporary tables always shadow +# permanent tables we adopt second approach. +create temporary table t1 (j int); +create table if not exists t1 select 1; +select * from t1; +drop temporary table t1; +--error ER_NO_SUCH_TABLE +select * from t1; +--error ER_BAD_TABLE_ERROR +drop table t1; + + +# +# CREATE TABLE ... SELECT and LOCK TABLES +# +# There is little sense in using CREATE TABLE ... SELECT under +# LOCK TABLES as it mostly does not work. At least we check that +# the server doesn't crash, hang and produces sensible errors. +# Includes test for bug #20662 "Infinite loop in CREATE TABLE +# IF NOT EXISTS ... SELECT with locked tables". +create table t1 (i int); +insert into t1 values (1), (2); +lock tables t1 read; +--error ER_TABLE_NOT_LOCKED +create table t2 select * from t1; +--error ER_TABLE_NOT_LOCKED +create table if not exists t2 select * from t1; +unlock tables; +create table t2 (j int); +lock tables t1 read; +--error ER_TABLE_NOT_LOCKED +create table t2 select * from t1; +# This should not be ever allowed as it will undermine +# lock-all-at-once approach +--error ER_TABLE_NOT_LOCKED +create table if not exists t2 select * from t1; +unlock tables; +lock table t1 read, t2 read; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create table t2 select * from t1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create table if not exists t2 select * from t1; +unlock tables; +lock table t1 read, t2 write; +--error ER_TABLE_EXISTS_ERROR +create table t2 select * from t1; +# This is the only case which really works. +create table if not exists t2 select * from t1; +select * from t1; +unlock tables; +drop table t2; + +# OTOH CREATE TEMPORARY TABLE ... SELECT should work +# well under LOCK TABLES. +lock tables t1 read; +create temporary table t2 select * from t1; +create temporary table if not exists t2 select * from t1; +select * from t2; +unlock tables; +drop table t1, t2; + + # # Bug#21772: can not name a column 'upgrade' when create a table # @@ -715,6 +826,7 @@ INSERT INTO t2 select * from t1; SELECT * from t2; drop table t1,t2; + # # Test incorrect database names # diff --git a/mysql-test/t/create_select-big.test b/mysql-test/t/create_select-big.test new file mode 100644 index 00000000000..3fa655c5501 --- /dev/null +++ b/mysql-test/t/create_select-big.test @@ -0,0 +1,268 @@ +# Tests for various aspects of CREATE TABLE ... SELECT implementation +# +# Note that we don't test general CREATE TABLE ... SELECT functionality here as +# it is already covered by create.test. We are more interested in extreme cases. +# +# This test takes rather long time so let us run it only in --big-test mode +--source include/big_test.inc +# We are using some debug-only features in this test +--source include/have_debug.inc + +# Create auxilliary connections +connect (addconroot1, localhost, root,,); +connect (addconroot2, localhost, root,,); +connect (addconroot3, localhost, root,,); +connection default; + +--disable_warnings +drop table if exists t1,t2,t3,t4,t5; +--enable_warnings + + +# +# Tests for concurrency problems. +# +# We introduce delays between various stages of table creation +# and check that other statements dealing with this table cannot +# interfere during those delays. +# +# What happens in situation when other statement messes with +# table to be created before it is created ? +# Concurrent CREATE TABLE +set session debug="+d,sleep_create_select_before_create"; +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +--error ER_TABLE_EXISTS_ERROR +create table t1 (j char(5)); +connection default; +--reap +show create table t1; +drop table t1; +# Concurrent CREATE TABLE ... SELECT +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +--error ER_TABLE_EXISTS_ERROR +create table t1 select "Test" as j; +connection default; +--reap +show create table t1; +drop table t1; +# Concurrent CREATE TABLE LIKE +create table t3 (j char(5)); +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +--error ER_TABLE_EXISTS_ERROR +create table t1 like t3; +connection default; +--reap +show create table t1; +drop table t1; +# Concurrent RENAME TABLE +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +--error ER_TABLE_EXISTS_ERROR +rename table t3 to t1; +connection default; +--reap +show create table t1; +drop table t1; +# Concurrent ALTER TABLE RENAME +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +--error ER_TABLE_EXISTS_ERROR +alter table t3 rename to t1; +connection default; +--reap +show create table t1; +drop table t1; +# Concurrent ALTER TABLE RENAME which also adds column +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +--error ER_TABLE_EXISTS_ERROR +alter table t3 rename to t1, add k int; +connection default; +--reap +show create table t1; +drop table t1, t3; +# What happens if other statement sneaks in after the table +# creation but before its opening ? +set session debug="-d,sleep_create_select_before_create:+d,sleep_create_select_before_open"; +# Concurrent DROP TABLE +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +drop table t1; +connection default; +--reap +# Concurrent RENAME TABLE +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +rename table t1 to t2; +connection default; +--reap +drop table t2; +# Concurrent SELECT +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +select * from t1; +connection default; +--reap +drop table t1; +# Concurrent INSERT +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +insert into t1 values (2); +connection default; +--reap +select * from t1; +drop table t1; +# Concurrent CREATE TRIGGER +set @a:=0; +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +create trigger t1_bi before insert on t1 for each row set @a:=1; +connection default; +--reap +select @a; +drop table t1; +# Okay, now the same tests for the potential gap between open and lock +set session debug="-d,sleep_create_select_before_open:+d,sleep_create_select_before_lock"; +# Concurrent DROP TABLE +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +drop table t1; +connection default; +--reap +# Concurrent RENAME TABLE +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +rename table t1 to t2; +connection default; +--reap +drop table t2; +# Concurrent SELECT +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +select * from t1; +connection default; +--reap +drop table t1; +# Concurrent INSERT +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +insert into t1 values (2); +connection default; +--reap +select * from t1; +drop table t1; +# Concurrent CREATE TRIGGER +set @a:=0; +--send create table t1 select 1 as i; +connection addconroot1; +--sleep 2 +create trigger t1_bi before insert on t1 for each row set @a:=1; +connection default; +--reap +select @a; +drop table t1; +# Some tests for case with existing table +set session debug="-d,sleep_create_select_before_lock:+d,sleep_create_select_before_check_if_exists"; +create table t1 (i int); +# Concurrent DROP TABLE +--send create table if not exists t1 select 1 as i; +connection addconroot1; +--sleep 2 +drop table t1; +connection default; +--reap +# Concurrent CREATE TRIGGER +create table t1 (i int); +set @a:=0; +--send create table if not exists t1 select 1 as i; +connection addconroot1; +--sleep 2 +create trigger t1_bi before insert on t1 for each row set @a:=1; +connection default; +--reap +select @a; +select * from t1; +drop table t1; +set session debug="-d,sleep_create_select_before_check_if_exists"; + + +# Test for some details of CREATE TABLE ... SELECT implementation. +# +# We check that create placeholder is handled properly if we have +# to reopen tables in open_tables(). +# This test heavily relies on current implementation of name-locking/ +# table cache so it may stop working if it changes. OTOH it such problem +# will serve as warning that such changes should not be done lightly. +create table t2 (a int); +create table t4 (b int); +connection addconroot2; +lock table t4 write; +select 1; +connection addconroot1; +# Create placeholder/name-lock for t3 +--send create table t3 as select * from t4; +--sleep 2 +connection default; +# This statement creates placeholder for t1, then opens t2, +# then meets name-lock for t3 and then reopens all tables +--send create table t1 select * from t2, t3; +--sleep 2 +connection addconroot2; +unlock tables; +connection addconroot1; +--reap +connection default; +--reap +select * from t1; +show create table t1; +drop table t1, t3; +# Now similar test which proves that we really temporarily +# remove placeholder when we reopen tables. +connection addconroot2; +lock table t4 read; +select 1; +connection addconroot1; +# Create name-lock for t3 +--send rename table t4 to t3; +--sleep 2 +connection default; +# This statement creates placeholder for t1, then opens t2, +# then meets name-lock for t3 and then reopens all tables +--send create table if not exists t1 select 1 as i from t2, t3; +--sleep 2 +connection addconroot3; +# We should be able to take name-lock on table t1 as we should not have +# open placeholder for it at this point (otherwise it is possible to +# come-up with situation which will lead to deadlock, e.g. think of +# concurrent CREATE TABLE t1 SELECT * FROM t2 and RENAME TABLE t2 TO t1) +create table t5 (j int); +# This statement takes name-lock on t1 and therefore proves +# that there is no active open placeholder for it. +rename table t5 to t1; +connection addconroot2; +unlock tables; +connection addconroot1; +--reap +connection default; +--reap +select * from t1; +show create table t1; +drop table t1, t2, t3; diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 55b67adf7c6..616e184796e 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -1737,4 +1737,30 @@ DROP TRIGGER trg27006_a_insert; DROP TRIGGER trg27006_a_update; drop table t1,t2; +# +# Bug #20903 "Crash when using CREATE TABLE .. SELECT and triggers" +# + +--disable_warnings +drop table if exists t1, t2, t3; +--enable_warnings +create table t1 (i int); +create trigger t1_bi before insert on t1 for each row set new.i = 7; +create trigger t1_ai after insert on t1 for each row set @a := 7; +create table t2 (j int); +insert into t2 values (1), (2); +set @a:=""; +create table if not exists t1 select * from t2; +select * from t1; +select @a; +# Let us check that trigger that involves table also works ok. +drop trigger t1_bi; +drop trigger t1_ai; +create table t3 (isave int); +create trigger t1_bi before insert on t1 for each row insert into t3 values (new.i); +create table if not exists t1 select * from t2; +select * from t1; +select * from t3; +drop table t1, t2, t3; + --echo End of 5.0 tests diff --git a/sql/lock.cc b/sql/lock.cc index 4427e57a938..ac6e90f68ff 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -892,8 +892,6 @@ end: int lock_table_name(THD *thd, TABLE_LIST *table_list, bool check_in_use) { TABLE *table; - TABLE_SHARE *share; - char *key_buff; char key[MAX_DBKEY_LENGTH]; char *db= table_list->db; uint key_length; @@ -921,29 +919,11 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list, bool check_in_use) } } } - /* - Create a table entry with the right key and with an old refresh version - Note that we must use my_multi_malloc() here as this is freed by the - table cache - */ - if (!my_multi_malloc(MYF(MY_WME | MY_ZEROFILL), - &table, sizeof(*table), - &share, sizeof(*share), - &key_buff, key_length, - NULL)) - DBUG_RETURN(-1); - table->s= share; - share->set_table_cache_key(key_buff, key, key_length); - share->tmp_table= INTERNAL_TMP_TABLE; // for intern_close_table - table->in_use= thd; - table->locked_by_name=1; - table_list->table=table; - if (my_hash_insert(&open_cache, (byte*) table)) - { - my_free((gptr) table,MYF(0)); + if (!(table= table_cache_insert_placeholder(thd, key, key_length))) DBUG_RETURN(-1); - } + + table_list->table=table; /* Return 1 if table is in use */ DBUG_RETURN(test(remove_table_from_cache(thd, db, table_list->table_name, diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 213512cd69f..c245a976b45 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -794,8 +794,6 @@ check_and_unset_inject_value(int value) #endif -uint build_table_path(char *buff, size_t bufflen, const char *db, - const char *table, const char *ext); void write_bin_log(THD *thd, bool clear_error, char const *query, ulong query_length); @@ -970,6 +968,12 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name, List &fields, List &keys, bool tmp_table, uint select_field_count, bool use_copy_create_info); +bool mysql_create_table_no_lock(THD *thd, const char *db, + const char *table_name, + HA_CREATE_INFO *create_info, + List &fields, List &keys, + bool tmp_table, uint select_field_count, + bool use_copy_create_info); bool mysql_alter_table(THD *thd, char *new_db, char *new_name, HA_CREATE_INFO *create_info, @@ -1027,7 +1031,11 @@ TABLE_SHARE *get_cached_table_share(const char *db, const char *table_name); TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT* mem, bool *refresh, uint flags); -bool reopen_name_locked_table(THD* thd, TABLE_LIST* table); +bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list, bool link_in); +TABLE *table_cache_insert_placeholder(THD *thd, const char *key, + uint key_length); +bool lock_table_name_if_not_cached(THD *thd, const char *db, + const char *table_name, TABLE **table); TABLE *find_locked_table(THD *thd, const char *db,const char *table_name); bool reopen_tables(THD *thd,bool get_locks,bool in_refresh); bool close_data_tables(THD *thd,const char *db, const char *table_name); @@ -1195,7 +1203,9 @@ void add_join_on(TABLE_LIST *b,Item *expr); void add_join_natural(TABLE_LIST *a,TABLE_LIST *b,List *using_fields, SELECT_LEX *lex); bool add_proc_to_list(THD *thd, Item *item); -TABLE *unlink_open_table(THD *thd,TABLE *list,TABLE *find); +void unlink_open_table(THD *thd, TABLE *find, bool unlock); +void drop_open_table(THD *thd, TABLE *table, const char *db_name, + const char *table_name); void update_non_unique_table_error(TABLE_LIST *update, const char *operation, TABLE_LIST *duplicate); @@ -1630,7 +1640,7 @@ extern double log_01[32]; extern ulonglong log_10_int[20]; extern ulonglong keybuff_size; extern ulonglong thd_startup_options; -extern ulong refresh_version, thread_id; +extern ulong thread_id; extern ulong binlog_cache_use, binlog_cache_disk_use; extern ulong aborted_threads,aborted_connects; extern ulong delayed_insert_timeout; @@ -1773,7 +1783,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **table, uint count, #define MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK 0x0001 #define MYSQL_LOCK_IGNORE_FLUSH 0x0002 #define MYSQL_LOCK_NOTIFY_IF_NEED_REOPEN 0x0004 -#define MYSQL_OPEN_IGNORE_LOCKED_TABLES 0x0008 +#define MYSQL_OPEN_TEMPORARY_ONLY 0x0008 void mysql_unlock_tables(THD *thd, MYSQL_LOCK *sql_lock); void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f26d6e5777b..3032171dc19 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -97,7 +97,7 @@ static bool open_new_frm(THD *thd, TABLE_SHARE *share, const char *alias, uint db_stat, uint prgflag, uint ha_open_flags, TABLE *outparam, TABLE_LIST *table_desc, MEM_ROOT *mem_root); -static void close_old_data_files(THD *thd, TABLE *table, bool abort_locks, +static void close_old_data_files(THD *thd, TABLE *table, bool morph_locks, bool send_refresh); static bool reopen_table(TABLE *table); static bool @@ -688,6 +688,8 @@ static void close_handle_and_leave_table_as_lock(TABLE *table) MEM_ROOT *mem_root= &table->mem_root; DBUG_ENTER("close_handle_and_leave_table_as_lock"); + DBUG_ASSERT(table->db_stat); + /* Make a local copy of the table share and free the current one. This has to be done to ensure that the table share is removed from @@ -934,8 +936,22 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh, for (uint idx=0 ; idx < open_cache.records ; idx++) { TABLE *table=(TABLE*) hash_element(&open_cache,idx); + /* + Note that we wait here only for tables which are actually open, and + not for placeholders with TABLE::open_placeholder set. Waiting for + latter will cause deadlock in the following scenario, for example: + + conn1: lock table t1 write; + conn2: lock table t2 write; + conn1: flush tables; + conn2: flush tables; + + It also does not make sense to wait for those of placeholders that + are employed by CREATE TABLE as in this case table simply does not + exist yet. + */ if (!table->s->log_table && - ((table->s->version) < refresh_version && table->db_stat)) + (table->needs_reopen_or_name_lock() && table->db_stat)) { found=1; DBUG_PRINT("signal", ("Waiting for COND_refresh")); @@ -1249,10 +1265,10 @@ bool close_thread_table(THD *thd, TABLE **table_ptr) TABLE *table= *table_ptr; DBUG_ENTER("close_thread_table"); DBUG_ASSERT(table->key_read == 0); - DBUG_ASSERT(table->file->inited == handler::NONE); + DBUG_ASSERT(!table->file || table->file->inited == handler::NONE); *table_ptr=table->next; - if (table->s->version != refresh_version || + if (table->needs_reopen_or_name_lock() || thd->version != refresh_version || !table->db_stat) { VOID(hash_delete(&open_cache,(byte*) table)); @@ -1260,6 +1276,12 @@ bool close_thread_table(THD *thd, TABLE **table_ptr) } else { + /* + Open placeholders have TABLE::db_stat set to 0, so they should be + handled by the first alternative. + */ + DBUG_ASSERT(!table->open_placeholder); + /* Free memory and reset for next loop */ table->file->ha_reset(); table->in_use=0; @@ -1778,18 +1800,32 @@ static void relink_unused(TABLE *table) } -/* - Remove all instances of table from the current open list - Free all locks on tables that are done with LOCK TABLES - */ +/** + @brief Remove all instances of table from thread's open list and + table cache. -TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find) + @param thd Thread context + @param find Table to remove + @param unlock TRUE - free all locks on tables removed that are + done with LOCK TABLES + FALSE - otherwise + + @note When unlock parameter is FALSE or current thread doesn't have + any tables locked with LOCK TABLES tables are assumed to be + not locked (for example already unlocked). +*/ + +void unlink_open_table(THD *thd, TABLE *find, bool unlock) { char key[MAX_DBKEY_LENGTH]; uint key_length= find->s->table_cache_key.length; - TABLE *start=list,**prev,*next; - prev= &start; + TABLE *list, **prev, *next; + DBUG_ENTER("unlink_open_table"); + safe_mutex_assert_owner(&LOCK_open); + + list= thd->open_tables; + prev= &thd->open_tables; memcpy(key, find->s->table_cache_key.str, key_length); for (; list ; list=next) { @@ -1797,7 +1833,7 @@ TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find) if (list->s->table_cache_key.length == key_length && !memcmp(list->s->table_cache_key.str, key, key_length)) { - if (thd->locked_tables) + if (unlock && thd->locked_tables) mysql_lock_remove(thd, thd->locked_tables,list); VOID(hash_delete(&open_cache,(byte*) list)); // Close table } @@ -1810,7 +1846,41 @@ TABLE *unlink_open_table(THD *thd, TABLE *list, TABLE *find) *prev=0; // Notify any 'refresh' threads broadcast_refresh(); - return start; + DBUG_VOID_RETURN; +} + + +/** + @brief Auxiliary routine which closes and drops open table. + + @param thd Thread handle + @param table TABLE object for table to be dropped + @param db_name Name of database for this table + @param table_name Name of this table + + @note This routine assumes that table to be closed is open only + by calling thread so we needn't wait until other threads + will close the table. It also assumes that table to be + dropped is already unlocked. +*/ + +void drop_open_table(THD *thd, TABLE *table, const char *db_name, + const char *table_name) +{ + if (table->s->tmp_table) + close_temporary_table(thd, table, 1, 1); + else + { + handlerton *table_type= table->s->db_type; + VOID(pthread_mutex_lock(&LOCK_open)); + /* + unlink_open_table() also tells threads waiting for refresh or close + that something has happened. + */ + unlink_open_table(thd, table, FALSE); + quick_rm_table(table_type, db_name, table_name, 0); + VOID(pthread_mutex_unlock(&LOCK_open)); + } } @@ -1867,6 +1937,11 @@ void wait_for_condition(THD *thd, pthread_mutex_t *mutex, pthread_cond_t *cond) table_list TABLE_LIST object for table to be open, TABLE_LIST::table member should point to TABLE object which was used for name-locking. + link_in TRUE - if TABLE object for table to be opened should be + linked into THD::open_tables list. + FALSE - placeholder used for name-locking is already in + this list so we only need to preserve TABLE::next + pointer. NOTE This function assumes that its caller already acquired LOCK_open mutex. @@ -1876,7 +1951,7 @@ void wait_for_condition(THD *thd, pthread_mutex_t *mutex, pthread_cond_t *cond) TRUE - Error */ -bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) +bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list, bool link_in) { TABLE *table= table_list->table; TABLE_SHARE *share; @@ -1907,11 +1982,32 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) } share= table->s; + /* + We want to prevent other connections from opening this table until end + of statement as it is likely that modifications of table's metadata are + not yet finished (for example CREATE TRIGGER have to change .TRG file, + or we might want to drop table if CREATE TABLE ... SELECT fails). + This also allows us to assume that no other connection will sneak in + before we will get table-level lock on this table. + */ share->version=0; table->in_use = thd; check_unused(); - table->next = thd->open_tables; - thd->open_tables = table; + + if (link_in) + { + table->next= thd->open_tables; + thd->open_tables= table; + } + else + { + /* + TABLE object should be already in THD::open_tables list so we just + need to set TABLE::next correctly. + */ + table->next= orig_table.next; + } + table->tablenr=thd->current_tablenr++; table->used_fields=0; table->const_table=0; @@ -1921,6 +2017,173 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) } +/** + @brief Create and insert into table cache placeholder for table + which will prevent its opening (or creation) (a.k.a lock + table name). + + @param thd Thread context + @param key Table cache key for name to be locked + @param key_length Table cache key length + + @return Pointer to TABLE object used for name locking or 0 in + case of failure. +*/ + +TABLE *table_cache_insert_placeholder(THD *thd, const char *key, + uint key_length) +{ + TABLE *table; + TABLE_SHARE *share; + char *key_buff; + DBUG_ENTER("table_cache_insert_placeholder"); + + safe_mutex_assert_owner(&LOCK_open); + + /* + Create a table entry with the right key and with an old refresh version + Note that we must use my_multi_malloc() here as this is freed by the + table cache + */ + if (!my_multi_malloc(MYF(MY_WME | MY_ZEROFILL), + &table, sizeof(*table), + &share, sizeof(*share), + &key_buff, key_length, + NULL)) + DBUG_RETURN(NULL); + + table->s= share; + share->set_table_cache_key(key_buff, key, key_length); + share->tmp_table= INTERNAL_TMP_TABLE; // for intern_close_table + table->in_use= thd; + table->locked_by_name=1; + + if (my_hash_insert(&open_cache, (byte*)table)) + { + my_free((gptr) table, MYF(0)); + DBUG_RETURN(NULL); + } + + DBUG_RETURN(table); +} + + +/** + @brief Obtain an exclusive name lock on the table if it is not cached + in the table cache. + + @param thd Thread context + @param db Name of database + @param table_name Name of table + @param[out] table Out parameter which is either: + - set to NULL if table cache contains record for + the table or + - set to point to the TABLE instance used for + name-locking. + + @note This function takes into account all records for table in table + cache, even placeholders used for name-locking. This means that + 'table' parameter can be set to NULL for some situations when + table does not really exist. + + @retval TRUE Error occured (OOM) + @retval FALSE Success. 'table' parameter set according to above rules. +*/ + +bool lock_table_name_if_not_cached(THD *thd, const char *db, + const char *table_name, TABLE **table) +{ + char key[MAX_DBKEY_LENGTH]; + uint key_length; + DBUG_ENTER("lock_table_name_if_not_cached"); + + key_length= (uint)(strmov(strmov(key, db) + 1, table_name) - key) + 1; + VOID(pthread_mutex_lock(&LOCK_open)); + + if (hash_search(&open_cache, (byte *)key, key_length)) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_PRINT("info", ("Table is cached, name-lock is not obtained")); + *table= 0; + DBUG_RETURN(FALSE); + } + if (!(*table= table_cache_insert_placeholder(thd, key, key_length))) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(TRUE); + } + (*table)->open_placeholder= 1; + (*table)->next= thd->open_tables; + thd->open_tables= *table; + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(FALSE); +} + + +/** + @brief Check that table exists in table definition cache, on disk + or in some storage engine. + + @param thd Thread context + @param table Table list element + @param exists[out] Out parameter which is set to TRUE if table + exists and to FALSE otherwise. + + @note This function assumes that caller owns LOCK_open mutex. + It also assumes that the fact that there are no name-locks + on the table was checked beforehand. + + @note If there is no .FRM file for the table but it exists in one + of engines (e.g. it was created on another node of NDB cluster) + this function will fetch and create proper .FRM file for it. + + @retval TRUE Some error occured + @retval FALSE No error. 'exists' out parameter set accordingly. +*/ + +bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists) +{ + char path[FN_REFLEN]; + int rc; + DBUG_ENTER("check_if_table_exists"); + + safe_mutex_assert_owner(&LOCK_open); + + *exists= TRUE; + + if (get_cached_table_share(table->db, table->table_name)) + DBUG_RETURN(FALSE); + + build_table_filename(path, sizeof(path) - 1, table->db, table->table_name, + reg_ext, 0); + + if (!access(path, F_OK)) + DBUG_RETURN(FALSE); + + /* .FRM file doesn't exist. Check if some engine can provide it. */ + + rc= ha_create_table_from_engine(thd, table->db, table->table_name); + + if (rc < 0) + { + /* Table does not exists in engines as well. */ + *exists= FALSE; + DBUG_RETURN(FALSE); + } + else if (!rc) + { + /* Table exists in some engine and .FRM for it was created. */ + DBUG_RETURN(FALSE); + } + else /* (rc > 0) */ + { + my_printf_error(ER_UNKNOWN_ERROR, "Failed to open '%-.64s', error while " + "unpacking from engine", MYF(0), table->table_name); + DBUG_RETURN(TRUE); + } +} + + /* Open a table. @@ -1936,12 +2199,17 @@ bool reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) MYSQL_LOCK_IGNORE_FLUSH - Open table even if someone has done a flush or namelock on it. No version number checking is done. - MYSQL_OPEN_IGNORE_LOCKED_TABLES - Open table - ignoring set of locked tables and prelocked mode. + MYSQL_OPEN_TEMPORARY_ONLY - Open only temporary + table not the base table or view. IMPLEMENTATION Uses a cache of open tables to find a table not in use. + If table list element for the table to be opened has "create" flag + set and table does not exist, this function will automatically insert + a placeholder for exclusive name lock into the open tables cache and + will return the TABLE instance that corresponds to this placeholder. + RETURN NULL Open failed. If refresh is set then one should close all other tables and retry the open. @@ -2014,6 +2282,12 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, } } + if (flags & MYSQL_OPEN_TEMPORARY_ONLY) + { + my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, table_list->table_name); + DBUG_RETURN(0); + } + /* The table is not temporary - if we're in pre-locked or LOCK TABLES mode, let's try to find the requested table in the list of pre-opened @@ -2021,8 +2295,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, open not pre-opened tables in pre-locked/LOCK TABLES mode. TODO: move this block into a separate function. */ - if (!(flags & MYSQL_OPEN_IGNORE_LOCKED_TABLES) && - (thd->locked_tables || thd->prelocked_mode)) + if (thd->locked_tables || thd->prelocked_mode) { // Using table locks TABLE *best_table= 0; int best_distance= INT_MIN; @@ -2204,7 +2477,7 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, c1: name lock t2; -- blocks c2: open t1; -- blocks */ - if (table->s->version != refresh_version && !table->s->log_table) + if (table->needs_reopen_or_name_lock() && !table->s->log_table) { DBUG_PRINT("note", ("Found table '%s.%s' with different refresh version", @@ -2217,6 +2490,14 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, continue; } + /* Avoid self-deadlocks by detecting self-dependencies. */ + if (table->open_placeholder && table->in_use == thd) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + my_error(ER_UPDATE_TABLE_USED, MYF(0), table->s->table_name.str); + DBUG_RETURN(0); + } + /* Back off, part 1: mark the table as "unused" for the purpose of name-locking by setting table->db_stat to 0. Do @@ -2233,6 +2514,14 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, and wait till the operation is complete: when any operation that juggles with table->s->version completes, it broadcasts COND_refresh condition variable. + If 'old' table we met is in use by current thread we return + without waiting since in this situation it's this thread + which is responsible for broadcasting on COND_refresh + (and this was done already in close_old_data_files()). + Good example of such situation is when we have statement + that needs two instances of table and FLUSH TABLES comes + after we open first instance but before we open second + instance. */ if (table->in_use != thd) { @@ -2273,6 +2562,40 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, while (open_cache.records > table_cache_size && unused_tables) VOID(hash_delete(&open_cache,(byte*) unused_tables)); /* purecov: tested */ + if (table_list->create) + { + bool exists; + + if (check_if_table_exists(thd, table_list, &exists)) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(NULL); + } + + if (!exists) + { + /* + Table to be created, so we need to create placeholder in table-cache. + */ + if (!(table= table_cache_insert_placeholder(thd, key, key_length))) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(NULL); + } + /* + Link placeholder to the open tables list so it will be automatically + removed once tables are closed. Also mark it so it won't be ignored + by other trying to take name-lock. + */ + table->open_placeholder= 1; + table->next= thd->open_tables; + thd->open_tables= table; + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(table); + } + /* Table exists. Let us try to open it. */ + } + /* make a new table */ if (!(table=(TABLE*) my_malloc(sizeof(*table),MYF(MY_WME)))) { @@ -2489,9 +2812,24 @@ bool close_data_tables(THD *thd,const char *db, const char *table_name) } -/* - Reopen all tables with closed data files - One should have lock on LOCK_open when calling this +/** + @brief Reopen all tables with closed data files. + + @param thd Thread context + @param get_locks Should we get locks after reopening tables ? + @param in_refresh Are we in FLUSH TABLES ? TODO: It seems that + we can remove this parameter. + + @note Since this function can't properly handle prelocking and + create placeholders it should be used in very special + situations like FLUSH TABLES or ALTER TABLE. In general + case one should just repeat open_tables()/lock_tables() + combination when one needs tables to be reopened (for + example see open_and_lock_tables()). + + @note One should have lock on LOCK_open when calling this. + + @return FALSE in case of success, TRUE - otherwise. */ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh) @@ -2537,7 +2875,7 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh) if (in_refresh) { table->s->version=0; - table->locked_by_flush=0; + table->open_placeholder= 0; } } } @@ -2564,13 +2902,21 @@ bool reopen_tables(THD *thd,bool get_locks,bool in_refresh) } -/* - Close handlers for tables in list, but leave the TABLE structure - intact so that we can re-open these quickly - abort_locks is set if called from flush_tables. +/** + @brief Close handlers for tables in list, but leave the TABLE structure + intact so that we can re-open these quickly. + + @param thd Thread context + @param table Head of the list of TABLE objects + @param morph_locks TRUE - remove locks which we have on tables being closed + but ensure that no DML or DDL will sneak in before + we will re-open the table (i.e. temporarily morph + our table-level locks into name-locks). + FALSE - otherwise + @param send_refresh Should we awake waiters even if we didn't close any tables? */ -void close_old_data_files(THD *thd, TABLE *table, bool abort_locks, +void close_old_data_files(THD *thd, TABLE *table, bool morph_locks, bool send_refresh) { bool found= send_refresh; @@ -2582,19 +2928,41 @@ void close_old_data_files(THD *thd, TABLE *table, bool abort_locks, Reopen marked for flush. But close log tables. They are flushed only explicitly on FLUSH LOGS */ - if (table->s->version != refresh_version && !table->s->log_table) + if (table->needs_reopen_or_name_lock() && !table->s->log_table) { found=1; if (table->db_stat) { - if (abort_locks) + if (morph_locks) { - mysql_lock_abort(thd,table, TRUE); // Close waiting threads - mysql_lock_remove(thd, thd->locked_tables,table); - table->locked_by_flush=1; // Will be reopened with locks + /* + Wake up threads waiting for table-level lock on this table + so they won't sneak in when we will temporarily remove our + lock on it. This will also give them a chance to close their + instances of this table. + */ + mysql_lock_abort(thd, table, TRUE); + mysql_lock_remove(thd, thd->locked_tables, table); + /* + We want to protect the table from concurrent DDL operations + (like RENAME TABLE) until we will re-open and re-lock it. + */ + table->open_placeholder= 1; } close_handle_and_leave_table_as_lock(table); } + else if (table->open_placeholder) + { + /* + We come here only in close-for-back-off scenario. So we have to + "close" create placeholder here to avoid deadlocks (for example, + in case of concurrent execution of CREATE TABLE t1 SELECT * FROM t2 + and RENAME TABLE t2 TO t1). In close-for-re-open scenario we will + probably want to let it stay. + */ + DBUG_ASSERT(!morph_locks); + table->open_placeholder= 0; + } } } if (found) @@ -2630,10 +2998,10 @@ bool table_is_used(TABLE *table, bool wait_for_name_lock) key_length, &state)) { DBUG_PRINT("info", ("share: 0x%lx locked_by_logger: %d " - "locked_by_flush: %d locked_by_name: %d " + "open_placeholder: %d locked_by_name: %d " "db_stat: %u version: %lu", (ulong) search->s, search->locked_by_logger, - search->locked_by_flush, search->locked_by_name, + search->open_placeholder, search->locked_by_name, search->db_stat, search->s->version)); if (search->in_use == table->in_use) @@ -2649,8 +3017,7 @@ bool table_is_used(TABLE *table, bool wait_for_name_lock) */ if (!search->locked_by_logger && (search->locked_by_name && wait_for_name_lock || - search->locked_by_flush || - (search->db_stat && search->s->version < refresh_version))) + (search->is_name_opened() && search->needs_reopen_or_name_lock()))) DBUG_RETURN(1); } } while ((table=table->next)); @@ -6637,7 +7004,7 @@ bool remove_table_from_cache(THD *thd, const char *db, const char *table_name, { DBUG_PRINT("info", ("Table was in use by other thread")); in_use->some_tables_deleted=1; - if (table->db_stat) + if (table->is_name_opened()) { DBUG_PRINT("info", ("Found another active instance of the table")); result=1; @@ -7012,7 +7379,7 @@ has_two_write_locked_tables_with_auto_increment(TABLE_LIST *tables) for (TABLE_LIST *table= tables; table; table= table->next_global) { /* we must do preliminary checks as table->table may be NULL */ - if (!table->placeholder() && !table->schema_table && + if (!table->placeholder() && table->table->found_next_number_field && (table->lock_type >= TL_WRITE_ALLOW_WRITE)) { diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index cd87330cedb..aaca6373f37 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -682,7 +682,7 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags, while (*table_ptr) { if ((mode_flags & MYSQL_HA_FLUSH_ALL) || - ((*table_ptr)->s->version != refresh_version)) + (*table_ptr)->needs_reopen_or_name_lock()) { /* The first time it is required, lock for close_thread_table(). */ if (! did_lock && ! is_locked) @@ -783,15 +783,22 @@ void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table) safe_mutex_assert_owner(&LOCK_open); for (; table; table= table->next) { - TABLE_LIST *hash_tables; - if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash, - (byte*) table->alias, - strlen(table->alias) + 1))) + /* + Some elements in open table list, for example placeholders used for + name-locking, can have alias set to 0. + */ + if (table->alias) { - /* Mark table as ready for reopen. */ - hash_tables->table= NULL; - /* End open index/table scans. */ - table->file->ha_index_or_rnd_end(); + TABLE_LIST *hash_tables; + if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash, + (byte*) table->alias, + strlen(table->alias) + 1))) + { + /* Mark table as ready for reopen. */ + hash_tables->table= NULL; + /* End open index/table scans. */ + table->file->ha_index_or_rnd_end(); + } } } DBUG_VOID_RETURN; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index f6ae2df3750..d6fd8359333 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2261,7 +2261,7 @@ bool delayed_insert::handle_inserts(void) thd.proc_info="insert"; max_rows= delayed_insert_limit; - if (thd.killed || table->s->version != refresh_version) + if (thd.killed || table->needs_reopen_or_name_lock()) { thd.killed= THD::KILL_CONNECTION; max_rows= ULONG_MAX; // Do as much as possible @@ -2962,8 +2962,8 @@ bool select_insert::send_eof() ***************************************************************************/ /* - Create table from lists of fields and items (or open existing table - with same name). + Create table from lists of fields and items (or just return TABLE + object for pre-opened existing table). SYNOPSIS create_table_from_items() @@ -2978,19 +2978,25 @@ bool select_insert::send_eof() of fields for the table (corresponding fields will be added to the end of 'extra_fields' list) lock out Pointer to the MYSQL_LOCK object for table created - (open) will be returned in this parameter. Since - this table is not included in THD::lock caller is - responsible for explicitly unlocking this table. + (or open temporary table) will be returned in this + parameter. Since this table is not included in + THD::lock caller is responsible for explicitly + unlocking this table. hooks NOTES - If 'create_info->options' bitmask has HA_LEX_CREATE_IF_NOT_EXISTS - flag and table with name provided already exists then this function will - simply open existing table. - Also note that create, open and lock sequence in this function is not - atomic and thus contains gap for deadlock and can cause other troubles. - Since this function contains some logic specific to CREATE TABLE ... SELECT - it should be changed before it can be used in other contexts. + This function behaves differently for base and temporary tables: + - For base table we assume that either table exists and was pre-opened + and locked at open_and_lock_tables() stage (and in this case we just + emit error or warning and return pre-opened TABLE object) or special + placeholder was put in table cache that guarantees that this table + won't be created or opened until the placeholder will be removed + (so there is an exclusive lock on this table). + - We don't pre-open existing temporary table, instead we either open + or create and then open table in this function. + + Since this function contains some logic specific to CREATE TABLE ... + SELECT it should be changed before it can be used in other contexts. RETURN VALUES non-zero Pointer to TABLE object for table created or opened @@ -3016,6 +3022,25 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, bool not_used; DBUG_ENTER("create_table_from_items"); + DBUG_EXECUTE_IF("sleep_create_select_before_check_if_exists", my_sleep(6000000);); + + if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE) && + create_table->table->db_stat) + { + /* Table already exists and was open at open_and_lock_tables() stage. */ + if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + { + create_info->table_existed= 1; // Mark that table existed + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR), + create_table->table_name); + DBUG_RETURN(create_table->table); + } + + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name); + DBUG_RETURN(0); + } + tmp_table.alias= 0; tmp_table.timestamp_field= 0; tmp_table.s= &share; @@ -3047,8 +3072,15 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, cr_field->flags &= ~NOT_NULL_FLAG; extra_fields->push_back(cr_field); } + + DBUG_EXECUTE_IF("sleep_create_select_before_create", my_sleep(6000000);); + /* - create and lock table + Create and lock table. + + Note that we either creating (or opening existing) temporary table or + creating base table on which name we have exclusive lock. So code below + should not cause deadlocks or races. We don't log the statement, it will be logged later. @@ -3058,63 +3090,74 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, don't want to delete from it) 2) it would be written before the CREATE TABLE, which is a wrong order. So we keep binary logging disabled when we open_table(). - NOTE: By locking table which we just have created (or for which we just - have have found that it already exists) separately from other tables used - by the statement we create potential window for deadlock. - TODO: create and open should be done atomic ! */ { tmp_disable_binlog(thd); - if (!mysql_create_table(thd, create_table->db, create_table->table_name, - create_info, *extra_fields, *keys, 0, - select_field_count, 0)) + if (!mysql_create_table_no_lock(thd, create_table->db, + create_table->table_name, + create_info, *extra_fields, *keys, 0, + select_field_count, 0)) { - /* - If we are here in prelocked mode we either create temporary table - or prelocked mode is caused by the SELECT part of this statement. - */ - DBUG_ASSERT(!thd->prelocked_mode || - create_info->options & HA_LEX_CREATE_TMP_TABLE || - thd->lex->requires_prelocking()); - /* - NOTE: We don't want to ignore set of locked tables here if we are - under explicit LOCK TABLES since it will open gap for deadlock - too wide (and also is not backward compatible). - */ + if (create_info->table_existed && + !(create_info->options & HA_LEX_CREATE_TMP_TABLE)) + { + /* + This means that someone created table underneath server + or it was created via different mysqld front-end to the + cluster. We don't have much options but throw an error. + */ + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), create_table->table_name); + DBUG_RETURN(0); + } + + DBUG_EXECUTE_IF("sleep_create_select_before_open", my_sleep(6000000);); + + if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE)) + { + VOID(pthread_mutex_lock(&LOCK_open)); + if (reopen_name_locked_table(thd, create_table, FALSE)) + { + quick_rm_table(create_info->db_type, create_table->db, + table_case_name(create_info, create_table->table_name), + 0); + } + else + table= create_table->table; + VOID(pthread_mutex_unlock(&LOCK_open)); + } + else + { + if (!(table= open_table(thd, create_table, thd->mem_root, (bool*) 0, + MYSQL_OPEN_TEMPORARY_ONLY)) && + !create_info->table_existed) + { + /* + This shouldn't happen as creation of temporary table should make + it preparable for open. But let us do close_temporary_table() here + just in case. + */ + close_temporary_table(thd, create_table); + } + } - if (! (table= open_table(thd, create_table, thd->mem_root, (bool*) 0, - (MYSQL_LOCK_IGNORE_FLUSH | - ((thd->prelocked_mode == PRELOCKED) ? - MYSQL_OPEN_IGNORE_LOCKED_TABLES:0))))) - quick_rm_table(create_info->db_type, create_table->db, - table_case_name(create_info, create_table->table_name), - 0); } reenable_binlog(thd); if (!table) // open failed DBUG_RETURN(0); } - /* - FIXME: What happens if trigger manages to be created while we are - obtaining this lock ? May be it is sensible just to disable - trigger execution in this case ? Or will MYSQL_LOCK_IGNORE_FLUSH - save us from that ? - */ + DBUG_EXECUTE_IF("sleep_create_select_before_lock", my_sleep(6000000);); + table->reginfo.lock_type=TL_WRITE; hooks->prelock(&table, 1); // Call prelock hooks if (! ((*lock)= mysql_lock_tables(thd, &table, 1, MYSQL_LOCK_IGNORE_FLUSH, ¬_used))) { - VOID(pthread_mutex_lock(&LOCK_open)); - hash_delete(&open_cache,(byte*) table); - VOID(pthread_mutex_unlock(&LOCK_open)); - quick_rm_table(create_info->db_type, create_table->db, - table_case_name(create_info, create_table->table_name), 0); + if (!create_info->table_existed) + drop_open_table(thd, table, create_table->db, create_table->table_name); DBUG_RETURN(0); } - table->file->extra(HA_EXTRA_WRITE_CACHE); DBUG_RETURN(table); } @@ -3217,6 +3260,7 @@ select_create::prepare(List &values, SELECT_LEX_UNIT *u) if (check_that_all_fields_are_given_values(thd, table, table_list)) DBUG_RETURN(1); table->mark_columns_needed_for_insert(); + table->file->extra(HA_EXTRA_WRITE_CACHE); DBUG_RETURN(0); } @@ -3319,24 +3363,19 @@ bool select_create::send_eof() table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); - VOID(pthread_mutex_lock(&LOCK_open)); - mysql_unlock_tables(thd, thd->extra_lock); - if (!table->s->tmp_table) + if (thd->extra_lock) { - if (close_thread_table(thd, &table)) - broadcast_refresh(); + mysql_unlock_tables(thd, thd->extra_lock); + thd->extra_lock=0; } - thd->extra_lock=0; - table=0; - VOID(pthread_mutex_unlock(&LOCK_open)); } return tmp; } + void select_create::abort() { DBUG_ENTER("select_create::abort"); - VOID(pthread_mutex_lock(&LOCK_open)); /* We roll back the statement, including truncating the transaction @@ -3364,24 +3403,10 @@ void select_create::abort() { table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); - handlerton *table_type=table->s->db_type; - if (!table->s->tmp_table) - { - ulong version= table->s->version; - table->s->version= 0; - hash_delete(&open_cache,(byte*) table); - if (!create_info->table_existed) - quick_rm_table(table_type, create_table->db, - create_table->table_name, 0); - /* Tell threads waiting for refresh that something has happened */ - if (version != refresh_version) - broadcast_refresh(); - } - else if (!create_info->table_existed) - close_temporary_table(thd, table, 1, 1); + if (!create_info->table_existed) + drop_open_table(thd, table, create_table->db, create_table->table_name); table=0; // Safety } - VOID(pthread_mutex_unlock(&LOCK_open)); DBUG_VOID_RETURN; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 702deac376b..f6924e67057 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2164,7 +2164,13 @@ mysql_execute_command(THD *thd) select_lex->options|= SELECT_NO_UNLOCK; unit->set_limit(select_lex); - if (!(res= open_and_lock_tables(thd, select_tables))) + if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + { + lex->link_first_table_back(create_table, link_to_local); + create_table->create= TRUE; + } + + if (!(res= open_and_lock_tables(thd, lex->query_tables))) { /* Is table which we are changing used somewhere in other parts @@ -2173,6 +2179,7 @@ mysql_execute_command(THD *thd) if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) { TABLE_LIST *duplicate; + create_table= lex->unlink_first_table(&link_to_local); if ((duplicate= unique_table(thd, create_table, select_tables, 0))) { update_non_unique_table_error(create_table, "CREATE", duplicate); @@ -2198,6 +2205,12 @@ mysql_execute_command(THD *thd) } } + /* + FIXME Temporary hack which will go away once Kostja pushes + his uber-fix for ALTER/CREATE TABLE. + */ + lex->create_info.table_existed= 0; + if ((result= new select_create(create_table, &lex->create_info, lex->create_list, @@ -2217,6 +2230,9 @@ mysql_execute_command(THD *thd) lex->create_list.empty(); lex->key_list.empty(); } + else if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + create_table= lex->unlink_first_table(&link_to_local); + } else { diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index ca1b29ea57d..e3d59060b86 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1492,8 +1492,21 @@ static bool mysql_test_create_table(Prepared_statement *stmt) if (select_lex->item_list.elements) { + if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + { + lex->link_first_table_back(create_table, link_to_local); + create_table->create= TRUE; + } + + if (open_normal_and_derived_tables(stmt->thd, lex->query_tables, 0)) + DBUG_RETURN(TRUE); + + if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) + create_table= lex->unlink_first_table(&link_to_local); + select_lex->context.resolve_in_select_list= TRUE; - res= select_like_stmt_test_with_open(stmt, tables, 0, 0); + + res= select_like_stmt_test(stmt, 0, 0); } /* put tables back for PS rexecuting */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 1047b1ec35d..6f59e326814 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3196,7 +3196,7 @@ static HA_CREATE_INFO *copy_create_info(HA_CREATE_INFO *lex_create_info) Create a table SYNOPSIS - mysql_create_table_internal() + mysql_create_table_no_lock() thd Thread object db Database table_name Table name @@ -3213,6 +3213,11 @@ static HA_CREATE_INFO *copy_create_info(HA_CREATE_INFO *lex_create_info) DESCRIPTION If one creates a temporary table, this is automatically opened + Note that this function assumes that caller already have taken + name-lock on table being created or used some other way to ensure + that concurrent operations won't intervene. mysql_create_table() + is a wrapper that can be used for this. + no_log is needed for the case of CREATE ... SELECT, as the logging will be done later in sql_insert.cc select_field_count is also used for CREATE ... SELECT, @@ -3223,7 +3228,7 @@ static HA_CREATE_INFO *copy_create_info(HA_CREATE_INFO *lex_create_info) TRUE error */ -bool mysql_create_table_internal(THD *thd, +bool mysql_create_table_no_lock(THD *thd, const char *db, const char *table_name, HA_CREATE_INFO *lex_create_info, List &fields, @@ -3239,7 +3244,7 @@ bool mysql_create_table_internal(THD *thd, HA_CREATE_INFO *create_info; handler *file; bool error= TRUE; - DBUG_ENTER("mysql_create_table_internal"); + DBUG_ENTER("mysql_create_table_no_lock"); DBUG_PRINT("enter", ("db: '%s' table: '%s' tmp: %d", db, table_name, internal_tmp_table)); @@ -3581,7 +3586,7 @@ warn: /* - Database locking aware wrapper for mysql_create_table_internal(), + Database and name-locking aware wrapper for mysql_create_table_no_lock(), */ bool mysql_create_table(THD *thd, const char *db, const char *table_name, @@ -3591,6 +3596,7 @@ bool mysql_create_table(THD *thd, const char *db, const char *table_name, uint select_field_count, bool use_copy_create_info) { + TABLE *name_lock= 0; bool result; DBUG_ENTER("mysql_create_table"); @@ -3611,11 +3617,44 @@ bool mysql_create_table(THD *thd, const char *db, const char *table_name, creating_table++; pthread_mutex_unlock(&LOCK_lock_db); - result= mysql_create_table_internal(thd, db, table_name, create_info, - fields, keys, internal_tmp_table, - select_field_count, - use_copy_create_info); + if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE)) + { + if (lock_table_name_if_not_cached(thd, db, table_name, &name_lock)) + { + result= TRUE; + goto unlock; + } + if (!name_lock) + { + if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + { + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR), + table_name); + create_info->table_existed= 1; + result= FALSE; + } + else + { + my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); + result= TRUE; + } + goto unlock; + } + } + result= mysql_create_table_no_lock(thd, db, table_name, create_info, + fields, keys, internal_tmp_table, + select_field_count, + use_copy_create_info); + +unlock: + if (name_lock) + { + pthread_mutex_lock(&LOCK_open); + unlink_open_table(thd, name_lock, FALSE); + pthread_mutex_unlock(&LOCK_open); + } pthread_mutex_lock(&LOCK_lock_db); if (!--creating_table && creating_database) pthread_cond_signal(&COND_refresh); @@ -3818,7 +3857,7 @@ void close_cached_table(THD *thd, TABLE *table) thd->lock=0; // Start locked threads } /* Close all copies of 'table'. This also frees all LOCK TABLES lock */ - thd->open_tables=unlink_open_table(thd,thd->open_tables,table); + unlink_open_table(thd, table, TRUE); /* When lock on LOCK_open is freed other threads can continue */ broadcast_refresh(); @@ -3894,7 +3933,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table, to finish the restore in the handler later on */ pthread_mutex_lock(&LOCK_open); - if (reopen_name_locked_table(thd, table)) + if (reopen_name_locked_table(thd, table, TRUE)) { unlock_table_name(thd, table); pthread_mutex_unlock(&LOCK_open); @@ -4026,7 +4065,7 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, to finish the repair in the handler later on. */ pthread_mutex_lock(&LOCK_open); - if (reopen_name_locked_table(thd, table_list)) + if (reopen_name_locked_table(thd, table_list, TRUE)) { unlock_table_name(thd, table_list); pthread_mutex_unlock(&LOCK_open); @@ -4632,7 +4671,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, HA_CREATE_INFO *lex_create_info, Table_ident *table_ident) { - TABLE *tmp_table; + TABLE *tmp_table, *name_lock= 0; char src_path[FN_REFLEN], dst_path[FN_REFLEN]; char src_table_name_buff[FN_REFLEN], src_db_name_buff[FN_REFLEN]; uint dst_path_length; @@ -4641,14 +4680,14 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, char *src_db; char *src_table= table_ident->table.str; int err; - bool res= TRUE, unlock_dst_table= FALSE; + bool res= TRUE; enum legacy_db_type not_used; HA_CREATE_INFO *create_info; #ifdef WITH_PARTITION_STORAGE_ENGINE char tmp_path[FN_REFLEN]; #endif char ts_name[FN_LEN]; - TABLE_LIST src_tables_list, dst_tables_list; + TABLE_LIST src_tables_list; DBUG_ENTER("mysql_create_like_table"); if (!(create_info= copy_create_info(lex_create_info))) @@ -4756,6 +4795,10 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, } else { + if (lock_table_name_if_not_cached(thd, db, table_name, &name_lock)) + goto err; + if (!name_lock) + goto table_exists; dst_path_length= build_table_filename(dst_path, sizeof(dst_path), db, table_name, reg_ext, 0); if (!access(dst_path, F_OK)) @@ -4843,28 +4886,21 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, char buf[2048]; String query(buf, sizeof(buf), system_charset_info); query.length(0); // Have to zero it since constructor doesn't - uint counter; /* - Here we open the destination table. This is needed for - store_create_info() to work. The table will be closed - by close_thread_tables() at the end of the statement. + Here we open the destination table, on which we already have + name-lock. This is needed for store_create_info() to work. + The table will be closed by unlink_open_table() at the end + of this function. */ - if (open_tables(thd, &table, &counter, 0)) + table->table= name_lock; + VOID(pthread_mutex_lock(&LOCK_open)); + if (reopen_name_locked_table(thd, table, FALSE)) + { + VOID(pthread_mutex_unlock(&LOCK_open)); goto err; - - bzero((gptr)&dst_tables_list, sizeof(dst_tables_list)); - dst_tables_list.db= table->db; - dst_tables_list.table_name= table->table_name; - - /* - lock destination table name, to make sure that nobody - can drop/alter the table while we execute store_create_info() - */ - if (lock_and_wait_for_table_name(thd, &dst_tables_list)) - goto err; - else - unlock_dst_table= TRUE; + } + VOID(pthread_mutex_unlock(&LOCK_open)); IF_DBUG(int result=) store_create_info(thd, table, &query, create_info); @@ -4899,10 +4935,10 @@ table_exists: my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name); err: - if (unlock_dst_table) + if (name_lock) { pthread_mutex_lock(&LOCK_open); - unlock_table_name(thd, &dst_tables_list); + unlink_open_table(thd, name_lock, FALSE); pthread_mutex_unlock(&LOCK_open); } DBUG_RETURN(res); @@ -5349,7 +5385,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, uint order_num, ORDER *order, bool ignore, ALTER_INFO *alter_info, bool do_send_ok) { - TABLE *table,*new_table=0; + TABLE *table, *new_table= 0, *name_lock= 0; int error= 0; char tmp_name[80],old_name[32],new_name_buff[FN_REFLEN]; char new_alias_buff[FN_REFLEN], *table_name, *db, *new_alias, *alias; @@ -5486,6 +5522,18 @@ view_err: DBUG_RETURN(TRUE); table->use_all_columns(); + List_iterator drop_it(alter_info->drop_list); + List_iterator def_it(fields); + List_iterator alter_it(alter_info->alter_list); + List create_list; // Add new fields here + List key_list; // Add new keys here + List_iterator find_it(create_list); + List_iterator key_it(keys); + List_iterator field_it(create_list); + List key_parts; + + KEY *key_info=table->key_info; + /* Check that we are not trying to rename to an existing table */ if (new_name) { @@ -5522,13 +5570,21 @@ view_err: } else { + if (lock_table_name_if_not_cached(thd, new_db, new_name, &name_lock)) + DBUG_RETURN(TRUE); + if (!name_lock) + { + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias); + DBUG_RETURN(TRUE); + } + build_table_filename(new_name_buff, sizeof(new_name_buff), new_db, new_name_buff, reg_ext, 0); if (!access(new_name_buff, F_OK)) { /* Table will be closed in do_command() */ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias); - DBUG_RETURN(TRUE); + goto err; } } } @@ -5563,12 +5619,10 @@ view_err: #ifdef WITH_PARTITION_STORAGE_ENGINE if (prep_alter_part_table(thd, table, alter_info, create_info, old_db_type, &partition_changed, &fast_alter_partition)) - { - DBUG_RETURN(TRUE); - } + goto err; #endif if (check_engine(thd, new_name, create_info)) - DBUG_RETURN(TRUE); + goto err; new_db_type= create_info->db_type; if (create_info->row_type == ROW_TYPE_NOT_USED) create_info->row_type= table->s->row_type; @@ -5581,7 +5635,7 @@ view_err: { DBUG_PRINT("info", ("doesn't support alter")); my_error(ER_ILLEGAL_HA, MYF(0), table_name); - DBUG_RETURN(TRUE); + goto err; } thd->proc_info="setup"; @@ -5640,7 +5694,19 @@ view_err: if (!error && (new_name != table_name || new_db != db)) { thd->proc_info="rename"; - /* Then do a 'simple' rename of the table */ + /* + Then do a 'simple' rename of the table. First we need to close all + instances of 'source' table. + */ + close_cached_table(thd, table); + /* + Then, we want check once again that target table does not exist. + Actually the order of these two steps does not matter since + earlier we took name-lock on the target table, so we do them + in this particular order only to be consistent with 5.0, in which + we don't take this name-lock and where this order really matters. + TODO: Investigate if we need this access() check at all. + */ if (!access(new_name_buff,F_OK)) { my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name); @@ -5649,8 +5715,6 @@ view_err: else { *fn_ext(new_name)=0; - table->s->version= 0; // Force removal of table def - close_cached_table(thd, table); if (mysql_rename_table(old_db_type,db,table_name,new_db,new_alias, 0)) error= -1; else if (Table_triggers_list::change_table_name(thd, db, table_name, @@ -5682,6 +5746,8 @@ view_err: table->file->print_error(error, MYF(0)); error= -1; } + if (name_lock) + unlink_open_table(thd, name_lock, FALSE); VOID(pthread_mutex_unlock(&LOCK_open)); table_list->table= NULL; // For query cache query_cache_invalidate3(thd, table_list, 0); @@ -5718,11 +5784,6 @@ view_err: create_info->tablespace= tablespace; } restore_record(table, s->default_values); // Empty record for DEFAULT - List_iterator drop_it(alter_info->drop_list); - List_iterator def_it(fields); - List_iterator alter_it(alter_info->alter_list); - List create_list; // Add new fields here - List key_list; // Add new keys here create_field *def; /* @@ -5793,7 +5854,7 @@ view_err: if (def->sql_type == MYSQL_TYPE_BLOB) { my_error(ER_BLOB_CANT_HAVE_DEFAULT, MYF(0), def->change); - DBUG_RETURN(TRUE); + goto err; } if ((def->def=alter->def)) // Use new default def->flags&= ~NO_DEFAULT_VALUE_FLAG; @@ -5804,13 +5865,12 @@ view_err: } } def_it.rewind(); - List_iterator find_it(create_list); while ((def=def_it++)) // Add new columns { if (def->change && ! def->field) { my_error(ER_BAD_FIELD_ERROR, MYF(0), def->change, table_name); - DBUG_RETURN(TRUE); + goto err; } if (!def->after) create_list.push_back(def); @@ -5828,7 +5888,7 @@ view_err: if (!find) { my_error(ER_BAD_FIELD_ERROR, MYF(0), def->after, table_name); - DBUG_RETURN(TRUE); + goto err; } find_it.after(def); // Put element after this } @@ -5837,13 +5897,13 @@ view_err: { my_error(ER_BAD_FIELD_ERROR, MYF(0), alter_info->alter_list.head()->name, table_name); - DBUG_RETURN(TRUE); + goto err; } if (!create_list.elements) { my_message(ER_CANT_REMOVE_ALL_FIELDS, ER(ER_CANT_REMOVE_ALL_FIELDS), MYF(0)); - DBUG_RETURN(TRUE); + goto err; } /* @@ -5851,11 +5911,6 @@ view_err: for which some fields exists. */ - List_iterator key_it(keys); - List_iterator field_it(create_list); - List key_parts; - - KEY *key_info=table->key_info; for (uint i=0 ; i < table->s->keys ; i++,key_info++) { char *key_name= key_info->name; @@ -5959,7 +6014,7 @@ view_err: !my_strcasecmp(system_charset_info,key->name,primary_key_name)) { my_error(ER_WRONG_NAME_FOR_INDEX, MYF(0), key->name); - DBUG_RETURN(TRUE); + goto err; } } } @@ -6201,6 +6256,7 @@ view_err: #ifdef WITH_PARTITION_STORAGE_ENGINE if (fast_alter_partition) { + DBUG_ASSERT(!name_lock); DBUG_RETURN(fast_alter_partition_table(thd, table, alter_info, create_info, table_list, &create_list, &key_list, @@ -6261,11 +6317,12 @@ view_err: We don't log the statement, it will be logged later. */ tmp_disable_binlog(thd); - error= mysql_create_table(thd, new_db, tmp_name, - create_info,create_list,key_list,1,0,0); + error= mysql_create_table_no_lock(thd, new_db, tmp_name, + create_info, create_list, + key_list, 1, 0, 0); reenable_binlog(thd); if (error) - DBUG_RETURN(error); + goto err; /* Open the table if we need to copy the data. */ if (need_copy_table) @@ -6526,17 +6583,6 @@ view_err: current_pid, thd->thread_id); if (lower_case_table_names) my_casedn_str(files_charset_info, old_name); - if (new_name != table_name || new_db != db) - { - if (!access(new_name_buff,F_OK)) - { - error=1; - my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name_buff); - VOID(quick_rm_table(new_db_type, new_db, tmp_name, FN_IS_TMP)); - VOID(pthread_mutex_unlock(&LOCK_open)); - goto err; - } - } #if !defined( __WIN__) if (table->file->has_transactions()) @@ -6546,7 +6592,6 @@ view_err: Win32 and InnoDB can't drop a table that is in use, so we must close the original table before doing the rename */ - table->s->version= 0; // Force removal of table def close_cached_table(thd, table); table=0; // Marker that table is closed no_table_reopen= TRUE; @@ -6556,6 +6601,21 @@ view_err: table->file->extra(HA_EXTRA_FORCE_REOPEN); // Don't use this file anymore #endif + if (new_name != table_name || new_db != db) + { + /* + Check that there is no table with target name. See the + comment describing code for 'simple' ALTER TABLE ... RENAME. + */ + if (!access(new_name_buff,F_OK)) + { + error=1; + my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name_buff); + VOID(quick_rm_table(new_db_type, new_db, tmp_name, FN_IS_TMP)); + VOID(pthread_mutex_unlock(&LOCK_open)); + goto err; + } + } error=0; save_old_db_type= old_db_type; @@ -6606,7 +6666,6 @@ view_err: */ if (table) { - table->s->version= 0; // Force removal of table def close_cached_table(thd,table); } VOID(pthread_mutex_unlock(&LOCK_open)); @@ -6647,7 +6706,6 @@ view_err: */ if (table) { - table->s->version= 0; // Force removal of table def close_cached_table(thd,table); } VOID(quick_rm_table(old_db_type, db, old_name, FN_IS_TMP)); @@ -6673,7 +6731,6 @@ view_err: { // This shouldn't happen if (table) { - table->s->version= 0; // Force removal of table def close_cached_table(thd,table); // Remove lock for table } VOID(pthread_mutex_unlock(&LOCK_open)); @@ -6730,6 +6787,13 @@ view_err: table_list->table=0; // For query cache query_cache_invalidate3(thd, table_list, 0); + if (name_lock) + { + pthread_mutex_lock(&LOCK_open); + unlink_open_table(thd, name_lock, FALSE); + pthread_mutex_unlock(&LOCK_open); + } + end_temporary: my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO), (ulong) (copied + deleted), (ulong) deleted, @@ -6749,6 +6813,12 @@ err1: VOID(quick_rm_table(new_db_type, new_db, tmp_name, FN_IS_TMP)); err: + if (name_lock) + { + pthread_mutex_lock(&LOCK_open); + unlink_open_table(thd, name_lock, FALSE); + pthread_mutex_unlock(&LOCK_open); + } DBUG_RETURN(TRUE); } /* mysql_alter_table */ diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 89ac444efa9..bdfcef23101 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -279,7 +279,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) /* We also don't allow creation of triggers on views. */ tables->required_type= FRMTYPE_TABLE; - if (reopen_name_locked_table(thd, tables)) + if (reopen_name_locked_table(thd, tables, TRUE)) { unlock_table_name(thd, tables); goto end; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index c02d8a85d9b..03a40c3d9e2 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1582,9 +1582,7 @@ create: lex->sql_command= SQLCOM_CREATE_TABLE; if (!lex->select_lex.add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING, - (using_update_log ? - TL_READ_NO_INSERT: - TL_READ))) + TL_WRITE)) MYSQL_YYABORT; lex->create_list.empty(); lex->key_list.empty(); diff --git a/sql/table.h b/sql/table.h index 5b6aa2a8a7c..685cb67dfbc 100644 --- a/sql/table.h +++ b/sql/table.h @@ -299,6 +299,8 @@ typedef struct st_table_share } TABLE_SHARE; +extern ulong refresh_version; + /* Information for one open table */ enum index_hint_type { @@ -314,8 +316,8 @@ struct st_table { handler *file; #ifdef NOT_YET struct st_table *used_next, **used_prev; /* Link to used tables */ -#endif struct st_table *open_next, **open_prev; /* Link to open tables */ +#endif struct st_table *next, *prev; THD *in_use; /* Which thread uses this */ @@ -431,7 +433,24 @@ struct st_table { my_bool force_index; my_bool distinct,const_table,no_rows; my_bool key_read, no_keyread; - my_bool locked_by_flush; + /* + Placeholder for an open table which prevents other connections + from taking name-locks on this table. Typically used with + TABLE_SHARE::version member to take an exclusive name-lock on + this table name -- a name lock that not only prevents other + threads from opening the table, but also blocks other name + locks. This is achieved by: + - setting open_placeholder to 1 - this will block other name + locks, as wait_for_locked_table_name will be forced to wait, + see table_is_used for details. + - setting version to 0 - this will force other threads to close + the instance of this table and wait (this is the same approach + as used for usual name locks). + An exclusively name-locked table currently can have no handler + object associated with it (db_stat is always 0), but please do + not rely on that. + */ + my_bool open_placeholder; my_bool locked_by_logger; my_bool no_replicate; my_bool locked_by_name; @@ -492,7 +511,13 @@ struct st_table { read_set= &def_read_set; write_set= &def_write_set; } - + /* Is table open or should be treated as such by name-locking? */ + inline bool is_name_opened() { return db_stat || open_placeholder; } + /* + Is this instance of the table should be reopen or represents a name-lock? + */ + inline bool needs_reopen_or_name_lock() + { return s->version != refresh_version; } }; enum enum_schema_table_state @@ -888,6 +913,12 @@ typedef struct st_table_list used for implicit LOCK TABLES only and won't be used in real statement. */ bool prelocking_placeholder; + /* + This TABLE_LIST object corresponds to the table to be created + so it is possible that it does not exist (used in CREATE TABLE + ... SELECT implementation). + */ + bool create; enum enum_schema_table_state schema_table_state; void calc_md5(char *buffer); @@ -895,7 +926,11 @@ typedef struct st_table_list int view_check_option(THD *thd, bool ignore_failure); bool setup_underlying(THD *thd); void cleanup_items(); - bool placeholder() {return derived || view || schema_table || !table; } + bool placeholder() + { + return derived || view || schema_table || create && !table->db_stat || + !table; + } void print(THD *thd, String *str); bool check_single_table(st_table_list **table, table_map map, st_table_list *view); From ee7677d125ac91429bab45d2943f531400adc4d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 23:37:36 +0500 Subject: [PATCH 119/137] merging fixes mysql-test/r/insert_update.result: result fixed mysql-test/r/type_newdecimal.result: result fixed --- mysql-test/r/insert_update.result | 4 ++-- mysql-test/r/type_newdecimal.result | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result index f6a9c2505b9..020c587959f 100644 --- a/mysql-test/r/insert_update.result +++ b/mysql-test/r/insert_update.result @@ -378,7 +378,7 @@ id c1 cnt INSERT IGNORE INTO t1 (id,c1) SELECT 1,NULL ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1 +Warning 1048 Column 'c1' cannot be null Error 1048 Column 'c1' cannot be null SELECT * FROM t1; id c1 cnt @@ -386,7 +386,7 @@ id c1 cnt INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1; Warnings: -Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1 +Warning 1048 Column 'c1' cannot be null Error 1048 Column 'c1' cannot be null SELECT * FROM t1; id c1 cnt diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 92dab9f8752..855c452cb21 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1444,12 +1444,12 @@ select cast(11.1234 as DECIMAL(3,2)); cast(11.1234 as DECIMAL(3,2)) 9.99 Warnings: -Error 1264 Out of range value adjusted for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 select * from (select cast(11.1234 as DECIMAL(3,2))) t; cast(11.1234 as DECIMAL(3,2)) 9.99 Warnings: -Error 1264 Out of range value adjusted for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 select cast(a as DECIMAL(3,2)) from (select 11.1233 as a UNION select 11.1234 @@ -1460,9 +1460,9 @@ cast(a as DECIMAL(3,2)) 9.99 9.99 Warnings: -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 select cast(a as DECIMAL(3,2)), count(*) from (select 11.1233 as a UNION select 11.1234 @@ -1471,10 +1471,10 @@ UNION select 12.1234 cast(a as DECIMAL(3,2)) count(*) 9.99 3 Warnings: -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value adjusted for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 End of 5.0 tests select cast(143.481 as decimal(4,1)); cast(143.481 as decimal(4,1)) From 04efdb1526fbe97ffe003a83da81a550dd234991 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 23:19:11 +0400 Subject: [PATCH 120/137] Bug#27878: Unchecked privileges on a view referring to a table from another database. If a user has a right to update anything in the current database then the access was granted and further checks of access rights for underlying tables wasn't done correctly. The check is done before a view is opened and thus no check of access rights for underlying tables can be carried out. This allows a user to update through a view a table from another database for which he hasn't enough rights. Now the mysql_update() and the mysql_test_update() functions are forces re-checking of access rights after a view is opened. mysql-test/t/grant.test: Added a test case for the bug#27878: Unchecked privileges on a view referring to a table from another database. mysql-test/r/grant.result: Added a test case for the bug#27878: Unchecked privileges on a view referring to a table from another database. sql/sql_update.cc: Bug#27878: Unchecked privileges on a view referring to a table from another database. Now the mysql_update() function forces re-checking of access rights after the view is opened. sql/sql_prepare.cc: Bug#27878: Unchecked privileges on a view referring to a table from another database. Now the mysql_test_update() function forces re-checking of access rights after the view is opened. --- mysql-test/r/grant.result | 19 +++++++++++++++++++ mysql-test/t/grant.test | 25 +++++++++++++++++++++++++ sql/sql_prepare.cc | 5 +++-- sql/sql_update.cc | 5 +++-- 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 6d014fbb71b..ca34b56b9cc 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1105,4 +1105,23 @@ ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table ' DROP DATABASE mysqltest1; DROP DATABASE mysqltest2; DROP USER mysqltest_1@localhost; +use test; +CREATE TABLE t1 (f1 int, f2 int); +INSERT INTO t1 VALUES(1,1), (2,2); +CREATE DATABASE db27878; +GRANT UPDATE(f1) ON t1 TO 'mysqltest_1'@'localhost'; +GRANT SELECT ON `test`.* TO 'mysqltest_1'@'localhost'; +GRANT ALL ON db27878.* TO 'mysqltest_1'@'localhost'; +use db27878; +CREATE SQL SECURITY INVOKER VIEW db27878.v1 AS SELECT * FROM test.t1; +use db27878; +UPDATE v1 SET f2 = 4; +ERROR HY000: View 'db27878.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +SELECT * FROM test.t1; +f1 f2 +1 1 +2 2 +DROP VIEW v1; +use test; +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 197f20db76e..c1eae9b3c36 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -413,6 +413,7 @@ connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK); connection user1; -- error 1142 alter table t1 rename t2; +disconnect user1; connection root; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; @@ -1122,5 +1123,29 @@ DROP DATABASE mysqltest2; DROP USER mysqltest_1@localhost; +# +# Bug#27878: Unchecked privileges on a view referring to a table from another +# database. +# +use test; +CREATE TABLE t1 (f1 int, f2 int); +INSERT INTO t1 VALUES(1,1), (2,2); +CREATE DATABASE db27878; +GRANT UPDATE(f1) ON t1 TO 'mysqltest_1'@'localhost'; +GRANT SELECT ON `test`.* TO 'mysqltest_1'@'localhost'; +GRANT ALL ON db27878.* TO 'mysqltest_1'@'localhost'; +use db27878; +CREATE SQL SECURITY INVOKER VIEW db27878.v1 AS SELECT * FROM test.t1; +connect (user1,localhost,mysqltest_1,,test); +connection user1; +use db27878; +--error 1356 +UPDATE v1 SET f2 = 4; +SELECT * FROM test.t1; +disconnect user1; +connection default; +DROP VIEW v1; +use test; +DROP TABLE t1; --echo End of 5.0 tests diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 1ec65743b0f..90361f8ff0d 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1164,8 +1164,9 @@ static int mysql_test_update(Prepared_statement *stmt, goto error; #ifndef NO_EMBEDDED_ACCESS_CHECKS - /* TABLE_LIST contain right privilages request */ - want_privilege= table_list->grant.want_privilege; + /* Force privilege re-checking for views after they have been opened. */ + want_privilege= (table_list->view ? UPDATE_ACL : + table_list->grant.want_privilege); #endif if (mysql_prepare_update(thd, table_list, &select->where, diff --git a/sql/sql_update.cc b/sql/sql_update.cc index e17c71ae541..222e33345cc 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -173,8 +173,9 @@ int mysql_update(THD *thd, table->quick_keys.clear_all(); #ifndef NO_EMBEDDED_ACCESS_CHECKS - /* TABLE_LIST contain right privilages request */ - want_privilege= table_list->grant.want_privilege; + /* Force privilege re-checking for views after they have been opened. */ + want_privilege= (table_list->view ? UPDATE_ACL : + table_list->grant.want_privilege); #endif if (mysql_prepare_update(thd, table_list, &conds, order_num, order)) DBUG_RETURN(1); From c9f09703182204e892a24fddea3965701d8cc2fc Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 May 2007 00:22:16 +0500 Subject: [PATCH 121/137] merging fix --- mysql-test/r/grant.result | 90 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 10363e552b7..d56bb62300b 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -923,7 +923,7 @@ ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table ' SHOW CREATE TABLE mysqltest2.t_nn; Table Create Table t_nn CREATE TABLE `t_nn` ( - `c1` int(11) default NULL + `c1` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW CREATE VIEW mysqltest2.t_nn; ERROR HY000: 'mysqltest2.t_nn' is not VIEW @@ -942,7 +942,7 @@ v_nn CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER SHOW CREATE TABLE mysqltest2.t_nn; Table Create Table t_nn CREATE TABLE `t_nn` ( - `c1` int(11) default NULL + `c1` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SHOW CREATE VIEW mysqltest2.t_nn; ERROR HY000: 'mysqltest2.t_nn' is not VIEW @@ -960,6 +960,72 @@ DROP USER 'mysqltest_1'@'localhost'; use test; create user mysqltest1_thisisreallytoolong; ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16) +CREATE DATABASE mysqltest1; +CREATE TABLE mysqltest1.t1 ( +int_field INTEGER UNSIGNED NOT NULL, +char_field CHAR(10), +INDEX(`int_field`) +); +CREATE TABLE mysqltest1.t2 (int_field INT); +"Now check that we require equivalent grants for " +"RENAME TABLE and ALTER TABLE" +CREATE USER mysqltest_1@localhost; +GRANT SELECT ON mysqltest1.t1 TO mysqltest_1@localhost; +SELECT USER(); +USER() +mysqltest_1@localhost +SHOW GRANTS; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +RENAME TABLE t1 TO t2; +ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ALTER TABLE t1 RENAME TO t2; +ERROR 42000: DROP,ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +GRANT DROP ON mysqltest1.t1 TO mysqltest_1@localhost; +RENAME TABLE t1 TO t2; +ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +ALTER TABLE t1 RENAME TO t2; +ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' +GRANT ALTER ON mysqltest1.t1 TO mysqltest_1@localhost; +SHOW GRANTS; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +RENAME TABLE t1 TO t2; +ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +ALTER TABLE t1 RENAME TO t2; +ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' +GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost; +SHOW GRANTS; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +GRANT INSERT, SELECT, CREATE, ALTER, DROP ON mysqltest1.t2 TO mysqltest_1@localhost; +DROP TABLE mysqltest1.t2; +SHOW GRANTS; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost' +GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +RENAME TABLE t1 TO t2; +RENAME TABLE t2 TO t1; +ALTER TABLE t1 RENAME TO t2; +ALTER TABLE t2 RENAME TO t1; +REVOKE DROP, INSERT ON mysqltest1.t1 FROM mysqltest_1@localhost; +REVOKE DROP, INSERT ON mysqltest1.t2 FROM mysqltest_1@localhost; +SHOW GRANTS; +Grants for mysqltest_1@localhost +GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost' +GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +RENAME TABLE t1 TO t2; +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' +ALTER TABLE t1 RENAME TO t2; +ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' +DROP USER mysqltest_1@localhost; +DROP DATABASE mysqltest1; +USE test; GRANT CREATE ON mysqltest.* TO 1234567890abcdefGHIKL@localhost; ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; @@ -984,6 +1050,26 @@ REVOKE EXECUTE ON PROCEDURE p1 FROM 1234567890abcdefGHIKL@localhost; ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) REVOKE EXECUTE ON PROCEDURE t1 FROM some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY; ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +CREATE USER bug23556@localhost; +CREATE DATABASE bug23556; +GRANT SELECT ON bug23556.* TO bug23556@localhost; +USE bug23556; +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +GRANT DELETE ON t1 TO bug23556@localhost; +USE bug23556; +TRUNCATE t1; +ERROR 42000: DROP command denied to user 'bug23556'@'localhost' for table 't1' +USE bug23556; +REVOKE DELETE ON t1 FROM bug23556@localhost; +GRANT DROP ON t1 TO bug23556@localhost; +USE bug23556; +TRUNCATE t1; +USE bug23556; +DROP TABLE t1; +USE test; +DROP DATABASE bug23556; +DROP USER bug23556@localhost; GRANT PROCESS ON * TO user@localhost; ERROR 3D000: No database selected DROP DATABASE IF EXISTS mysqltest1; From c9af98c4a4171900f7d6b56710f406e5aa09029d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 May 2007 00:03:50 +0400 Subject: [PATCH 122/137] Added missing DBUG_VOID_RETURN to the sp_head::init_sp_name() method. --- sql/sp_head.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 5a1faf50296..31388e0e19c 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -512,6 +512,8 @@ sp_head::init_sp_name(THD *thd, sp_name *spname) m_qname.length= spname->m_qname.length; m_qname.str= strmake_root(thd->mem_root, spname->m_qname.str, m_qname.length); + + DBUG_VOID_RETURN; } From f0ddabc51875755b897232659dff241c1c8eb11e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 12 May 2007 00:46:07 +0400 Subject: [PATCH 123/137] grant.result, grant.test: Corrected test case for the bug#27878. mysql-test/t/grant.test: Corrected test case for the bug#27878. mysql-test/r/grant.result: Corrected test case for the bug#27878. --- mysql-test/r/grant.result | 2 +- mysql-test/t/grant.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index ca34b56b9cc..a4c51cca277 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1121,7 +1121,7 @@ SELECT * FROM test.t1; f1 f2 1 1 2 2 -DROP VIEW v1; +DROP DATABASE db27878; use test; DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index c1eae9b3c36..aa43e4225c5 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1144,7 +1144,7 @@ UPDATE v1 SET f2 = 4; SELECT * FROM test.t1; disconnect user1; connection default; -DROP VIEW v1; +DROP DATABASE db27878; use test; DROP TABLE t1; From d886ea8fb66c10e58029bf7c010a1a2a085ad23d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 19:37:32 -0700 Subject: [PATCH 124/137] Fixed bug #28375: a query with an NOT IN subquery predicate may cause a crash when the left operand of the predicate is evaluated to NULL. It happens when the rows from the inner tables (tables from the subquery) are accessed by index methods with key values obtained by evaluation of the left operand of the subquery predicate. When this predicate is evaluated to NULL an alternative access with full table scan is used to check whether the result set returned by the subquery is empty or not. The crash was due to the fact the info about the access methods used for regular key values was not properly restored after a switch back from the full scan access method had occurred. The patch restores this info properly. The same problem existed for queries with IN subquery predicates if they were used not at the top level of the queries. mysql-test/r/subselect3.result: Added a test case for bug #28375. mysql-test/t/subselect3.test: Added a test case for bug #28375. sql/item_subselect.cc: Fixed bug #28375: a query with an NOT IN subquery predicate may cause a crash when the left operand of the predicate is evaluated to NULL. It happens when the rows from the inner tables (tables from the subquery) are accessed by index methods with key values obtained by evaluation of the left operand of the subquery predicate. When this predicate is evaluated to NULL an alternative access with full table scan is used to check whether the result set returned by the subquery is empty or not. The crash was due to the fact the info about the access methods used for regular key values was not properly restored after a switch back from the full scan access method had occurred. The patch restores this info properly. sql/sql_select.h: Fixed bug #28375: a query with an NOT IN subquery predicate may cause a crash when the left operand of the predicate is evaluated to NULL. In the JOIN_TAB structure two fields have been added to save info about index methods used to access the subquery rows. The saved info is used after a switch back from the alternative full scan access method has occurred. The full scan is used when the left operand of the subquery predicate is evaluated to NULL. --- mysql-test/r/subselect3.result | 31 +++++++++++++++++++++++++++++++ mysql-test/t/subselect3.test | 25 +++++++++++++++++++++++++ sql/item_subselect.cc | 6 ++++-- sql/sql_select.h | 7 +++++++ 4 files changed, 67 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index f52249db8a1..9bbfdc6c5f9 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -711,3 +711,34 @@ a 1 4 DROP TABLE t1,t2; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int PRIMARY KEY); +CREATE TABLE t3 (id int PRIMARY KEY, name varchar(10)); +INSERT INTO t1 VALUES (2), (NULL), (3), (1); +INSERT INTO t2 VALUES (234), (345), (457); +INSERT INTO t3 VALUES (222,'bbb'), (333,'ccc'), (111,'aaa'); +EXPLAIN +SELECT * FROM t1 +WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3 +WHERE t3.name='xxx' AND t2.id=t3.id); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where +2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 func 1 Using where; Using index; Full scan on NULL key +2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 Using where; Full scan on NULL key +SELECT * FROM t1 +WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3 +WHERE t3.name='xxx' AND t2.id=t3.id); +id +2 +NULL +3 +1 +SELECT (t1.id IN (SELECT t2.id FROM t2,t3 +WHERE t3.name='xxx' AND t2.id=t3.id)) AS x +FROM t1; +x +0 +0 +0 +0 +DROP TABLE t1,t2,t3; diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index dfe09968fa2..65556012588 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -546,3 +546,28 @@ SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1)); SELECT a FROM t1, t2 WHERE a=b AND (b NOT IN (SELECT a FROM t1 WHERE a > 4)); DROP TABLE t1,t2; + +# +# Bug #28375: crash for NOT IN subquery predicate when left operand becomes NULL +# + +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int PRIMARY KEY); +CREATE TABLE t3 (id int PRIMARY KEY, name varchar(10)); +INSERT INTO t1 VALUES (2), (NULL), (3), (1); +INSERT INTO t2 VALUES (234), (345), (457); +INSERT INTO t3 VALUES (222,'bbb'), (333,'ccc'), (111,'aaa'); + +EXPLAIN +SELECT * FROM t1 + WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3 + WHERE t3.name='xxx' AND t2.id=t3.id); +SELECT * FROM t1 + WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3 + WHERE t3.name='xxx' AND t2.id=t3.id); + +SELECT (t1.id IN (SELECT t2.id FROM t2,t3 + WHERE t3.name='xxx' AND t2.id=t3.id)) AS x + FROM t1; + +DROP TABLE t1,t2,t3; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index ccd361dba99..48b82e3cde6 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1829,6 +1829,8 @@ int subselect_single_select_engine::exec() if (cond_guard && !*cond_guard) { /* Change the access method to full table scan */ + tab->save_read_first_record= tab->read_first_record; + tab->save_read_record= tab->read_record.read_record; tab->read_first_record= init_read_record_seq; tab->read_record.record= tab->table->record[0]; tab->read_record.thd= join->thd; @@ -1849,8 +1851,8 @@ int subselect_single_select_engine::exec() JOIN_TAB *tab= *ptab; tab->read_record.record= 0; tab->read_record.ref_length= 0; - tab->read_first_record= join_read_always_key_or_null; - tab->read_record.read_record= join_read_next_same_or_null; + tab->read_first_record= tab->save_read_first_record; + tab->read_record.read_record= tab->save_read_record; } executed= 1; thd->where= save_where; diff --git a/sql/sql_select.h b/sql/sql_select.h index 5081366c10b..3cdd265df9a 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -159,6 +159,13 @@ typedef struct st_join_table { Read_record_func read_first_record; Next_select_func next_select; READ_RECORD read_record; + /* + Currently the following two fields are used only for a [NOT] IN subquery + if it is executed by an alternative full table scan when the left operand of + the subquery predicate is evaluated to NULL. + */ + Read_record_func save_read_first_record;/* to save read_first_record */ + int (*save_read_record) (READ_RECORD *);/* to save read_record.read_record */ double worst_seeks; key_map const_keys; /* Keys with constant part */ key_map checked_keys; /* Keys checked in find_best */ From c749664deb9f5e77dd846480fba53568f39815d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 May 2007 23:22:56 -0700 Subject: [PATCH 125/137] Post-merge fix --- mysql-test/r/grant.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index d56bb62300b..a68cee5e52e 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1210,7 +1210,7 @@ SELECT * FROM test.t1; f1 f2 1 1 2 2 -DROP VIEW v1; +DROP DATABASE db27878; use test; DROP TABLE t1; End of 5.0 tests From d98a2a87c9610b40cf1c7a6cbf1e7f90e971739b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 10:56:23 +0400 Subject: [PATCH 126/137] Fix a warning. sql/sql_insert.cc: Fix a compile-time warning (log_on is not used in embedded). --- sql/sql_insert.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index febc7883f62..26caf059e73 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -483,11 +483,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, bool ignore) { int error, res; - /* - log_on is about delayed inserts only. - By default, both logs are enabled (this won't cause problems if the server - runs without --log-update or --log-bin). - */ bool transactional_table, joins_freed= FALSE; bool changed; uint value_count; @@ -501,9 +496,14 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, Name_resolution_context_state ctx_state; #ifndef EMBEDDED_LIBRARY char *query= thd->query; -#endif + /* + log_on is about delayed inserts only. + By default, both logs are enabled (this won't cause problems if the server + runs without --log-update or --log-bin). + */ bool log_on= (thd->options & OPTION_BIN_LOG) || (!(thd->security_ctx->master_access & SUPER_ACL)); +#endif thr_lock_type lock_type = table_list->lock_type; Item *unused_conds= 0; DBUG_ENTER("mysql_insert"); From 8ebfa0baf4682b996b300fc7dd67b55886838e42 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 13:02:12 +0400 Subject: [PATCH 127/137] Disable random-failing IM tests. --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index df56165950f..7311aabd2a6 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,3 +12,4 @@ ndb_load : Bug#17233 user_limits : Bug#23921 random failure of user_limits.test +im_daemon_life_cycle : IM tests fail randomly From ea11e9444349952b50106b0715ad2fbc49041863 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 13:04:59 +0400 Subject: [PATCH 128/137] Disable random-failing IM tests. --- mysql-test/t/disabled.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index f054cf26813..56aa2f4a8a6 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,7 +11,9 @@ ############################################################################## user_limits : Bug#23921 random failure of user_limits.test -im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly +im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly +im_daemon_life_cycle : IM tests fail randomly +im_cmd_line.imtest : IM tests fail randomly im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance. concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog From 2c4c8558294a59970eac2c08dd7624db53d66894 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 13:20:11 +0400 Subject: [PATCH 129/137] Update description. --- mysql-test/t/disabled.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 7311aabd2a6..aeeab6ee6d4 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,4 +12,4 @@ ndb_load : Bug#17233 user_limits : Bug#23921 random failure of user_limits.test -im_daemon_life_cycle : IM tests fail randomly +im_daemon_life_cycle : Bug#20294: Instance manager tests fail randomly From 225a0c17b98bb3ee02f803aa1e4920c8df3d9365 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 13:22:03 +0400 Subject: [PATCH 130/137] Update description. --- mysql-test/t/disabled.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 56aa2f4a8a6..e3d72f1f7e0 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,8 +12,8 @@ user_limits : Bug#23921 random failure of user_limits.test im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly -im_daemon_life_cycle : IM tests fail randomly -im_cmd_line.imtest : IM tests fail randomly +im_daemon_life_cycle : Bug#20294 2007-05-14 alik Instance manager tests fail randomly +im_cmd_line : Bug#20294 2007-05-14 alik Instance manager tests fail randomly im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance. concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog From d8f13c8cd004eafd08ea72219133adc76be756e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 19:25:03 +0400 Subject: [PATCH 131/137] Disable im_life_cycle in 5.0. --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index aeeab6ee6d4..85685234de9 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,4 +12,5 @@ ndb_load : Bug#17233 user_limits : Bug#23921 random failure of user_limits.test +im_life_cycle : Bug#27851: Instance manager test im_life_cycle fails randomly im_daemon_life_cycle : Bug#20294: Instance manager tests fail randomly From 3f0cdbc4cd521066075247aedb10abc57d294ae1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 May 2007 22:38:26 +0400 Subject: [PATCH 132/137] Fix for bug #28415 "Some ALTER TABLE statements no longer work under LOCK TABLES" and failures of alter_table.test on Windows which occured after pushing fix for bugs #20662, #20903, #24508, #24738 (various problems with CREATE TABLE SELECT). ALTER TABLE statements which were handled using "fast" alter table optimization were not properly working under LOCK TABLES if table was transactional (for all table types under Windows). Code implementing "fast" version of ALTER TABLE tried to open and lock table using open_ltable() after renaming .FRM files (which corresponds to renaming tables in normal case) in some cases (for transactional tables or on Windows). This caused problems under LOCK TABLES and conflicted with name-lock taken by ALTER TABLE RENAME on target tables. This patch solves this issue by using reopen_name_locked_table() instead of open_ltable(). mysql-test/include/mix1.inc: Added test for bug #28415 "Some ALTER TABLE statements no longer work under LOCK TABLES" and minimal coverage for fast ALTER TABLE behaviour for transactional tables. mysql-test/r/innodb_mysql.result: Added test for bug #28415 "Some ALTER TABLE statements no longer work under LOCK TABLES" and minimal coverage for fast ALTER TABLE behaviour for transactional tables. sql/sql_table.cc: mysql_alter_table(): Fixed handling of transactional tables (and all tables on Windows) by "fast" ALTER TABLE. Code implementing "fast" version of ALTER TABLE tried to open and lock table using open_ltable() after renaming .FRM files (which corresponds to renaming tables in normal case) for such tables. This caused problems under LOCK TABLES and conflicted with name-lock taken by ALTER TABLE RENAME on target tables. We solve this issue by using reopen_name_locked_table() instead of open_ltable(). --- mysql-test/include/mix1.inc | 20 +++++++++++++++ mysql-test/r/innodb_mysql.result | 11 ++++++++ sql/sql_table.cc | 44 +++++++++++++++++++++++++++++--- 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 352d5a987a2..fce37eef187 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -688,4 +688,24 @@ select * from t2; drop table t2; + +# +# Tests for bug #28415 "Some ALTER TABLE statements no longer work +# under LOCK TABLES" and some aspects of fast ALTER TABLE behaviour +# for transactional tables. +# +--disable_warnings +drop table if exists t1, t2; +--enable_warnings +create table t1 (i int); +alter table t1 modify i int default 1; +alter table t1 modify i int default 2, rename t2; +lock table t2 write; +alter table t2 modify i int default 3; +unlock tables; +lock table t2 write; +alter table t2 modify i int default 4, rename t1; +unlock tables; +drop table t1; + --echo End of 5.1 tests diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index e51318af827..074efc30838 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -733,4 +733,15 @@ k a c 11 15 1 12 20 1 drop table t2; +drop table if exists t1, t2; +create table t1 (i int); +alter table t1 modify i int default 1; +alter table t1 modify i int default 2, rename t2; +lock table t2 write; +alter table t2 modify i int default 3; +unlock tables; +lock table t2 write; +alter table t2 modify i int default 4, rename t1; +unlock tables; +drop table t1; End of 5.1 tests diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 6f59e326814..23214c7c8a7 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -6673,6 +6673,7 @@ view_err: } if (! need_copy_table) { + bool needs_unlink= FALSE; if (! table) { if (new_name != table_name || new_db != db) @@ -6683,11 +6684,41 @@ view_err: table_list->db= new_db; table_list->db_length= strlen(new_db); } - - VOID(pthread_mutex_unlock(&LOCK_open)); - if (! (table= open_ltable(thd, table_list, TL_WRITE_ALLOW_READ))) + else + { + /* + TODO: Creation of name-lock placeholder here is a temporary + work-around. Long term we should change close_cached_table() call + which we invoke before table renaming operation in such way that + it will leave placeholders for table in table cache/THD::open_tables + list. By doing this we will be able easily reopen and relock these + tables later and therefore behave under LOCK TABLES in the same way + on all platforms. + */ + char key[MAX_DBKEY_LENGTH]; + uint key_length; + key_length= create_table_def_key(thd, key, table_list, 0); + if (!(name_lock= table_cache_insert_placeholder(thd, key, + key_length))) + { + VOID(pthread_mutex_unlock(&LOCK_open)); + goto err; + } + name_lock->next= thd->open_tables; + thd->open_tables= name_lock; + } + table_list->table= name_lock; + if (reopen_name_locked_table(thd, table_list, FALSE)) + { + VOID(pthread_mutex_unlock(&LOCK_open)); goto err; - VOID(pthread_mutex_lock(&LOCK_open)); + } + table= table_list->table; + /* + We can't rely on later close_cached_table() calls to close + this instance of the table since it was not properly locked. + */ + needs_unlink= TRUE; } /* Tell the handler that a new frm file is in place. */ if (table->file->create_handler_files(path, NULL, CHF_INDEX_FLAG, @@ -6696,6 +6727,11 @@ view_err: VOID(pthread_mutex_unlock(&LOCK_open)); goto err; } + if (needs_unlink) + { + unlink_open_table(thd, table, FALSE); + table= name_lock= 0; + } } if (thd->lock || new_name != table_name || no_table_reopen) // True if WIN32 From ffa7179e730284ae6fb06d6170e3b1d606dd0a08 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 15 May 2007 17:58:26 +0400 Subject: [PATCH 133/137] A post-merge fix. --- sql/sql_base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 54581ac484c..25437699c21 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1871,7 +1871,7 @@ void drop_open_table(THD *thd, TABLE *table, const char *db_name, close_temporary_table(thd, table, 1, 1); else { - handlerton *table_type= table->s->db_type; + handlerton *table_type= table->s->db_type(); VOID(pthread_mutex_lock(&LOCK_open)); /* unlink_open_table() also tells threads waiting for refresh or close From 3395c53efcf07126fdf05ccd4ffdafb8ce319751 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 May 2007 09:51:05 +0400 Subject: [PATCH 134/137] A fix and a test case for Bug#21483 "Server abort or deadlock on INSERT DELAYED with another implicit insert" Also fixes and adds test cases for bugs: 20497 "Trigger with INSERT DELAYED causes Error 1165" 21714 "Wrong NEW.value and server abort on INSERT DELAYED to a table with a trigger". Post-review fixes. Problem: In MySQL INSERT DELAYED is a way to pipe all inserts into a given table through a dedicated thread. This is necessary for simplistic storage engines like MyISAM, which do not have internal concurrency control or threading and thus can not achieve efficient INSERT throughput without support from SQL layer. DELAYED INSERT works as follows: For every distinct table, which can accept DELAYED inserts and has pending data to insert, a dedicated thread is created to write data to disk. All user connection threads that attempt to delayed-insert into this table interact with the dedicated thread in producer/consumer fashion: all records to-be inserted are pushed into a queue of the dedicated thread, which fetches the records and writes them. In this design, client connection threads never open or lock the delayed insert table. This functionality was introduced in version 3.23 and does not take into account existence of triggers, views, or pre-locking. E.g. if INSERT DELAYED is called from a stored function, which, in turn, is called from another stored function that uses the delayed table, a deadlock can occur, because delayed locking by-passes pre-locking. Besides: * the delayed thread works directly with the subject table through the storage engine API and does not invoke triggers * even if it was patched to invoke triggers, if triggers, in turn, used other tables, the delayed thread would have to open and lock involved tables (use pre-locking). * even if it was patched to use pre-locking, without deadlock detection the delayed thread could easily lock out user connection threads in case when the same table is used both in a trigger and on the right side of the insert query: the delayed thread would not release locks until all inserts are complete, and user connection can not complete inserts without having locks on the tables used on the right side of the query. Solution: These considerations suggest two general alternatives for the future of INSERT DELAYED: * it is considered a full-fledged alternative to normal INSERT * it is regarded as an optimisation that is only relevant for simplistic engines. Since we missed our chance to provide complete support of new features when 5.0 was in development, the first alternative currently renders infeasible. However, even the second alternative, which is to detect new features and convert DELAYED insert into a normal insert, is not easy to implement. The catch-22 is that we don't know if the subject table has triggers or is a view before we open it, and we only open it in the delayed thread. We don't know if the query involves pre-locking until we have opened all tables, and we always first create the delayed thread, and only then open the remaining tables. This patch detects the problematic scenarios and converts DELAYED INSERT to a normal INSERT using the following approach: * if the statement is executed under pre-locking (e.g. from within a stored function or trigger) or the right side may require pre-locking, we detect the situation before creating a delayed insert thread and convert the statement to a conventional INSERT. * if the subject table is a view or has triggers, we shutdown the delayed thread and convert the statement to a conventional INSERT. mysql-test/r/insert.result: Update test results. mysql-test/t/insert.test: Add a test case for Bug#21483, Bug#20497, Bug#21714 (INSERT DELAYED and stored routines, triggers). sql/sp_head.cc: Upgrade lock type to TL_WRITE when computing the pre-locking set. sql/sql_base.cc: Use a new method. sql/sql_insert.cc: INSERT DELAYED and pre-locking: - if under pre-locking, upgrade the lock type to TL_WRITE and proceed as a normal write - if DELAYED table has triggers, also request a lock upgrade. - make sure errors in the delayed thread are propagated correctly sql/sql_lex.h: Add a method to check if a parsed tree refers to stored routines. --- mysql-test/r/insert.result | 116 +++++++++++++++++ mysql-test/t/insert.test | 139 ++++++++++++++++++++ sql/sp_head.cc | 8 ++ sql/sql_base.cc | 4 +- sql/sql_insert.cc | 252 +++++++++++++++++++++++++------------ sql/sql_lex.h | 6 + 6 files changed, 442 insertions(+), 83 deletions(-) diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 7900e0b7695..fa6e23d09f9 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -346,3 +346,119 @@ f1 f2 12 NULL drop view v1; drop table t1,t2; +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +CREATE TABLE t1 (i INT); +CREATE FUNCTION f1() RETURNS INT +BEGIN +INSERT INTO t1 VALUES (1); +RETURN 1; +END | +CREATE FUNCTION f2() RETURNS INT +BEGIN +INSERT DELAYED INTO t1 VALUES (2); +RETURN 1; +END | +SELECT f1(); +f1() +1 +SELECT f2(); +f2() +1 +INSERT INTO t1 VALUES (3); +INSERT DELAYED INTO t1 VALUES (4); +INSERT INTO t1 VALUES (f1()); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +INSERT DELAYED INTO t1 VALUES (f1()); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +INSERT INTO t1 VALUES (f2()); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +INSERT DELAYED INTO t1 VALUES (f2()); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW +INSERT INTO t1 VALUES (NEW.i); +INSERT INTO t1 VALUES (1); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +INSERT DELAYED INTO t1 VALUES (1); +ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. +SELECT * FROM t1; +i +1 +2 +3 +4 +DROP FUNCTION f2; +DROP FUNCTION f1; +DROP TABLE t1; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (i INT); +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW +INSERT DELAYED INTO t2 VALUES (NEW.i); +CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW +INSERT DELAYED INTO t2 VALUES (NEW.i); +CREATE TRIGGER t1_bd BEFORE DELETE ON t1 FOR EACH ROW +INSERT DELAYED INTO t2 VALUES (OLD.i); +INSERT INTO t1 VALUES (1); +INSERT DELAYED INTO t1 VALUES (2); +SELECT * FROM t1; +i +1 +2 +UPDATE t1 SET i = 3 WHERE i = 1; +SELECT * FROM t1; +i +3 +2 +DELETE FROM t1 WHERE i = 3; +SELECT * FROM t1; +i +2 +SELECT * FROM t2; +i +1 +2 +3 +3 +DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (i INT); +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW +SET @a= NEW.i; +SET @a= 0; +INSERT DELAYED INTO t1 VALUES (1); +SELECT @a; +@a +1 +INSERT DELAYED INTO t1 VALUES (2); +SELECT @a; +@a +2 +DROP TABLE t1; +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (i INT); +CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW +INSERT INTO t2 VALUES (NEW.i); +CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW +INSERT DELAYED INTO t2 VALUES (NEW.i); +CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW +INSERT DELAYED INTO t2 VALUES (OLD.i); +INSERT DELAYED INTO t1 VALUES (1); +SELECT * FROM t1; +i +1 +UPDATE t1 SET i = 2 WHERE i = 1; +SELECT * FROM t1; +i +2 +DELETE FROM t1 WHERE i = 2; +SELECT * FROM t1; +i +SELECT * FROM t2; +i +1 +2 +2 +DROP TABLE t1, t2; +End of 5.0 tests. diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 0a8e184ea5c..76177403bd0 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -216,3 +216,142 @@ select * from t1; drop view v1; drop table t1,t2; + +# +# BUG#21483: Server abort or deadlock on INSERT DELAYED with another +# implicit insert +# +# The solution is to downgrade INSERT DELAYED to normal INSERT if the +# statement uses functions and access tables or triggers, or is called +# from a function or a trigger. +# +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP FUNCTION IF EXISTS f1; +DROP FUNCTION IF EXISTS f2; +--enable_warnings + +CREATE TABLE t1 (i INT); +delimiter |; +CREATE FUNCTION f1() RETURNS INT +BEGIN + INSERT INTO t1 VALUES (1); + RETURN 1; +END | +CREATE FUNCTION f2() RETURNS INT +BEGIN + INSERT DELAYED INTO t1 VALUES (2); + RETURN 1; +END | +delimiter ;| + +SELECT f1(); +SELECT f2(); +INSERT INTO t1 VALUES (3); +INSERT DELAYED INTO t1 VALUES (4); + +--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG +INSERT INTO t1 VALUES (f1()); + +--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG +INSERT DELAYED INTO t1 VALUES (f1()); + +--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG +INSERT INTO t1 VALUES (f2()); + +--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG +INSERT DELAYED INTO t1 VALUES (f2()); + +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW + INSERT INTO t1 VALUES (NEW.i); + +--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG +INSERT INTO t1 VALUES (1); + +--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG +INSERT DELAYED INTO t1 VALUES (1); + +SELECT * FROM t1; + +DROP FUNCTION f2; +DROP FUNCTION f1; +DROP TABLE t1; + +# +# BUG#20497: Trigger with INSERT DELAYED causes Error 1165 +# +# Fixed by the patch for Bug#21483 +# +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (i INT); + +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW + INSERT DELAYED INTO t2 VALUES (NEW.i); + +CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW + INSERT DELAYED INTO t2 VALUES (NEW.i); + +CREATE TRIGGER t1_bd BEFORE DELETE ON t1 FOR EACH ROW + INSERT DELAYED INTO t2 VALUES (OLD.i); + +INSERT INTO t1 VALUES (1); +INSERT DELAYED INTO t1 VALUES (2); +SELECT * FROM t1; +UPDATE t1 SET i = 3 WHERE i = 1; +SELECT * FROM t1; +DELETE FROM t1 WHERE i = 3; +SELECT * FROM t1; +SELECT * FROM t2; + +DROP TABLE t1, t2; + +# +# BUG#21714: Wrong NEW.value and server abort on INSERT DELAYED to a +# table with a trigger +# +# Fixed by the patch for Bug#21483 +# +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 (i INT); +CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW + SET @a= NEW.i; + +SET @a= 0; +INSERT DELAYED INTO t1 VALUES (1); +SELECT @a; +INSERT DELAYED INTO t1 VALUES (2); +SELECT @a; + +DROP TABLE t1; + +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (i INT); + +CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW + INSERT INTO t2 VALUES (NEW.i); + +CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW + INSERT DELAYED INTO t2 VALUES (NEW.i); + +CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW + INSERT DELAYED INTO t2 VALUES (OLD.i); + +INSERT DELAYED INTO t1 VALUES (1); +SELECT * FROM t1; +UPDATE t1 SET i = 2 WHERE i = 1; +SELECT * FROM t1; +DELETE FROM t1 WHERE i = 2; +SELECT * FROM t1; +SELECT * FROM t2; + +DROP TABLE t1, t2; + +--echo End of 5.0 tests. + diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 5a1faf50296..b24fb01e2ff 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -3487,6 +3487,14 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check) tlen+= alen; tname[tlen]= '\0'; + /* + Upgrade the lock type because this table list will be used + only in pre-locked mode, in which DELAYED inserts are always + converted to normal inserts. + */ + if (table->lock_type == TL_WRITE_DELAYED) + table->lock_type= TL_WRITE; + /* We ignore alias when we check if table was already marked as temporary (and therefore should not be prelocked). Otherwise we will erroneously diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 6e6611d54d2..f044a1edb01 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2277,7 +2277,7 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags) */ if (!thd->prelocked_mode && !thd->lex->requires_prelocking() && - thd->lex->sroutines_list.elements) + thd->lex->uses_stored_routines()) { bool first_no_prelocking, need_prelocking, tabs_changed; TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last; @@ -2465,7 +2465,7 @@ process_view_routines: */ if (tables->view && !thd->prelocked_mode && !thd->lex->requires_prelocking() && - tables->view->sroutines_list.elements) + tables->view->uses_stored_routines()) { /* We have at least one table in TL here. */ if (!query_tables_last_own) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index db4c2f64d6a..d62f782683d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -61,7 +61,7 @@ #include "slave.h" #ifndef EMBEDDED_LIBRARY -static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list); +static bool delayed_get_table(THD *thd, TABLE_LIST *table_list); static int write_delayed(THD *thd,TABLE *table, enum_duplicates dup, bool ignore, char *query, uint query_length, bool log_on); static void end_delayed_insert(THD *thd); @@ -409,6 +409,7 @@ void mark_fields_used_by_triggers_for_insert_stmt(THD *thd, TABLE *table, downgrade the lock in handler::store_lock() method. */ +static void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, enum_duplicates duplic, bool is_multi_insert) @@ -422,29 +423,37 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, if (*lock_type == TL_WRITE_DELAYED) { -#ifdef EMBEDDED_LIBRARY - /* No auxiliary threads in the embedded server. */ - *lock_type= TL_WRITE; - return; -#else /* We do not use delayed threads if: - - we're running in the safe mode or skip-new - the feature - is disabled in these modes - - we're running this query in statement level replication, - on a replication slave - because we must ensure serial - execution of queries on the slave + - we're running in the safe mode or skip-new mode -- the + feature is disabled in these modes + - we're executing this statement on a replication slave -- + we need to ensure serial execution of queries on the + slave - it is INSERT .. ON DUPLICATE KEY UPDATE - in this case the insert cannot be concurrent + - this statement is directly or indirectly invoked from + a stored function or trigger (under pre-locking) - to + avoid deadlocks, since INSERT DELAYED involves a lock + upgrade (TL_WRITE_DELAYED -> TL_WRITE) which we should not + attempt while keeping other table level locks. + - this statement itself may require pre-locking. + We should upgrade the lock even though in most cases + delayed functionality may work. Unfortunately, we can't + easily identify whether the subject table is not used in + the statement indirectly via a stored function or trigger: + if it is used, that will lead to a deadlock between the + client connection and the delayed thread. */ if (specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE) || thd->slave_thread || - thd->variables.max_insert_delayed_threads == 0) + thd->variables.max_insert_delayed_threads == 0 || + thd->prelocked_mode || + thd->lex->uses_stored_routines()) { *lock_type= TL_WRITE; return; } -#endif bool log_on= (thd->options & OPTION_BIN_LOG || ! (thd->security_ctx->master_access & SUPER_ACL)); if (log_on && mysql_bin_log.is_open() && is_multi_insert) @@ -470,6 +479,72 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, } +/** + Find or create a delayed insert thread for the first table in + the table list, then open and lock the remaining tables. + If a table can not be used with insert delayed, upgrade the lock + and open and lock all tables using the standard mechanism. + + @param thd thread context + @param table_list list of "descriptors" for tables referenced + directly in statement SQL text. + The first element in the list corresponds to + the destination table for inserts, remaining + tables, if any, are usually tables referenced + by sub-queries in the right part of the + INSERT. + + @return Status of the operation. In case of success 'table' + member of every table_list element points to an instance of + class TABLE. + + @sa open_and_lock_tables for more information about MySQL table + level locking +*/ + +static +bool open_and_lock_for_insert_delayed(THD *thd, TABLE_LIST *table_list) +{ + DBUG_ENTER("open_and_lock_for_insert_delayed"); + +#ifndef EMBEDDED_LIBRARY + if (delayed_get_table(thd, table_list)) + DBUG_RETURN(TRUE); + + if (table_list->table) + { + /* + Open tables used for sub-selects or in stored functions, will also + cache these functions. + */ + if (open_and_lock_tables(thd, table_list->next_global)) + { + end_delayed_insert(thd); + DBUG_RETURN(TRUE); + } + /* + First table was not processed by open_and_lock_tables(), + we need to set updatability flag "by hand". + */ + if (!table_list->derived && !table_list->view) + table_list->updatable= 1; // usual table + DBUG_RETURN(FALSE); + } +#endif + /* + * This is embedded library and we don't have auxiliary + threads OR + * a lock upgrade was requested inside delayed_get_table + because + - there are too many delayed insert threads OR + - the table has triggers. + Use a normal insert. + */ + table_list->lock_type= TL_WRITE; + DBUG_RETURN(open_and_lock_tables(thd, table_list)); +} + + /** INSERT statement implementation */ @@ -483,11 +558,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, bool ignore) { int error, res; - /* - log_on is about delayed inserts only. - By default, both logs are enabled (this won't cause problems if the server - runs without --log-update or --log-bin). - */ bool transactional_table, joins_freed= FALSE; bool changed; uint value_count; @@ -501,9 +571,14 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, Name_resolution_context_state ctx_state; #ifndef EMBEDDED_LIBRARY char *query= thd->query; -#endif + /* + log_on is about delayed inserts only. + By default, both logs are enabled (this won't cause problems if the server + runs without --log-update or --log-bin). + */ bool log_on= (thd->options & OPTION_BIN_LOG) || (!(thd->security_ctx->master_access & SUPER_ACL)); +#endif thr_lock_type lock_type = table_list->lock_type; Item *unused_conds= 0; DBUG_ENTER("mysql_insert"); @@ -514,7 +589,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, */ upgrade_lock_type(thd, &table_list->lock_type, duplic, values_list.elements > 1); - lock_type= table_list->lock_type; /* We can't write-delayed into a table locked with LOCK TABLES: @@ -522,7 +596,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, never be able to get a lock on the table. QQQ: why not upgrade the lock here instead? */ - if (lock_type == TL_WRITE_DELAYED && thd->locked_tables && + if (table_list->lock_type == TL_WRITE_DELAYED && thd->locked_tables && find_locked_table(thd, table_list->db, table_list->table_name)) { my_error(ER_DELAYED_INSERT_TABLE_LOCKED, MYF(0), @@ -530,36 +604,16 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, DBUG_RETURN(TRUE); } -#ifndef EMBEDDED_LIBRARY - if (lock_type == TL_WRITE_DELAYED) + if (table_list->lock_type == TL_WRITE_DELAYED) { - res= 1; - if ((table= delayed_get_table(thd,table_list)) && !thd->is_fatal_error) - { - /* - Open tables used for sub-selects or in stored functions, will also - cache these functions. - */ - res= open_and_lock_tables(thd, table_list->next_global); - /* - First is not processed by open_and_lock_tables() => we need set - updateability flags "by hands". - */ - if (!table_list->derived && !table_list->view) - table_list->updatable= 1; // usual table - } - else if (thd->net.last_errno != ER_WRONG_OBJECT) - { - /* Too many delayed insert threads; Use a normal insert */ - table_list->lock_type= lock_type= TL_WRITE; - res= open_and_lock_tables(thd, table_list); - } + if (open_and_lock_for_insert_delayed(thd, table_list)) + DBUG_RETURN(TRUE); } else -#endif /* EMBEDDED_LIBRARY */ - res= open_and_lock_tables(thd, table_list); - if (res || thd->is_fatal_error) - DBUG_RETURN(TRUE); + { + if (open_and_lock_tables(thd, table_list)) + DBUG_RETURN(TRUE); + } thd->proc_info="init"; thd->used_tables=0; @@ -577,6 +631,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, /* mysql_prepare_insert set table_list->table if it was not set */ table= table_list->table; + lock_type= table_list->lock_type; context= &thd->lex->select_lex.context; /* @@ -1633,19 +1688,32 @@ Delayed_insert *find_handler(THD *thd, TABLE_LIST *table_list) Attempt to find or create a delayed insert thread to handle inserts into this table. - @return Return a local copy of the table in the delayed thread - @retval NULL too many delayed threads OR - this thread ran out of resources OR - a newly created delayed insert thread ran out of resources OR - the delayed insert thread failed to open the table. - In the last three cases an error is set in THD. + @return In case of success, table_list->table points to a local copy + of the delayed table or is set to NULL, which indicates a + request for lock upgrade. In case of failure, value of + table_list->table is undefined. + @retval TRUE - this thread ran out of resources OR + - a newly created delayed insert thread ran out of + resources OR + - the created thread failed to open and lock the table + (e.g. because it does not exist) OR + - the table opened in the created thread turned out to + be a view + @retval FALSE - table successfully opened OR + - too many delayed insert threads OR + - the table has triggers and we have to fall back to + a normal INSERT + Two latter cases indicate a request for lock upgrade. + + XXX: why do we regard INSERT DELAYED into a view as an error and + do not simply a lock upgrade? */ -static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) +static +bool delayed_get_table(THD *thd, TABLE_LIST *table_list) { int error; Delayed_insert *tmp; - TABLE *table; DBUG_ENTER("delayed_get_table"); /* Must be set in the parser */ @@ -1671,7 +1739,8 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) if (!(tmp=new Delayed_insert())) { my_error(ER_OUTOFMEMORY,MYF(0),sizeof(Delayed_insert)); - goto err1; + thd->fatal_error(); + goto end_create; } pthread_mutex_lock(&LOCK_thread_count); thread_count++; @@ -1680,9 +1749,10 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) tmp->thd.query= my_strdup(table_list->table_name,MYF(MY_WME)); if (tmp->thd.db == NULL || tmp->thd.query == NULL) { + /* The error is reported */ delete tmp; - my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); - goto err1; + thd->fatal_error(); + goto end_create; } tmp->table_list= *table_list; // Needed to open table tmp->table_list.alias= tmp->table_list.table_name= tmp->thd.query; @@ -1698,7 +1768,8 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) tmp->unlock(); delete tmp; my_error(ER_CANT_CREATE_THREAD, MYF(0), error); - goto err1; + thd->fatal_error(); + goto end_create; } /* Wait until table is open */ @@ -1711,41 +1782,44 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) thd->proc_info="got old table"; if (tmp->thd.killed) { - if (tmp->thd.is_fatal_error) + if (tmp->thd.net.report_error) { - /* Copy error message and abort */ - thd->fatal_error(); - strmov(thd->net.last_error,tmp->thd.net.last_error); - thd->net.last_errno=tmp->thd.net.last_errno; + /* + Copy the error message. Note that we don't treat fatal + errors in the delayed thread as fatal errors in the + main thread. Use of my_message will enable stored + procedures continue handlers. + */ + my_message(tmp->thd.net.last_errno, tmp->thd.net.last_error, + MYF(0)); } tmp->unlock(); - goto err; + goto end_create; } if (thd->killed) { tmp->unlock(); - goto err; + goto end_create; } } pthread_mutex_unlock(&LOCK_delayed_create); } pthread_mutex_lock(&tmp->mutex); - table= tmp->get_local_table(thd); + table_list->table= tmp->get_local_table(thd); pthread_mutex_unlock(&tmp->mutex); - if (table) + if (table_list->table) + { + DBUG_ASSERT(tmp->thd.net.report_error == 0 && thd->net.report_error == 0); thd->di=tmp; - else if (tmp->thd.is_fatal_error) - thd->fatal_error(); + } /* Unlock the delayed insert object after its last access. */ tmp->unlock(); - DBUG_RETURN((table_list->table=table)); + DBUG_RETURN(table_list->table == NULL); - err1: - thd->fatal_error(); - err: +end_create: pthread_mutex_unlock(&LOCK_delayed_create); - DBUG_RETURN(0); // Continue with normal insert + DBUG_RETURN(thd->net.report_error); } @@ -1760,6 +1834,9 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) @pre This function is called from the client thread. Delayed insert thread mutex must be acquired before invoking this function. + + @return Not-NULL table object on success. NULL in case of an error, + which is set in client_thd. */ TABLE *Delayed_insert::get_local_table(THD* client_thd) @@ -1785,8 +1862,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) goto error; if (dead) { - strmov(client_thd->net.last_error,thd.net.last_error); - client_thd->net.last_errno=thd.net.last_errno; + my_message(thd.net.last_errno, thd.net.last_error, MYF(0)); goto error; } } @@ -1831,7 +1907,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) for (org_field= table->field; *org_field; org_field++, field++) { if (!(*field= (*org_field)->new_field(client_thd->mem_root, copy, 1))) - DBUG_RETURN(0); + goto error; (*field)->orig_table= copy; // Remove connection (*field)->move_field(adjust_ptrs); // Point at copy->record[0] if (*org_field == found_next_number_field) @@ -1871,8 +1947,9 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) /* Put a question in queue */ -static int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic, bool ignore, - char *query, uint query_length, bool log_on) +static +int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic, bool ignore, + char *query, uint query_length, bool log_on) { delayed_row *row=0; Delayed_insert *di=thd->di; @@ -1939,6 +2016,10 @@ static int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic, bool igno DBUG_RETURN(1); } +/** + Signal the delayed insert thread that this user connection + is finished using it for this statement. +*/ static void end_delayed_insert(THD *thd) { @@ -2051,6 +2132,15 @@ pthread_handler_t handle_delayed_insert(void *arg) my_error(ER_ILLEGAL_HA, MYF(0), di->table_list.table_name); goto end; } + if (di->table->triggers) + { + /* + Table has triggers. This is not an error, but we do + not support triggers with delayed insert. Terminate the delayed + thread without an error and thus request lock upgrade. + */ + goto end; + } di->table->copy_blobs=1; /* One can now use this */ diff --git a/sql/sql_lex.h b/sql/sql_lex.h index d07de73d5b9..aa85711b4fd 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -886,6 +886,12 @@ public: query_tables_own_last= 0; } } + /** + true if the parsed tree contains references to stored procedures + or functions, false otherwise + */ + bool uses_stored_routines() const + { return sroutines_list.elements != 0; } }; From 5ac4515a575eb1d5e1e5939c4414bd3d6f2edac2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 May 2007 10:32:47 +0400 Subject: [PATCH 135/137] Correct a merge error. sql/sql_insert.cc: Correct a merge error (wrong declaration was used). --- sql/sql_insert.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 93cb16715f9..785e75635b8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -64,7 +64,7 @@ #ifndef EMBEDDED_LIBRARY static bool delayed_get_table(THD *thd, TABLE_LIST *table_list); -static int write_delayed(THD *thd, TABLE *table, enum_duplicates dup, +static int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic, LEX_STRING query, bool ignore, bool log_on); static void end_delayed_insert(THD *thd); pthread_handler_t handle_delayed_insert(void *arg); @@ -1999,8 +1999,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) /* Put a question in queue */ static -int write_delayed(THD *thd,TABLE *table,enum_duplicates duplic, bool ignore, - char *query, uint query_length, bool log_on) +int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic, + LEX_STRING query, bool ignore, bool log_on) { delayed_row *row= 0; Delayed_insert *di=thd->di; From 75392f37078a8e3bf3098f40c84a24c18cd91d5b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 May 2007 11:49:15 +0400 Subject: [PATCH 136/137] Fix a failing assert. sql/sql_insert.cc: Do not access delayed thread memory without a mutex. --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 7f951867f4c..5720758128e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1811,7 +1811,7 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list) pthread_mutex_unlock(&tmp->mutex); if (table_list->table) { - DBUG_ASSERT(tmp->thd.net.report_error == 0 && thd->net.report_error == 0); + DBUG_ASSERT(thd->net.report_error == 0); thd->di=tmp; } /* Unlock the delayed insert object after its last access. */ From 7c472868af278cf5725d3a3f94c7f6c905386c06 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 May 2007 15:35:18 +0400 Subject: [PATCH 137/137] Make a stab at events_bugs.test failure under valgrind (no open bug report, reproduced in the runtime team tree). sql/event_data_objects.cc: Make a stub at fixing a race in event_bugs.test under valgrind: read of uninitialized byte in SHOW PROCESSLIST from an event thread. --- sql/event_data_objects.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 4b788a8f7d8..41f2f89db24 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1913,6 +1913,11 @@ Event_job_data::execute(THD *thd, bool drop) thd->variables.sql_mode= sql_mode; thd->variables.time_zone= time_zone; + /* + Peculiar initialization order is a clutch to avoid races in SHOW + PROCESSLIST which reads thd->{query/query_length} without a mutex. + */ + thd->query_length= 0; thd->query= sp_sql.c_ptr_safe(); thd->query_length= sp_sql.length(); @@ -1968,6 +1973,11 @@ end: ret= 1; else { + /* + Peculiar initialization order is a clutch to avoid races in SHOW + PROCESSLIST which reads thd->{query/query_length} without a mutex. + */ + thd->query_length= 0; thd->query= sp_sql.c_ptr_safe(); thd->query_length= sp_sql.length(); if (Events::drop_event(thd, dbname, name, FALSE))