diff options
440 files changed, 7882 insertions, 3480 deletions
diff --git a/.gitattributes b/.gitattributes index 9d638481a84..6d94dc06cd7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -30,6 +30,6 @@ pcre/testdata/greppatN4 -text *.c diff=cpp *.h diff=cpp *.cc diff=cpp -*.ic diff=cpp +*.inl diff=cpp *.cpp diff=cpp *.java diff=cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 4153b73b572..88a0d64e6de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -402,6 +402,10 @@ IF(WITH_UNIT_TESTS) ENDIF() ENDIF() +INCLUDE(cpack_tgz) +INCLUDE(cpack_rpm) +INCLUDE(cpack_deb) + UNSET (MYSQLD_STATIC_PLUGIN_LIBS CACHE) INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb) diff --git a/appveyor.yml b/appveyor.yml index e8902eec589..650f5ec4dab 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,15 +1,5 @@ -init: - # Install bison - - choco feature disable --name showDownloadProgress - - choco install -y winflexbison - - C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe --version - version: build-{build}~branch-{branch} -cache: - - C:\ProgramData\chocolatey\bin -> appveyor.yml - - C:\ProgramData\chocolatey\lib -> appveyor.yml - clone_depth: 1 build_script: @@ -26,8 +16,8 @@ build_script: - cd _build - set BUILD_TYPE=MinSizeRel - set GENERATOR=-GNinja - - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" - - cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO + - call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" + - cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO - set /A jobs=2*%NUMBER_OF_PROCESSORS% - cmake -E time cmake --build . -j %jobs% --config %BUILD_TYPE% --target minbuild @@ -37,4 +27,4 @@ test_script: - set /A parallel=4*%NUMBER_OF_PROCESSORS% - perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 -parallel=%parallel% --testcase-timeout=4 --suite=main --skip-test-list=unstable-tests --mysqld=--loose-innodb-flush-log-at-trx-commit=2 -image: Visual Studio 2019 +image: Visual Studio 2022 diff --git a/client/client_priv.h b/client/client_priv.h index 7a6fa8f3bc8..9280d6ccc96 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -101,6 +101,7 @@ enum options_client OPT_SSL_CRL, OPT_SSL_CRLPATH, OPT_IGNORE_DATA, OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS, + OPT_CHECK_IF_UPGRADE_NEEDED, OPT_SHUTDOWN_WAIT_FOR_SLAVES, OPT_MAX_CLIENT_OPTION /* should be always the last */ }; diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 5e350cf66bc..bcc83e96cb9 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -22,7 +22,7 @@ #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ -#define VER "1.4" +#define VER "2.0" #ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> @@ -37,13 +37,15 @@ #endif static int phase = 0; +static int info_file= -1; static const int phases_total = 7; static char mysql_path[FN_REFLEN]; static char mysqlcheck_path[FN_REFLEN]; -static my_bool opt_force, opt_verbose, debug_info_flag, debug_check_flag, +static my_bool debug_info_flag, debug_check_flag, opt_systables_only, opt_version_check; -static my_bool opt_not_used, opt_silent; +static my_bool opt_not_used, opt_silent, opt_check_upgrade; +static uint opt_force, opt_verbose; static uint my_end_arg= 0; static char *opt_user= (char*)"root"; @@ -69,7 +71,7 @@ static char **defaults_argv; static my_bool not_used; /* Can't use GET_BOOL without a value pointer */ -char upgrade_from_version[sizeof("10.20.456-MariaDB")+1]; +char upgrade_from_version[sizeof("10.20.456-MariaDB")+30]; static my_bool opt_write_binlog; @@ -95,8 +97,8 @@ static struct my_option my_long_options[]= {"debug", '#', "This is a non-debug version. Catch this and exit.", 0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, #else - {"debug", '#', "Output debug log.", &default_dbug_option, - &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"debug", '#', "Output debug log.", + 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", &debug_check_flag, &debug_check_flag, @@ -110,9 +112,13 @@ static struct my_option my_long_options[]= "Default authentication client-side plugin to use.", &opt_default_auth, &opt_default_auth, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"check-if-upgrade-is-needed", OPT_CHECK_IF_UPGRADE_NEEDED, + "Exits with status 0 if an upgrades is required, 1 otherwise.", + &opt_check_upgrade, &opt_check_upgrade, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade " "has already been executed for the current version of MariaDB.", - &opt_force, &opt_force, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + &opt_not_used, &opt_not_used, 0 , GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"host", 'h', "Connect to host.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #define PASSWORD_OPT 12 @@ -189,6 +195,12 @@ static void free_used_memory(void) dynstr_free(&conn_args); if (cnf_file_path) my_delete(cnf_file_path, MYF(MY_WME)); + if (info_file >= 0) + { + (void) my_lock(info_file, F_UNLCK, 0, 1, MYF(0)); + my_close(info_file, MYF(MY_WME)); + info_file= -1; + } } @@ -234,6 +246,13 @@ static void verbose(const char *fmt, ...) } +static void print_error(const char *error_msg, DYNAMIC_STRING *output) +{ + fprintf(stderr, "%s\n", error_msg); + fprintf(stderr, "%s", output->str); +} + + /* Add one option - passed to mysql_upgrade on command line or by defaults file(my.cnf) - to a dynamic string, in @@ -267,6 +286,7 @@ static void add_one_option_cnf_file(DYNAMIC_STRING *ds, dynstr_append(ds, "\n"); } + static my_bool get_one_option(int optid, const struct my_option *opt, char *argument) @@ -335,11 +355,17 @@ get_one_option(int optid, const struct my_option *opt, my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); die(0); break; + case 'f': /* --force */ + opt_force++; + if (argument == disabled_my_option) + opt_force= 0; + add_option= 0; + break; case OPT_SILENT: opt_verbose= 0; add_option= 0; break; - case 'f': /* --force */ + case OPT_CHECK_IF_UPGRADE_NEEDED: /* --check-if-upgrade-needed */ case 's': /* --upgrade-system-tables */ case OPT_WRITE_BINLOG: /* --write-binlog */ add_option= FALSE; @@ -369,6 +395,18 @@ get_one_option(int optid, const struct my_option *opt, } +/* Convert the specified version string into the numeric format. */ + +static ulong STDCALL calc_server_version(char *some_version) +{ + uint major, minor, version; + char *point= some_version, *end_point; + major= (uint) strtoul(point, &end_point, 10); point=end_point+1; + minor= (uint) strtoul(point, &end_point, 10); point=end_point+1; + version= (uint) strtoul(point, &end_point, 10); + return (ulong) major * 10000L + (ulong)(minor * 100 + version); +} + /** Run a command using the shell, storing its output in the supplied dynamic string. @@ -566,7 +604,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res, if (my_write(fd, sql_log_bin, sizeof(sql_log_bin)-1, MYF(MY_FNABP | MY_WME))) { - my_close(fd, MYF(0)); + my_close(fd, MYF(MY_WME)); my_delete(query_file_path, MYF(0)); die("Failed to write to '%s'", query_file_path); } @@ -575,7 +613,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res, if (my_write(fd, (uchar*) query, strlen(query), MYF(MY_FNABP | MY_WME))) { - my_close(fd, MYF(0)); + my_close(fd, MYF(MY_WME)); my_delete(query_file_path, MYF(0)); die("Failed to write to '%s'", query_file_path); } @@ -592,7 +630,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res, "2>&1", NULL); - my_close(fd, MYF(0)); + my_close(fd, MYF(MY_WME)); my_delete(query_file_path, MYF(0)); DBUG_RETURN(ret); @@ -639,6 +677,9 @@ static int get_upgrade_info_file_name(char* name) &ds_datadir, FALSE) || extract_variable_from_show(&ds_datadir, name)) { + print_error("Reading datadir from the MariaDB server failed. Got the " + "following error when executing the 'mysql' command line client", + &ds_datadir); dynstr_free(&ds_datadir); DBUG_RETURN(1); /* Query failed */ } @@ -650,6 +691,83 @@ static int get_upgrade_info_file_name(char* name) DBUG_RETURN(0); } +static char upgrade_info_file[FN_REFLEN]= {0}; + + +/* + Open or create mysql_upgrade_info file in servers data dir. + + Take a lock to ensure there cannot be any other mysql_upgrades + runninc concurrently +*/ + +const char *create_error_message= + "%sCould not open or create the upgrade info file '%s' in " + "the MariaDB Servers data directory, errno: %d (%s)\n"; + + + +static void open_mysql_upgrade_file() +{ + char errbuff[80]; + if (get_upgrade_info_file_name(upgrade_info_file)) + { + die("Upgrade failed"); + } + if ((info_file= my_create(upgrade_info_file, 0, + O_RDWR | O_NOFOLLOW, + MYF(0))) < 0) + { + if (opt_force >= 2) + { + fprintf(stdout, create_error_message, + "", upgrade_info_file, errno, + my_strerror(errbuff, sizeof(errbuff)-1, errno)); + fprintf(stdout, + "--force --force used, continuing without using the %s file.\n" + "Note that this means that there is no protection against " + "concurrent mysql_upgrade executions and next mysql_upgrade run " + "will do a full upgrade again!\n", + upgrade_info_file); + return; + } + fprintf(stdout, create_error_message, + "FATAL ERROR: ", + upgrade_info_file, errno, + my_strerror(errbuff, sizeof(errbuff)-1, errno)); + if (errno == EACCES) + { + fprintf(stderr, + "Note that mysql_upgrade should be run as the same user as the " + "MariaDB server binary, normally 'mysql' or 'root'.\n" + "Alternatively you can use mysql_upgrade --force --force. " + "Please check the documentation if you decide to use the force " + "option!\n"); + } + fflush(stderr); + die(0); + } + if (my_lock(info_file, F_WRLCK, 0, 1, MYF(0))) + { + die("Could not exclusively lock on file '%s'. Error %d: %s\n", + upgrade_info_file, my_errno, + my_strerror(errbuff, sizeof(errbuff)-1, my_errno)); + } +} + + +/** + Place holder for versions that require a major upgrade + + @return 0 upgrade has alredy been run on this version + @return 1 upgrade has to be run + +*/ + +static int faulty_server_versions(const char *version) +{ + return 0; +} /* Read the content of mysql_upgrade_info file and @@ -659,86 +777,111 @@ static int get_upgrade_info_file_name(char* name) NOTE This is an optimization to avoid running mysql_upgrade when it's already been performed for the particular - version of MySQL. + version of MariaDB. - In case the MySQL server can't return the upgrade info + In case the MariaDBL server can't return the upgrade info file it's always better to report that the upgrade hasn't been performed. + @return 0 Upgrade has alredy been run on this version + @return > 0 Upgrade has to be run */ -static int upgrade_already_done(myf flags) +static int upgrade_already_done(int silent) { - FILE *in; - char upgrade_info_file[FN_REFLEN]= {0}; - - if (get_upgrade_info_file_name(upgrade_info_file)) - return 0; /* Could not get filename => not sure */ - - if (!(in= my_fopen(upgrade_info_file, O_RDONLY, flags))) - return 0; /* Could not open file => not sure */ + const char *version = MYSQL_SERVER_VERSION; + const char *s; + char *pos; + my_off_t length; - bzero(upgrade_from_version, sizeof(upgrade_from_version)); - if (!fgets(upgrade_from_version, sizeof(upgrade_from_version), in)) + if (info_file < 0) { - /* Preserve errno for caller */ - int save_errno= errno; - (void) my_fclose(in, flags); - errno= save_errno; - return 0; + DBUG_ASSERT(opt_force > 1); + return 1; /* No info file and --force */ } - if (my_fclose(in, flags)) - return 0; - - errno= 0; - return (strncmp(upgrade_from_version, MYSQL_SERVER_VERSION, - sizeof(MYSQL_SERVER_VERSION)-1)==0); -} + bzero(upgrade_from_version, sizeof(upgrade_from_version)); + (void) my_seek(info_file, 0, SEEK_SET, MYF(0)); + /* We have -3 here to make calc_server_version() safe */ + length= my_read(info_file, (uchar*) upgrade_from_version, + sizeof(upgrade_from_version)-3, + MYF(MY_WME)); -/* - Write mysql_upgrade_info file in servers data dir indicating that - upgrade has been done for this version + if (!length) + { + if (opt_verbose) + verbose("Empty or non existent %s. Assuming mysql_upgrade has to be run!", + upgrade_info_file); + return 1; + } - NOTE - This might very well fail but since it's just an optimization - to run mysql_upgrade only when necessary the error can be - ignored. + /* Remove possible \ŋ that may end in output */ + if ((pos= strchr(upgrade_from_version, '\n'))) + *pos= 0; -*/ - -static void create_mysql_upgrade_info_file(void) -{ - FILE *out; - char upgrade_info_file[FN_REFLEN]= {0}; + if (faulty_server_versions(upgrade_from_version)) + { + if (opt_verbose) + verbose("Upgrading from version %s requires mysql_upgrade to be run!", + upgrade_from_version); + return 2; + } - if (get_upgrade_info_file_name(upgrade_info_file)) - return; /* Could not get filename => skip */ + s= strchr(version, '.'); + s= strchr(s + 1, '.'); - if (!(out= my_fopen(upgrade_info_file, O_TRUNC | O_WRONLY, MYF(0)))) + if (strncmp(upgrade_from_version, version, + (size_t)(s - version + 1))) { - fprintf(stderr, - "Could not create the upgrade info file '%s' in " - "the MariaDB Servers datadir, errno: %d\n", - upgrade_info_file, errno); - return; + if (calc_server_version(upgrade_from_version) <= MYSQL_VERSION_ID) + { + verbose("Major version upgrade detected from %s to %s. Check required!", + upgrade_from_version, version); + return 3; + } + die("Version mismatch (%s -> %s): Trying to downgrade from a higher to " + "lower version is not supported!", + upgrade_from_version, version); } + if (!silent) + { + verbose("This installation of MariaDB is already upgraded to %s.\n" + "There is no need to run mysql_upgrade again for %s.", + upgrade_from_version, version); + if (!opt_check_upgrade) + verbose("You can use --force if you still want to run mysql_upgrade", + upgrade_from_version, version); + } + return 0; +} + +static void finish_mysql_upgrade_info_file(void) +{ + if (info_file < 0) + return; /* Write new version to file */ - my_fwrite(out, (uchar*) MYSQL_SERVER_VERSION, - sizeof(MYSQL_SERVER_VERSION), MY_WME); - my_fclose(out, MYF(MY_WME)); + (void) my_seek(info_file, 0, SEEK_CUR, MYF(0)); + (void) my_chsize(info_file, 0, 0, MYF(0)); + (void) my_seek(info_file, 0, 0, MYF(0)); + (void) my_write(info_file, (uchar*) MYSQL_SERVER_VERSION, + sizeof(MYSQL_SERVER_VERSION)-1, MYF(MY_WME)); + (void) my_write(info_file, (uchar*) "\n", 1, MYF(MY_WME)); + (void) my_lock(info_file, F_UNLCK, 0, 1, MYF(0)); /* - Check if the upgrad_info_file was properly created/updated + Check if the upgrade_info_file was properly created/updated It's not a fatal error -> just print a message if it fails */ - if (!upgrade_already_done(MY_WME)) + if (upgrade_already_done(1)) fprintf(stderr, - "Upgrade file '%s' was not properly created. " - "Got error errno while checking file content: %d\n", + "Could not write to the upgrade info file '%s' in " + "the MariaDB Servers datadir, errno: %d\n", upgrade_info_file, errno); + + my_close(info_file, MYF(MY_WME)); + info_file= -1; return; } @@ -1066,7 +1209,7 @@ static int check_slave_repositories(void) } /* - Update all system tables in MySQL Server to current + Update all system tables in MariaDB Server to current version using "mysql" to execute all the SQL commands compiled into the mysql_fix_privilege_tables array */ @@ -1135,24 +1278,6 @@ static int run_sql_fix_privilege_tables(void) } -static void print_error(const char *error_msg, DYNAMIC_STRING *output) -{ - fprintf(stderr, "%s\n", error_msg); - fprintf(stderr, "%s", output->str); -} - - -/* Convert the specified version string into the numeric format. */ -static ulong STDCALL calc_server_version(char *some_version) -{ - uint major, minor, version; - char *point= some_version, *end_point; - major= (uint) strtoul(point, &end_point, 10); point=end_point+1; - minor= (uint) strtoul(point, &end_point, 10); point=end_point+1; - version= (uint) strtoul(point, &end_point, 10); - return (ulong) major * 10000L + (ulong)(minor * 100 + version); -} - /** Check if the server version matches with the server version mysql_upgrade was compiled with. @@ -1188,8 +1313,7 @@ static int check_version_match(void) "check.\n", version_str, MYSQL_SERVER_VERSION); return 1; } - else - return 0; + return 0; } @@ -1198,6 +1322,8 @@ int main(int argc, char **argv) char self_name[FN_REFLEN + 1]; MY_INIT(argv[0]); + DBUG_PROCESS(argv[0]); + load_defaults_or_exit("my", load_default_groups, &argc, &argv); defaults_argv= argv; /* Must be freed by 'free_defaults' */ @@ -1238,12 +1364,17 @@ int main(int argc, char **argv) die(NULL); my_write(fd, USTRING_WITH_LEN( "[client]\n"), MYF(MY_FAE)); my_write(fd, (uchar*)ds_args.str, ds_args.length, MYF(MY_FAE)); - my_close(fd, MYF(0)); + my_close(fd, MYF(MY_WME)); } /* Find mysql */ find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"), self_name); + open_mysql_upgrade_file(); + + if (opt_check_upgrade) + exit(upgrade_already_done(0) == 0); + /* Find mysqlcheck */ find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name); @@ -1252,15 +1383,10 @@ int main(int argc, char **argv) /* Read the mysql_upgrade_info file to check if mysql_upgrade - already has been run for this installation of MySQL + already has been run for this installation of MariaDB */ - if (!opt_force && upgrade_already_done(0)) - { - printf("This installation of MariaDB is already upgraded to %s, " - "use --force if you still need to run mysql_upgrade\n", - MYSQL_SERVER_VERSION); - goto end; - } + if (!opt_force && !upgrade_already_done(0)) + goto end; /* Upgrade already done */ if (opt_version_check && check_version_match()) die("Upgrade failed"); @@ -1285,8 +1411,8 @@ int main(int argc, char **argv) verbose("OK"); - /* Create a file indicating upgrade has been performed */ - create_mysql_upgrade_info_file(); + /* Finish writing indicating upgrade has been performed */ + finish_mysql_upgrade_info_file(); DBUG_ASSERT(phase == phases_total); diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 232d3582eff..164dcd0490b 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -27,7 +27,7 @@ SET(CPACK_COMPONENT_BACKUP_GROUP "backup") SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts SupportFiles Development ManPagesDevelopment - ManPagesTest Readme ManPagesClient Test + ManPagesTest Readme ManPagesClient Test Common Client SharedLibraries ClientPlugins backup ) @@ -187,6 +187,8 @@ SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES "MySQL-devel") SETA(CPACK_RPM_devel_PACKAGE_PROVIDES "MySQL-devel") +SETA(CPACK_RPM_devel_PACKAGE_REQUIRES + "MariaDB-shared >= 10.2.42") SETA(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB" @@ -349,6 +351,7 @@ ENDMACRO() ADDIF(CMAKE_BUILD_TYPE) ADDIF(BUILD_CONFIG) ADDIF(WITH_SSL) +ADDIF(WITH_JEMALLOC) ENDIF() ENDIF(RPM) diff --git a/cmake/cpack_tgz.cmake b/cmake/cpack_tgz.cmake new file mode 100644 index 00000000000..7dd9f397189 --- /dev/null +++ b/cmake/cpack_tgz.cmake @@ -0,0 +1,10 @@ +IF(NOT RPM AND NOT DEB) + # + # use -DEXTRA_FILES='/path/to/file=where/to/install;/bin/dd=bin;...' + # + FOREACH(f ${EXTRA_FILES}) + STRING(REGEX REPLACE "=.*$" "" from ${f}) + STRING(REGEX REPLACE "^.*=" "" to ${f}) + INSTALL(PROGRAMS ${from} DESTINATION ${to}) + ENDFOREACH() +ENDIF() diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 7c2488be8bd..a6793cf3c55 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -118,7 +118,7 @@ MACRO (MYSQL_CHECK_SSL) ENDIF() FIND_PACKAGE(OpenSSL) SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE RECOMMENDED) - IF(OPENSSL_FOUND) + IF(OPENSSL_FOUND AND OPENSSL_VERSION AND OPENSSL_VERSION VERSION_LESS "3.0.0") SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY}) INCLUDE(CheckSymbolExists) SET(SSL_SOURCES "") diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake index 978be0b9f98..255abe62351 100644 --- a/cmake/systemd.cmake +++ b/cmake/systemd.cmake @@ -17,7 +17,7 @@ MACRO(CHECK_SYSTEMD) IF(UNIX) INCLUDE(FindPkgConfig) # http://www.cmake.org/cmake/help/v3.0/module/FindPkgConfig.html - SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support") + SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support. Allowed values yes/no/auto.") IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto") IF(PKG_CONFIG_FOUND) IF (NOT DEFINED LIBSYSTEMD_FOUND) @@ -49,6 +49,12 @@ MACRO(CHECK_SYSTEMD) SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld") SET(SYSTEMD_EXECSTARTPOST "ExecStartPost=/etc/mysql/debian-start") ENDIF() + IF(NOT DEB AND NOT RPM) + SET(SYSTEMD_READWRITEPATH "# Database dir: '${MYSQL_DATADIR}' should be writable even +# ProtectSystem=full prevents it +ReadWritePaths=-${MYSQL_DATADIR}\n") + ENDIF() + MESSAGE_ONCE(systemd "Systemd features enabled") ELSE() UNSET(LIBSYSTEMD) diff --git a/configure.cmake b/configure.cmake index d2111c2a91e..634ae1d4940 100644 --- a/configure.cmake +++ b/configure.cmake @@ -862,9 +862,16 @@ MARK_AS_ADVANCED(NO_ALARM) CHECK_CXX_SOURCE_COMPILES(" int main() { - long long int var= 1; - long long int *ptr= &var; - return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + char x=1; + short y=1; + int z=1; + long w = 1; + long long s = 1; + x = __atomic_add_fetch(&x, 1, __ATOMIC_SEQ_CST); + y = __atomic_add_fetch(&y, 1, __ATOMIC_SEQ_CST); + z = __atomic_add_fetch(&z, 1, __ATOMIC_SEQ_CST); + w = __atomic_add_fetch(&w, 1, __ATOMIC_SEQ_CST); + return (int)__atomic_load_n(&s, __ATOMIC_SEQ_CST); }" HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) @@ -875,9 +882,16 @@ ELSE() CHECK_CXX_SOURCE_COMPILES(" int main() { - long long int var= 1; - long long int *ptr= &var; - return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + char x=1; + short y=1; + int z=1; + long w = 1; + long long s = 1; + x = __atomic_add_fetch(&x, 1, __ATOMIC_SEQ_CST); + y = __atomic_add_fetch(&y, 1, __ATOMIC_SEQ_CST); + z = __atomic_add_fetch(&z, 1, __ATOMIC_SEQ_CST); + w = __atomic_add_fetch(&w, 1, __ATOMIC_SEQ_CST); + return (int)__atomic_load_n(&s, __ATOMIC_SEQ_CST); }" HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index 87451037995..62b7e885578 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -54,6 +54,12 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */ #include <string.h> +#ifdef UNIV_NONINL +# include "fsp0fsp.inl" +# include "mach0data.inl" +# include "ut0rnd.inl" +#endif + #ifndef PRIuMAX #define PRIuMAX "llu" #endif diff --git a/include/errmsg.h b/include/errmsg.h index c0c4cfc58be..bd086bba05b 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -36,8 +36,9 @@ extern const char *client_errors[]; /* Error messages */ #define CR_MIN_ERROR 2000 /* For easier client code */ #define CR_MAX_ERROR 2999 #if !defined(ER) -#define ER(X) (((X) >= CR_ERROR_FIRST && (X) <= CR_ERROR_LAST)? \ - client_errors[(X)-CR_ERROR_FIRST]: client_errors[CR_UNKNOWN_ERROR]) +#define ER(X) (((X) >= CR_ERROR_FIRST && (X) <= CR_ERROR_LAST) \ + ? client_errors[(X)-CR_ERROR_FIRST] \ + : client_errors[CR_UNKNOWN_ERROR-CR_ERROR_FIRST]) #endif #define CLIENT_ERRMAP 2 /* Errormap used by my_error() */ diff --git a/include/my_base.h b/include/my_base.h index 767da14b4d6..dab357f45a4 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -521,7 +521,8 @@ enum ha_base_keytype { #define HA_ERR_TABLESPACE_MISSING 194 /* Missing Tablespace */ #define HA_ERR_SEQUENCE_INVALID_DATA 195 #define HA_ERR_SEQUENCE_RUN_OUT 196 -#define HA_ERR_LAST 196 /* Copy of last error nr * */ +#define HA_ERR_PARTITION_LIST 197 +#define HA_ERR_LAST 197 /* Copy of last error nr * */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) diff --git a/include/my_handler_errors.h b/include/my_handler_errors.h index 45614ce221a..946e615aa79 100644 --- a/include/my_handler_errors.h +++ b/include/my_handler_errors.h @@ -107,7 +107,8 @@ static const char *handler_error_messages[]= "Foreign key cascade delete/update exceeds max depth", "Tablespace is missing for a table", "Sequence has been run out", - "Sequence values are conflicting" + "Sequence values are conflicting", + "Cannot select partitions" }; #endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */ diff --git a/include/my_sys.h b/include/my_sys.h index 29a9b426a5a..fbb46d7a6e0 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2021, MariaDB Corporation. + Copyright (c) 2010, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -279,7 +279,7 @@ extern int my_umask_dir, my_recived_signals, /* Signals we have got */ my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ my_dont_interrupt; /* call remember_intr when set */ -extern my_bool my_use_symdir; +extern MYSQL_PLUGIN_IMPORT my_bool my_use_symdir; extern ulong my_default_record_cache_size; extern MYSQL_PLUGIN_IMPORT my_bool my_disable_locking; diff --git a/libmariadb b/libmariadb -Subproject 735a7299dbae19cc2b82b9697becaf90e9b4304 +Subproject f6c3d9fd2af5d17db64cc996574aa312efd70fc diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 42a93f9a38b..55c6dd6f6e8 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -834,7 +834,7 @@ int check_embedded_connection(MYSQL *mysql, const char *db) /* acl_authenticate() takes the data from thd->net->read_pos */ thd->net.read_pos= (uchar*)buf; - if (acl_authenticate(thd, 0, end - buf)) + if (acl_authenticate(thd, (uint) (end - buf))) { my_free(thd->security_ctx->user); goto err; diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 39e893b8863..62f13ae2e52 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -239,6 +239,21 @@ Old option accepted for backward compatibility but ignored\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql_upgrade: check-if-upgrade-is-needed option +.\" check-if-upgrade-is-needed option: mysql_upgrade +\fB\-\-check\-if\-upgrade\-is\-needed\fR +.sp +Exit with a status code indicating if an upgrade is needed\&. Returns 0 if upgrade needed or current version couldn't be determined, 1 when no action required\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql_upgrade: datadir option .\" datadir option: mysql_upgrade \fB\-\-datadir=\fR\fB\fIpath\fR\fR diff --git a/mysql-test/collections/buildbot_suites.bat b/mysql-test/collections/buildbot_suites.bat index 6228199c793..0880e0124dd 100644 --- a/mysql-test/collections/buildbot_suites.bat +++ b/mysql-test/collections/buildbot_suites.bat @@ -1,4 +1,5 @@ -perl mysql-test-run.pl --verbose-restart --force --suite-timeout=120 --max-test-fail=10 --retry=3 --parallel=4 --suite=^ +if "%MTR_PARALLEL%"=="" set MTR_PARALLEL=%NUMBER_OF_PROCESSORS% +perl mysql-test-run.pl --verbose-restart --force --suite-timeout=120 --max-test-fail=10 --retry=3 --suite=^ vcol,gcol,perfschema,^ main,^ innodb,^ diff --git a/mysql-test/include/index_merge1.inc b/mysql-test/include/index_merge1.inc index 5364780b689..fdd87f85ef5 100644 --- a/mysql-test/include/index_merge1.inc +++ b/mysql-test/include/index_merge1.inc @@ -153,12 +153,22 @@ explain select * from t0 where (((key3 <7 and key7 < 6) or key5 < 2) and (key5 < 5 or key6 < 6)); explain select * from t0 where - ((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) + ((key3 < 4 or key5 < 4) and (key1 < 4 or key2 < 4)) or ((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where - ((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) + ((key3 < 4 or key5 < 4) and (key1 < 4 or key2 < 4)) + or + ((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); + +explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where + ((key3 < 5 or key5 < 4) and (key1 < 4 or key2 < 4)) + or + ((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); + +explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where + ((key3 < 10 or key5 < 4) and (key1 < 4 or key2 < 4)) or ((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); diff --git a/mysql-test/include/is_embedded.inc b/mysql-test/include/is_embedded.inc index b20f21953f0..a440406edd4 100644 --- a/mysql-test/include/is_embedded.inc +++ b/mysql-test/include/is_embedded.inc @@ -1,5 +1,7 @@ +# +# Check if the current used server is an embedded server# +# if (`SELECT VERSION() NOT LIKE '%embedded%'`) { --skip Test requires: embedded server } - diff --git a/mysql-test/include/is_embedded_no_privileges.inc b/mysql-test/include/is_embedded_no_privileges.inc new file mode 100644 index 00000000000..364c697c5a8 --- /dev/null +++ b/mysql-test/include/is_embedded_no_privileges.inc @@ -0,0 +1,16 @@ +# +# Test that we do not have an embedded server compiled with privileges. +# This is not a regular setup, but we are running this in buildbot for +# testing of embedded + privileges. +# Some funcs_1 test cannot handle this combination, which is why we have this +# file to disable them +# + +--source include/is_embedded.inc + +let priv=`SELECT privileges FROM information_schema.columns limit 1`; + +if (`SELECT "$priv" <> ""`) +{ + --skip Embedded server is compiled with privileges; Test disabled. +} diff --git a/mysql-test/include/not_windows_embedded.inc b/mysql-test/include/not_windows_embedded.inc index 46f5e0ccfce..50ff0f80c7d 100644 --- a/mysql-test/include/not_windows_embedded.inc +++ b/mysql-test/include/not_windows_embedded.inc @@ -1,10 +1,8 @@ let $is_win = `select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows")`; -let $is_embedded = `select version() like '%embedded%'`; #echo is_win: $is_win; -#echo is_embedded: $is_embedded; if ($is_win) { - if ($is_embedded) + if(!$MYSQL_EMBEDDED) { skip Not supported with embedded on windows; } diff --git a/mysql-test/lib/My/Options.pm b/mysql-test/lib/My/Options.pm index 5827e0666a6..b3ae64cb4c2 100644 --- a/mysql-test/lib/My/Options.pm +++ b/mysql-test/lib/My/Options.pm @@ -142,11 +142,11 @@ sub diff { sub is_subset { my ($set, $subset)= @_; - my %cache = map { _split_option($_) } @$set; + my %cache = map { join('=', _split_option($_)), 1 } @$set; for (@$subset){ my ($name, $value)= _split_option($_); - return 0 unless exists $cache{$name} and $cache{$name} eq $value; + return 0 unless $cache{"$name=$value"}; } return 1; diff --git a/mysql-test/main/alter_user.result b/mysql-test/main/alter_user.result index 0dcec5835b7..bdc96a64fee 100644 --- a/mysql-test/main/alter_user.result +++ b/mysql-test/main/alter_user.result @@ -102,4 +102,14 @@ select * from mysql.user where user = 'foo'; Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time % foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 drop user foo; +# +# Bug #29882299: ALTER USER ... IDENTIFIED WITH ... BY ... SHOULD BE A PRIVILEGED OPERATION +# +create user foo@localhost; +connect x,localhost,foo; +alter user current_user identified with 'something'; +ERROR 42000: Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation +connection default; +disconnect x; +drop user foo@localhost; update mysql.global_priv set priv=@root_priv where user='root' and host='localhost'; diff --git a/mysql-test/main/alter_user.test b/mysql-test/main/alter_user.test index 5a05a671277..83a06a78728 100644 --- a/mysql-test/main/alter_user.test +++ b/mysql-test/main/alter_user.test @@ -87,4 +87,15 @@ alter user foo with MAX_QUERIES_PER_HOUR 10 select * from mysql.user where user = 'foo'; drop user foo; +--echo # +--echo # Bug #29882299: ALTER USER ... IDENTIFIED WITH ... BY ... SHOULD BE A PRIVILEGED OPERATION +--echo # +create user foo@localhost; +--connect x,localhost,foo +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +alter user current_user identified with 'something'; +--connection default +--disconnect x +drop user foo@localhost; + update mysql.global_priv set priv=@root_priv where user='root' and host='localhost'; diff --git a/mysql-test/main/create.result b/mysql-test/main/create.result index 39ede1f90b9..d249e4b453c 100644 --- a/mysql-test/main/create.result +++ b/mysql-test/main/create.result @@ -1072,58 +1072,58 @@ create table t1 like information_schema.processlist; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 drop table t1; create temporary table t1 like information_schema.processlist; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 drop table t1; create table t1 like information_schema.character_sets; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '', - `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', - `MAXLEN` bigint(3) NOT NULL DEFAULT 0 + `CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL, + `DESCRIPTION` varchar(60) NOT NULL, + `MAXLEN` bigint(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 drop table t1; diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result index ac7d3b2d879..3c995d95a01 100644 --- a/mysql-test/main/derived.result +++ b/mysql-test/main/derived.result @@ -1204,6 +1204,59 @@ REPLACE INTO v2 ( SELECT * FROM v4 ) UNION ( SELECT f FROM v2 ); drop view v1,v2,v3,v4; drop table t1,t2,t3; # +# MDEV-20325: Assertion `outer_context || !*from_field || *from_field == not_found_field' failed in Item_field::fix_outer_field | `!derived->is_excluded()' failed in TABLE_LIST::set_check_materialized | SIGEGV in st_select_lex::mark_as_dependent (optimized builds) +# +CREATE TABLE t1 (a INT); +# Check that re-execution of a stored routine containing +# a query with subquery in the FROM clause doesn't result in +# assert failure in case the 'derived_merge' optimizer option +# has been turned on/off +CREATE PROCEDURE sp() SELECT * FROM (SELECT a FROM t1) tb; +CALL sp(); +a +SET optimizer_switch='derived_merge=off'; +# Without the patch the following statement would result in assert +# failure +CALL sp(); +a +# Check the same test case for Prepared Statement +SET optimizer_switch='derived_merge=on'; +PREPARE stmt FROM "SELECT * FROM (SELECT a FROM t1) tb"; +EXECUTE stmt; +a +SET optimizer_switch='derived_merge=off'; +# Without the patch the following statement would result in assert +# failure +EXECUTE stmt; +a +DEALLOCATE PREPARE stmt; +# Here check the reverse test case - first turn off the 'derived_merge' +# optimizer option, run the stored routine containing a query with +# subquery in the FROM clause, then turn on the 'derived_merge' +# optimizer option and re-execute the same stored routine to check that +# the routine is finished successfully. +CREATE PROCEDURE sp1() SELECT * FROM (SELECT a FROM t1) tb; +SET optimizer_switch='derived_merge=off'; +CALL sp1(); +a +SET optimizer_switch='derived_merge=on'; +CALL sp1(); +a +# Check the same test case for Prepared Statement +SET optimizer_switch='derived_merge=off'; +PREPARE stmt FROM "SELECT * FROM (SELECT a FROM t1) tb"; +EXECUTE stmt; +a +SET optimizer_switch='derived_merge=on'; +# Without the patch the following statement would result in assert +# failure +EXECUTE stmt; +a +DEALLOCATE PREPARE stmt; +DROP PROCEDURE sp; +DROP PROCEDURE sp1; +DROP TABLE t1; +# # End of 10.2 tests # # diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test index f4477ce8550..4ff0cf4165c 100644 --- a/mysql-test/main/derived.test +++ b/mysql-test/main/derived.test @@ -1037,6 +1037,57 @@ drop view v1,v2,v3,v4; drop table t1,t2,t3; --echo # +--echo # MDEV-20325: Assertion `outer_context || !*from_field || *from_field == not_found_field' failed in Item_field::fix_outer_field | `!derived->is_excluded()' failed in TABLE_LIST::set_check_materialized | SIGEGV in st_select_lex::mark_as_dependent (optimized builds) +--echo # +CREATE TABLE t1 (a INT); + +--echo # Check that re-execution of a stored routine containing +--echo # a query with subquery in the FROM clause doesn't result in +--echo # assert failure in case the 'derived_merge' optimizer option +--echo # has been turned on/off +CREATE PROCEDURE sp() SELECT * FROM (SELECT a FROM t1) tb; +CALL sp(); +SET optimizer_switch='derived_merge=off'; +--echo # Without the patch the following statement would result in assert +--echo # failure +CALL sp(); + +--echo # Check the same test case for Prepared Statement +SET optimizer_switch='derived_merge=on'; +PREPARE stmt FROM "SELECT * FROM (SELECT a FROM t1) tb"; +EXECUTE stmt; +SET optimizer_switch='derived_merge=off'; +--echo # Without the patch the following statement would result in assert +--echo # failure +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +--echo # Here check the reverse test case - first turn off the 'derived_merge' +--echo # optimizer option, run the stored routine containing a query with +--echo # subquery in the FROM clause, then turn on the 'derived_merge' +--echo # optimizer option and re-execute the same stored routine to check that +--echo # the routine is finished successfully. +CREATE PROCEDURE sp1() SELECT * FROM (SELECT a FROM t1) tb; +SET optimizer_switch='derived_merge=off'; +CALL sp1(); +SET optimizer_switch='derived_merge=on'; +CALL sp1(); + +--echo # Check the same test case for Prepared Statement +SET optimizer_switch='derived_merge=off'; +PREPARE stmt FROM "SELECT * FROM (SELECT a FROM t1) tb"; +EXECUTE stmt; +SET optimizer_switch='derived_merge=on'; +--echo # Without the patch the following statement would result in assert +--echo # failure +EXECUTE stmt; +DEALLOCATE PREPARE stmt; + +DROP PROCEDURE sp; +DROP PROCEDURE sp1; +DROP TABLE t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index 01a863ccb8b..bb6d8ee5a87 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -17491,7 +17491,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 1 PRIMARY <derived2> ref key0 key0 5 test.t3.id 2 3 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 -2 LATERAL DERIVED cp2 ref a a 5 test.t1.a 1 Using index +2 LATERAL DERIVED cp2 ref a a 5 test.t1.a 1 Using where; Using index explain format=json select * from t1, (select a from t1 cp2 group by a) dt, t3 where dt.a = t1.a and t1.a = t3.id and t1.a in (select a from t2); EXPLAIN @@ -17564,6 +17564,7 @@ EXPLAIN "ref": ["test.t1.a"], "rows": 1, "filtered": 100, + "attached_condition": "cp2.a = t3.`id`", "using_index": true } } @@ -17583,6 +17584,618 @@ id a a id 21 2 2 2 deallocate prepare stmt; drop table t1,t2,t3; +# +# MDEV-MDEV-27132: Splittable derived with equality in WHERE +# +CREATE TABLE t1 ( +id int PRIMARY KEY +) ENGINE=MyISAM; +INSERT INTO t1 VALUES +(-1),(2070),(4826),(4827),(4828),(4829),(4830),(4831),(4832),(4833),(4834), +(4835),(4836),(4837),(4838),(4839),(4840),(4841),(4842),(4843),(4844), +(4845),(4846),(4847),(4848),(4849),(4850),(4851),(4852),(4853),(4854), +(4855),(4856),(4857),(4858),(4859),(4860),(4861),(4862),(4863),(4864), +(4865),(4866),(4867),(4868),(4869),(4870),(4871),(4872),(4873),(4874), +(4875),(4876); +CREATE TABLE t2 ( +id int PRIMARY KEY AUTO_INCREMENT, +deleted int(1), +t1_id int, +email varchar(255), +reporting_person int(1), +KEY t1_id (t1_id) +) ENGINE=MyISAM; +INSERT INTO t2 VALUES +(1,0,2064,'1test@test.ee',1),(2,1626095588,2066,'2test@test.ee',1), +(3,0,2066,'3test@test.ee',1),(4,0,2068,'4test@test.ee',1), +(5,0,2068,'5test@test.ee',1),(6,0,2069,'6test@test.ee',1),(7,0,2070,'',0), +(8,0,2070,'',0),(9,0,2071,'',0),(10,0,2071,'',0),(11,0,2072,'',0), +(12,0,2072,'',0),(13,0,2072,'13test@test.ee',1),(14,0,2073,'14test@test.ee',1), +(15,0,2074,'15test@test.ee',1),(16,0,2075,'16test@test.ee',1),(17,0,2075,'',0), +(18,0,2075,'',0),(19,0,2076,'19test@test.ee',1),(20,0,2077,'',0), +(21,0,2078,'21test@test.ee',1),(22,0,2078,'22test@test.ee',1); +INSERT INTO t2(deleted, t1_id, email, reporting_person) +SELECT deleted, t1_id, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) +SELECT deleted, t1_id+10000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) +SELECT deleted, t1_id+20000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) +SELECT deleted, t1_id+40000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) +SELECT deleted, t1_id+80000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) +SELECT deleted, t1_id+160000, email, reporting_person FROM t2; +CREATE TABLE t3 ( +id int PRIMARY KEY, +deleted int, +t1_id int, +YEAR int(4), +quarter int(1), +KEY t1_id (t1_id,year,quarter) +) ENGINE=MyISAM; +INSERT INTO t3 VALUES +(1,0,3885,2020,1),(2,0,2064,2020,1),(3,1611670734,2225,2020,1), +(4,0,2070,2020,1),(5,1611055981,2095,2020,1),(6,1610970096,2102,2020,1), +(7,0,3974,2020,1),(153,1609851928,3892,2020,2),(154,0,3885,2020,2), +(155,0,2064,2020,2),(156,1611670717,2225,2020,2),(157,0,2070,2020,2), +(317,0,2257,2020,2),(318,0,3885,2020,3),(319,0,2064,2020,3), +(320,1611670709,2225,2020,3),(321,0,2070,2020,3),(322,0,2095,2020,3), +(323,0,2102,2020,3),(324,0,3974,2020,3),(325,0,3886,2020,3), +(326,1609939963,2104,2020,3),(327,0,3887,2020,3),(328,0,3888,2020,3), +(329,0,2148,2020,3),(330,0,3889,2020,3),(331,0,3890,2020,3), +(332,0,2179,2020,3),(333,0,2115,2020,3),(334,0,2193,2020,3), +(335,0,2213,2020,3),(336,0,3891,2020,3),(337,1609851955,3892,2020,3), +(338,1610447706,2232,2020,3),(339,0,2235,2020,3),(340,0,2237,2020,3), +(341,0,3972,2020,3),(342,1610449357,2242,2020,3),(343,0,3893,2020,3), +(344,0,2257,2020,3),(345,0,3951,2020,3),(346,0,3894,2020,3), +(347,0,3912,2020,3),(348,0,3895,2020,3),(349,0,2301,2020,3), +(350,0,2304,2020,3),(351,0,3896,2020,3); +ANALYZE TABLE t1,t2,t3; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +test.t2 analyze status Engine-independent statistics collected +test.t2 analyze status OK +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +set optimizer_switch='split_materialized=on'; +SELECT t1.id +FROM t1 +JOIN t3 +ON t3.t1_id = t1.id +JOIN (SELECT t1_id FROM t2 WHERE reporting_person = 1 GROUP BY t1_id) tx +ON tx.t1_id = t1.id +WHERE t1.id BETWEEN 200 AND 100000; +id +EXPLAIN SELECT t1.id +FROM t1 +JOIN t3 +ON t3.t1_id = t1.id +JOIN (SELECT t1_id FROM t2 WHERE reporting_person = 1 GROUP BY t1_id) tx +ON tx.t1_id = t1.id +WHERE t1.id BETWEEN 200 AND 100000; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t3 index t1_id t1_id 15 NULL 47 Using where; Using index +1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.t1_id 1 Using index +1 PRIMARY <derived2> ref key0 key0 5 test.t3.t1_id 2 +2 LATERAL DERIVED t2 ref t1_id t1_id 5 test.t1.id 3 Using index condition; Using where +EXPLAIN FORMAT=JSON SELECT t1.id +FROM t1 +JOIN t3 +ON t3.t1_id = t1.id +JOIN (SELECT t1_id FROM t2 WHERE reporting_person = 1 GROUP BY t1_id) tx +ON tx.t1_id = t1.id +WHERE t1.id BETWEEN 200 AND 100000; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t3", + "access_type": "index", + "possible_keys": ["t1_id"], + "key": "t1_id", + "key_length": "15", + "used_key_parts": ["t1_id", "YEAR", "quarter"], + "rows": 47, + "filtered": 100, + "attached_condition": "t3.t1_id between 200 and 100000 and t3.t1_id is not null", + "using_index": true + }, + "table": { + "table_name": "t1", + "access_type": "eq_ref", + "possible_keys": ["PRIMARY"], + "key": "PRIMARY", + "key_length": "4", + "used_key_parts": ["id"], + "ref": ["test.t3.t1_id"], + "rows": 1, + "filtered": 100, + "using_index": true + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["t1_id"], + "ref": ["test.t3.t1_id"], + "rows": 2, + "filtered": 100, + "materialized": { + "lateral": 1, + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ref", + "possible_keys": ["t1_id"], + "key": "t1_id", + "key_length": "5", + "used_key_parts": ["t1_id"], + "ref": ["test.t1.id"], + "rows": 3, + "filtered": 58.594, + "index_condition": "t2.t1_id between 200 and 100000 and t2.t1_id = t3.t1_id", + "attached_condition": "t2.reporting_person = 1" + } + } + } + } + } +} +set optimizer_switch='split_materialized=off'; +SELECT t1.id +FROM t1 +JOIN t3 +ON t3.t1_id = t1.id +JOIN (SELECT t1_id FROM t2 WHERE reporting_person = 1 GROUP BY t1_id) tx +ON tx.t1_id = t1.id +WHERE t1.id BETWEEN 200 AND 100000; +id +set optimizer_switch='split_materialized=default'; +DROP TABLE t1,t2,t3; +# +# MDEV-27510: Splittable derived with grouping over two tables +# +CREATE TABLE ledgers ( +id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +name VARCHAR(32) +) ENGINE=MyISAM; +CREATE TABLE charges ( +id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +from_ledger_id BIGINT UNSIGNED NOT NULL, +to_ledger_id BIGINT UNSIGNED NOT NULL, +amount INT NOT NULL, +KEY fk_charge_from_ledger (from_ledger_id), +KEY fk_charge_to_ledger (to_ledger_id) +) ENGINE=MyISAM; +CREATE TABLE transactions ( +id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +ledger_id BIGINT UNSIGNED NOT NULL, +KEY fk_transactions_ledger (ledger_id) +) ENGINE=MyISAM; +CREATE TABLE transaction_items ( +id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +transaction_id BIGINT UNSIGNED NOT NULL, +charge_id BIGINT UNSIGNED, +amount INT NOT NULL, +KEY fk_items_transaction (transaction_id), +KEY fk_items_charge (charge_id) +) ENGINE=MyISAM; +INSERT INTO ledgers (id, name) VALUES +(1, 'Anna'), (2, 'John'), (3, 'Fred'); +INSERT INTO charges (id, from_ledger_id, to_ledger_id, amount) VALUES +(1, 2, 1, 200), (2, 1, 2, 330), (3, 1, 2, 640), (4, 3, 1, 640), (5, 3, 2, 1000), +(6, 3, 1, 660), (7, 2, 3, 650), (8, 3, 2, 160), (9, 2, 1, 740), (10, 3, 2, 310), +(11, 2, 1, 640), (12, 3, 2, 240), (13, 3, 2, 340), (14, 2, 1, 720), +(15, 2, 3, 100), +(16, 2, 3, 980), (17, 2, 1, 80), (18, 1, 2, 760), (19, 2, 3, 740), +(20, 2, 1, 990); +INSERT INTO transactions (id, ledger_id) VALUES +(2, 1), (3, 1), (5, 1), (8, 1), (12, 1), (18, 1), (22, 1), (28, 1), +(34, 1), (35, 1), +(40, 1), (1, 2), (4, 2), (6, 2), (10, 2), (13, 2), (16, 2), (17, 2), +(20, 2), (21, 2), +(24, 2), (26, 2), (27, 2), (29, 2), (31, 2), (33, 2), (36, 2), (37, 2), +(39, 2), (7, 3), +(9, 3), (11, 3), (14, 3), (15, 3), (19, 3), (23, 3), (25, 3), (30, 3), +(32, 3), (38, 3); +INSERT INTO transaction_items (id, transaction_id, charge_id, amount) VALUES +(1, 1, 1, -200), (2, 2, 1, 200), (3, 3, 2, -330), (4, 4, 2, 330), +(5, 5, 3, -640), +(6, 6, 3, 640), (7, 7, 4, -640), (8, 8, 4, 640), (9, 9, 5, -1000), +(10, 10, 5, 1000), +(11, 11, 6, -660), (12, 12, 6, 660), (13, 13, 7, -650), (14, 14, 7, 650), +(15, 15, 8, -160), +(16, 16, 8, 160), (17, 17, 9, -740), (18, 18, 9, 740), (19, 19, 10, -310), +(20, 20, 10, 310), +(21, 21, 11, -640), (22, 22, 11, 640), (23, 23, 12, -240), (24, 24, 12, 240), +(25, 25, 13, -340), +(26, 26, 13, 340), (27, 27, 14, -720), (28, 28, 14, 720), (29, 29, 15, -100), +(30, 30, 15, 100), +(31, 31, 16, -980), (32, 32, 16, 980), (33, 33, 17, -80), (34, 34, 17, 80), +(35, 35, 18, -760), +(36, 36, 18, 760), (37, 37, 19, -740), (38, 38, 19, 740), (39, 39, 20, -990), +(40, 40, 20, 990); +ANALYZE TABLE ledgers, charges, transactions, transaction_items; +Table Op Msg_type Msg_text +test.ledgers analyze status Engine-independent statistics collected +test.ledgers analyze status OK +test.charges analyze status Engine-independent statistics collected +test.charges analyze status OK +test.transactions analyze status Engine-independent statistics collected +test.transactions analyze status OK +test.transaction_items analyze status Engine-independent statistics collected +test.transaction_items analyze status OK +set optimizer_switch='split_materialized=on'; +SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +INNER JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id from_ledger_id to_ledger_id from_num_rows +2 1 2 1 +3 1 2 1 +5 3 2 1 +8 3 2 1 +10 3 2 1 +12 3 2 1 +13 3 2 1 +18 1 2 1 +EXPLAIN SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +INNER JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY charges ref PRIMARY,fk_charge_from_ledger,fk_charge_to_ledger fk_charge_to_ledger 8 const 8 +1 PRIMARY <derived2> ref key0 key0 17 test.charges.from_ledger_id,test.charges.id 2 +2 LATERAL DERIVED transaction_items ref fk_items_transaction,fk_items_charge fk_items_charge 9 test.charges.id 2 +2 LATERAL DERIVED transactions eq_ref PRIMARY,fk_transactions_ledger PRIMARY 8 test.transaction_items.transaction_id 1 Using where +EXPLAIN FORMAT=JSON SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +INNER JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "charges", + "access_type": "ref", + "possible_keys": ["PRIMARY", "fk_charge_from_ledger", "fk_charge_to_ledger"], + "key": "fk_charge_to_ledger", + "key_length": "8", + "used_key_parts": ["to_ledger_id"], + "ref": ["const"], + "rows": 8, + "filtered": 100 + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "17", + "used_key_parts": ["ledger_id", "charge_id"], + "ref": ["test.charges.from_ledger_id", "test.charges.id"], + "rows": 2, + "filtered": 100, + "materialized": { + "lateral": 1, + "query_block": { + "select_id": 2, + "table": { + "table_name": "transaction_items", + "access_type": "ref", + "possible_keys": ["fk_items_transaction", "fk_items_charge"], + "key": "fk_items_charge", + "key_length": "9", + "used_key_parts": ["charge_id"], + "ref": ["test.charges.id"], + "rows": 2, + "filtered": 100 + }, + "table": { + "table_name": "transactions", + "access_type": "eq_ref", + "possible_keys": ["PRIMARY", "fk_transactions_ledger"], + "key": "PRIMARY", + "key_length": "8", + "used_key_parts": ["id"], + "ref": ["test.transaction_items.transaction_id"], + "rows": 1, + "filtered": 100, + "attached_condition": "transactions.ledger_id = charges.from_ledger_id" + } + } + } + } + } +} +set optimizer_switch='split_materialized=off'; +SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +INNER JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id from_ledger_id to_ledger_id from_num_rows +2 1 2 1 +3 1 2 1 +5 3 2 1 +8 3 2 1 +10 3 2 1 +12 3 2 1 +13 3 2 1 +18 1 2 1 +EXPLAIN SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +INNER JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY charges ref PRIMARY,fk_charge_from_ledger,fk_charge_to_ledger fk_charge_to_ledger 8 const 8 +1 PRIMARY <derived2> ref key0 key0 17 test.charges.from_ledger_id,test.charges.id 4 +2 DERIVED transaction_items ALL fk_items_transaction NULL NULL NULL 40 Using temporary; Using filesort +2 DERIVED transactions eq_ref PRIMARY PRIMARY 8 test.transaction_items.transaction_id 1 +INSERT INTO charges (id, from_ledger_id, to_ledger_id, amount) VALUES +(101, 4, 2, 100), (102, 7, 2, 200); +set optimizer_switch='split_materialized=on'; +SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +LEFT JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id from_ledger_id to_ledger_id from_num_rows +2 1 2 1 +3 1 2 1 +5 3 2 1 +8 3 2 1 +10 3 2 1 +12 3 2 1 +13 3 2 1 +18 1 2 1 +101 4 2 NULL +102 7 2 NULL +EXPLAIN SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +LEFT JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY charges ref fk_charge_to_ledger fk_charge_to_ledger 8 const 10 +1 PRIMARY <derived2> ref key0 key0 18 test.charges.from_ledger_id,test.charges.id 2 +2 LATERAL DERIVED transaction_items ref fk_items_transaction,fk_items_charge fk_items_charge 9 test.charges.id 2 +2 LATERAL DERIVED transactions eq_ref PRIMARY,fk_transactions_ledger PRIMARY 8 test.transaction_items.transaction_id 1 Using where +EXPLAIN FORMAT=JSON SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +LEFT JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "charges", + "access_type": "ref", + "possible_keys": ["fk_charge_to_ledger"], + "key": "fk_charge_to_ledger", + "key_length": "8", + "used_key_parts": ["to_ledger_id"], + "ref": ["const"], + "rows": 10, + "filtered": 100 + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "18", + "used_key_parts": ["ledger_id", "charge_id"], + "ref": ["test.charges.from_ledger_id", "test.charges.id"], + "rows": 2, + "filtered": 100, + "materialized": { + "lateral": 1, + "query_block": { + "select_id": 2, + "table": { + "table_name": "transaction_items", + "access_type": "ref", + "possible_keys": ["fk_items_transaction", "fk_items_charge"], + "key": "fk_items_charge", + "key_length": "9", + "used_key_parts": ["charge_id"], + "ref": ["test.charges.id"], + "rows": 2, + "filtered": 100 + }, + "table": { + "table_name": "transactions", + "access_type": "eq_ref", + "possible_keys": ["PRIMARY", "fk_transactions_ledger"], + "key": "PRIMARY", + "key_length": "8", + "used_key_parts": ["id"], + "ref": ["test.transaction_items.transaction_id"], + "rows": 1, + "filtered": 100, + "attached_condition": "transactions.ledger_id = charges.from_ledger_id" + } + } + } + } + } +} +set optimizer_switch='split_materialized=off'; +SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +LEFT JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id from_ledger_id to_ledger_id from_num_rows +2 1 2 1 +3 1 2 1 +5 3 2 1 +8 3 2 1 +10 3 2 1 +12 3 2 1 +13 3 2 1 +18 1 2 1 +101 4 2 NULL +102 7 2 NULL +EXPLAIN SELECT +charges.id, +charges.from_ledger_id, +charges.to_ledger_id, +from_agg_items.num_rows AS from_num_rows +FROM charges +LEFT JOIN ( +SELECT +transactions.ledger_id, +transaction_items.charge_id, +count(*) as num_rows +FROM transaction_items +INNER JOIN transactions ON transaction_items.transaction_id = transactions.id +GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND +from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY charges ref fk_charge_to_ledger fk_charge_to_ledger 8 const 10 +1 PRIMARY <derived2> ref key0 key0 18 test.charges.from_ledger_id,test.charges.id 4 +2 DERIVED transaction_items ALL fk_items_transaction NULL NULL NULL 40 Using temporary; Using filesort +2 DERIVED transactions eq_ref PRIMARY PRIMARY 8 test.transaction_items.transaction_id 1 +set optimizer_switch='split_materialized=default'; +DROP TABLE transaction_items; +DROP TABLE transactions; +DROP TABLE charges; +DROP TABLE ledgers; # End of 10.3 tests # # MDEV-18679: materialized view with SELECT S containing materialized diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index 9544ad34572..bd38716f2a6 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -3628,6 +3628,248 @@ deallocate prepare stmt; drop table t1,t2,t3; +--echo # +--echo # MDEV-MDEV-27132: Splittable derived with equality in WHERE +--echo # + +CREATE TABLE t1 ( + id int PRIMARY KEY +) ENGINE=MyISAM; + +INSERT INTO t1 VALUES +(-1),(2070),(4826),(4827),(4828),(4829),(4830),(4831),(4832),(4833),(4834), +(4835),(4836),(4837),(4838),(4839),(4840),(4841),(4842),(4843),(4844), +(4845),(4846),(4847),(4848),(4849),(4850),(4851),(4852),(4853),(4854), +(4855),(4856),(4857),(4858),(4859),(4860),(4861),(4862),(4863),(4864), +(4865),(4866),(4867),(4868),(4869),(4870),(4871),(4872),(4873),(4874), +(4875),(4876); + +CREATE TABLE t2 ( + id int PRIMARY KEY AUTO_INCREMENT, + deleted int(1), + t1_id int, + email varchar(255), + reporting_person int(1), + KEY t1_id (t1_id) +) ENGINE=MyISAM; + +INSERT INTO t2 VALUES +(1,0,2064,'1test@test.ee',1),(2,1626095588,2066,'2test@test.ee',1), +(3,0,2066,'3test@test.ee',1),(4,0,2068,'4test@test.ee',1), +(5,0,2068,'5test@test.ee',1),(6,0,2069,'6test@test.ee',1),(7,0,2070,'',0), +(8,0,2070,'',0),(9,0,2071,'',0),(10,0,2071,'',0),(11,0,2072,'',0), +(12,0,2072,'',0),(13,0,2072,'13test@test.ee',1),(14,0,2073,'14test@test.ee',1), +(15,0,2074,'15test@test.ee',1),(16,0,2075,'16test@test.ee',1),(17,0,2075,'',0), +(18,0,2075,'',0),(19,0,2076,'19test@test.ee',1),(20,0,2077,'',0), +(21,0,2078,'21test@test.ee',1),(22,0,2078,'22test@test.ee',1); + +INSERT INTO t2(deleted, t1_id, email, reporting_person) + SELECT deleted, t1_id, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) + SELECT deleted, t1_id+10000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) + SELECT deleted, t1_id+20000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) + SELECT deleted, t1_id+40000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) + SELECT deleted, t1_id+80000, email, reporting_person FROM t2; +INSERT INTO t2(deleted, t1_id, email, reporting_person) + SELECT deleted, t1_id+160000, email, reporting_person FROM t2; + +CREATE TABLE t3 ( + id int PRIMARY KEY, + deleted int, + t1_id int, + YEAR int(4), + quarter int(1), + KEY t1_id (t1_id,year,quarter) +) ENGINE=MyISAM; + +INSERT INTO t3 VALUES +(1,0,3885,2020,1),(2,0,2064,2020,1),(3,1611670734,2225,2020,1), +(4,0,2070,2020,1),(5,1611055981,2095,2020,1),(6,1610970096,2102,2020,1), +(7,0,3974,2020,1),(153,1609851928,3892,2020,2),(154,0,3885,2020,2), +(155,0,2064,2020,2),(156,1611670717,2225,2020,2),(157,0,2070,2020,2), +(317,0,2257,2020,2),(318,0,3885,2020,3),(319,0,2064,2020,3), +(320,1611670709,2225,2020,3),(321,0,2070,2020,3),(322,0,2095,2020,3), +(323,0,2102,2020,3),(324,0,3974,2020,3),(325,0,3886,2020,3), +(326,1609939963,2104,2020,3),(327,0,3887,2020,3),(328,0,3888,2020,3), +(329,0,2148,2020,3),(330,0,3889,2020,3),(331,0,3890,2020,3), +(332,0,2179,2020,3),(333,0,2115,2020,3),(334,0,2193,2020,3), +(335,0,2213,2020,3),(336,0,3891,2020,3),(337,1609851955,3892,2020,3), +(338,1610447706,2232,2020,3),(339,0,2235,2020,3),(340,0,2237,2020,3), +(341,0,3972,2020,3),(342,1610449357,2242,2020,3),(343,0,3893,2020,3), +(344,0,2257,2020,3),(345,0,3951,2020,3),(346,0,3894,2020,3), +(347,0,3912,2020,3),(348,0,3895,2020,3),(349,0,2301,2020,3), +(350,0,2304,2020,3),(351,0,3896,2020,3); + +ANALYZE TABLE t1,t2,t3; + +let $q= +SELECT t1.id +FROM t1 + JOIN t3 + ON t3.t1_id = t1.id + JOIN (SELECT t1_id FROM t2 WHERE reporting_person = 1 GROUP BY t1_id) tx + ON tx.t1_id = t1.id +WHERE t1.id BETWEEN 200 AND 100000; + +set optimizer_switch='split_materialized=on'; + +eval $q; +eval EXPLAIN $q; +eval EXPLAIN FORMAT=JSON $q; + +set optimizer_switch='split_materialized=off'; + +eval $q; + +set optimizer_switch='split_materialized=default'; + +DROP TABLE t1,t2,t3; + +--echo # +--echo # MDEV-27510: Splittable derived with grouping over two tables +--echo # + +CREATE TABLE ledgers ( + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + name VARCHAR(32) +) ENGINE=MyISAM; + +CREATE TABLE charges ( + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + from_ledger_id BIGINT UNSIGNED NOT NULL, + to_ledger_id BIGINT UNSIGNED NOT NULL, + amount INT NOT NULL, + KEY fk_charge_from_ledger (from_ledger_id), + KEY fk_charge_to_ledger (to_ledger_id) +) ENGINE=MyISAM; + +CREATE TABLE transactions ( + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + ledger_id BIGINT UNSIGNED NOT NULL, + KEY fk_transactions_ledger (ledger_id) +) ENGINE=MyISAM; + +CREATE TABLE transaction_items ( + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + transaction_id BIGINT UNSIGNED NOT NULL, + charge_id BIGINT UNSIGNED, + amount INT NOT NULL, + KEY fk_items_transaction (transaction_id), + KEY fk_items_charge (charge_id) +) ENGINE=MyISAM; + +INSERT INTO ledgers (id, name) VALUES +(1, 'Anna'), (2, 'John'), (3, 'Fred'); + +INSERT INTO charges (id, from_ledger_id, to_ledger_id, amount) VALUES +(1, 2, 1, 200), (2, 1, 2, 330), (3, 1, 2, 640), (4, 3, 1, 640), (5, 3, 2, 1000), +(6, 3, 1, 660), (7, 2, 3, 650), (8, 3, 2, 160), (9, 2, 1, 740), (10, 3, 2, 310), +(11, 2, 1, 640), (12, 3, 2, 240), (13, 3, 2, 340), (14, 2, 1, 720), +(15, 2, 3, 100), +(16, 2, 3, 980), (17, 2, 1, 80), (18, 1, 2, 760), (19, 2, 3, 740), +(20, 2, 1, 990); + +INSERT INTO transactions (id, ledger_id) VALUES +(2, 1), (3, 1), (5, 1), (8, 1), (12, 1), (18, 1), (22, 1), (28, 1), +(34, 1), (35, 1), +(40, 1), (1, 2), (4, 2), (6, 2), (10, 2), (13, 2), (16, 2), (17, 2), +(20, 2), (21, 2), +(24, 2), (26, 2), (27, 2), (29, 2), (31, 2), (33, 2), (36, 2), (37, 2), +(39, 2), (7, 3), +(9, 3), (11, 3), (14, 3), (15, 3), (19, 3), (23, 3), (25, 3), (30, 3), +(32, 3), (38, 3); + +INSERT INTO transaction_items (id, transaction_id, charge_id, amount) VALUES +(1, 1, 1, -200), (2, 2, 1, 200), (3, 3, 2, -330), (4, 4, 2, 330), +(5, 5, 3, -640), +(6, 6, 3, 640), (7, 7, 4, -640), (8, 8, 4, 640), (9, 9, 5, -1000), +(10, 10, 5, 1000), +(11, 11, 6, -660), (12, 12, 6, 660), (13, 13, 7, -650), (14, 14, 7, 650), +(15, 15, 8, -160), +(16, 16, 8, 160), (17, 17, 9, -740), (18, 18, 9, 740), (19, 19, 10, -310), +(20, 20, 10, 310), +(21, 21, 11, -640), (22, 22, 11, 640), (23, 23, 12, -240), (24, 24, 12, 240), +(25, 25, 13, -340), +(26, 26, 13, 340), (27, 27, 14, -720), (28, 28, 14, 720), (29, 29, 15, -100), +(30, 30, 15, 100), +(31, 31, 16, -980), (32, 32, 16, 980), (33, 33, 17, -80), (34, 34, 17, 80), +(35, 35, 18, -760), +(36, 36, 18, 760), (37, 37, 19, -740), (38, 38, 19, 740), (39, 39, 20, -990), +(40, 40, 20, 990); + +ANALYZE TABLE ledgers, charges, transactions, transaction_items; + +let $q= +SELECT + charges.id, + charges.from_ledger_id, + charges.to_ledger_id, + from_agg_items.num_rows AS from_num_rows +FROM charges +INNER JOIN ( + SELECT + transactions.ledger_id, + transaction_items.charge_id, + count(*) as num_rows + FROM transaction_items + INNER JOIN transactions ON transaction_items.transaction_id = transactions.id + GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND + from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; + +set optimizer_switch='split_materialized=on'; +eval $q; +eval EXPLAIN $q; +eval EXPLAIN FORMAT=JSON $q; + +set optimizer_switch='split_materialized=off'; +eval $q; +eval EXPLAIN $q; + +INSERT INTO charges (id, from_ledger_id, to_ledger_id, amount) VALUES +(101, 4, 2, 100), (102, 7, 2, 200); + +let $q1= +SELECT + charges.id, + charges.from_ledger_id, + charges.to_ledger_id, + from_agg_items.num_rows AS from_num_rows +FROM charges +LEFT JOIN ( + SELECT + transactions.ledger_id, + transaction_items.charge_id, + count(*) as num_rows + FROM transaction_items + INNER JOIN transactions ON transaction_items.transaction_id = transactions.id + GROUP BY transactions.ledger_id, transaction_items.charge_id +) AS from_agg_items +ON from_agg_items.charge_id = charges.id AND + from_agg_items.ledger_id = charges.from_ledger_id +WHERE charges.to_ledger_id = 2; + +set optimizer_switch='split_materialized=on'; +eval $q1; +eval EXPLAIN $q1; +eval EXPLAIN FORMAT=JSON $q1; + +set optimizer_switch='split_materialized=off'; +eval $q1; +eval EXPLAIN $q1; + +set optimizer_switch='split_materialized=default'; + +DROP TABLE transaction_items; +DROP TABLE transactions; +DROP TABLE charges; +DROP TABLE ledgers; + --echo # End of 10.3 tests --echo # diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result index 63db8c94dde..04f79d3f018 100644 --- a/mysql-test/main/derived_split_innodb.result +++ b/mysql-test/main/derived_split_innodb.result @@ -239,4 +239,48 @@ drop table t1,t2,t3; set optimizer_switch='split_materialized=default'; set use_stat_tables=default; set optimizer_use_condition_selectivity=default; +# +# MDEV-26337: subquery with groupby and ROLLUP returns incorrect results +# (The testcase is taken from testcase for MDEV-13389 due to it being +# much smaller) +# +create table t3 (a int, b int, c char(127), index idx_b(b)) engine=myisam; +insert into t3 values +(8,11,'aa'), (5,15,'cc'), (1,14,'bb'), (2,12,'aa'), (7,17,'cc'), +(7,18,'aa'), (2,11,'aa'), (7,10,'bb'), (3,11,'dd'), (4,12,'ee'), +(5,14,'dd'), (9,12,'ee'); +create table t4 (a int, b int, c char(127), index idx(a,c)) engine=myisam; +insert into t4 values +(7,10,'cc'), (1,20,'aa'), (2,23,'bb'), (7,18,'cc'), (1,30,'bb'), +(4,71,'xx'), (3,15,'aa'), (7,82,'aa'), (8,12,'dd'), (4,15,'aa'), +(11,33,'yy'), (10,42,'zz'), (4,53,'xx'), (10,17,'yy'), (7,12,'cc'), +(8,20,'dd'), (7,32,'bb'), (1,50,'aa'), (3,40,'bb'), (3,77,'aa'); +insert into t4 select a+10, b+10, concat(c,'f') from t4; +analyze table t3,t4; +Table Op Msg_type Msg_text +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +test.t4 analyze status Engine-independent statistics collected +test.t4 analyze status OK +# This should use a plan with LATERAL DERIVED: +explain select t3.a,t3.c,t.max,t.min +from t3 join +(select a, c, max(b) max, min(b) min from t4 group by a,c) t +on t3.a=t.a and t3.c=t.c +where t3.b > 15; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t3 range idx_b idx_b 5 NULL 2 Using index condition; Using where +1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 2 +2 LATERAL DERIVED t4 ref idx idx 133 test.t3.a,test.t3.c 1 +# ... and if one adds WITH ROLLUP, then LATERAL DERIVED is no longer used: +explain select t3.a,t3.c,t.max,t.min +from t3 join +(select a, c, max(b) max, min(b) min from t4 group by a,c with rollup) t +on t3.a=t.a and t3.c=t.c +where t3.b > 15; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t3 range idx_b idx_b 5 NULL 2 Using index condition; Using where +1 PRIMARY <derived2> ref key0 key0 133 test.t3.a,test.t3.c 4 +2 DERIVED t4 ALL NULL NULL NULL NULL 40 Using filesort +drop table t3, t4; # End of 10.3 tests diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test index 22793b448da..2f74f5fe747 100644 --- a/mysql-test/main/derived_split_innodb.test +++ b/mysql-test/main/derived_split_innodb.test @@ -190,4 +190,40 @@ set optimizer_switch='split_materialized=default'; set use_stat_tables=default; set optimizer_use_condition_selectivity=default; +--echo # +--echo # MDEV-26337: subquery with groupby and ROLLUP returns incorrect results +--echo # (The testcase is taken from testcase for MDEV-13389 due to it being +--echo # much smaller) +--echo # + +create table t3 (a int, b int, c char(127), index idx_b(b)) engine=myisam; +insert into t3 values +(8,11,'aa'), (5,15,'cc'), (1,14,'bb'), (2,12,'aa'), (7,17,'cc'), +(7,18,'aa'), (2,11,'aa'), (7,10,'bb'), (3,11,'dd'), (4,12,'ee'), +(5,14,'dd'), (9,12,'ee'); +create table t4 (a int, b int, c char(127), index idx(a,c)) engine=myisam; +insert into t4 values +(7,10,'cc'), (1,20,'aa'), (2,23,'bb'), (7,18,'cc'), (1,30,'bb'), +(4,71,'xx'), (3,15,'aa'), (7,82,'aa'), (8,12,'dd'), (4,15,'aa'), +(11,33,'yy'), (10,42,'zz'), (4,53,'xx'), (10,17,'yy'), (7,12,'cc'), +(8,20,'dd'), (7,32,'bb'), (1,50,'aa'), (3,40,'bb'), (3,77,'aa'); +insert into t4 select a+10, b+10, concat(c,'f') from t4; +analyze table t3,t4; + +--echo # This should use a plan with LATERAL DERIVED: +explain select t3.a,t3.c,t.max,t.min +from t3 join +(select a, c, max(b) max, min(b) min from t4 group by a,c) t +on t3.a=t.a and t3.c=t.c +where t3.b > 15; + +--echo # ... and if one adds WITH ROLLUP, then LATERAL DERIVED is no longer used: +explain select t3.a,t3.c,t.max,t.min +from t3 join +(select a, c, max(b) max, min(b) min from t4 group by a,c with rollup) t +on t3.a=t.a and t3.c=t.c +where t3.b > 15; + +drop table t3, t4; + --echo # End of 10.3 tests diff --git a/mysql-test/main/derived_view.result b/mysql-test/main/derived_view.result index f761a9f92de..268c0ae13b9 100644 --- a/mysql-test/main/derived_view.result +++ b/mysql-test/main/derived_view.result @@ -3500,4 +3500,134 @@ a 7 drop view v1; drop table t1; +# +# MDEV-24454 Second execution of SELECT containing set function +# MDEV-25086: whose only argument is an outer reference to a column +# of mergeable view/derived/table/CTE +# +create table t1 (a int); +create table t2 (b int); +insert into t1 values (3), (1), (3); +insert into t2 values (70), (30), (70); +create view v1 as select * from t2; +prepare stmt from " +select (select sum(b) from t1 where a=1) as r from v1; +"; +execute stmt; +r +170 +execute stmt; +r +170 +deallocate prepare stmt; +prepare stmt from " +select (select sum(b) from t1 where a=1) as r from (select * from t2) dt; +"; +execute stmt; +r +170 +execute stmt; +r +170 +deallocate prepare stmt; +prepare stmt from " +with cte as (select * from t2) +select (select sum(b) from t1 where a=1) as r from cte; +"; +execute stmt; +r +170 +execute stmt; +r +170 +deallocate prepare stmt; +prepare stmt from " +select (select sum(b) from t1 where a=1) as r +from (select * from v1 where b > 50) dt; +"; +execute stmt; +r +140 +execute stmt; +r +140 +deallocate prepare stmt; +prepare stmt from " +select (select sum(b) from t1 where a=1) as r +from (select * from (select * from t2) dt1 where b > 50) dt; +"; +execute stmt; +r +140 +execute stmt; +r +140 +deallocate prepare stmt; +prepare stmt from " +with cte as (select * from (select * from t2) dt1 where b > 50) +select (select sum(b) from t1 where a=1) as r from cte; +"; +execute stmt; +r +140 +execute stmt; +r +140 +deallocate prepare stmt; +create procedure sp1() +begin +select (select sum(b) from t1 where a=1) as r from v1; +end | +call sp1(); +r +170 +call sp1(); +r +170 +drop procedure sp1; +create procedure sp1() +begin +select (select sum(b) from t1 where a=1) as r from (select * from t2) dt; +end | +call sp1(); +r +170 +call sp1(); +r +170 +drop procedure sp1; +create procedure sp1() +begin +with cte as (select * from t2) +select (select sum(b) from t1 where a=1) as r from cte; +end | +call sp1(); +r +170 +call sp1(); +r +170 +drop procedure sp1; +drop view v1; +drop table t1,t2; +CREATE TABLE t1(f0 INT); +INSERT INTO t1 VALUES (3); +CREATE VIEW v1 AS SELECT f0 AS f1 FROM t1; +CREATE VIEW v2 AS +SELECT +(SELECT GROUP_CONCAT(v1.f1 SEPARATOR ', ') FROM v1 n) AS f2, +GROUP_CONCAT('aa' SEPARATOR ', ') AS f3 +FROM v1; +CREATE VIEW v3 AS SELECT * FROM v2; +CREATE PROCEDURE p1() +SELECT * FROM v3; +CALL p1(); +f2 f3 +3 aa +CALL p1(); +f2 f3 +3 aa +DROP PROCEDURE p1; +DROP VIEW v1,v2,v3; +DROP TABLE t1; # End of 10.2 tests diff --git a/mysql-test/main/derived_view.test b/mysql-test/main/derived_view.test index 9ab1ddd3a76..584bde2d75d 100644 --- a/mysql-test/main/derived_view.test +++ b/mysql-test/main/derived_view.test @@ -2289,4 +2289,115 @@ select * from ((select a from t1 limit 2) order by a desc) dt; drop view v1; drop table t1; +--echo # +--echo # MDEV-24454 Second execution of SELECT containing set function +--echo # MDEV-25086: whose only argument is an outer reference to a column +--echo # of mergeable view/derived/table/CTE +--echo # + +create table t1 (a int); +create table t2 (b int); +insert into t1 values (3), (1), (3); +insert into t2 values (70), (30), (70); +create view v1 as select * from t2; + +prepare stmt from " +select (select sum(b) from t1 where a=1) as r from v1; +"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +prepare stmt from " +select (select sum(b) from t1 where a=1) as r from (select * from t2) dt; +"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +prepare stmt from " +with cte as (select * from t2) +select (select sum(b) from t1 where a=1) as r from cte; +"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +prepare stmt from " +select (select sum(b) from t1 where a=1) as r +from (select * from v1 where b > 50) dt; +"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +prepare stmt from " +select (select sum(b) from t1 where a=1) as r +from (select * from (select * from t2) dt1 where b > 50) dt; +"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +prepare stmt from " +with cte as (select * from (select * from t2) dt1 where b > 50) +select (select sum(b) from t1 where a=1) as r from cte; +"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +--delimiter | +create procedure sp1() +begin +select (select sum(b) from t1 where a=1) as r from v1; +end | +--delimiter ; +call sp1(); +call sp1(); +drop procedure sp1; + +--delimiter | +create procedure sp1() +begin +select (select sum(b) from t1 where a=1) as r from (select * from t2) dt; +end | +--delimiter ; +call sp1(); +call sp1(); +drop procedure sp1; + +--delimiter | +create procedure sp1() +begin +with cte as (select * from t2) +select (select sum(b) from t1 where a=1) as r from cte; +end | +--delimiter ; +call sp1(); +call sp1(); +drop procedure sp1; + +drop view v1; +drop table t1,t2; + +CREATE TABLE t1(f0 INT); +INSERT INTO t1 VALUES (3); +CREATE VIEW v1 AS SELECT f0 AS f1 FROM t1; +CREATE VIEW v2 AS +SELECT + (SELECT GROUP_CONCAT(v1.f1 SEPARATOR ', ') FROM v1 n) AS f2, + GROUP_CONCAT('aa' SEPARATOR ', ') AS f3 +FROM v1; +CREATE VIEW v3 AS SELECT * FROM v2; + +CREATE PROCEDURE p1() + SELECT * FROM v3; +CALL p1(); +CALL p1(); + +DROP PROCEDURE p1; +DROP VIEW v1,v2,v3; +DROP TABLE t1; + --echo # End of 10.2 tests diff --git a/mysql-test/main/events_embedded.test b/mysql-test/main/events_embedded.test index 9922ea6dfee..f6921f302bf 100644 --- a/mysql-test/main/events_embedded.test +++ b/mysql-test/main/events_embedded.test @@ -2,4 +2,3 @@ --error 1193 set global event_scheduler=ON; - diff --git a/mysql-test/main/explain_innodb.result b/mysql-test/main/explain_innodb.result new file mode 100644 index 00000000000..fe51e45e35d --- /dev/null +++ b/mysql-test/main/explain_innodb.result @@ -0,0 +1,20 @@ +# +# MDEV-26249: Crash in in Explain_node::print_explain_for_children while writing to the slow query log +# +set @sql_tmp=@@slow_query_log; +SET GLOBAL slow_query_log = 1; +SET long_query_time = 0.000000; +SET log_slow_verbosity = 'explain'; +CREATE TABLE t1 ( id varchar(50), KEY (id)) engine=innodb; +SELECT * FROM (SELECT id FROM t1 GROUP BY id) dt WHERE 1=0; +id +select 1; +1 +1 +explain +SELECT * FROM (SELECT id FROM t1 GROUP BY id) dt WHERE 1=0; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 DERIVED t1 index NULL id 53 NULL 1 Using index +SET GLOBAL slow_query_log = @sql_tmp; +drop table t1; diff --git a/mysql-test/main/explain_innodb.test b/mysql-test/main/explain_innodb.test new file mode 100644 index 00000000000..2c29a6e26da --- /dev/null +++ b/mysql-test/main/explain_innodb.test @@ -0,0 +1,20 @@ +--echo # +--echo # MDEV-26249: Crash in in Explain_node::print_explain_for_children while writing to the slow query log +--echo # + +--source include/have_innodb.inc + +set @sql_tmp=@@slow_query_log; +SET GLOBAL slow_query_log = 1; +SET long_query_time = 0.000000; +SET log_slow_verbosity = 'explain'; + +CREATE TABLE t1 ( id varchar(50), KEY (id)) engine=innodb; +SELECT * FROM (SELECT id FROM t1 GROUP BY id) dt WHERE 1=0; +select 1; + +explain +SELECT * FROM (SELECT id FROM t1 GROUP BY id) dt WHERE 1=0; + +SET GLOBAL slow_query_log = @sql_tmp; +drop table t1; diff --git a/mysql-test/main/func_default.result b/mysql-test/main/func_default.result index 9699f0795e3..8721270ca1c 100644 --- a/mysql-test/main/func_default.result +++ b/mysql-test/main/func_default.result @@ -29,6 +29,9 @@ INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); SELECT s, 32 AS mi FROM t1 GROUP BY s HAVING DEFAULT(mi) IS NULL; ERROR HY000: Field 'mi' doesn't have a default value DROP TABLE t1; +# +# Start of 10.2 tests +# set timestamp=unix_timestamp('2001-01-01 10:20:30.123456'); create table t1 (a int default 1, b int default (a+1), c varchar(100) default 'foo', d text default 'bar', @@ -40,3 +43,121 @@ default(a) default(b) default(c) default(d) default(e) default(f) 1 2 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.120000 1 11 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.120000 drop table t1; +# +# MDEV-21639 DEFAULT(col) evaluates to a bad value in WHERE clause +# +CREATE TABLE t1 (a BIGINT NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = 10 AS ce +FROM t1; +a DEFAULT(a) c ce +10000 10 10 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END=10; +a +10000 +DROP TABLE t1; +CREATE TABLE t1 (a DOUBLE NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = 10 AS ce +FROM t1; +a DEFAULT(a) c ce +10000 10 10 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END=10; +a +10000 +DROP TABLE t1; +CREATE TABLE t1 (a DECIMAL(10,0) NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = 10 AS ce +FROM t1; +a DEFAULT(a) c ce +10000 10 10 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END=10; +a +10000 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(32) NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = '10' AS ce +FROM t1; +a DEFAULT(a) c ce +10000 10 10 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='10'; +a +10000 +DROP TABLE t1; +CREATE TABLE t1 (a DATE NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP()%10,DATE'2001-01-01'))); +INSERT INTO t1 VALUES ('2000-01-01'); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = '2001-01-01' AS ce +FROM t1; +a DEFAULT(a) c ce +2000-01-01 2001-01-01 2001-01-01 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='2001-01-01'; +a +2000-01-01 +DROP TABLE t1; +CREATE TABLE t1 (a TIME NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP()%10,TIME'10:20:30'))); +INSERT INTO t1 VALUES ('10:00:00'); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = '10:20:30' AS ce +FROM t1; +a DEFAULT(a) c ce +10:00:00 10:20:30 10:20:30 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='10:20:30'; +a +10:00:00 +DROP TABLE t1; +CREATE TABLE t1 (a DATETIME NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),TIMESTAMP'2001-01-01 10:20:30'))); +INSERT INTO t1 VALUES ('2000-01-01 10:00:00'); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END = '2001-01-01 10:20:30' AS ce +FROM t1; +a DEFAULT(a) c ce +2000-01-01 10:00:00 2001-01-01 10:20:30 2001-01-01 10:20:30 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='2001-01-01 10:20:30'; +a +2000-01-01 10:00:00 +DROP TABLE t1; +CREATE TABLE t1 (a INT NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),FALSE))); +INSERT INTO t1 VALUES (10); +SELECT +a, +DEFAULT(a), +CASE WHEN a THEN DEFAULT(a) END AS c, +CASE WHEN a THEN DEFAULT(a) END IS FALSE AS ce +FROM t1; +a DEFAULT(a) c ce +10 0 0 1 +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END IS FALSE; +a +10 +DROP TABLE t1; +# +# End of 10.2 tests +# diff --git a/mysql-test/main/func_default.test b/mysql-test/main/func_default.test index 332bfca021f..cba7842c68f 100644 --- a/mysql-test/main/func_default.test +++ b/mysql-test/main/func_default.test @@ -34,9 +34,9 @@ INSERT INTO t1 VALUES (1, 'one'), (2, 'two'), (3, 'three'); SELECT s, 32 AS mi FROM t1 GROUP BY s HAVING DEFAULT(mi) IS NULL; DROP TABLE t1; -# -# 10.2 tests -# +--echo # +--echo # Start of 10.2 tests +--echo # set timestamp=unix_timestamp('2001-01-01 10:20:30.123456'); create table t1 (a int default 1, b int default (a+1), @@ -46,3 +46,99 @@ insert t1 () values (); insert t1 (a) values (10); select default(a),default(b),default(c),default(d),default(e),default(f) from t1; drop table t1; + +--echo # +--echo # MDEV-21639 DEFAULT(col) evaluates to a bad value in WHERE clause +--echo # + +CREATE TABLE t1 (a BIGINT NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = 10 AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END=10; +DROP TABLE t1; + +CREATE TABLE t1 (a DOUBLE NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = 10 AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END=10; +DROP TABLE t1; + +CREATE TABLE t1 (a DECIMAL(10,0) NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = 10 AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END=10; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(32) NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),10))); +INSERT INTO t1 VALUES (10000); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = '10' AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='10'; +DROP TABLE t1; + +CREATE TABLE t1 (a DATE NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP()%10,DATE'2001-01-01'))); +INSERT INTO t1 VALUES ('2000-01-01'); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = '2001-01-01' AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='2001-01-01'; +DROP TABLE t1; + +CREATE TABLE t1 (a TIME NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP()%10,TIME'10:20:30'))); +INSERT INTO t1 VALUES ('10:00:00'); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = '10:20:30' AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='10:20:30'; +DROP TABLE t1; + +CREATE TABLE t1 (a DATETIME NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),TIMESTAMP'2001-01-01 10:20:30'))); +INSERT INTO t1 VALUES ('2000-01-01 10:00:00'); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END = '2001-01-01 10:20:30' AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END='2001-01-01 10:20:30'; +DROP TABLE t1; + +CREATE TABLE t1 (a INT NOT NULL DEFAULT (IF(false,UNIX_TIMESTAMP(),FALSE))); +INSERT INTO t1 VALUES (10); +SELECT + a, + DEFAULT(a), + CASE WHEN a THEN DEFAULT(a) END AS c, + CASE WHEN a THEN DEFAULT(a) END IS FALSE AS ce +FROM t1; +SELECT a FROM t1 WHERE CASE WHEN a THEN DEFAULT(a) END IS FALSE; +DROP TABLE t1; + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index 1e0c542d02f..2c051d9bce5 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -940,6 +940,24 @@ SELECT JSON_REPLACE( JSON_DETAILED('["x"]'), '$.a', 'xx' ); JSON_REPLACE( JSON_DETAILED('["x"]'), '$.a', 'xx' ) ["x"] # +# MDEV-18284 JSON casting using JSON_COMPACT doesn't always work +# with values from subqueries +# +CREATE TABLE json_test(a JSON, b JSON); +INSERT INTO json_test VALUES ("[1,2,3]", '{"a":"foo"}'); +SELECT * FROM json_test; +a b +[1,2,3] {"a":"foo"} +SELECT json_object("a", json_compact(a), "b", b) +FROM (SELECT * FROM json_test) AS json_test_values; +json_object("a", json_compact(a), "b", b) +{"a": [1,2,3], "b": "{\"a\":\"foo\"}"} +SELECT json_object("a", json_compact(a), "b", json_compact(b)) +FROM (SELECT * FROM json_test) AS json_test_values; +json_object("a", json_compact(a), "b", json_compact(b)) +{"a": [1,2,3], "b": {"a":"foo"}} +DROP TABLE json_test; +# # End of 10.2 tests # # diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index bbee8c28a8b..321a9f1082f 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -558,6 +558,21 @@ SELECT SELECT JSON_REPLACE( JSON_DETAILED('["x"]'), '$.a', 'xx' ); --echo # +--echo # MDEV-18284 JSON casting using JSON_COMPACT doesn't always work +--echo # with values from subqueries +--echo # + +CREATE TABLE json_test(a JSON, b JSON); +INSERT INTO json_test VALUES ("[1,2,3]", '{"a":"foo"}'); +SELECT * FROM json_test; + +SELECT json_object("a", json_compact(a), "b", b) + FROM (SELECT * FROM json_test) AS json_test_values; +SELECT json_object("a", json_compact(a), "b", json_compact(b)) + FROM (SELECT * FROM json_test) AS json_test_values; +DROP TABLE json_test; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result index d50a77544f3..cb9393da144 100644 --- a/mysql-test/main/func_str.result +++ b/mysql-test/main/func_str.result @@ -5023,6 +5023,59 @@ SELECT NULL IN (RIGHT(AES_ENCRYPT('foo','bar'), LAST_INSERT_ID()), 'qux'); NULL IN (RIGHT(AES_ENCRYPT('foo','bar'), LAST_INSERT_ID()), 'qux') NULL # +# Bug#31374305 - FORMAT() NOT DISPLAYING WHOLE NUMBER SIDE CORRECTLY +# FOR ES_MX AND ES_ES LOCALES +# +CREATE PROCEDURE load_locale_format_table() +BEGIN +DECLARE locale_list VARCHAR(1000) DEFAULT ' + es_AR,es_BO,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_HN, + es_MX,es_NI,es_PA,es_PE,es_PR,es_PY,es_SV,es_US,es_UY,es_VE'; +SET @fmt_stmt = 'INSERT INTO locale_format VALUES + (?, FORMAT(12131254123412541,2,?));'; +PREPARE stmt FROM @fmt_stmt; +WHILE locale_list != '' DO +/* get the first locale from the list */ +SET @locale = +TRIM(REPLACE((SUBSTRING_INDEX(locale_list, ',', 1)), '\n','')); +EXECUTE stmt USING @locale, @locale; +/* remove the first locale from the list */ +IF LOCATE(',', locale_list) > 0 THEN +SET locale_list = +SUBSTRING(locale_list, LOCATE(',', locale_list) + 1); +ELSE +SET locale_list = ''; +END IF; +END WHILE; +DEALLOCATE PREPARE stmt; +END| +CREATE TABLE locale_format(locale VARCHAR(10), formatted_string VARCHAR(100)); +CALL load_locale_format_table(); +SELECT * FROM locale_format; +locale formatted_string +es_AR 12.131.254.123.412.541,00 +es_BO 12.131.254.123.412.541,00 +es_CL 12.131.254.123.412.541,00 +es_CO 12.131.254.123.412.541,00 +es_CR 12 131 254 123 412 541,00 +es_DO 12,131,254,123,412,541.00 +es_EC 12.131.254.123.412.541,00 +es_ES 12.131.254.123.412.541,00 +es_GT 12,131,254,123,412,541.00 +es_HN 12,131,254,123,412,541.00 +es_MX 12,131,254,123,412,541.00 +es_NI 12,131,254,123,412,541.00 +es_PA 12,131,254,123,412,541.00 +es_PE 12,131,254,123,412,541.00 +es_PR 12,131,254,123,412,541.00 +es_PY 12.131.254.123.412.541,00 +es_SV 12,131,254,123,412,541.00 +es_US 12,131,254,123,412,541.00 +es_UY 12.131.254.123.412.541,00 +es_VE 12.131.254.123.412.541,00 +DROP PROCEDURE load_locale_format_table; +DROP TABLE locale_format; +# # End of 10.2 tests # # diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test index 6a9fbc71371..f3fcd527f76 100644 --- a/mysql-test/main/func_str.test +++ b/mysql-test/main/func_str.test @@ -1997,6 +1997,42 @@ DROP TABLE t1; SELECT NULL IN (RIGHT(AES_ENCRYPT('foo','bar'), LAST_INSERT_ID()), 'qux'); +--echo # +--echo # Bug#31374305 - FORMAT() NOT DISPLAYING WHOLE NUMBER SIDE CORRECTLY +--echo # FOR ES_MX AND ES_ES LOCALES +--echo # + +DELIMITER |; +CREATE PROCEDURE load_locale_format_table() +BEGIN + DECLARE locale_list VARCHAR(1000) DEFAULT ' + es_AR,es_BO,es_CL,es_CO,es_CR,es_DO,es_EC,es_ES,es_GT,es_HN, + es_MX,es_NI,es_PA,es_PE,es_PR,es_PY,es_SV,es_US,es_UY,es_VE'; + SET @fmt_stmt = 'INSERT INTO locale_format VALUES + (?, FORMAT(12131254123412541,2,?));'; + PREPARE stmt FROM @fmt_stmt; + WHILE locale_list != '' DO + /* get the first locale from the list */ + SET @locale = + TRIM(REPLACE((SUBSTRING_INDEX(locale_list, ',', 1)), '\n','')); + EXECUTE stmt USING @locale, @locale; + /* remove the first locale from the list */ + IF LOCATE(',', locale_list) > 0 THEN + SET locale_list = + SUBSTRING(locale_list, LOCATE(',', locale_list) + 1); + ELSE + SET locale_list = ''; + END IF; + END WHILE; + DEALLOCATE PREPARE stmt; +END| +DELIMITER ;| + +CREATE TABLE locale_format(locale VARCHAR(10), formatted_string VARCHAR(100)); +CALL load_locale_format_table(); +SELECT * FROM locale_format; +DROP PROCEDURE load_locale_format_table; +DROP TABLE locale_format; --echo # --echo # End of 10.2 tests diff --git a/mysql-test/main/func_system.result b/mysql-test/main/func_system.result index 06fb7e44cf0..688f4a30b50 100644 --- a/mysql-test/main/func_system.result +++ b/mysql-test/main/func_system.result @@ -46,7 +46,7 @@ create table t1 (version char(60)) select database(), user(), version() as 'vers show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL, + `database()` varchar(64) CHARACTER SET utf8 DEFAULT NULL, `user()` varchar(141) CHARACTER SET utf8 DEFAULT NULL, `version` char(60) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -95,3 +95,21 @@ select left(concat(a,version()),1) from t1; left(concat(a,version()),1) a drop table t1; +# +# Start of 10.2 tests +# + +MDEV-27544 database() function under UNION ALL truncates results to 34 characters + + +SET NAMES utf8; +create database betäubungsmittelverschreibungsverordnung; +use betäubungsmittelverschreibungsverordnung; +select database() as "database" union all select database(); +database +betäubungsmittelverschreibungsverordnung +betäubungsmittelverschreibungsverordnung +drop database betäubungsmittelverschreibungsverordnung; +# +# End of 10.2 tests +# diff --git a/mysql-test/main/func_system.test b/mysql-test/main/func_system.test index fa09e81a300..d9f2bda750a 100644 --- a/mysql-test/main/func_system.test +++ b/mysql-test/main/func_system.test @@ -55,3 +55,23 @@ select left(concat(a,version()),1) from t1; drop table t1; # End of 4.1 tests + +--echo # +--echo # Start of 10.2 tests +--echo # + +--echo +--echo MDEV-27544 database() function under UNION ALL truncates results to 34 characters +--echo +--echo + +SET NAMES utf8; +create database betäubungsmittelverschreibungsverordnung; +use betäubungsmittelverschreibungsverordnung; +select database() as "database" union all select database(); +drop database betäubungsmittelverschreibungsverordnung; + + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result index 655649b85ff..73427052b57 100644 --- a/mysql-test/main/gis.result +++ b/mysql-test/main/gis.result @@ -1746,27 +1746,27 @@ drop table t1; SHOW CREATE TABLE information_schema.geometry_columns; Table Create Table GEOMETRY_COLUMNS CREATE TEMPORARY TABLE `GEOMETRY_COLUMNS` ( - `F_TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `F_TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `F_TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `F_GEOMETRY_COLUMN` varchar(64) NOT NULL DEFAULT '', - `G_TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `G_TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `G_TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `G_GEOMETRY_COLUMN` varchar(64) NOT NULL DEFAULT '', - `STORAGE_TYPE` tinyint(2) NOT NULL DEFAULT 0, - `GEOMETRY_TYPE` int(7) NOT NULL DEFAULT 0, - `COORD_DIMENSION` tinyint(2) NOT NULL DEFAULT 0, - `MAX_PPR` tinyint(2) NOT NULL DEFAULT 0, - `SRID` smallint(5) NOT NULL DEFAULT 0 + `F_TABLE_CATALOG` varchar(512) NOT NULL, + `F_TABLE_SCHEMA` varchar(64) NOT NULL, + `F_TABLE_NAME` varchar(64) NOT NULL, + `F_GEOMETRY_COLUMN` varchar(64) NOT NULL, + `G_TABLE_CATALOG` varchar(512) NOT NULL, + `G_TABLE_SCHEMA` varchar(64) NOT NULL, + `G_TABLE_NAME` varchar(64) NOT NULL, + `G_GEOMETRY_COLUMN` varchar(64) NOT NULL, + `STORAGE_TYPE` tinyint(2) NOT NULL, + `GEOMETRY_TYPE` int(7) NOT NULL, + `COORD_DIMENSION` tinyint(2) NOT NULL, + `MAX_PPR` tinyint(2) NOT NULL, + `SRID` smallint(5) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE information_schema.spatial_ref_sys; Table Create Table SPATIAL_REF_SYS CREATE TEMPORARY TABLE `SPATIAL_REF_SYS` ( - `SRID` smallint(5) NOT NULL DEFAULT 0, - `AUTH_NAME` varchar(512) NOT NULL DEFAULT '', - `AUTH_SRID` int(5) NOT NULL DEFAULT 0, - `SRTEXT` varchar(2048) NOT NULL DEFAULT '' + `SRID` smallint(5) NOT NULL, + `AUTH_NAME` varchar(512) NOT NULL, + `AUTH_SRID` int(5) NOT NULL, + `SRTEXT` varchar(2048) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 create table t1(g GEOMETRY, pt POINT); create table t2(g LINESTRING, pl POLYGON); diff --git a/mysql-test/main/index_merge_myisam.result b/mysql-test/main/index_merge_myisam.result index 55caf051720..92c25259be5 100644 --- a/mysql-test/main/index_merge_myisam.result +++ b/mysql-test/main/index_merge_myisam.result @@ -180,17 +180,29 @@ or id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7 i3,i5 4,4 NULL 9 Using sort_union(i3,i5); Using where explain select * from t0 where -((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +((key3 < 4 or key5 < 4) and (key1 < 4 or key2 < 4)) or ((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL i1,i2,i3,i5,i6 NULL NULL NULL 1024 Using where explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where -((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4)) +((key3 < 4 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 4,4 NULL 1024 Using sort_union(i3,i5); Using where +explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where +((key3 < 5 or key5 < 4) and (key1 < 4 or key2 < 4)) or ((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 0,4 NULL 1024 Using sort_union(i3,i5); Using where +1 SIMPLE t0 ALL i1,i2,i3,i5,i6 NULL NULL NULL 1024 Using where +explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where +((key3 < 10 or key5 < 4) and (key1 < 4 or key2 < 4)) +or +((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t0 ALL i1,i2,i3,i5,i6 NULL NULL NULL 1024 Using where select * from t0 where key1 < 5 or key8 < 4 order by key1; key1 key2 key3 key4 key5 key6 key7 key8 1 1 1 1 1 1 1 1023 @@ -1690,7 +1702,7 @@ SELECT * FROM t1 FORCE KEY (PRIMARY , i , c1 , c2) WHERE pk = 255 OR i = 22 OR (pk IN (1 , 136) AND c2 IN ('c' , 'w') AND (c1 NOT BETWEEN 'e' AND 'i' OR c2 > 'g')) OR (pk is not null and (pk <1 or pk>1)) ; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index_merge PRIMARY,c1,i,c2 PRIMARY,i 0,5 NULL 69 Using sort_union(PRIMARY,i); Using where +1 SIMPLE t1 ALL PRIMARY,c1,i,c2 NULL NULL NULL 69 Using where DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; # diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index cc7f10a32fd..cd726f7298f 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -227,7 +227,7 @@ Field Type Collation Null Key Default Extra Privileges Comment Insert_priv enum('N','Y') utf8_general_ci NO N select,insert,update,references show full columns from v1; Field Type Collation Null Key Default Extra Privileges Comment -c varchar(64) utf8_general_ci NO select,insert,update,references +c varchar(64) utf8_general_ci NO NULL select,insert,update,references select * from information_schema.COLUMNS where table_name="t1" and column_name= "a"; 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 DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION @@ -605,19 +605,19 @@ drop table t1; SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; Table Create Table CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '', - `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', - `MAXLEN` bigint(3) NOT NULL DEFAULT 0 + `CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL, + `DESCRIPTION` varchar(60) NOT NULL, + `MAXLEN` bigint(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 set names latin2; SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; Table Create Table CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '', - `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', - `MAXLEN` bigint(3) NOT NULL DEFAULT 0 + `CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL, + `DESCRIPTION` varchar(60) NOT NULL, + `MAXLEN` bigint(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 set names latin1; create table t1 select * from information_schema.CHARACTER_SETS @@ -629,10 +629,10 @@ alter table t1 default character set utf8; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '', - `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', - `MAXLEN` bigint(3) NOT NULL DEFAULT 0 + `CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL, + `DESCRIPTION` varchar(60) NOT NULL, + `MAXLEN` bigint(3) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 drop table t1; create view v1 as select * from information_schema.TABLES; @@ -2367,5 +2367,30 @@ select * from t1 where (name, len) in (select name, len from information_schema name len drop table t1; # +# MDEV-20254 Problems with EMPTY_STRING_IS_NULL and I_S tables +# +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE OR REPLACE TABLE t1 AS SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +SHOW returned: CREATE TABLE `t1` ( + `TABLE_NAME` varchar(64) CHARACTER SET utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE `t1` ( + `TABLE_NAME` varchar(64) CHARACTER SET utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TABLE_NAME` varchar(64) CHARACTER SET utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET SQL_MODE=DEFAULT; +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE OR REPLACE TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +DROP TABLE t1; +# Executing the statement returned from SHOW CREATE TABLE +DROP TABLE t1; +SET SQL_MODE=DEFAULT; +# # End of 10.3 tests # diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test index 360717a2685..c7087958f79 100644 --- a/mysql-test/main/information_schema.test +++ b/mysql-test/main/information_schema.test @@ -2075,5 +2075,38 @@ select * from t1 where (name, len) in (select name, len from information_schema drop table t1; --echo # +--echo # MDEV-20254 Problems with EMPTY_STRING_IS_NULL and I_S tables +--echo # + +# Test one column with detailed output + +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE OR REPLACE TABLE t1 AS SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +--let $myvar= query_get_value(SHOW CREATE TABLE test.t1, Create Table, 1) +--echo SHOW returned: $myvar +DROP TABLE t1; +--eval $myvar +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET SQL_MODE=DEFAULT; + +# Test all columns without detailed output. +# Just make sure the SHOW CREATE TABLE result +# can be passed back to the server without errors. + +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE OR REPLACE TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +--let $myvar= query_get_value(SHOW CREATE TABLE test.t1, Create Table, 1) +DROP TABLE t1; +--disable_query_log +--echo # Executing the statement returned from SHOW CREATE TABLE +--eval $myvar +--enable_query_log +DROP TABLE t1; +SET SQL_MODE=DEFAULT; + + + +--echo # --echo # End of 10.3 tests --echo # diff --git a/mysql-test/main/information_schema_inno.result b/mysql-test/main/information_schema_inno.result index d952e4372ca..c81631728f0 100644 --- a/mysql-test/main/information_schema_inno.result +++ b/mysql-test/main/information_schema_inno.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB; CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id, id), FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE, diff --git a/mysql-test/main/information_schema_inno.test b/mysql-test/main/information_schema_inno.test index 3cdbb8111d9..6c50ff3ece0 100644 --- a/mysql-test/main/information_schema_inno.test +++ b/mysql-test/main/information_schema_inno.test @@ -1,8 +1,6 @@ -- source include/testdb_only.inc -- source include/have_innodb.inc ---disable_warnings -DROP TABLE IF EXISTS t1,t2,t3; ---enable_warnings +-- source include/have_symlink.inc # # Test for KEY_COLUMN_USAGE & TABLE_CONSTRAINTS tables diff --git a/mysql-test/main/information_schema_parameters.result b/mysql-test/main/information_schema_parameters.result index 02f97159f28..81fed4c1ae4 100644 --- a/mysql-test/main/information_schema_parameters.result +++ b/mysql-test/main/information_schema_parameters.result @@ -3,22 +3,22 @@ USE INFORMATION_SCHEMA; SHOW CREATE TABLE INFORMATION_SCHEMA.PARAMETERS; Table Create Table PARAMETERS CREATE TEMPORARY TABLE `PARAMETERS` ( - `SPECIFIC_CATALOG` varchar(512) NOT NULL DEFAULT '', - `SPECIFIC_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` int(21) NOT NULL DEFAULT 0, - `PARAMETER_MODE` varchar(5) DEFAULT NULL, - `PARAMETER_NAME` varchar(64) DEFAULT NULL, - `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL, - `NUMERIC_PRECISION` int(21) DEFAULT NULL, - `NUMERIC_SCALE` int(21) DEFAULT NULL, - `DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL, - `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, - `COLLATION_NAME` varchar(64) DEFAULT NULL, - `DTD_IDENTIFIER` longtext NOT NULL DEFAULT '', - `ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT '' + `SPECIFIC_CATALOG` varchar(512) NOT NULL, + `SPECIFIC_SCHEMA` varchar(64) NOT NULL, + `SPECIFIC_NAME` varchar(64) NOT NULL, + `ORDINAL_POSITION` int(21) NOT NULL, + `PARAMETER_MODE` varchar(5), + `PARAMETER_NAME` varchar(64), + `DATA_TYPE` varchar(64) NOT NULL, + `CHARACTER_MAXIMUM_LENGTH` int(21), + `CHARACTER_OCTET_LENGTH` int(21), + `NUMERIC_PRECISION` int(21), + `NUMERIC_SCALE` int(21), + `DATETIME_PRECISION` bigint(21) unsigned, + `CHARACTER_SET_NAME` varchar(64), + `COLLATION_NAME` varchar(64), + `DTD_IDENTIFIER` longtext NOT NULL, + `ROUTINE_TYPE` varchar(9) NOT NULL ) DEFAULT CHARSET=utf8 SELECT * FROM information_schema.columns WHERE table_schema = 'information_schema' @@ -29,7 +29,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME SPECIFIC_CATALOG ORDINAL_POSITION 1 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 512 @@ -51,7 +51,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME SPECIFIC_SCHEMA ORDINAL_POSITION 2 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -73,7 +73,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME SPECIFIC_NAME ORDINAL_POSITION 3 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -95,7 +95,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME ORDINAL_POSITION ORDINAL_POSITION 4 -COLUMN_DEFAULT 0 +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE int CHARACTER_MAXIMUM_LENGTH NULL @@ -161,7 +161,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME DATA_TYPE ORDINAL_POSITION 7 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -337,7 +337,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME DTD_IDENTIFIER ORDINAL_POSITION 15 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE longtext CHARACTER_MAXIMUM_LENGTH 4294967295 @@ -359,7 +359,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS COLUMN_NAME ROUTINE_TYPE ORDINAL_POSITION 16 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 9 @@ -378,13 +378,13 @@ IS_GENERATED NEVER GENERATION_EXPRESSION NULL DESCRIBE INFORMATION_SCHEMA.PARAMETERS; Field Type Null Key Default Extra -SPECIFIC_CATALOG varchar(512) NO -SPECIFIC_SCHEMA varchar(64) NO -SPECIFIC_NAME varchar(64) NO -ORDINAL_POSITION int(21) NO 0 +SPECIFIC_CATALOG varchar(512) NO NULL +SPECIFIC_SCHEMA varchar(64) NO NULL +SPECIFIC_NAME varchar(64) NO NULL +ORDINAL_POSITION int(21) NO NULL PARAMETER_MODE varchar(5) YES NULL PARAMETER_NAME varchar(64) YES NULL -DATA_TYPE varchar(64) NO +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH int(21) YES NULL CHARACTER_OCTET_LENGTH int(21) YES NULL NUMERIC_PRECISION int(21) YES NULL @@ -392,8 +392,8 @@ NUMERIC_SCALE int(21) YES NULL DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL -DTD_IDENTIFIER longtext NO -ROUTINE_TYPE varchar(9) NO +DTD_IDENTIFIER longtext NO NULL +ROUTINE_TYPE varchar(9) NO NULL # ========== parameters.2 ========== DROP DATABASE IF EXISTS i_s_parameters_test; CREATE DATABASE i_s_parameters_test; diff --git a/mysql-test/main/information_schema_routines.result b/mysql-test/main/information_schema_routines.result index eaa69adf740..65779351289 100644 --- a/mysql-test/main/information_schema_routines.result +++ b/mysql-test/main/information_schema_routines.result @@ -5,37 +5,37 @@ USE INFORMATION_SCHEMA; SHOW CREATE TABLE INFORMATION_SCHEMA.ROUTINES; Table Create Table ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_TYPE` varchar(13) NOT NULL DEFAULT '', - `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL, - `NUMERIC_PRECISION` int(21) DEFAULT NULL, - `NUMERIC_SCALE` int(21) DEFAULT NULL, - `DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL, - `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, - `COLLATION_NAME` varchar(64) DEFAULT NULL, - `DTD_IDENTIFIER` longtext DEFAULT NULL, - `ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '', - `ROUTINE_DEFINITION` longtext DEFAULT NULL, - `EXTERNAL_NAME` varchar(64) DEFAULT NULL, - `EXTERNAL_LANGUAGE` varchar(64) DEFAULT NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL DEFAULT '', - `IS_DETERMINISTIC` varchar(3) NOT NULL DEFAULT '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL DEFAULT '', - `SQL_PATH` varchar(64) DEFAULT NULL, - `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', - `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `ROUTINE_COMMENT` longtext NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' + `SPECIFIC_NAME` varchar(64) NOT NULL, + `ROUTINE_CATALOG` varchar(512) NOT NULL, + `ROUTINE_SCHEMA` varchar(64) NOT NULL, + `ROUTINE_NAME` varchar(64) NOT NULL, + `ROUTINE_TYPE` varchar(13) NOT NULL, + `DATA_TYPE` varchar(64) NOT NULL, + `CHARACTER_MAXIMUM_LENGTH` int(21), + `CHARACTER_OCTET_LENGTH` int(21), + `NUMERIC_PRECISION` int(21), + `NUMERIC_SCALE` int(21), + `DATETIME_PRECISION` bigint(21) unsigned, + `CHARACTER_SET_NAME` varchar(64), + `COLLATION_NAME` varchar(64), + `DTD_IDENTIFIER` longtext, + `ROUTINE_BODY` varchar(8) NOT NULL, + `ROUTINE_DEFINITION` longtext, + `EXTERNAL_NAME` varchar(64), + `EXTERNAL_LANGUAGE` varchar(64), + `PARAMETER_STYLE` varchar(8) NOT NULL, + `IS_DETERMINISTIC` varchar(3) NOT NULL, + `SQL_DATA_ACCESS` varchar(64) NOT NULL, + `SQL_PATH` varchar(64), + `SECURITY_TYPE` varchar(7) NOT NULL, + `CREATED` datetime NOT NULL, + `LAST_ALTERED` datetime NOT NULL, + `SQL_MODE` varchar(8192) NOT NULL, + `ROUTINE_COMMENT` longtext NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `DATABASE_COLLATION` varchar(32) NOT NULL ) DEFAULT CHARSET=utf8 SELECT * FROM information_schema.columns WHERE table_schema = 'information_schema' @@ -46,7 +46,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME SPECIFIC_NAME ORDINAL_POSITION 1 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -68,7 +68,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME ROUTINE_CATALOG ORDINAL_POSITION 2 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 512 @@ -90,7 +90,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME ROUTINE_SCHEMA ORDINAL_POSITION 3 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -112,7 +112,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME ROUTINE_NAME ORDINAL_POSITION 4 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -134,7 +134,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME ROUTINE_TYPE ORDINAL_POSITION 5 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 13 @@ -156,7 +156,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME DATA_TYPE ORDINAL_POSITION 6 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -354,7 +354,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME ROUTINE_BODY ORDINAL_POSITION 15 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 8 @@ -442,7 +442,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME PARAMETER_STYLE ORDINAL_POSITION 19 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 8 @@ -464,7 +464,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME IS_DETERMINISTIC ORDINAL_POSITION 20 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 3 @@ -486,7 +486,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME SQL_DATA_ACCESS ORDINAL_POSITION 21 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 64 @@ -530,7 +530,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME SECURITY_TYPE ORDINAL_POSITION 23 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 7 @@ -552,7 +552,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME CREATED ORDINAL_POSITION 24 -COLUMN_DEFAULT '0000-00-00 00:00:00' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE datetime CHARACTER_MAXIMUM_LENGTH NULL @@ -574,7 +574,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME LAST_ALTERED ORDINAL_POSITION 25 -COLUMN_DEFAULT '0000-00-00 00:00:00' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE datetime CHARACTER_MAXIMUM_LENGTH NULL @@ -596,7 +596,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME SQL_MODE ORDINAL_POSITION 26 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 8192 @@ -618,7 +618,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME ROUTINE_COMMENT ORDINAL_POSITION 27 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE longtext CHARACTER_MAXIMUM_LENGTH 4294967295 @@ -640,7 +640,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME DEFINER ORDINAL_POSITION 28 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 189 @@ -662,7 +662,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME CHARACTER_SET_CLIENT ORDINAL_POSITION 29 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 32 @@ -684,7 +684,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME COLLATION_CONNECTION ORDINAL_POSITION 30 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 32 @@ -706,7 +706,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES COLUMN_NAME DATABASE_COLLATION ORDINAL_POSITION 31 -COLUMN_DEFAULT '' +COLUMN_DEFAULT NULL IS_NULLABLE NO DATA_TYPE varchar CHARACTER_MAXIMUM_LENGTH 32 @@ -725,12 +725,12 @@ IS_GENERATED NEVER GENERATION_EXPRESSION NULL DESCRIBE INFORMATION_SCHEMA.ROUTINES; Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(512) NO -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(13) NO -DATA_TYPE varchar(64) NO +SPECIFIC_NAME varchar(64) NO NULL +ROUTINE_CATALOG varchar(512) NO NULL +ROUTINE_SCHEMA varchar(64) NO NULL +ROUTINE_NAME varchar(64) NO NULL +ROUTINE_TYPE varchar(13) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH int(21) YES NULL CHARACTER_OCTET_LENGTH int(21) YES NULL NUMERIC_PRECISION int(21) YES NULL @@ -739,23 +739,23 @@ DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL DTD_IDENTIFIER longtext YES NULL -ROUTINE_BODY varchar(8) NO +ROUTINE_BODY varchar(8) NO NULL ROUTINE_DEFINITION longtext YES NULL EXTERNAL_NAME varchar(64) YES NULL EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO +PARAMETER_STYLE varchar(8) NO NULL +IS_DETERMINISTIC varchar(3) NO NULL +SQL_DATA_ACCESS varchar(64) NO NULL SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE varchar(8192) NO -ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SECURITY_TYPE varchar(7) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL +SQL_MODE varchar(8192) NO NULL +ROUTINE_COMMENT longtext NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL # ========== routines.2 ========== DROP DATABASE IF EXISTS i_s_routines_test; CREATE DATABASE i_s_routines_test; diff --git a/mysql-test/main/insert_select.result b/mysql-test/main/insert_select.result index 5094638c92b..e85c4982137 100644 --- a/mysql-test/main/insert_select.result +++ b/mysql-test/main/insert_select.result @@ -865,3 +865,22 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1, t2; End of 5.5 tests +# +# Beginning of 10.2 test +# +# MDEV-26698: Incorrect row number upon INSERT .. SELECT from the same +# table: rows are counted twice +# +CREATE TABLE t1(a TINYINT); +INSERT INTO t1 VALUES (1), (100); +INSERT INTO t1 SELECT a*2 FROM t1; +Warnings: +Warning 1264 Out of range value for column 'a' at row 2 +TRUNCATE TABLE t1; +# using ORDER BY +INSERT INTO t1 VALUES(1), (2), (100), (3); +INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a; +Warnings: +Warning 1264 Out of range value for column 'a' at row 4 +DROP TABLE t1; +# End of 10.2 test diff --git a/mysql-test/main/insert_select.test b/mysql-test/main/insert_select.test index 0b5cdf95daf..91b2cc6f981 100644 --- a/mysql-test/main/insert_select.test +++ b/mysql-test/main/insert_select.test @@ -435,3 +435,28 @@ show create table t2; drop table t1, t2; --echo End of 5.5 tests + +--echo # +--echo # Beginning of 10.2 test +--echo # +--echo # MDEV-26698: Incorrect row number upon INSERT .. SELECT from the same +--echo # table: rows are counted twice +--echo # + +CREATE TABLE t1(a TINYINT); + +INSERT INTO t1 VALUES (1), (100); + +INSERT INTO t1 SELECT a*2 FROM t1; + +TRUNCATE TABLE t1; + +--echo # using ORDER BY + +INSERT INTO t1 VALUES(1), (2), (100), (3); + +INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a; + +DROP TABLE t1; + +--echo # End of 10.2 test diff --git a/mysql-test/main/mysql_client_test-master.opt b/mysql-test/main/mysql_client_test-master.opt index 8d49abf6a10..e3d42121b45 100644 --- a/mysql-test/main/mysql_client_test-master.opt +++ b/mysql-test/main/mysql_client_test-master.opt @@ -3,3 +3,4 @@ --log-output=FILE,TABLE --max-allowed-packet=32000000 --proxy-protocol-networks=* +--sequence=on diff --git a/mysql-test/main/mysql_client_test_comp-master.opt b/mysql-test/main/mysql_client_test_comp-master.opt index 6c4a5e4c782..ccaa4a8ee6e 100644 --- a/mysql-test/main/mysql_client_test_comp-master.opt +++ b/mysql-test/main/mysql_client_test_comp-master.opt @@ -1,3 +1,4 @@ --loose-enable-performance-schema --max-allowed-packet=32000000 --proxy-protocol-networks=::1/32,127.0.0.0/8,localhost +--sequence=on diff --git a/mysql-test/main/mysql_client_test_nonblock-master.opt b/mysql-test/main/mysql_client_test_nonblock-master.opt index a39d0089562..f306d27feac 100644 --- a/mysql-test/main/mysql_client_test_nonblock-master.opt +++ b/mysql-test/main/mysql_client_test_nonblock-master.opt @@ -1,3 +1,4 @@ --general-log --general-log-file=$MYSQLTEST_VARDIR/log/master.log --log-output=FILE,TABLE --max-allowed-packet=32000000 --proxy-protocol-networks=::1,::ffff:127.0.0.1/97,localhost +--sequence=on diff --git a/mysql-test/main/mysql_upgrade-6984.test b/mysql-test/main/mysql_upgrade-6984.test index 01bdc15c64b..d6d06a1e05e 100644 --- a/mysql-test/main/mysql_upgrade-6984.test +++ b/mysql-test/main/mysql_upgrade-6984.test @@ -13,6 +13,7 @@ update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')) where user='root'; +--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ --exec $MYSQL_UPGRADE connect(con1,localhost,root,foo,,,); @@ -21,3 +22,6 @@ update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$. flush privileges; # Load event table set global event_scheduler=OFF; + +let MYSQLD_DATADIR= `select @@datadir`; +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index c4c0af1601c..75566d06a0c 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -47,7 +47,8 @@ test Phase 7/7: Running 'FLUSH PRIVILEGES' OK Run it again - should say already completed -This installation of MariaDB is already upgraded to VERSION, use --force if you still need to run mysql_upgrade +This installation of MariaDB is already upgraded to VERSION.There is no need to run mysql_upgrade again for VERSION. +You can use --force if you still want to run mysql_upgrade Force should run it regardless of whether it has been run before Phase 1/7: Checking and upgrading mysql database Processing databases @@ -145,11 +146,12 @@ test Phase 7/7: Running 'FLUSH PRIVILEGES' OK DROP USER mysqltest1@'%'; -Version check failed. Got the following error when calling the 'mysql' command line client +Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client ERROR 1045 (28000): Access denied for user 'mysqltest1'@'localhost' (using password: YES) FATAL ERROR: Upgrade failed Run mysql_upgrade with a non existing server socket -mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect +Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client +ERROR 2005 (HY000): Unknown MySQL server host 'not_existing_host' (errno) FATAL ERROR: Upgrade failed set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE'; Phase 1/7: Checking and upgrading mysql database @@ -412,9 +414,12 @@ OK # Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR # Run mysql_upgrade with unauthorized access -Version check failed. Got the following error when calling the 'mysql' command line client +Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) FATAL ERROR: Upgrade failed +Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client +ERROR 1045 (errno): Access denied for user 'root'@'localhost' (using password: YES) +FATAL ERROR: Upgrade failed # # MDEV-4332 Increase username length from 16 characters # MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names @@ -768,6 +773,34 @@ GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION GRANT USAGE ON *.* TO `aRole` DROP ROLE `aRole`; FLUSH PRIVILEGES; +# +# MDEV-27279: mariadb_upgrade add --check-if-upgrade-is-needed +# +This installation of MariaDB is already upgraded to MariaDB . +There is no need to run mysql_upgrade again for MariaDB . +Looking for 'mysql' as: mysql +This installation of MariaDB is already upgraded to MariaDB . +There is no need to run mysql_upgrade again for MariaDB . +# +# MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it +# +Looking for 'mysql' as: mysql +Empty or non existent ...mysql_upgrade_info. Assuming mysql_upgrade has to be run! +# +# MDEV-27279: mariadb_upgrade check-if-upgrade with minor version change +# +Looking for 'mysql' as: mysql +This installation of MariaDB is already upgraded to MariaDB . +There is no need to run mysql_upgrade again for MariaDB . +This installation of MariaDB is already upgraded to MariaDB . +There is no need to run mysql_upgrade again for MariaDB . +You can use --force if you still want to run mysql_upgrade +# +# MDEV-27279: mariadb_upgrade check-if-upgrade with major version change +# +Major version upgrade detected from MariaDB to MariaDB . Check required! +Looking for 'mysql' as: mysql +Major version upgrade detected from MariaDB to MariaDB . Check required! drop table mysql.global_priv; rename table mysql.global_priv_bak to mysql.global_priv; # End of 10.2 tests diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test index afc06dfc5ee..0440cd75d77 100644 --- a/mysql-test/main/mysql_upgrade.test +++ b/mysql-test/main/mysql_upgrade.test @@ -17,7 +17,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; file_exists $MYSQLD_DATADIR/mysql_upgrade_info; --echo Run it again - should say already completed ---replace_regex /upgraded to .*, use/upgraded to VERSION, use/ +--replace_regex /upgraded to [^\n].*/upgraded to VERSION./ /again for [^\n]*/again for VERSION./ --exec $MYSQL_UPGRADE 2>&1 # It should have created a file in the MySQL Servers datadir @@ -125,7 +125,7 @@ let $MYSQLD_DATADIR= `select @@datadir`; --remove_file $MYSQLD_DATADIR/mysql_upgrade_info --echo # Running mysql_upgrade with --skip-write-binlog.. ---replace_result $MYSQLTEST_VARDIR var +--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ --exec $MYSQL_UPGRADE --skip-write-binlog # mysql_upgrade must have created mysql_upgrade_info file, @@ -139,6 +139,9 @@ let $MYSQLD_DATADIR= `select @@datadir`; --echo Run mysql_upgrade with unauthorized access --error 1 --exec $MYSQL_UPGRADE --skip-verbose --user=root --password=wrong_password 2>&1 +--replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9|-]*\)/(errno)/ +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose --skip-version-check --user=root --password=wrong_password 2>&1 --echo # --echo # MDEV-4332 Increase username length from 16 characters @@ -232,6 +235,7 @@ FLUSH TABLES mysql.user; FLUSH PRIVILEGES; SHOW CREATE TABLE mysql.user; +--replace_result $MYSQLTEST_VARDIR var --exec $MYSQL_UPGRADE --force 2>&1 SHOW CREATE TABLE mysql.user; @@ -276,6 +280,79 @@ SHOW GRANTS; DROP ROLE `aRole`; --exec $MYSQL mysql < $MYSQLTEST_VARDIR/tmp/user.sql FLUSH PRIVILEGES; + +--echo # +--echo # MDEV-27279: mariadb_upgrade add --check-if-upgrade-is-needed +--echo # + +--error 1 +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / +--error 1 +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/ +--error 1 +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose + +--echo # +--echo # MDEV-27279: mariadb_upgrade check-if-upgrade absence is do it +--echo # + +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info +--replace_regex /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed + +--replace_regex /'mysql.* as:[^\n]*/'mysql' as: mysql/ /open .* Assuming/open XXX. Assuming/ /[^ ]*mysql_upgrade_info/...mysql_upgrade_info/ +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose + +--echo # +--echo # MDEV-27279: mariadb_upgrade check-if-upgrade with minor version change +--echo # + +# take 3rd number of version and change to 0 + +let DATADIR= $MYSQLD_DATADIR; + +perl; + my $ver= $ENV{'MYSQL_SERVER_VERSION'} or die "MYSQL_SERVER_VERSION not set"; + my $file= $ENV{'DATADIR'} or die "MYSQLD_DATADIR not set"; + $ver =~ s/^(\d*)\.(\d*).(\d*)(.*)/$1.$2.0$4/; + open(FILE, ">$file/mysql_upgrade_info") or die "Failed to open $file"; + print FILE "$ver\n"; + close(FILE); +EOF + +--error 1 +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/ +--error 1 +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / +--exec $MYSQL_UPGRADE +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info + +--echo # +--echo # MDEV-27279: mariadb_upgrade check-if-upgrade with major version change +--echo # + +# take 2rd number of version and change to 0 + +let DATADIR= $MYSQLD_DATADIR; + +perl; + my $ver= $ENV{'MYSQL_SERVER_VERSION'} or die "MYSQL_SERVER_VERSION not set"; + my $file= $ENV{'DATADIR'} or die "MYSQLD_DATADIR not set"; + $ver =~ s/^(\d*)\.(\d*).(\d*)(.*)/$1.0.$3$4/; + open(FILE, ">$file/mysql_upgrade_info") or die "Failed to open $file"; + print FILE "$ver\n"; + close(FILE); +EOF + +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --silent +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / /'mysql.* as:[^\n]*/'mysql' as: mysql/ +--exec $MYSQL_UPGRADE --check-if-upgrade-is-needed --verbose --remove_file $MYSQLD_DATADIR/mysql_upgrade_info drop table mysql.global_priv; rename table mysql.global_priv_bak to mysql.global_priv; diff --git a/mysql-test/main/mysql_upgrade_noengine.result b/mysql-test/main/mysql_upgrade_noengine.result index 7b7082ab007..2e62d72538f 100644 --- a/mysql-test/main/mysql_upgrade_noengine.result +++ b/mysql-test/main/mysql_upgrade_noengine.result @@ -55,6 +55,7 @@ Warnings: Level Warning Code 1286 Message Unknown storage engine 'ARCHIVE' +# upgrade from 10.1 - engines aren't enabled Phase 1/7: Checking and upgrading mysql database Processing databases mysql @@ -148,6 +149,8 @@ rename table mysql.global_priv_bak to mysql.global_priv; # switching from mysql.global_priv to mysql.user drop view mysql.user_bak; alter table mysql.user drop column default_role, drop column max_statement_time; +# still upgrade from 10.1 +Major version upgrade detected from MariaDB to MariaDB . Check required! Phase 1/7: Checking and upgrading mysql database Processing databases mysql @@ -241,6 +244,7 @@ rename table mysql.global_priv_bak to mysql.global_priv; # switching from mysql.global_priv to mysql.user drop view mysql.user_bak; alter table mysql.user drop column default_role, drop column max_statement_time; +# upgrade from 10.0 - engines are enabled Phase 1/7: Checking and upgrading mysql database Processing databases mysql diff --git a/mysql-test/main/mysql_upgrade_noengine.test b/mysql-test/main/mysql_upgrade_noengine.test index e3c3e718591..48a007c4557 100644 --- a/mysql-test/main/mysql_upgrade_noengine.test +++ b/mysql-test/main/mysql_upgrade_noengine.test @@ -31,7 +31,8 @@ uninstall plugin archive; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; -# upgrade from 10.1 - engines aren't enabled +--echo # upgrade from 10.1 - engines aren't enabled +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / exec $MYSQL_UPGRADE 2>&1; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; @@ -50,7 +51,8 @@ write_file $datadir/mysql_upgrade_info; 10.1.10-MariaDB EOF -# still upgrade from 10.1 +--echo # still upgrade from 10.1 +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / exec $MYSQL_UPGRADE 2>&1; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; @@ -63,7 +65,8 @@ drop view mysql.user_bak; alter table mysql.user drop column default_role, drop column max_statement_time; remove_file $datadir/mysql_upgrade_info; -# upgrade from 10.0 - engines are enabled +--echo # upgrade from 10.0 - engines are enabled +--replace_regex /\d\d\.\d*\.\d*[^ .\n]*/MariaDB / exec $MYSQL_UPGRADE 2>&1; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t1'; select table_catalog, table_schema, table_name, table_type, engine, row_format, table_rows, data_length, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index d0d054b5473..81a8d0b8162 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -3704,29 +3704,29 @@ DROP TABLE IF EXISTS `TABLES`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', - `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) unsigned DEFAULT NULL, - `ROW_FORMAT` varchar(10) 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(32) DEFAULT NULL, - `CHECKSUM` bigint(21) unsigned DEFAULT NULL, - `CREATE_OPTIONS` varchar(2048) DEFAULT NULL, - `TABLE_COMMENT` varchar(2048) NOT NULL DEFAULT '', - `MAX_INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, - `TEMPORARY` varchar(1) DEFAULT NULL + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `TABLE_TYPE` varchar(64) NOT NULL, + `ENGINE` varchar(64), + `VERSION` bigint(21) unsigned, + `ROW_FORMAT` varchar(10), + `TABLE_ROWS` bigint(21) unsigned, + `AVG_ROW_LENGTH` bigint(21) unsigned, + `DATA_LENGTH` bigint(21) unsigned, + `MAX_DATA_LENGTH` bigint(21) unsigned, + `INDEX_LENGTH` bigint(21) unsigned, + `DATA_FREE` bigint(21) unsigned, + `AUTO_INCREMENT` bigint(21) unsigned, + `CREATE_TIME` datetime, + `UPDATE_TIME` datetime, + `CHECK_TIME` datetime, + `TABLE_COLLATION` varchar(32), + `CHECKSUM` bigint(21) unsigned, + `CREATE_OPTIONS` varchar(2048), + `TABLE_COMMENT` varchar(2048) NOT NULL, + `MAX_INDEX_LENGTH` bigint(21) unsigned, + `TEMPORARY` varchar(1) ) ENGINE=MEMORY DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; # diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result index 129bd8928f2..46d7544eb4e 100644 --- a/mysql-test/main/order_by.result +++ b/mysql-test/main/order_by.result @@ -3561,6 +3561,29 @@ b a 40 1 30 4 drop table t1,t2; +# +# MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string +# +SET sql_mode=''; +SET @@SESSION.max_sort_length=4; +Warnings: +Warning 1292 Truncated incorrect max_sort_length value: '4' +CREATE TABLE t1 (c TIMESTAMP(1)); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; +SET sql_mode=''; +SET @@SESSION.max_sort_length=1; +Warnings: +Warning 1292 Truncated incorrect max_sort_length value: '1' +CREATE TEMPORARY TABLE t1 (c DATETIME); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; # End of 10.2 tests # # MDEV-16214: Incorrect plan taken by the optimizer , uses INDEX instead of ref access with ORDER BY diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test index 0bf0311a642..191e6d02673 100644 --- a/mysql-test/main/order_by.test +++ b/mysql-test/main/order_by.test @@ -2310,6 +2310,29 @@ explain (select b,a from t2 order by a limit 3) order by b desc; drop table t1,t2; +--echo # +--echo # MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string +--echo # + +SET sql_mode=''; +SET @@SESSION.max_sort_length=4; +CREATE TABLE t1 (c TIMESTAMP(1)); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; + +SET sql_mode=''; +SET @@SESSION.max_sort_length=1; +CREATE TEMPORARY TABLE t1 (c DATETIME); +INSERT INTO t1 VALUES(0); +DELETE FROM t1 ORDER BY c; +DROP TABLE t1; +SET @@SESSION.max_sort_length=DEFAULT; +SET sql_mode=DEFAULT; + + --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/partition_sp.result b/mysql-test/main/partition_sp.result new file mode 100644 index 00000000000..585e2c7ab9d --- /dev/null +++ b/mysql-test/main/partition_sp.result @@ -0,0 +1,22 @@ +# +# MDEV-8652: Partitioned table creation problem when +# creating from procedure context twice in same session +# +CREATE PROCEDURE p1() +BEGIN +DROP TABLE IF EXISTS t1 ; +CREATE TABLE t1 ( +id INT PRIMARY KEY +) +PARTITION BY RANGE (id) ( +PARTITION P1 VALUES LESS THAN (2), +PARTITION P2 VALUES LESS THAN (3) +); +END | +call p1(); +call p1(); +drop procedure p1; +drop table t1; +# +# End of 10.2 tests +# diff --git a/mysql-test/main/partition_sp.test b/mysql-test/main/partition_sp.test new file mode 100644 index 00000000000..1d3d1d707c7 --- /dev/null +++ b/mysql-test/main/partition_sp.test @@ -0,0 +1,35 @@ +--source include/have_partition.inc + +--echo # +--echo # MDEV-8652: Partitioned table creation problem when +--echo # creating from procedure context twice in same session +--echo # + + +DELIMITER |; + +CREATE PROCEDURE p1() +BEGIN + DROP TABLE IF EXISTS t1 ; + + CREATE TABLE t1 ( + id INT PRIMARY KEY + ) + PARTITION BY RANGE (id) ( + PARTITION P1 VALUES LESS THAN (2), + PARTITION P2 VALUES LESS THAN (3) + ); +END | + +DELIMITER ;| + +call p1(); +call p1(); + +drop procedure p1; +drop table t1; + +--echo # +--echo # End of 10.2 tests +--echo # + diff --git a/mysql-test/main/partition_symlink.result b/mysql-test/main/partition_symlink.result index 90048eb3438..b5a976e3a9e 100644 --- a/mysql-test/main/partition_symlink.result +++ b/mysql-test/main/partition_symlink.result @@ -177,3 +177,97 @@ partition by key (a) (partition p0, partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); Got one of the listed errors +# +# MDEV-25917 create table like fails if source table is partitioned and engine is myisam or aria with data directory. +# +CREATE TABLE t1 (a INT) +ENGINE = MyISAM +PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0) +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', +PARTITION p1 VALUES IN (1) +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', +PARTITION p2 VALUES IN (2)); +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + PARTITION BY LIST (`a`) +(PARTITION `p0` VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, + PARTITION `p1` VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, + PARTITION `p2` VALUES IN (2) ENGINE = MyISAM) +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + PARTITION BY LIST (`a`) +(PARTITION `p0` VALUES IN (0) ENGINE = MyISAM, + PARTITION `p1` VALUES IN (1) ENGINE = MyISAM, + PARTITION `p2` VALUES IN (2) ENGINE = MyISAM) +DROP TABLE t1, t2; +CREATE TABLE t1 ( +ID int(11) NOT NULL, +type int(11)) Engine=MyISAM +PARTITION BY RANGE(ID) +SUBPARTITION BY HASH(type) +( +PARTITION p01 VALUES LESS THAN(100) +(SUBPARTITION s11 +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', +SUBPARTITION s12 +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp' + ), +PARTITION p11 VALUES LESS THAN(200) +(SUBPARTITION s21, SUBPARTITION s22), +PARTITION p21 VALUES LESS THAN MAXVALUE +(SUBPARTITION s31 +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', +SUBPARTITION s32 +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp' + ) +); +CREATE TABLE t2 LIKE t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ID` int(11) NOT NULL, + `type` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + PARTITION BY RANGE (`ID`) +SUBPARTITION BY HASH (`type`) +(PARTITION `p01` VALUES LESS THAN (100) + (SUBPARTITION `s11` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, + SUBPARTITION `s12` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), + PARTITION `p11` VALUES LESS THAN (200) + (SUBPARTITION `s21` ENGINE = MyISAM, + SUBPARTITION `s22` ENGINE = MyISAM), + PARTITION `p21` VALUES LESS THAN MAXVALUE + (SUBPARTITION `s31` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, + SUBPARTITION `s32` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `ID` int(11) NOT NULL, + `type` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + PARTITION BY RANGE (`ID`) +SUBPARTITION BY HASH (`type`) +(PARTITION `p01` VALUES LESS THAN (100) + (SUBPARTITION `s11` ENGINE = MyISAM, + SUBPARTITION `s12` ENGINE = MyISAM), + PARTITION `p11` VALUES LESS THAN (200) + (SUBPARTITION `s21` ENGINE = MyISAM, + SUBPARTITION `s22` ENGINE = MyISAM), + PARTITION `p21` VALUES LESS THAN MAXVALUE + (SUBPARTITION `s31` ENGINE = MyISAM, + SUBPARTITION `s32` ENGINE = MyISAM)) +DROP TABLE t1, t2; diff --git a/mysql-test/main/partition_symlink.test b/mysql-test/main/partition_symlink.test index 8f6e837299a..7e09c7d0642 100644 --- a/mysql-test/main/partition_symlink.test +++ b/mysql-test/main/partition_symlink.test @@ -220,3 +220,58 @@ ENGINE = MyISAM partition by key (a) (partition p0, partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); + +--echo # +--echo # MDEV-25917 create table like fails if source table is partitioned and engine is myisam or aria with data directory. +--echo # +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t1 (a INT) +ENGINE = MyISAM +PARTITION BY LIST (a) +(PARTITION p0 VALUES IN (0) + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', + PARTITION p1 VALUES IN (1) + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', + PARTITION p2 VALUES IN (2)); + +CREATE TABLE t2 LIKE t1; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t1 ( + ID int(11) NOT NULL, + type int(11)) Engine=MyISAM +PARTITION BY RANGE(ID) +SUBPARTITION BY HASH(type) +( + PARTITION p01 VALUES LESS THAN(100) + (SUBPARTITION s11 + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', + SUBPARTITION s12 + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp' + ), + PARTITION p11 VALUES LESS THAN(200) + (SUBPARTITION s21, SUBPARTITION s22), + PARTITION p21 VALUES LESS THAN MAXVALUE + (SUBPARTITION s31 + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', + SUBPARTITION s32 + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp' + ) +); + +CREATE TABLE t2 LIKE t1; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; + +DROP TABLE t1, t2; diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result index 66a1e6e6c87..0caf16cbab8 100644 --- a/mysql-test/main/range_innodb.result +++ b/mysql-test/main/range_innodb.result @@ -110,6 +110,112 @@ SET @@GLOBAL.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; # End of 10.1 tests # +# MDEV-27262: Index intersection with full scan over an index +# +CREATE TABLE t1 ( +id int(10) unsigned NOT NULL AUTO_INCREMENT, +p char(32) DEFAULT NULL, +es tinyint(3) unsigned NOT NULL DEFAULT 0, +er tinyint(3) unsigned NOT NULL DEFAULT 0, +x mediumint(8) unsigned NOT NULL DEFAULT 0, +PRIMARY KEY (id), +INDEX es (es), +INDEX x (x), +INDEX er (er,x), +INDEX p (p) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1(es,er) select 0, 1 from seq_1_to_45; +insert into t1(es,er) select 0, 2 from seq_1_to_49; +insert into t1(es,er) select 0, 3 from seq_1_to_951; +insert into t1(es,er) select 0, 3 from seq_1_to_1054; +insert into t1(es,er) select 0, 6 from seq_1_to_25; +insert into t1(es,er) select 0, 11 from seq_1_to_1; +insert into t1(es,er) select 1, 1 from seq_1_to_45; +insert into t1(es,er) select 1, 2 from seq_1_to_16; +insert into t1(es,er) select 1, 3 from seq_1_to_511; +insert into t1(es,er) select 1, 4 from seq_1_to_687; +insert into t1(es,er) select 1, 6 from seq_1_to_50; +insert into t1(es,er) select 1, 7 from seq_1_to_4; +insert into t1(es,er) select 1, 11 from seq_1_to_1; +insert into t1(es,er) select 2, 1 from seq_1_to_82; +insert into t1(es,er) select 2, 2 from seq_1_to_82; +insert into t1(es,er) select 2, 3 from seq_1_to_1626; +insert into t1(es,er) select 2, 4 from seq_1_to_977; +insert into t1(es,er) select 2, 6 from seq_1_to_33; +insert into t1(es,er) select 2, 11 from seq_1_to_1; +insert into t1(es,er) select 3, 1 from seq_1_to_245; +insert into t1(es,er) select 3, 2 from seq_1_to_81; +insert into t1(es,er) select 3, 3 from seq_1_to_852; +insert into t1(es,er) select 3, 4 from seq_1_to_2243; +insert into t1(es,er) select 3, 6 from seq_1_to_44; +insert into t1(es,er) select 3, 11 from seq_1_to_1; +insert into t1(es,er) select 4, 1 from seq_1_to_91; +insert into t1(es,er) select 4, 2 from seq_1_to_83; +insert into t1(es,er) select 4, 3 from seq_1_to_297; +insert into t1(es,er) select 4, 4 from seq_1_to_2456; +insert into t1(es,er) select 4, 6 from seq_1_to_19; +insert into t1(es,er) select 4, 11 from seq_1_to_1; +update t1 set p='foobar'; +update t1 set x=0; +set @save_isp=@@innodb_stats_persistent; +set global innodb_stats_persistent= 1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +set optimizer_switch='index_merge_sort_intersection=on'; +SELECT * FROM t1 +WHERE ((p = 'foo' AND er != 4) OR er = 4 ) AND (es >= 4) LIMIT 2; +id p es er x +14645 foobar 4 4 0 +14646 foobar 4 4 0 +EXPLAIN EXTENDED SELECT * FROM t1 +WHERE ((p = 'foo' AND er != 4) OR er = 4 ) AND (es >= 4) LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range es,er,p es 1 NULL # 100.00 Using index condition; Using where +Warnings: +Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`p` AS `p`,`test`.`t1`.`es` AS `es`,`test`.`t1`.`er` AS `er`,`test`.`t1`.`x` AS `x` from `test`.`t1` where (`test`.`t1`.`p` = 'foo' and `test`.`t1`.`er` <> 4 or `test`.`t1`.`er` = 4) and `test`.`t1`.`es` >= 4 limit 2 +set optimizer_switch='index_merge_sort_intersection=off'; +SELECT * FROM t1 +WHERE ((p = 'foo' AND er != 4) OR er = 4 ) AND (es >= 4) LIMIT 2; +id p es er x +14645 foobar 4 4 0 +14646 foobar 4 4 0 +EXPLAIN EXTENDED SELECT * FROM t1 +WHERE ((p = 'foo' AND er != 4) OR er = 4 ) AND (es >= 4) LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range es,er,p es 1 NULL # 100.00 Using index condition; Using where +Warnings: +Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`p` AS `p`,`test`.`t1`.`es` AS `es`,`test`.`t1`.`er` AS `er`,`test`.`t1`.`x` AS `x` from `test`.`t1` where (`test`.`t1`.`p` = 'foo' and `test`.`t1`.`er` <> 4 or `test`.`t1`.`er` = 4) and `test`.`t1`.`es` >= 4 limit 2 +set optimizer_switch='index_merge_sort_intersection=on'; +SELECT * FROM t1 +WHERE ((p = 'foo' AND er < 6) OR er >=2 ) AND (es >= 4) LIMIT 2; +id p es er x +14007 foobar 4 2 0 +14008 foobar 4 2 0 +EXPLAIN EXTENDED SELECT * FROM t1 +WHERE ((p = 'foo' AND er < 6) OR er >=2 ) AND (es >= 4) LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range es,er,p es 1 NULL # 100.00 Using index condition; Using where +Warnings: +Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`p` AS `p`,`test`.`t1`.`es` AS `es`,`test`.`t1`.`er` AS `er`,`test`.`t1`.`x` AS `x` from `test`.`t1` where (`test`.`t1`.`p` = 'foo' and `test`.`t1`.`er` < 6 or `test`.`t1`.`er` >= 2) and `test`.`t1`.`es` >= 4 limit 2 +set optimizer_switch='index_merge_sort_intersection=off'; +SELECT * FROM t1 +WHERE ((p = 'foo' AND er < 6) OR er >=2 ) AND (es >= 4) LIMIT 2; +id p es er x +14007 foobar 4 2 0 +14008 foobar 4 2 0 +EXPLAIN EXTENDED SELECT * FROM t1 +WHERE ((p = 'foo' AND er < 6) OR er >=2 ) AND (es >= 4) LIMIT 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range es,er,p es 1 NULL # 100.00 Using index condition; Using where +Warnings: +Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`p` AS `p`,`test`.`t1`.`es` AS `es`,`test`.`t1`.`er` AS `er`,`test`.`t1`.`x` AS `x` from `test`.`t1` where (`test`.`t1`.`p` = 'foo' and `test`.`t1`.`er` < 6 or `test`.`t1`.`er` >= 2) and `test`.`t1`.`es` >= 4 limit 2 +set optimizer_switch='index_merge_sort_intersection=default'; +set global innodb_stats_persistent= @save_isp; +DROP TABLE t1; +# End of 10.2 tests +# # MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, # [Warning] InnoDB: Using a partial-field key prefix in search # diff --git a/mysql-test/main/range_innodb.test b/mysql-test/main/range_innodb.test index f79104fde85..8b9771d1d1e 100644 --- a/mysql-test/main/range_innodb.test +++ b/mysql-test/main/range_innodb.test @@ -118,6 +118,99 @@ set @@optimizer_switch= @optimizer_switch_save; --echo # End of 10.1 tests --echo # +--echo # MDEV-27262: Index intersection with full scan over an index +--echo # + +--source include/have_sequence.inc + +CREATE TABLE t1 ( + id int(10) unsigned NOT NULL AUTO_INCREMENT, + p char(32) DEFAULT NULL, + es tinyint(3) unsigned NOT NULL DEFAULT 0, + er tinyint(3) unsigned NOT NULL DEFAULT 0, + x mediumint(8) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (id), + INDEX es (es), + INDEX x (x), + INDEX er (er,x), + INDEX p (p) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1(es,er) select 0, 1 from seq_1_to_45; +insert into t1(es,er) select 0, 2 from seq_1_to_49; +insert into t1(es,er) select 0, 3 from seq_1_to_951; +insert into t1(es,er) select 0, 3 from seq_1_to_1054; +insert into t1(es,er) select 0, 6 from seq_1_to_25; +insert into t1(es,er) select 0, 11 from seq_1_to_1; +insert into t1(es,er) select 1, 1 from seq_1_to_45; +insert into t1(es,er) select 1, 2 from seq_1_to_16; +insert into t1(es,er) select 1, 3 from seq_1_to_511; +insert into t1(es,er) select 1, 4 from seq_1_to_687; +insert into t1(es,er) select 1, 6 from seq_1_to_50; +insert into t1(es,er) select 1, 7 from seq_1_to_4; +insert into t1(es,er) select 1, 11 from seq_1_to_1; +insert into t1(es,er) select 2, 1 from seq_1_to_82; +insert into t1(es,er) select 2, 2 from seq_1_to_82; +insert into t1(es,er) select 2, 3 from seq_1_to_1626; +insert into t1(es,er) select 2, 4 from seq_1_to_977; +insert into t1(es,er) select 2, 6 from seq_1_to_33; +insert into t1(es,er) select 2, 11 from seq_1_to_1; +insert into t1(es,er) select 3, 1 from seq_1_to_245; +insert into t1(es,er) select 3, 2 from seq_1_to_81; +insert into t1(es,er) select 3, 3 from seq_1_to_852; +insert into t1(es,er) select 3, 4 from seq_1_to_2243; +insert into t1(es,er) select 3, 6 from seq_1_to_44; +insert into t1(es,er) select 3, 11 from seq_1_to_1; +insert into t1(es,er) select 4, 1 from seq_1_to_91; +insert into t1(es,er) select 4, 2 from seq_1_to_83; +insert into t1(es,er) select 4, 3 from seq_1_to_297; +insert into t1(es,er) select 4, 4 from seq_1_to_2456; +insert into t1(es,er) select 4, 6 from seq_1_to_19; +insert into t1(es,er) select 4, 11 from seq_1_to_1; +update t1 set p='foobar'; +update t1 set x=0; +set @save_isp=@@innodb_stats_persistent; +set global innodb_stats_persistent= 1; +analyze table t1; + +let $q= +SELECT * FROM t1 + WHERE ((p = 'foo' AND er != 4) OR er = 4 ) AND (es >= 4) LIMIT 2; + +set optimizer_switch='index_merge_sort_intersection=on'; +eval $q; +--replace_column 9 # +eval EXPLAIN EXTENDED $q; + +set optimizer_switch='index_merge_sort_intersection=off'; +# execution of $q and explain for it led to an assertion failure in 10.4 +# (with the optimizer switch rowid_filter set to 'on') +eval $q; +--replace_column 9 # +eval EXPLAIN EXTENDED $q; + +let $q= +SELECT * FROM t1 + WHERE ((p = 'foo' AND er < 6) OR er >=2 ) AND (es >= 4) LIMIT 2; + +set optimizer_switch='index_merge_sort_intersection=on'; +eval $q; +--replace_column 9 # +eval EXPLAIN EXTENDED $q; + +set optimizer_switch='index_merge_sort_intersection=off'; +eval $q; +--replace_column 9 # +eval EXPLAIN EXTENDED $q; + +set optimizer_switch='index_merge_sort_intersection=default'; + +set global innodb_stats_persistent= @save_isp; +DROP TABLE t1; + +--echo # End of 10.2 tests + +--echo # --echo # MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase, --echo # [Warning] InnoDB: Using a partial-field key prefix in search --echo # diff --git a/mysql-test/main/range_vs_index_merge.result b/mysql-test/main/range_vs_index_merge.result index 286338d0433..b4e59f474d4 100644 --- a/mysql-test/main/range_vs_index_merge.result +++ b/mysql-test/main/range_vs_index_merge.result @@ -1812,7 +1812,7 @@ EXPLAIN SELECT * FROM t1 WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY,idx PRIMARY 0 NULL 2 Using index condition; Using where +1 SIMPLE t1 ALL PRIMARY,idx NULL NULL NULL 2 Using where SELECT * FROM t1 WHERE a BETWEEN 4 AND 5 AND b IN (255,4) OR a IN (2,14,25) OR (a<2 or a>2); a b diff --git a/mysql-test/main/show.result b/mysql-test/main/show.result index d1b373d8969..4a9e2738346 100644 --- a/mysql-test/main/show.result +++ b/mysql-test/main/show.result @@ -40,5 +40,16 @@ nm varchar(32) YES NULL a int(11) YES NULL drop table t1; # +# MDEV-4621 select returns null for information_schema.statistics.collation field +# +create table t1 (f varchar(64), key(f)); +select index_name, column_name, collation, cardinality from information_schema.STATISTICS where table_schema='test' and table_name='t1'; +index_name column_name collation cardinality +f f A NULL +select index_name, column_name, collation from information_schema.STATISTICS where table_schema='test' and table_name='t1'; +index_name column_name collation +f f A +drop table t1; +# # End of 10.2 tests # diff --git a/mysql-test/main/show.test b/mysql-test/main/show.test index f2f6efc4e45..9b0b58349d5 100644 --- a/mysql-test/main/show.test +++ b/mysql-test/main/show.test @@ -35,5 +35,13 @@ show fields from test.t1 where field in drop table t1; --echo # +--echo # MDEV-4621 select returns null for information_schema.statistics.collation field +--echo # +create table t1 (f varchar(64), key(f)); +select index_name, column_name, collation, cardinality from information_schema.STATISTICS where table_schema='test' and table_name='t1'; +select index_name, column_name, collation from information_schema.STATISTICS where table_schema='test' and table_name='t1'; +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result index d031c792922..06277f5fe93 100644 --- a/mysql-test/main/show_check.result +++ b/mysql-test/main/show_check.result @@ -63,19 +63,19 @@ Table Op Msg_type Msg_text test.t1 check status OK show index from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 64 2 N 1 0 8 -def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63 -def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 8 -def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63 -def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 64 1 N 1 0 8 -def information_schema STATISTICS STATISTICS COLLATION Collation 253 1 1 Y 0 0 8 -def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63 -def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 0 Y 32768 0 63 -def information_schema STATISTICS STATISTICS PACKED Packed 253 10 0 Y 0 0 8 -def information_schema STATISTICS STATISTICS NULLABLE Null 253 3 0 N 1 0 8 -def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 8 -def information_schema STATISTICS STATISTICS COMMENT Comment 253 16 0 Y 0 0 8 -def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_comment 253 1024 0 N 1 0 8 +def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 64 2 N 4097 0 8 +def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 36865 0 63 +def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 64 7 N 4097 0 8 +def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 36865 0 63 +def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 64 1 N 4097 0 8 +def information_schema STATISTICS STATISTICS COLLATION Collation 253 1 1 Y 4096 0 8 +def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 36864 0 63 +def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 0 Y 36864 0 63 +def information_schema STATISTICS STATISTICS PACKED Packed 253 10 0 Y 4096 0 8 +def information_schema STATISTICS STATISTICS NULLABLE Null 253 3 0 N 4097 0 8 +def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 16 5 N 4097 0 8 +def information_schema STATISTICS STATISTICS COMMENT Comment 253 16 0 Y 4096 0 8 +def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_comment 253 1024 0 N 4097 0 8 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 0 PRIMARY 1 a A 5 NULL NULL BTREE t1 1 b 1 b A 1 NULL NULL BTREE @@ -102,47 +102,47 @@ drop table t1; -- after Bug#29394 is implemented. show variables like "wait_timeout%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 1 0 8 -def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_VALUE Value 253 2048 5 N 1 0 8 +def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 4097 0 8 +def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_VALUE Value 253 2048 5 N 4097 0 8 Variable_name Value wait_timeout 28800 show variables like "WAIT_timeout%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 1 0 8 -def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_VALUE Value 253 2048 5 N 1 0 8 +def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 4097 0 8 +def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_VALUE Value 253 2048 5 N 4097 0 8 Variable_name Value wait_timeout 28800 show variables like "this_doesn't_exists%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_NAME Variable_name 253 64 0 N 1 0 8 -def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_VALUE Value 253 2048 0 N 1 0 8 +def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_NAME Variable_name 253 64 0 N 4097 0 8 +def information_schema SESSION_VARIABLES SESSION_VARIABLES VARIABLE_VALUE Value 253 2048 0 N 4097 0 8 Variable_name Value show table status from test like "this_doesn't_exists%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 1 0 8 -def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 0 0 8 -def information_schema TABLES TABLES VERSION Version 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES ROW_FORMAT Row_format 253 10 0 Y 0 0 8 -def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES MAX_DATA_LENGTH Max_data_length 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES INDEX_LENGTH Index_length 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES DATA_FREE Data_free 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES AUTO_INCREMENT Auto_increment 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES CREATE_TIME Create_time 12 19 0 Y 128 0 63 -def information_schema TABLES TABLES UPDATE_TIME Update_time 12 19 0 Y 128 0 63 -def information_schema TABLES TABLES CHECK_TIME Check_time 12 19 0 Y 128 0 63 -def information_schema TABLES TABLES TABLE_COLLATION Collation 253 32 0 Y 0 0 8 -def information_schema TABLES TABLES CHECKSUM Checksum 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES CREATE_OPTIONS Create_options 253 2048 0 Y 0 0 8 -def information_schema TABLES TABLES TABLE_COMMENT Comment 253 2048 0 N 1 0 8 -def information_schema TABLES TABLES MAX_INDEX_LENGTH Max_index_length 8 21 0 Y 32800 0 63 -def information_schema TABLES TABLES TEMPORARY Temporary 253 1 0 Y 0 0 8 +def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 4097 0 8 +def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 4096 0 8 +def information_schema TABLES TABLES VERSION Version 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES ROW_FORMAT Row_format 253 10 0 Y 4096 0 8 +def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES MAX_DATA_LENGTH Max_data_length 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES INDEX_LENGTH Index_length 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES DATA_FREE Data_free 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES AUTO_INCREMENT Auto_increment 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES CREATE_TIME Create_time 12 19 0 Y 4224 0 63 +def information_schema TABLES TABLES UPDATE_TIME Update_time 12 19 0 Y 4224 0 63 +def information_schema TABLES TABLES CHECK_TIME Check_time 12 19 0 Y 4224 0 63 +def information_schema TABLES TABLES TABLE_COLLATION Collation 253 32 0 Y 4096 0 8 +def information_schema TABLES TABLES CHECKSUM Checksum 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES CREATE_OPTIONS Create_options 253 2048 0 Y 4096 0 8 +def information_schema TABLES TABLES TABLE_COMMENT Comment 253 2048 0 N 4097 0 8 +def information_schema TABLES TABLES MAX_INDEX_LENGTH Max_index_length 8 21 0 Y 36896 0 63 +def information_schema TABLES TABLES TEMPORARY Temporary 253 1 0 Y 4096 0 8 Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary show databases; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database 253 64 18 N 1 0 8 +def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database 253 64 18 N 4097 0 8 Database information_schema mtr @@ -151,7 +151,7 @@ performance_schema test show databases like "test%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database (test%) 253 64 4 N 1 0 8 +def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database (test%) 253 64 4 N 4097 0 8 Database (test%) test create table t1 (f1 int not null, f2 int not null, f3 int not null, f4 int not null, primary key(f1,f2,f3,f4)); @@ -647,19 +647,19 @@ PRIMARY KEY(field1(1000)) ); show index from t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 64 2 N 1 0 63 -def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63 -def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 63 -def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63 -def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 64 6 N 1 0 63 -def information_schema STATISTICS STATISTICS COLLATION Collation 253 1 1 Y 0 0 63 -def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63 -def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 4 Y 32768 0 63 -def information_schema STATISTICS STATISTICS PACKED Packed 253 10 0 Y 0 0 63 -def information_schema STATISTICS STATISTICS NULLABLE Null 253 3 0 N 1 0 63 -def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 63 -def information_schema STATISTICS STATISTICS COMMENT Comment 253 16 0 Y 0 0 63 -def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_comment 253 1024 0 N 1 0 63 +def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 64 2 N 4097 0 63 +def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 36865 0 63 +def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 64 7 N 4097 0 63 +def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 36865 0 63 +def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 64 6 N 4097 0 63 +def information_schema STATISTICS STATISTICS COLLATION Collation 253 1 1 Y 4096 0 63 +def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 36864 0 63 +def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 4 Y 36864 0 63 +def information_schema STATISTICS STATISTICS PACKED Packed 253 10 0 Y 4096 0 63 +def information_schema STATISTICS STATISTICS NULLABLE Null 253 3 0 N 4097 0 63 +def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 16 5 N 4097 0 63 +def information_schema STATISTICS STATISTICS COMMENT Comment 253 16 0 Y 4096 0 63 +def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_comment 253 1024 0 N 4097 0 63 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 0 PRIMARY 1 field1 A 0 1000 NULL BTREE drop table t1; @@ -874,21 +874,21 @@ set names utf8; ---------------------------------------------------------------- SHOW CHARACTER SET LIKE 'utf8'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema CHARACTER_SETS CHARACTER_SETS CHARACTER_SET_NAME Charset 253 96 4 N 1 0 33 -def information_schema CHARACTER_SETS CHARACTER_SETS DESCRIPTION Description 253 180 13 N 1 0 33 -def information_schema CHARACTER_SETS CHARACTER_SETS DEFAULT_COLLATE_NAME Default collation 253 96 15 N 1 0 33 -def information_schema CHARACTER_SETS CHARACTER_SETS MAXLEN Maxlen 8 3 1 N 32769 0 63 +def information_schema CHARACTER_SETS CHARACTER_SETS CHARACTER_SET_NAME Charset 253 96 4 N 4097 0 33 +def information_schema CHARACTER_SETS CHARACTER_SETS DESCRIPTION Description 253 180 13 N 4097 0 33 +def information_schema CHARACTER_SETS CHARACTER_SETS DEFAULT_COLLATE_NAME Default collation 253 96 15 N 4097 0 33 +def information_schema CHARACTER_SETS CHARACTER_SETS MAXLEN Maxlen 8 3 1 N 36865 0 63 Charset Description Default collation Maxlen utf8 UTF-8 Unicode utf8_general_ci 3 ---------------------------------------------------------------- SHOW COLLATION LIKE 'latin1_bin'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema COLLATIONS COLLATIONS COLLATION_NAME Collation 253 96 10 N 1 0 33 -def information_schema COLLATIONS COLLATIONS CHARACTER_SET_NAME Charset 253 96 6 N 1 0 33 -def information_schema COLLATIONS COLLATIONS ID Id 8 11 2 N 32769 0 63 -def information_schema COLLATIONS COLLATIONS IS_DEFAULT Default 253 9 0 N 1 0 33 -def information_schema COLLATIONS COLLATIONS IS_COMPILED Compiled 253 9 3 N 1 0 33 -def information_schema COLLATIONS COLLATIONS SORTLEN Sortlen 8 3 1 N 32769 0 63 +def information_schema COLLATIONS COLLATIONS COLLATION_NAME Collation 253 96 10 N 4097 0 33 +def information_schema COLLATIONS COLLATIONS CHARACTER_SET_NAME Charset 253 96 6 N 4097 0 33 +def information_schema COLLATIONS COLLATIONS ID Id 8 11 2 N 36865 0 63 +def information_schema COLLATIONS COLLATIONS IS_DEFAULT Default 253 9 0 N 4097 0 33 +def information_schema COLLATIONS COLLATIONS IS_COMPILED Compiled 253 9 3 N 4097 0 33 +def information_schema COLLATIONS COLLATIONS SORTLEN Sortlen 8 3 1 N 36865 0 63 Collation Charset Id Default Compiled Sortlen latin1_bin latin1 47 Yes 1 ---------------------------------------------------------------- @@ -901,7 +901,7 @@ mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */ ---------------------------------------------------------------- SHOW DATABASES LIKE 'mysqltest1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database (mysqltest1) 253 192 10 N 1 0 33 +def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database (mysqltest1) 253 192 10 N 4097 0 33 Database (mysqltest1) mysqltest1 ---------------------------------------------------------------- @@ -917,19 +917,19 @@ t1 CREATE TABLE `t1` ( ---------------------------------------------------------------- SHOW INDEX FROM t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 192 2 N 1 0 33 -def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63 -def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 192 7 N 1 0 33 -def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63 -def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 192 1 N 1 0 33 -def information_schema STATISTICS STATISTICS COLLATION Collation 253 3 1 Y 0 0 33 -def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63 -def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 0 Y 32768 0 63 -def information_schema STATISTICS STATISTICS PACKED Packed 253 30 0 Y 0 0 33 -def information_schema STATISTICS STATISTICS NULLABLE Null 253 9 0 N 1 0 33 -def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 48 5 N 1 0 33 -def information_schema STATISTICS STATISTICS COMMENT Comment 253 48 0 Y 0 0 33 -def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_comment 253 3072 0 N 1 0 33 +def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 192 2 N 4097 0 33 +def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 36865 0 63 +def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 192 7 N 4097 0 33 +def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 36865 0 63 +def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 192 1 N 4097 0 33 +def information_schema STATISTICS STATISTICS COLLATION Collation 253 3 1 Y 4096 0 33 +def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 36864 0 63 +def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 0 Y 36864 0 63 +def information_schema STATISTICS STATISTICS PACKED Packed 253 30 0 Y 4096 0 33 +def information_schema STATISTICS STATISTICS NULLABLE Null 253 9 0 N 4097 0 33 +def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 48 5 N 4097 0 33 +def information_schema STATISTICS STATISTICS COMMENT Comment 253 48 0 Y 4096 0 33 +def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_comment 253 3072 0 N 4097 0 33 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment t1 0 PRIMARY 1 c A 0 NULL NULL BTREE ---------------------------------------------------------------- @@ -946,15 +946,15 @@ TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema TABLES TABLES TABLE_CATALOG TABLE_CATALOG 253 1536 3 N 1 0 33 -def information_schema TABLES TABLES TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33 -def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 -def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33 -def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33 -def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 0 0 33 -def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 0 0 33 -def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 6144 0 Y 0 0 33 -def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 1 0 33 +def information_schema TABLES TABLES TABLE_CATALOG TABLE_CATALOG 253 1536 3 N 4097 0 33 +def information_schema TABLES TABLES TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 4097 0 33 +def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 4097 0 33 +def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 4097 0 33 +def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 4096 0 33 +def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 4096 0 33 +def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 96 17 Y 4096 0 33 +def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 6144 0 Y 4096 0 33 +def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 6144 0 N 4097 0 33 TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_COLLATION CREATE_OPTIONS TABLE_COMMENT def test t1 BASE TABLE MyISAM Fixed latin1_swedish_ci ---------------------------------------------------------------- @@ -976,53 +976,53 @@ COLUMN_COMMENT FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 't1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N 1 0 33 -def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33 -def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589788 0 Y 16 0 33 -def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33 -def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33 -def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 96 0 Y 0 0 33 -def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 96 0 Y 0 0 33 -def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33 -def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33 -def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 90 0 N 1 0 33 -def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 3072 0 N 1 0 33 +def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N 4097 0 33 +def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 4097 0 33 +def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 4097 0 33 +def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 4097 0 33 +def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589788 0 Y 4112 0 33 +def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 4097 0 33 +def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 4097 0 33 +def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 96 0 Y 4096 0 33 +def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 96 0 Y 4096 0 33 +def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 4113 0 33 +def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 4097 0 33 +def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 90 0 N 4097 0 33 +def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 4097 0 33 +def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 3072 0 N 4097 0 33 TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT def test t1 c NULL NO int NULL NULL int(11) PRI select,insert,update,references ---------------------------------------------------------------- SHOW TABLES LIKE 't1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema TABLE_NAMES TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 219 2 N 1 0 33 +def information_schema TABLE_NAMES TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 219 2 N 4097 0 33 Tables_in_test (t1) t1 ---------------------------------------------------------------- SHOW COLUMNS FROM t1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33 -def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33 -def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 16 0 33 -def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 1 0 33 +def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 4097 0 33 +def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 4113 0 33 +def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 4097 0 33 +def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 4097 0 33 +def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 4112 0 33 +def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 4097 0 33 Field Type Null Key Default Extra c int(11) NO PRI NULL ---------------------------------------------------------------- SHOW TRIGGERS LIKE 't1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema TRIGGERS TRIGGERS TRIGGER_NAME Trigger 253 192 5 N 1 0 33 -def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION Event 253 18 6 N 1 0 33 -def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 1 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 17 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33 -def information_schema TRIGGERS TRIGGERS CREATED Created 12 22 22 Y 128 2 63 -def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 89 N 1 0 33 -def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 567 14 N 1 0 33 -def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 96 6 N 1 0 33 -def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 96 6 N 1 0 33 -def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 96 17 N 1 0 33 +def information_schema TRIGGERS TRIGGERS TRIGGER_NAME Trigger 253 192 5 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION Event 253 18 6 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 4113 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS CREATED Created 12 22 22 Y 4224 2 63 +def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 89 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 567 14 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 96 6 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 96 6 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 96 17 N 4097 0 33 Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation t1_bi INSERT t1 SET @a = 1 BEFORE # STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost binary binary latin1_swedish_ci ---------------------------------------------------------------- @@ -1047,28 +1047,28 @@ DEFINER FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name = 't1_bi'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema TRIGGERS TRIGGERS TRIGGER_CATALOG TRIGGER_CATALOG 253 1536 3 N 1 0 33 -def information_schema TRIGGERS TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 192 4 N 1 0 33 -def information_schema TRIGGERS TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 192 5 N 1 0 33 -def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 18 6 N 1 0 33 -def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 1536 3 N 1 0 33 -def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 192 4 N 1 0 33 -def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 192 2 N 1 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 589815 0 Y 16 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 589815 10 N 17 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 27 3 N 1 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_TIMING ACTION_TIMING 253 18 6 N 1 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 192 0 Y 0 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 0 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33 -def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33 -def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 -def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema TRIGGERS TRIGGERS TRIGGER_CATALOG TRIGGER_CATALOG 253 1536 3 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 192 4 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 192 5 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 18 6 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 1536 3 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 192 4 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 192 2 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 589815 0 Y 4112 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 589815 10 N 4113 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 27 3 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_TIMING ACTION_TIMING 253 18 6 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 192 0 Y 4096 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 4096 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 89 N 4097 0 33 +def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 567 14 N 4097 0 33 TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost SELECT CREATED FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name='t1_bi'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema TRIGGERS TRIGGERS CREATED CREATED 12 22 22 Y 128 2 63 +def information_schema TRIGGERS TRIGGERS CREATED CREATED 12 22 22 Y 4224 2 63 CREATED # ---------------------------------------------------------------- @@ -1085,17 +1085,17 @@ SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema VIEWS VIEWS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N 1 0 33 -def information_schema VIEWS VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33 -def information_schema VIEWS VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 -def information_schema VIEWS VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 15 N 17 0 33 -def information_schema VIEWS VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33 -def information_schema VIEWS VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33 -def information_schema VIEWS VIEWS DEFINER DEFINER 253 567 14 N 1 0 33 -def information_schema VIEWS VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 -def information_schema VIEWS VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 96 6 N 1 0 33 -def information_schema VIEWS VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 96 6 N 1 0 33 -def information_schema VIEWS VIEWS ALGORITHM ALGORITHM 253 30 9 N 1 0 33 +def information_schema VIEWS VIEWS TABLE_CATALOG TABLE_CATALOG 253 1536 3 N 4097 0 33 +def information_schema VIEWS VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 4097 0 33 +def information_schema VIEWS VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 4097 0 33 +def information_schema VIEWS VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 15 N 4113 0 33 +def information_schema VIEWS VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 4097 0 33 +def information_schema VIEWS VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 4097 0 33 +def information_schema VIEWS VIEWS DEFINER DEFINER 253 567 14 N 4097 0 33 +def information_schema VIEWS VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 4097 0 33 +def information_schema VIEWS VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 96 6 N 4097 0 33 +def information_schema VIEWS VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 96 6 N 4097 0 33 +def information_schema VIEWS VIEWS ALGORITHM ALGORITHM 253 30 9 N 4097 0 33 TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM def test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary UNDEFINED ---------------------------------------------------------------- @@ -1133,24 +1133,24 @@ DEFINER FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'p1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 3 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 39 9 N 1 0 33 -def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 589815 0 Y 16 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33 -def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33 -def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33 -def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33 -def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33 -def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33 -def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 3 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 39 9 N 4097 0 33 +def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 589815 0 Y 4112 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 4112 0 33 +def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 4096 0 33 +def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 4096 0 33 +def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 4097 0 33 +def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 4097 0 33 +def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 4097 0 33 +def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 4096 0 33 +def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 4097 0 33 +def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 4113 0 33 +def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 4097 0 33 SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost ---------------------------------------------------------------- @@ -1188,24 +1188,24 @@ DEFINER FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name = 'f1'; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 3 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 39 8 N 1 0 33 -def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 589815 7 Y 16 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33 -def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33 -def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33 -def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33 -def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33 -def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 -def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 1 0 33 -def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33 -def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33 +def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 3 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 39 8 N 4097 0 33 +def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 589815 7 Y 4112 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 4112 0 33 +def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 4096 0 33 +def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 4096 0 33 +def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 4097 0 33 +def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 4097 0 33 +def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 4097 0 33 +def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 4096 0 33 +def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 4097 0 33 +def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 89 N 4097 0 33 +def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 4113 0 33 +def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 4097 0 33 SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost ---------------------------------------------------------------- diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result index 35ec5fc628f..7dfaa6176a3 100644 --- a/mysql-test/main/sp.result +++ b/mysql-test/main/sp.result @@ -8483,6 +8483,34 @@ b-c 0 drop procedure p1| drop function f1| +# +# MDEV-24827: MariaDB 10.5.5 crash (sig 11) during a SELECT +# +CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT); +CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT, KEY idx_c2(c2)); +INSERT INTO t1 (c1, c2) SELECT seq, seq FROM seq_1_to_10000; +INSERT INTO t2 (c1, c2) SELECT seq, seq FROM seq_1_to_20000; +CREATE OR REPLACE PROCEDURE p1() +begin +DECLARE done INT DEFAULT FALSE; +DECLARE a INT; +DECLARE cur1 CURSOR FOR +SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 +WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1; +DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; +OPEN cur1; +read_loop: LOOP +FETCH cur1 INTO a; +IF done THEN +LEAVE read_loop; +END IF; +END LOOP; +CLOSE cur1; +END $ +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; +DROP TABLE t2; #End of 10.2 tests # # MDEV-12007 Allow ROW variables as a cursor FETCH target diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index 681ffa3fb33..bd614072e1a 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -1,4 +1,6 @@ --source include/have_partition.inc +--source include/have_sequence.inc + # # Basic stored PROCEDURE tests # @@ -10032,6 +10034,46 @@ drop procedure p1| drop function f1| delimiter ;| +--echo # +--echo # MDEV-24827: MariaDB 10.5.5 crash (sig 11) during a SELECT +--echo # + +CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT); +CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT, KEY idx_c2(c2)); + +INSERT INTO t1 (c1, c2) SELECT seq, seq FROM seq_1_to_10000; +INSERT INTO t2 (c1, c2) SELECT seq, seq FROM seq_1_to_20000; + +--delimiter $ + +CREATE OR REPLACE PROCEDURE p1() +begin + DECLARE done INT DEFAULT FALSE; + DECLARE a INT; + + DECLARE cur1 CURSOR FOR + SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 + WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1; + + DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; + + OPEN cur1; + read_loop: LOOP + FETCH cur1 INTO a; + IF done THEN + LEAVE read_loop; + END IF; + END LOOP; + CLOSE cur1; +END $ + +--delimiter ; + +CALL p1(); + +DROP PROCEDURE p1; +DROP TABLE t1; +DROP TABLE t2; --echo #End of 10.2 tests diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result index f3519e1d846..3af248e7ab2 100644 --- a/mysql-test/main/subselect_sj.result +++ b/mysql-test/main/subselect_sj.result @@ -3318,4 +3318,22 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 2 MATERIALIZED t4 ALL NULL NULL NULL NULL 500 drop table t1, t2, t3, t4; +# +# MDEV-20770: Server crashes in JOIN::transform_in_predicates_into_in_subq +# upon 2nd execution of PS/SP comparing GEOMETRY with other types +# +CREATE TABLE t1 (a GEOMETRY); +CREATE TABLE t2 (b INT); +INSERT INTO t1 VALUES (GeomFromText('POINT(0 0)')),(GeomFromText('POINT(1 1)')); +INSERT INTO t2 VALUES (1),(2); +PREPARE stmt FROM "SELECT * from t1 WHERE a IN (SELECT b FROM t2)"; +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +DROP TABLE t1, t2; set optimizer_switch=@subselect_sj_tmp; diff --git a/mysql-test/main/subselect_sj.test b/mysql-test/main/subselect_sj.test index c5c3354bc32..324f2828de2 100644 --- a/mysql-test/main/subselect_sj.test +++ b/mysql-test/main/subselect_sj.test @@ -2995,5 +2995,28 @@ explain select * from t3 where a in (select a from t4); drop table t1, t2, t3, t4; +--echo # +--echo # MDEV-20770: Server crashes in JOIN::transform_in_predicates_into_in_subq +--echo # upon 2nd execution of PS/SP comparing GEOMETRY with other types +--echo # + +CREATE TABLE t1 (a GEOMETRY); +CREATE TABLE t2 (b INT); + +INSERT INTO t1 VALUES (GeomFromText('POINT(0 0)')),(GeomFromText('POINT(1 1)')); +INSERT INTO t2 VALUES (1),(2); + +PREPARE stmt FROM "SELECT * from t1 WHERE a IN (SELECT b FROM t2)"; +--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION +EXECUTE stmt; +--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION +EXECUTE stmt; +--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION +EXECUTE stmt; +--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION +EXECUTE stmt; + +DROP TABLE t1, t2; + # The following command must be the last one the file set optimizer_switch=@subselect_sj_tmp; diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result index 02e9a833db6..645c123cfcd 100644 --- a/mysql-test/main/subselect_sj_jcl6.result +++ b/mysql-test/main/subselect_sj_jcl6.result @@ -3329,6 +3329,24 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 2 MATERIALIZED t4 ALL NULL NULL NULL NULL 500 drop table t1, t2, t3, t4; +# +# MDEV-20770: Server crashes in JOIN::transform_in_predicates_into_in_subq +# upon 2nd execution of PS/SP comparing GEOMETRY with other types +# +CREATE TABLE t1 (a GEOMETRY); +CREATE TABLE t2 (b INT); +INSERT INTO t1 VALUES (GeomFromText('POINT(0 0)')),(GeomFromText('POINT(1 1)')); +INSERT INTO t2 VALUES (1),(2); +PREPARE stmt FROM "SELECT * from t1 WHERE a IN (SELECT b FROM t2)"; +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +EXECUTE stmt; +ERROR HY000: Illegal parameter data types geometry and int for operation '=' +DROP TABLE t1, t2; set optimizer_switch=@subselect_sj_tmp; # # BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result index 339394a29c2..756fd8591dd 100644 --- a/mysql-test/main/trigger.result +++ b/mysql-test/main/trigger.result @@ -2428,6 +2428,13 @@ CREATE TRIGGER t1_trigger BEFORE INSERT ON t1 FOR EACH ROW BEGIN END; INSERT INTO t1 () VALUES (); DROP TABLE t1; # +# Bug#33141958 - THE FIRST ASAN UAF ISSUE OF MYSQL SERVER +# +create table t1 (a int); +create trigger tr1 after insert on t1 for each row alter table t1 tablespace s2; +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger +drop table t1; +# # End of 10.2 tests # # diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test index 581015a45e6..56e9246b95c 100644 --- a/mysql-test/main/trigger.test +++ b/mysql-test/main/trigger.test @@ -2757,6 +2757,14 @@ INSERT INTO t1 () VALUES (); DROP TABLE t1; --echo # +--echo # Bug#33141958 - THE FIRST ASAN UAF ISSUE OF MYSQL SERVER +--echo # +create table t1 (a int); +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create trigger tr1 after insert on t1 for each row alter table t1 tablespace s2; +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result index c8277ab832f..d17b94bbb4f 100644 --- a/mysql-test/main/type_enum.result +++ b/mysql-test/main/type_enum.result @@ -2225,6 +2225,27 @@ a DROP TABLE t1; # +# MDEV-26129 Bad results with join comparing case insensitive VARCHAR/ENUM/SET expression to a _bin ENUM column +# +CREATE TABLE t1 (a ENUM('a') CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (a ENUM('a','A','b','B','c','C','d','D','e','E') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +INSERT INTO t2 VALUES ('b'),('B'),('c'),('C'),('d'),('D'),('e'),('E'); +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.a res FROM t1 JOIN t2 ON t1.a COLLATE latin1_swedish_ci=t2.a; +res +a +a +SELECT t1.a res FROM t1 LEFT JOIN t2 ON t1.a COLLATE latin1_swedish_ci=t2.a; +res +a +a +DROP TABLE IF EXISTS t1,t2; +# +# End of 10.2. tests +# +# # Start of 10.3 tests # # diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test index a36d63f8725..6ff3e257feb 100644 --- a/mysql-test/main/type_enum.test +++ b/mysql-test/main/type_enum.test @@ -458,6 +458,26 @@ SELECT * FROM t1; DROP TABLE t1; --echo # +--echo # MDEV-26129 Bad results with join comparing case insensitive VARCHAR/ENUM/SET expression to a _bin ENUM column +--echo # + +CREATE TABLE t1 (a ENUM('a') CHARACTER SET latin1 PRIMARY KEY); +INSERT INTO t1 VALUES ('a'); +CREATE TABLE t2 (a ENUM('a','A','b','B','c','C','d','D','e','E') CHARACTER SET latin1 COLLATE latin1_bin); +INSERT INTO t2 VALUES ('a'),('A'); +# without the following insert the bug doesn't show, was fixed in MDEV-6978 +INSERT INTO t2 VALUES ('b'),('B'),('c'),('C'),('d'),('D'),('e'),('E'); +ALTER TABLE t2 ADD PRIMARY KEY(a); +SELECT t1.a res FROM t1 JOIN t2 ON t1.a COLLATE latin1_swedish_ci=t2.a; +SELECT t1.a res FROM t1 LEFT JOIN t2 ON t1.a COLLATE latin1_swedish_ci=t2.a; +DROP TABLE IF EXISTS t1,t2; + + +--echo # +--echo # End of 10.2. tests +--echo # + +--echo # --echo # Start of 10.3 tests --echo # diff --git a/mysql-test/main/userstat.result b/mysql-test/main/userstat.result index 9152f602304..5315317e33a 100644 --- a/mysql-test/main/userstat.result +++ b/mysql-test/main/userstat.result @@ -3,71 +3,71 @@ Warnings: Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead show columns from information_schema.client_statistics; Field Type Null Key Default Extra -CLIENT varchar(64) NO -TOTAL_CONNECTIONS bigint(21) NO 0 -CONCURRENT_CONNECTIONS bigint(21) NO 0 -CONNECTED_TIME bigint(21) NO 0 -BUSY_TIME double NO 0 -CPU_TIME double NO 0 -BYTES_RECEIVED bigint(21) NO 0 -BYTES_SENT bigint(21) NO 0 -BINLOG_BYTES_WRITTEN bigint(21) NO 0 -ROWS_READ bigint(21) NO 0 -ROWS_SENT bigint(21) NO 0 -ROWS_DELETED bigint(21) NO 0 -ROWS_INSERTED bigint(21) NO 0 -ROWS_UPDATED bigint(21) NO 0 -SELECT_COMMANDS bigint(21) NO 0 -UPDATE_COMMANDS bigint(21) NO 0 -OTHER_COMMANDS bigint(21) NO 0 -COMMIT_TRANSACTIONS bigint(21) NO 0 -ROLLBACK_TRANSACTIONS bigint(21) NO 0 -DENIED_CONNECTIONS bigint(21) NO 0 -LOST_CONNECTIONS bigint(21) NO 0 -ACCESS_DENIED bigint(21) NO 0 -EMPTY_QUERIES bigint(21) NO 0 -TOTAL_SSL_CONNECTIONS bigint(21) unsigned NO 0 -MAX_STATEMENT_TIME_EXCEEDED bigint(21) NO 0 +CLIENT varchar(64) NO NULL +TOTAL_CONNECTIONS bigint(21) NO NULL +CONCURRENT_CONNECTIONS bigint(21) NO NULL +CONNECTED_TIME bigint(21) NO NULL +BUSY_TIME double NO NULL +CPU_TIME double NO NULL +BYTES_RECEIVED bigint(21) NO NULL +BYTES_SENT bigint(21) NO NULL +BINLOG_BYTES_WRITTEN bigint(21) NO NULL +ROWS_READ bigint(21) NO NULL +ROWS_SENT bigint(21) NO NULL +ROWS_DELETED bigint(21) NO NULL +ROWS_INSERTED bigint(21) NO NULL +ROWS_UPDATED bigint(21) NO NULL +SELECT_COMMANDS bigint(21) NO NULL +UPDATE_COMMANDS bigint(21) NO NULL +OTHER_COMMANDS bigint(21) NO NULL +COMMIT_TRANSACTIONS bigint(21) NO NULL +ROLLBACK_TRANSACTIONS bigint(21) NO NULL +DENIED_CONNECTIONS bigint(21) NO NULL +LOST_CONNECTIONS bigint(21) NO NULL +ACCESS_DENIED bigint(21) NO NULL +EMPTY_QUERIES bigint(21) NO NULL +TOTAL_SSL_CONNECTIONS bigint(21) unsigned NO NULL +MAX_STATEMENT_TIME_EXCEEDED bigint(21) NO NULL show columns from information_schema.user_statistics; Field Type Null Key Default Extra -USER varchar(128) NO -TOTAL_CONNECTIONS int(11) NO 0 -CONCURRENT_CONNECTIONS int(11) NO 0 -CONNECTED_TIME int(11) NO 0 -BUSY_TIME double NO 0 -CPU_TIME double NO 0 -BYTES_RECEIVED bigint(21) NO 0 -BYTES_SENT bigint(21) NO 0 -BINLOG_BYTES_WRITTEN bigint(21) NO 0 -ROWS_READ bigint(21) NO 0 -ROWS_SENT bigint(21) NO 0 -ROWS_DELETED bigint(21) NO 0 -ROWS_INSERTED bigint(21) NO 0 -ROWS_UPDATED bigint(21) NO 0 -SELECT_COMMANDS bigint(21) NO 0 -UPDATE_COMMANDS bigint(21) NO 0 -OTHER_COMMANDS bigint(21) NO 0 -COMMIT_TRANSACTIONS bigint(21) NO 0 -ROLLBACK_TRANSACTIONS bigint(21) NO 0 -DENIED_CONNECTIONS bigint(21) NO 0 -LOST_CONNECTIONS bigint(21) NO 0 -ACCESS_DENIED bigint(21) NO 0 -EMPTY_QUERIES bigint(21) NO 0 -TOTAL_SSL_CONNECTIONS bigint(21) unsigned NO 0 -MAX_STATEMENT_TIME_EXCEEDED bigint(21) NO 0 +USER varchar(128) NO NULL +TOTAL_CONNECTIONS int(11) NO NULL +CONCURRENT_CONNECTIONS int(11) NO NULL +CONNECTED_TIME int(11) NO NULL +BUSY_TIME double NO NULL +CPU_TIME double NO NULL +BYTES_RECEIVED bigint(21) NO NULL +BYTES_SENT bigint(21) NO NULL +BINLOG_BYTES_WRITTEN bigint(21) NO NULL +ROWS_READ bigint(21) NO NULL +ROWS_SENT bigint(21) NO NULL +ROWS_DELETED bigint(21) NO NULL +ROWS_INSERTED bigint(21) NO NULL +ROWS_UPDATED bigint(21) NO NULL +SELECT_COMMANDS bigint(21) NO NULL +UPDATE_COMMANDS bigint(21) NO NULL +OTHER_COMMANDS bigint(21) NO NULL +COMMIT_TRANSACTIONS bigint(21) NO NULL +ROLLBACK_TRANSACTIONS bigint(21) NO NULL +DENIED_CONNECTIONS bigint(21) NO NULL +LOST_CONNECTIONS bigint(21) NO NULL +ACCESS_DENIED bigint(21) NO NULL +EMPTY_QUERIES bigint(21) NO NULL +TOTAL_SSL_CONNECTIONS bigint(21) unsigned NO NULL +MAX_STATEMENT_TIME_EXCEEDED bigint(21) NO NULL show columns from information_schema.index_statistics; Field Type Null Key Default Extra -TABLE_SCHEMA varchar(192) NO -TABLE_NAME varchar(192) NO -INDEX_NAME varchar(192) NO -ROWS_READ bigint(21) NO 0 +TABLE_SCHEMA varchar(192) NO NULL +TABLE_NAME varchar(192) NO NULL +INDEX_NAME varchar(192) NO NULL +ROWS_READ bigint(21) NO NULL show columns from information_schema.table_statistics; Field Type Null Key Default Extra -TABLE_SCHEMA varchar(192) NO -TABLE_NAME varchar(192) NO -ROWS_READ bigint(21) NO 0 -ROWS_CHANGED bigint(21) NO 0 -ROWS_CHANGED_X_INDEXES bigint(21) NO 0 +TABLE_SCHEMA varchar(192) NO NULL +TABLE_NAME varchar(192) NO NULL +ROWS_READ bigint(21) NO NULL +ROWS_CHANGED bigint(21) NO NULL +ROWS_CHANGED_X_INDEXES bigint(21) NO NULL set @save_general_log=@@global.general_log; set @@global.general_log=0; set @@global.userstat=1; diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result index b096397f8b2..795231fab97 100644 --- a/mysql-test/main/view.result +++ b/mysql-test/main/view.result @@ -6789,49 +6789,6 @@ sum(z) DROP TABLE t1; DROP VIEW v1; # -# MDEV-24454: Crash at change_item_tree -# -CREATE TABLE t1(f0 INT); -CREATE VIEW v1 AS -SELECT -f0 AS f1 -FROM t1; -CREATE VIEW v2 AS -SELECT -(SELECT GROUP_CONCAT(v1.f1 SEPARATOR ', ') -FROM v1 n) AS f2, -GROUP_CONCAT('' SEPARATOR ', ') AS f3 -FROM v1; -CREATE VIEW v3 AS -SELECT 1 as f4 FROM v2; -CREATE PROCEDURE p1() -SELECT * FROM v3; -CALL p1(); -f4 -1 -CALL p1(); -f4 -1 -drop procedure p1; -drop view v1,v2,v3; -drop table t1; -# -# MDEV-25631: Crash in st_select_lex::mark_as_dependent with -# VIEW, aggregate and subquery -# -CREATE TABLE t1 (i1 int); -insert into t1 values (1),(2),(3); -CREATE VIEW v1 AS -SELECT t1.i1 FROM (t1 a JOIN t1 ON (t1.i1 = (SELECT t1.i1 FROM t1 b))); -SELECT 1 FROM (SELECT count(((SELECT i1 FROM v1))) FROM v1) dt ; -ERROR 21000: Subquery returns more than 1 row -delete from t1 where i1 > 1; -SELECT 1 FROM (SELECT count(((SELECT i1 FROM v1))) FROM v1) dt ; -1 -1 -drop view v1; -drop table t1; -# # MDEV-26299: Some views force server (and mysqldump) to generate # invalid SQL for their definitions # @@ -6843,6 +6800,24 @@ drop view v1; CREATE VIEW v1 AS select `t1`.`12345678901234567890123456789012345678901234567890123456789012345` AS `Name_exp_1` from (select '12345678901234567890123456789012345678901234567890123456789012345') `t1`; drop view v1; # +# MDEV-25631: view with outer reference in select used +# as argument of set function +# +create table t1 (c int); +insert into t1 values (1); +create view v1 as select c from t1 where (select t1.c from t1 t) = 1; +select * from (select sum((select * from v1)) as r) dt; +r +1 +with cte as (select c from t1 where (select t1.c from t1 t) = 1) +select * from (select sum((select * from cte)) as r) dt1 +union +select * from (select sum((select * from cte)) as r) dt2; +r +1 +drop view v1; +drop table t1; +# # End of 10.2 tests # # diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test index 64f65c04dff..6c079c48b00 100644 --- a/mysql-test/main/view.test +++ b/mysql-test/main/view.test @@ -6501,56 +6501,6 @@ DROP TABLE t1; DROP VIEW v1; --echo # ---echo # MDEV-24454: Crash at change_item_tree ---echo # - -CREATE TABLE t1(f0 INT); - -CREATE VIEW v1 AS -SELECT - f0 AS f1 -FROM t1; - -CREATE VIEW v2 AS -SELECT - (SELECT GROUP_CONCAT(v1.f1 SEPARATOR ', ') - FROM v1 n) AS f2, - GROUP_CONCAT('' SEPARATOR ', ') AS f3 -FROM v1; - -CREATE VIEW v3 AS -SELECT 1 as f4 FROM v2; - -CREATE PROCEDURE p1() - SELECT * FROM v3; - -CALL p1(); -CALL p1(); - -drop procedure p1; -drop view v1,v2,v3; -drop table t1; - ---echo # ---echo # MDEV-25631: Crash in st_select_lex::mark_as_dependent with ---echo # VIEW, aggregate and subquery ---echo # - -CREATE TABLE t1 (i1 int); -insert into t1 values (1),(2),(3); #not important -CREATE VIEW v1 AS - SELECT t1.i1 FROM (t1 a JOIN t1 ON (t1.i1 = (SELECT t1.i1 FROM t1 b))); - ---error ER_SUBQUERY_NO_1_ROW -SELECT 1 FROM (SELECT count(((SELECT i1 FROM v1))) FROM v1) dt ; -delete from t1 where i1 > 1; -SELECT 1 FROM (SELECT count(((SELECT i1 FROM v1))) FROM v1) dt ; - -drop view v1; -drop table t1; - - ---echo # --echo # MDEV-26299: Some views force server (and mysqldump) to generate --echo # invalid SQL for their definitions --echo # @@ -6566,9 +6516,29 @@ drop view v1; eval CREATE VIEW v1 AS $definition; + drop view v1; --echo # +--echo # MDEV-25631: view with outer reference in select used +--echo # as argument of set function +--echo # + +create table t1 (c int); +insert into t1 values (1); +create view v1 as select c from t1 where (select t1.c from t1 t) = 1; + +select * from (select sum((select * from v1)) as r) dt; + +with cte as (select c from t1 where (select t1.c from t1 t) = 1) +select * from (select sum((select * from cte)) as r) dt1 +union +select * from (select sum((select * from cte)) as r) dt2; + +drop view v1; +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f513e9091d3..592915fb0b2 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1807,7 +1807,7 @@ sub executable_setup () { $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); $exe_mysql_plugin= mtr_exe_exists("$path_client_bindir/mysql_plugin"); - $exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded"); + $exe_mysql_embedded= mtr_exe_maybe_exists("$bindir/libmysqld/examples/mysql_embedded"); # Look for mysqltest executable if ( $opt_embedded_server ) diff --git a/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc b/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc index ce919550b51..874be1dac61 100644 --- a/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc +++ b/mysql-test/suite/binlog/include/mysqlbinlog_row_engine.inc @@ -1921,3 +1921,28 @@ let $MYSQLD_DATADIR= `select @@datadir`; DROP TABLE t1; +--echo # +--echo # Beginning of 10.2 test +--echo # +--echo # MDEV-25460: Assertion `!is_set() || (m_status == DA_OK_BULK && +--echo # is_bulk_op())' failed in Diagnostics_area::set_ok_status in my_ok +--echo # from mysql_sql_stmt_prepare +--echo # + +CREATE TEMPORARY TABLE a (c INT) ENGINE=InnoDB; +CREATE TABLE b (c INT) ENGINE=InnoDB; + +--error ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR +PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT * FROM b'; + +DROP TABLE b; +DROP TEMPORARY TABLE a; + +CREATE TEMPORARY TABLE t (c INT); +--error ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR +PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT 1'; +DROP TEMPORARY TABLE t; + +--echo # +--echo # End of 10.2 test +--echo # diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result index d8a5864ba3d..a1d3adb7c02 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -6372,3 +6372,23 @@ ROLLBACK /* added by mysqlbinlog */; # Cleanup. # DROP TABLE t1; +# +# Beginning of 10.2 test +# +# MDEV-25460: Assertion `!is_set() || (m_status == DA_OK_BULK && +# is_bulk_op())' failed in Diagnostics_area::set_ok_status in my_ok +# from mysql_sql_stmt_prepare +# +CREATE TEMPORARY TABLE a (c INT) ENGINE=InnoDB; +CREATE TABLE b (c INT) ENGINE=InnoDB; +PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT * FROM b'; +ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables +DROP TABLE b; +DROP TEMPORARY TABLE a; +CREATE TEMPORARY TABLE t (c INT); +PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT 1'; +ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables +DROP TEMPORARY TABLE t; +# +# End of 10.2 test +# diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result index a75593055d7..00756368e45 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -6413,3 +6413,29 @@ ROLLBACK /* added by mysqlbinlog */; # Cleanup. # DROP TABLE t1; +# +# Beginning of 10.2 test +# +# MDEV-25460: Assertion `!is_set() || (m_status == DA_OK_BULK && +# is_bulk_op())' failed in Diagnostics_area::set_ok_status in my_ok +# from mysql_sql_stmt_prepare +# +CREATE TEMPORARY TABLE a (c INT) ENGINE=InnoDB; +Warnings: +Warning 1286 Unknown storage engine 'InnoDB' +Warning 1266 Using storage engine MyISAM for table 'a' +CREATE TABLE b (c INT) ENGINE=InnoDB; +Warnings: +Warning 1286 Unknown storage engine 'InnoDB' +Warning 1266 Using storage engine MyISAM for table 'b' +PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT * FROM b'; +ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables +DROP TABLE b; +DROP TEMPORARY TABLE a; +CREATE TEMPORARY TABLE t (c INT); +PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT 1'; +ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables +DROP TEMPORARY TABLE t; +# +# End of 10.2 test +# diff --git a/mysql-test/suite/binlog/r/binlog_parallel_replication_ddl.result b/mysql-test/suite/binlog/r/binlog_parallel_replication_ddl.result new file mode 100644 index 00000000000..34d8bbf5999 --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_parallel_replication_ddl.result @@ -0,0 +1,8 @@ +RESET MASTER; +CREATE OR REPLACE SEQUENCE s1; +DROP SEQUENCE s1; +FLUSH LOGS; +FOUND 2 /GTID [0-9]+-[0-9]+-[0-9]+/ in mysqlbinlog.sql +The same as above number of samples must be found: +FOUND 2 /GTID [0-9]+-[0-9]+-[0-9]+ ddl/ in mysqlbinlog.sql +End of the tests diff --git a/mysql-test/suite/binlog/r/binlog_xa_handling.result b/mysql-test/suite/binlog/r/binlog_xa_handling.result new file mode 100644 index 00000000000..7a60fb59b9a --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_xa_handling.result @@ -0,0 +1,11 @@ +connection default; +CREATE TABLE t1(f1 int) ENGINE=Innodb; +XA START 'xa'; +INSERT INTO t1 VALUES(10); +BINLOG ' +SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8='; +XA END 'xa'; +XA PREPARE 'xa'; +XA ROLLBACK 'xa'; +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/t/binlog_parallel_replication_ddl.test b/mysql-test/suite/binlog/t/binlog_parallel_replication_ddl.test new file mode 100644 index 00000000000..d861ecc96df --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_parallel_replication_ddl.test @@ -0,0 +1,30 @@ +# Check binlog properties of various DDL:s. +# Motivated by MDEV-27365. +# +--source include/have_log_bin.inc +--source include/have_binlog_format_mixed.inc + +RESET MASTER; + +# MDEV-27365 CREATE-or-REPLACE SEQUENCE bilogged without DDL flag +# Prove it is logged with the DDL flag. +CREATE OR REPLACE SEQUENCE s1; + +# This one has been always correct. +DROP SEQUENCE s1; +FLUSH LOGS; + +--let $MYSQLD_DATADIR= `select @@datadir` +--exec $MYSQL_BINLOG --base64-output=decode-rows $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql + +--let SEARCH_PATTERN= GTID [0-9]+-[0-9]+-[0-9]+ +--let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql +--source include/search_pattern_in_file.inc + +--echo The same as above number of samples must be found: +--let SEARCH_PATTERN= GTID [0-9]+-[0-9]+-[0-9]+ ddl +--let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql +--source include/search_pattern_in_file.inc +--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql + +--echo End of the tests diff --git a/mysql-test/suite/binlog/t/binlog_xa_handling.test b/mysql-test/suite/binlog/t/binlog_xa_handling.test new file mode 100644 index 00000000000..c454e83169e --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_xa_handling.test @@ -0,0 +1,28 @@ +############################################################################### +# Bug#19928622: ASSERTION `! IS_SET()' FAILED. | ABORT IN +# DIAGNOSTICS_AREA::SET_OK_STATUS +# +# MDEV-27536 Invalid BINLOG_BASE64_EVENT and assertion Diagnostics_area:: !is_set() +# +# Test: +# ===== +# Begin an XA transaction and execte a DML statement so that XA state becomes +# XA_ACTIVE. Execute the BINLOG command it should not cause any assert. +# Execution should be successful. +############################################################################### +--source include/have_log_bin.inc +--source include/have_innodb.inc + +--connection default +CREATE TABLE t1(f1 int) ENGINE=Innodb; + +XA START 'xa'; +INSERT INTO t1 VALUES(10); +BINLOG ' +SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8='; +XA END 'xa'; +XA PREPARE 'xa'; +XA ROLLBACK 'xa'; + +DROP TABLE t1; diff --git a/mysql-test/suite/federated/rpl.result b/mysql-test/suite/federated/rpl.result new file mode 100644 index 00000000000..71821411c91 --- /dev/null +++ b/mysql-test/suite/federated/rpl.result @@ -0,0 +1,18 @@ +include/master-slave.inc +[connection master] +create table t1 (a int primary key, b int); +connection slave; +rename table t1 to t2; +create table t1 (a int primary key, b int) engine=federated connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t2'; +connection master; +insert t1 values (1,1),(2,2),(3,1); +delete from t1 where a=2; +connection slave; +select * from t1; +a b +1 1 +3 1 +drop table t2; +connection master; +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/federated/rpl.test b/mysql-test/suite/federated/rpl.test new file mode 100644 index 00000000000..6ec4bec5a1a --- /dev/null +++ b/mysql-test/suite/federated/rpl.test @@ -0,0 +1,19 @@ +source include/have_binlog_format_row.inc; +source include/master-slave.inc; + +create table t1 (a int primary key, b int); + +sync_slave_with_master; +rename table t1 to t2; +evalp create table t1 (a int primary key, b int) engine=federated connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t2'; +connection master; + +insert t1 values (1,1),(2,2),(3,1); +delete from t1 where a=2; +sync_slave_with_master; +select * from t1; +drop table t2; + +connection master; +drop table t1; +source include/rpl_end.inc; diff --git a/mysql-test/suite/funcs_1/datadict/columns.inc b/mysql-test/suite/funcs_1/datadict/columns.inc index 64318492b00..a03fef9c0dd 100644 --- a/mysql-test/suite/funcs_1/datadict/columns.inc +++ b/mysql-test/suite/funcs_1/datadict/columns.inc @@ -25,6 +25,10 @@ # --source suite/funcs_1/datadict/datadict_bug_12777.inc + +# The following is needed as embedded server can be compiled with and without +# privlege tables + eval SELECT * FROM information_schema.columns $my_where diff --git a/mysql-test/suite/funcs_1/r/is_character_sets.result b/mysql-test/suite/funcs_1/r/is_character_sets.result index da4e3b06503..4f2015348b5 100644 --- a/mysql-test/suite/funcs_1/r/is_character_sets.result +++ b/mysql-test/suite/funcs_1/r/is_character_sets.result @@ -28,24 +28,24 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.CHARACTER_SETS; Field Type Null Key Default Extra -CHARACTER_SET_NAME varchar(32) NO -DEFAULT_COLLATE_NAME varchar(32) NO -DESCRIPTION varchar(60) NO -MAXLEN bigint(3) NO 0 +CHARACTER_SET_NAME varchar(32) NO NULL +DEFAULT_COLLATE_NAME varchar(32) NO NULL +DESCRIPTION varchar(60) NO NULL +MAXLEN bigint(3) NO NULL SHOW CREATE TABLE information_schema.CHARACTER_SETS; Table Create Table CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '', - `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', - `MAXLEN` bigint(3) NOT NULL DEFAULT 0 + `CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATE_NAME` varchar(32) NOT NULL, + `DESCRIPTION` varchar(60) NOT NULL, + `MAXLEN` bigint(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.CHARACTER_SETS; Field Type Null Key Default Extra -CHARACTER_SET_NAME varchar(32) NO -DEFAULT_COLLATE_NAME varchar(32) NO -DESCRIPTION varchar(60) NO -MAXLEN bigint(3) NO 0 +CHARACTER_SET_NAME varchar(32) NO NULL +DEFAULT_COLLATE_NAME varchar(32) NO NULL +DESCRIPTION varchar(60) NO NULL +MAXLEN bigint(3) NO NULL # Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test ######################################################################## # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and diff --git a/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result b/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result index a512a7458fb..354d032d168 100644 --- a/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result +++ b/mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result @@ -28,18 +28,18 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; Field Type Null Key Default Extra -COLLATION_NAME varchar(32) NO -CHARACTER_SET_NAME varchar(32) NO +COLLATION_NAME varchar(32) NO NULL +CHARACTER_SET_NAME varchar(32) NO NULL SHOW CREATE TABLE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; Table Create Table COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` ( - `COLLATION_NAME` varchar(32) NOT NULL DEFAULT '', - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '' + `COLLATION_NAME` varchar(32) NOT NULL, + `CHARACTER_SET_NAME` varchar(32) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; Field Type Null Key Default Extra -COLLATION_NAME varchar(32) NO -CHARACTER_SET_NAME varchar(32) NO +COLLATION_NAME varchar(32) NO NULL +CHARACTER_SET_NAME varchar(32) NO NULL # Testcases 3.2.4.2 and 3.2.4.3 are checked in suite/funcs_1/t/charset_collation*.test ######################################################################## # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and diff --git a/mysql-test/suite/funcs_1/r/is_collations.result b/mysql-test/suite/funcs_1/r/is_collations.result index c74976f9fc2..80bde843c68 100644 --- a/mysql-test/suite/funcs_1/r/is_collations.result +++ b/mysql-test/suite/funcs_1/r/is_collations.result @@ -28,30 +28,30 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.COLLATIONS; Field Type Null Key Default Extra -COLLATION_NAME varchar(32) NO -CHARACTER_SET_NAME varchar(32) NO -ID bigint(11) NO 0 -IS_DEFAULT varchar(3) NO -IS_COMPILED varchar(3) NO -SORTLEN bigint(3) NO 0 +COLLATION_NAME varchar(32) NO NULL +CHARACTER_SET_NAME varchar(32) NO NULL +ID bigint(11) NO NULL +IS_DEFAULT varchar(3) NO NULL +IS_COMPILED varchar(3) NO NULL +SORTLEN bigint(3) NO NULL SHOW CREATE TABLE information_schema.COLLATIONS; Table Create Table COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` ( - `COLLATION_NAME` varchar(32) NOT NULL DEFAULT '', - `CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `ID` bigint(11) NOT NULL DEFAULT 0, - `IS_DEFAULT` varchar(3) NOT NULL DEFAULT '', - `IS_COMPILED` varchar(3) NOT NULL DEFAULT '', - `SORTLEN` bigint(3) NOT NULL DEFAULT 0 + `COLLATION_NAME` varchar(32) NOT NULL, + `CHARACTER_SET_NAME` varchar(32) NOT NULL, + `ID` bigint(11) NOT NULL, + `IS_DEFAULT` varchar(3) NOT NULL, + `IS_COMPILED` varchar(3) NOT NULL, + `SORTLEN` bigint(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLLATIONS; Field Type Null Key Default Extra -COLLATION_NAME varchar(32) NO -CHARACTER_SET_NAME varchar(32) NO -ID bigint(11) NO 0 -IS_DEFAULT varchar(3) NO -IS_COMPILED varchar(3) NO -SORTLEN bigint(3) NO 0 +COLLATION_NAME varchar(32) NO NULL +CHARACTER_SET_NAME varchar(32) NO NULL +ID bigint(11) NO NULL +IS_DEFAULT varchar(3) NO NULL +IS_COMPILED varchar(3) NO NULL +SORTLEN bigint(3) NO NULL # Testcases 3.2.3.2 and 3.2.3.3 are checked in suite/funcs_1/t/charset_collation*.test ######################################################################## # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result index b6be9118048..30c16317e56 100644 --- a/mysql-test/suite/funcs_1/r/is_column_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result @@ -28,33 +28,33 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.COLUMN_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SHOW CREATE TABLE information_schema.COLUMN_PRIVILEGES; Table Create Table COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', - `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' + `GRANTEE` varchar(190) NOT NULL, + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `COLUMN_NAME` varchar(64) NOT NULL, + `PRIVILEGE_TYPE` varchar(64) NOT NULL, + `IS_GRANTABLE` varchar(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLUMN_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SELECT table_catalog, table_schema, table_name, column_name, privilege_type FROM information_schema.column_privileges WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name column_name privilege_type diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result index f1c784e2839..13042dd11bc 100644 --- a/mysql-test/suite/funcs_1/r/is_columns.result +++ b/mysql-test/suite/funcs_1/r/is_columns.result @@ -28,14 +28,14 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.COLUMNS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) unsigned NO 0 +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +ORDINAL_POSITION bigint(21) unsigned NO NULL COLUMN_DEFAULT longtext YES NULL -IS_NULLABLE varchar(3) NO -DATA_TYPE varchar(64) NO +IS_NULLABLE varchar(3) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL NUMERIC_PRECISION bigint(21) unsigned YES NULL @@ -43,49 +43,49 @@ NUMERIC_SCALE bigint(21) unsigned YES NULL DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(32) YES NULL COLLATION_NAME varchar(32) YES NULL -COLUMN_TYPE longtext NO -COLUMN_KEY varchar(3) NO -EXTRA varchar(30) NO -PRIVILEGES varchar(80) NO -COLUMN_COMMENT varchar(1024) NO -IS_GENERATED varchar(6) NO +COLUMN_TYPE longtext NO NULL +COLUMN_KEY varchar(3) NO NULL +EXTRA varchar(30) NO NULL +PRIVILEGES varchar(80) NO NULL +COLUMN_COMMENT varchar(1024) NO NULL +IS_GENERATED varchar(6) NO NULL GENERATION_EXPRESSION longtext YES NULL SHOW CREATE TABLE information_schema.COLUMNS; Table Create Table COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `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) unsigned NOT NULL DEFAULT 0, - `COLUMN_DEFAULT` longtext DEFAULT NULL, - `IS_NULLABLE` varchar(3) NOT NULL DEFAULT '', - `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `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, - `DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL, - `CHARACTER_SET_NAME` varchar(32) DEFAULT NULL, - `COLLATION_NAME` varchar(32) DEFAULT NULL, - `COLUMN_TYPE` longtext NOT NULL DEFAULT '', - `COLUMN_KEY` varchar(3) NOT NULL DEFAULT '', - `EXTRA` varchar(30) NOT NULL DEFAULT '', - `PRIVILEGES` varchar(80) NOT NULL DEFAULT '', - `COLUMN_COMMENT` varchar(1024) NOT NULL DEFAULT '', - `IS_GENERATED` varchar(6) NOT NULL DEFAULT '', - `GENERATION_EXPRESSION` longtext DEFAULT NULL + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `COLUMN_NAME` varchar(64) NOT NULL, + `ORDINAL_POSITION` bigint(21) unsigned NOT NULL, + `COLUMN_DEFAULT` longtext, + `IS_NULLABLE` varchar(3) NOT NULL, + `DATA_TYPE` varchar(64) NOT NULL, + `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned, + `CHARACTER_OCTET_LENGTH` bigint(21) unsigned, + `NUMERIC_PRECISION` bigint(21) unsigned, + `NUMERIC_SCALE` bigint(21) unsigned, + `DATETIME_PRECISION` bigint(21) unsigned, + `CHARACTER_SET_NAME` varchar(32), + `COLLATION_NAME` varchar(32), + `COLUMN_TYPE` longtext NOT NULL, + `COLUMN_KEY` varchar(3) NOT NULL, + `EXTRA` varchar(30) NOT NULL, + `PRIVILEGES` varchar(80) NOT NULL, + `COLUMN_COMMENT` varchar(1024) NOT NULL, + `IS_GENERATED` varchar(6) NOT NULL, + `GENERATION_EXPRESSION` longtext ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLUMNS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) unsigned NO 0 +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +ORDINAL_POSITION bigint(21) unsigned NO NULL COLUMN_DEFAULT longtext YES NULL -IS_NULLABLE varchar(3) NO -DATA_TYPE varchar(64) NO +IS_NULLABLE varchar(3) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL NUMERIC_PRECISION bigint(21) unsigned YES NULL @@ -93,12 +93,12 @@ NUMERIC_SCALE bigint(21) unsigned YES NULL DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(32) YES NULL COLLATION_NAME varchar(32) YES NULL -COLUMN_TYPE longtext NO -COLUMN_KEY varchar(3) NO -EXTRA varchar(30) NO -PRIVILEGES varchar(80) NO -COLUMN_COMMENT varchar(1024) NO -IS_GENERATED varchar(6) NO +COLUMN_TYPE longtext NO NULL +COLUMN_KEY varchar(3) NO NULL +EXTRA varchar(30) NO NULL +PRIVILEGES varchar(80) NO NULL +COLUMN_COMMENT varchar(1024) NO NULL +IS_GENERATED varchar(6) NO NULL GENERATION_EXPRESSION longtext YES NULL SELECT table_catalog, table_schema, table_name, column_name FROM information_schema.columns WHERE table_catalog IS NULL OR table_catalog <> 'def'; diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index 2088b6224a5..50a43d3ccbd 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -3,125 +3,125 @@ WHERE table_schema = 'information_schema' AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY table_schema, table_name, column_name; 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 DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION -def information_schema ALL_PLUGINS LOAD_OPTION 11 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ALL_PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ALL_PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_LICENSE 10 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_MATURITY 12 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_STATUS 3 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_TYPE 4 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema APPLICABLE_ROLES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL +def information_schema APPLICABLE_ROLES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL def information_schema APPLICABLE_ROLES IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema APPLICABLE_ROLES ROLE_NAME 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL -def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select NEVER NULL -def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL -def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL -def information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS BYTES_SENT 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS CLIENT 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS CONNECTED_TIME 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS CPU_TIME 6 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL -def information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_DELETED 12 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_INSERTED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_READ 10 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_SENT 11 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_UPDATED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema COLLATIONS CHARACTER_SET_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema COLLATIONS COLLATION_NAME 1 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11) select NEVER NULL -def information_schema COLLATIONS IS_COMPILED 5 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema COLLATIONS IS_DEFAULT 4 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL -def information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema APPLICABLE_ROLES ROLE_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL +def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema CHARACTER_SETS DESCRIPTION 3 NULL NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select NEVER NULL +def information_schema CHARACTER_SETS MAXLEN 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL +def information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS CLIENT 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS CONNECTED_TIME 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL +def information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema COLLATIONS CHARACTER_SET_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema COLLATIONS COLLATION_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema COLLATIONS ID 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11) select NEVER NULL +def information_schema COLLATIONS IS_COMPILED 5 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema COLLATIONS IS_DEFAULT 4 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema COLLATIONS SORTLEN 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL +def information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema COLUMNS CHARACTER_SET_NAME 14 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema COLUMNS COLLATION_NAME 15 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema COLUMNS COLUMN_COMMENT 20 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select NEVER NULL +def information_schema COLUMNS COLUMN_COMMENT 20 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select NEVER NULL def information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema COLUMNS COLUMN_KEY 17 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema COLUMNS COLUMN_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMNS COLUMN_TYPE 16 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema COLUMNS DATA_TYPE 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMNS COLUMN_KEY 17 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema COLUMNS EXTRA 18 '' NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) select NEVER NULL +def information_schema COLUMNS EXTRA 18 NULL NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) select NEVER NULL def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema COLUMNS IS_GENERATED 21 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL -def information_schema COLUMNS IS_NULLABLE 7 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL +def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema COLUMNS PRIVILEGES 19 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL -def information_schema COLUMNS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema COLUMNS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMNS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMN_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL -def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMNS ORDINAL_POSITION 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema COLUMNS PRIVILEGES 19 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL +def information_schema COLUMNS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema COLUMNS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMNS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMN_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ENABLED_ROLES ROLE_NAME 1 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL -def information_schema ENGINES COMMENT 3 '' NO varchar 160 480 NULL NULL NULL utf8 utf8_general_ci varchar(160) select NEVER NULL -def information_schema ENGINES ENGINE 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ENGINES COMMENT 3 NULL NO varchar 160 480 NULL NULL NULL utf8 utf8_general_ci varchar(160) select NEVER NULL +def information_schema ENGINES ENGINE 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema ENGINES SUPPORT 2 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL +def information_schema ENGINES SUPPORT 2 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL def information_schema ENGINES TRANSACTIONS 4 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema ENGINES XA 5 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema EVENTS CHARACTER_SET_CLIENT 22 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema EVENTS COLLATION_CONNECTION 23 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema EVENTS CREATED 17 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema EVENTS DATABASE_COLLATION 24 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema EVENTS DEFINER 4 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema EVENTS CHARACTER_SET_CLIENT 22 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema EVENTS COLLATION_CONNECTION 23 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema EVENTS CREATED 17 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL +def information_schema EVENTS DATABASE_COLLATION 24 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema EVENTS DEFINER 4 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema EVENTS EVENT_BODY 6 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL -def information_schema EVENTS EVENT_CATALOG 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema EVENTS EVENT_COMMENT 20 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema EVENTS EVENT_DEFINITION 7 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema EVENTS EVENT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema EVENTS EVENT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema EVENTS EVENT_TYPE 8 '' NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) select NEVER NULL +def information_schema EVENTS EVENT_BODY 6 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL +def information_schema EVENTS EVENT_CATALOG 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema EVENTS EVENT_COMMENT 20 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema EVENTS EVENT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema EVENTS EVENT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema EVENTS EVENT_TYPE 8 NULL NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) select NEVER NULL def information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select NEVER NULL def information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL NULL utf8 utf8_general_ci varchar(256) select NEVER NULL -def information_schema EVENTS LAST_ALTERED 18 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL +def information_schema EVENTS LAST_ALTERED 18 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema EVENTS ON_COMPLETION 16 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL -def information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL -def information_schema EVENTS SQL_MODE 12 '' NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) select NEVER NULL +def information_schema EVENTS ON_COMPLETION 16 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL +def information_schema EVENTS ORIGINATOR 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL +def information_schema EVENTS SQL_MODE 12 NULL NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) select NEVER NULL def information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema EVENTS STATUS 15 '' NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select NEVER NULL -def information_schema EVENTS TIME_ZONE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema EVENTS STATUS 15 NULL NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select NEVER NULL +def information_schema EVENTS TIME_ZONE 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL @@ -131,12 +131,12 @@ def information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL N def information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL -def information_schema FILES ENGINE 10 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL +def information_schema FILES ENGINE 10 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema FILES EXTENT_SIZE 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255) select NEVER NULL -def information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL +def information_schema FILES FILE_ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema FILES FILE_NAME 2 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema FILES FILE_TYPE 3 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL +def information_schema FILES FILE_TYPE 3 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL def information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL @@ -149,9 +149,9 @@ def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select NEVER NULL -def information_schema FILES STATUS 37 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL +def information_schema FILES STATUS 37 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema FILES TABLE_CATALOG 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema FILES TABLE_CATALOG 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL @@ -160,82 +160,82 @@ def information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 def information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema FILES VERSION 25 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL -def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL -def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GEOMETRY_COLUMNS MAX_PPR 12 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL -def information_schema GEOMETRY_COLUMNS SRID 13 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL -def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL -def information_schema GLOBAL_STATUS VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema INDEX_STATISTICS INDEX_NAME 3 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL -def information_schema INDEX_STATISTICS ROWS_READ 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema INDEX_STATISTICS TABLE_NAME 2 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL -def information_schema INDEX_STATISTICS TABLE_SCHEMA 1 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL +def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL +def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL +def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GEOMETRY_COLUMNS MAX_PPR 12 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL +def information_schema GEOMETRY_COLUMNS SRID 13 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL +def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL +def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema INDEX_STATISTICS INDEX_NAME 3 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL +def information_schema INDEX_STATISTICS ROWS_READ 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema INDEX_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL +def information_schema INDEX_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL def information_schema KEYWORDS WORD 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema KEY_CACHES BLOCK_SIZE 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES DIRTY_BLOCKS 8 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES FULL_SIZE 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES KEY_CACHE_NAME 1 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL -def information_schema KEY_CACHES READS 10 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES READ_REQUESTS 9 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES BLOCK_SIZE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES DIRTY_BLOCKS 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES FULL_SIZE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES KEY_CACHE_NAME 1 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL +def information_schema KEY_CACHES READS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES READ_REQUESTS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema KEY_CACHES SEGMENTS 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned select NEVER NULL def information_schema KEY_CACHES SEGMENT_NUMBER 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned select NEVER NULL -def information_schema KEY_CACHES UNUSED_BLOCKS 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES USED_BLOCKS 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES WRITES 12 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_CACHES WRITE_REQUESTS 11 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL +def information_schema KEY_CACHES UNUSED_BLOCKS 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES USED_BLOCKS 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES WRITES 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_CACHES WRITE_REQUESTS 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL def information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(10) select NEVER NULL def information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select NEVER NULL -def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(20) select NEVER NULL -def information_schema OPTIMIZER_TRACE QUERY 1 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema OPTIMIZER_TRACE TRACE 2 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select NEVER NULL +def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(20) select NEVER NULL +def information_schema OPTIMIZER_TRACE QUERY 1 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema OPTIMIZER_TRACE TRACE 2 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL def information_schema PARAMETERS CHARACTER_OCTET_LENGTH 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL def information_schema PARAMETERS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PARAMETERS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PARAMETERS DATA_TYPE 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PARAMETERS DATA_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PARAMETERS DATETIME_PRECISION 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema PARAMETERS DTD_IDENTIFIER 15 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema PARAMETERS DTD_IDENTIFIER 15 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema PARAMETERS NUMERIC_PRECISION 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL def information_schema PARAMETERS NUMERIC_SCALE 11 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL -def information_schema PARAMETERS ORDINAL_POSITION 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL +def information_schema PARAMETERS ORDINAL_POSITION 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL def information_schema PARAMETERS PARAMETER_MODE 5 NULL YES varchar 5 15 NULL NULL NULL utf8 utf8_general_ci varchar(5) select NEVER NULL def information_schema PARAMETERS PARAMETER_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PARAMETERS ROUTINE_TYPE 16 '' NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) select NEVER NULL -def information_schema PARAMETERS SPECIFIC_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema PARAMETERS SPECIFIC_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PARAMETERS SPECIFIC_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema PARAMETERS ROUTINE_TYPE 16 NULL NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) select NEVER NULL +def information_schema PARAMETERS SPECIFIC_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema PARAMETERS SPECIFIC_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PARAMETERS SPECIFIC_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PARTITIONS AVG_ROW_LENGTH 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema PARTITIONS DATA_FREE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema PARTITIONS DATA_LENGTH 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema PARTITIONS INDEX_LENGTH 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema PARTITIONS NODEGROUP 24 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL -def information_schema PARTITIONS PARTITION_COMMENT 23 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL +def information_schema PARTITIONS NODEGROUP 24 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL +def information_schema PARTITIONS PARTITION_COMMENT 23 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL def information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) select NEVER NULL @@ -246,133 +246,133 @@ def information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 N def information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PARTITIONS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema PARTITIONS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema PARTITIONS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PARTITIONS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema PARTITIONS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PARTITIONS TABLE_ROWS 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema PARTITIONS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema PLUGINS LOAD_OPTION 11 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema PLUGINS PLUGIN_LICENSE 10 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL -def information_schema PLUGINS PLUGIN_MATURITY 12 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL -def information_schema PLUGINS PLUGIN_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PLUGINS PLUGIN_STATUS 3 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL -def information_schema PLUGINS PLUGIN_TYPE 4 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL -def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL -def information_schema PROCESSLIST COMMAND 5 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL +def information_schema PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL +def information_schema PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) select NEVER NULL +def information_schema PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL +def information_schema PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) select NEVER NULL +def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL +def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) select NEVER NULL +def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PROCESSLIST EXAMINED_ROWS 15 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL -def information_schema PROCESSLIST HOST 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL +def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL +def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob select NEVER NULL -def information_schema PROCESSLIST MAX_MEMORY_USED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL -def information_schema PROCESSLIST MAX_STAGE 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL -def information_schema PROCESSLIST MEMORY_USED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL -def information_schema PROCESSLIST PROGRESS 12 0.000 NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select NEVER NULL -def information_schema PROCESSLIST QUERY_ID 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL -def information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL +def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL +def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL +def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) select NEVER NULL +def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) select NEVER NULL +def information_schema PROCESSLIST QUERY_ID 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL +def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema PROCESSLIST TID 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL -def information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL -def information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select NEVER NULL -def information_schema PROCESSLIST USER 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema PROCESSLIST TID 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL +def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) select NEVER NULL +def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) select NEVER NULL +def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ROUTINES CHARACTER_MAXIMUM_LENGTH 7 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL def information_schema ROUTINES CHARACTER_OCTET_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL -def information_schema ROUTINES CHARACTER_SET_CLIENT 29 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema ROUTINES CHARACTER_SET_CLIENT 29 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema ROUTINES CHARACTER_SET_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES COLLATION_CONNECTION 30 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema ROUTINES COLLATION_CONNECTION 30 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema ROUTINES COLLATION_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES CREATED 24 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL -def information_schema ROUTINES DATABASE_COLLATION 31 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema ROUTINES DATA_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ROUTINES CREATED 24 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL +def information_schema ROUTINES DATABASE_COLLATION 31 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema ROUTINES DATA_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema ROUTINES DEFINER 28 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema ROUTINES DEFINER 28 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES IS_DETERMINISTIC 20 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema ROUTINES LAST_ALTERED 25 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL +def information_schema ROUTINES IS_DETERMINISTIC 20 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema ROUTINES LAST_ALTERED 25 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema ROUTINES NUMERIC_PRECISION 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL def information_schema ROUTINES NUMERIC_SCALE 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) select NEVER NULL -def information_schema ROUTINES PARAMETER_STYLE 19 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL -def information_schema ROUTINES ROUTINE_BODY 15 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL -def information_schema ROUTINES ROUTINE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema ROUTINES ROUTINE_COMMENT 27 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema ROUTINES PARAMETER_STYLE 19 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL +def information_schema ROUTINES ROUTINE_BODY 15 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL +def information_schema ROUTINES ROUTINE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema ROUTINES ROUTINE_COMMENT 27 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema ROUTINES ROUTINE_DEFINITION 16 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema ROUTINES ROUTINE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES ROUTINE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES ROUTINE_TYPE 5 '' NO varchar 13 39 NULL NULL NULL utf8 utf8_general_ci varchar(13) select NEVER NULL -def information_schema ROUTINES SECURITY_TYPE 23 '' NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) select NEVER NULL -def information_schema ROUTINES SPECIFIC_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES SQL_DATA_ACCESS 21 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema ROUTINES SQL_MODE 26 '' NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) select NEVER NULL +def information_schema ROUTINES ROUTINE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ROUTINES ROUTINE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ROUTINES ROUTINE_TYPE 5 NULL NO varchar 13 39 NULL NULL NULL utf8 utf8_general_ci varchar(13) select NEVER NULL +def information_schema ROUTINES SECURITY_TYPE 23 NULL NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) select NEVER NULL +def information_schema ROUTINES SPECIFIC_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ROUTINES SQL_DATA_ACCESS 21 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema ROUTINES SQL_MODE 26 NULL NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) select NEVER NULL def information_schema ROUTINES SQL_PATH 22 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SCHEMATA CATALOG_NAME 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema SCHEMATA SCHEMA_NAME 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SCHEMATA CATALOG_NAME 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema SCHEMATA SCHEMA_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL -def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SESSION_STATUS VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SESSION_STATUS VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema SESSION_VARIABLES VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema SPATIAL_REF_SYS AUTH_NAME 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(5) select NEVER NULL -def information_schema SPATIAL_REF_SYS SRID 1 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL -def information_schema SPATIAL_REF_SYS SRTEXT 4 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema SCHEMA_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SESSION_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema SPATIAL_REF_SYS AUTH_SRID 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(5) select NEVER NULL +def information_schema SPATIAL_REF_SYS SRID 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL +def information_schema SPATIAL_REF_SYS SRTEXT 4 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL def information_schema SQL_FUNCTIONS FUNCTION 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1) select NEVER NULL -def information_schema STATISTICS COLUMN_NAME 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema STATISTICS COLUMN_NAME 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL -def information_schema STATISTICS INDEX_COMMENT 16 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select NEVER NULL -def information_schema STATISTICS INDEX_NAME 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema STATISTICS INDEX_SCHEMA 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema STATISTICS INDEX_TYPE 14 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL -def information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(1) select NEVER NULL -def information_schema STATISTICS NULLABLE 13 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema STATISTICS INDEX_COMMENT 16 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) select NEVER NULL +def information_schema STATISTICS INDEX_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema STATISTICS INDEX_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema STATISTICS INDEX_TYPE 14 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select NEVER NULL +def information_schema STATISTICS NON_UNIQUE 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(1) select NEVER NULL +def information_schema STATISTICS NULLABLE 13 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select NEVER NULL -def information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(2) select NEVER NULL +def information_schema STATISTICS SEQ_IN_INDEX 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(2) select NEVER NULL def information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL -def information_schema STATISTICS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema STATISTICS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema STATISTICS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema STATISTICS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema STATISTICS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema STATISTICS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema SYSTEM_VARIABLES DEFAULT_VALUE 5 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select NEVER NULL def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select NEVER NULL def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) select NEVER NULL -def information_schema SYSTEM_VARIABLES READ_ONLY 13 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema SYSTEM_VARIABLES READ_ONLY 13 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema SYSTEM_VARIABLES SESSION_VALUE 2 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT 8 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_TYPE 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT 8 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL @@ -386,104 +386,104 @@ def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NUL def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLES MAX_INDEX_LENGTH 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select NEVER NULL -def information_schema TABLES TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema TABLES TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema TABLES TABLE_COMMENT 21 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema TABLES TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLES TABLE_COMMENT 21 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL +def information_schema TABLES TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema TABLES TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLES TABLE_TYPE 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLES TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLES TABLE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLES TEMPORARY 23 NULL YES varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1) select NEVER NULL def information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select NEVER NULL def information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLESPACES AUTOEXTEND_SIZE 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema TABLESPACES ENGINE 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLESPACES ENGINE 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLESPACES EXTENT_SIZE 5 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLESPACES LOGFILE_GROUP_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLESPACES MAXIMUM_SIZE 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLESPACES NODEGROUP_ID 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL def information_schema TABLESPACES TABLESPACE_COMMENT 9 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select NEVER NULL -def information_schema TABLESPACES TABLESPACE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLESPACES TABLESPACE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema TABLESPACES TABLESPACE_TYPE 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL -def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema TABLE_PRIVILEGES TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TABLE_STATISTICS ROWS_CHANGED 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema TABLE_STATISTICS ROWS_READ 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema TABLE_STATISTICS TABLE_NAME 2 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL -def information_schema TABLE_STATISTICS TABLE_SCHEMA 1 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema TABLE_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TABLE_STATISTICS ROWS_CHANGED 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema TABLE_STATISTICS ROWS_READ 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema TABLE_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL +def information_schema TABLE_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) select NEVER NULL def information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL -def information_schema TRIGGERS ACTION_ORIENTATION 11 '' NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) select NEVER NULL -def information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema TRIGGERS ACTION_ORDER 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) select NEVER NULL +def information_schema TRIGGERS ACTION_ORIENTATION 11 NULL NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) select NEVER NULL +def information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL def information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TRIGGERS ACTION_STATEMENT 10 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL -def information_schema TRIGGERS ACTION_TIMING 12 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL -def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema TRIGGERS COLLATION_CONNECTION 21 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema TRIGGERS ACTION_TIMING 12 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL +def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema TRIGGERS COLLATION_CONNECTION 21 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 2 NULL NULL datetime(2) select NEVER NULL -def information_schema TRIGGERS DATABASE_COLLATION 22 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema TRIGGERS DEFINER 19 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL -def information_schema TRIGGERS EVENT_MANIPULATION 4 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL -def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TRIGGERS EVENT_OBJECT_TABLE 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TRIGGERS SQL_MODE 18 '' NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) select NEVER NULL -def information_schema TRIGGERS TRIGGER_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema TRIGGERS TRIGGER_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema TRIGGERS TRIGGER_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema USER_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL -def information_schema USER_PRIVILEGES IS_GRANTABLE 4 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema USER_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema USER_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL -def information_schema USER_STATISTICS BYTES_RECEIVED 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS BYTES_SENT 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL -def information_schema USER_STATISTICS CONNECTED_TIME 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL -def information_schema USER_STATISTICS CPU_TIME 6 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL -def information_schema USER_STATISTICS DENIED_CONNECTIONS 20 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS EMPTY_QUERIES 23 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS LOST_CONNECTIONS 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS OTHER_COMMANDS 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS ROWS_DELETED 12 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS ROWS_INSERTED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS ROWS_READ 10 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS ROWS_SENT 11 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS ROWS_UPDATED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS SELECT_COMMANDS 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL -def information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS 24 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL -def information_schema USER_STATISTICS UPDATE_COMMANDS 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL -def information_schema USER_STATISTICS USER 1 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL -def information_schema VIEWS ALGORITHM 11 '' NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select NEVER NULL -def information_schema VIEWS CHARACTER_SET_CLIENT 9 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema VIEWS CHECK_OPTION 5 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL -def information_schema VIEWS COLLATION_CONNECTION 10 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL -def information_schema VIEWS DEFINER 7 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL -def information_schema VIEWS IS_UPDATABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL -def information_schema VIEWS SECURITY_TYPE 8 '' NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) select NEVER NULL -def information_schema VIEWS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema VIEWS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema VIEWS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema VIEWS VIEW_DEFINITION 4 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL +def information_schema TRIGGERS DATABASE_COLLATION 22 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema TRIGGERS DEFINER 19 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema TRIGGERS EVENT_MANIPULATION 4 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) select NEVER NULL +def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TRIGGERS SQL_MODE 18 NULL NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) select NEVER NULL +def information_schema TRIGGERS TRIGGER_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema TRIGGERS TRIGGER_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema TRIGGERS TRIGGER_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema USER_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) select NEVER NULL +def information_schema USER_PRIVILEGES IS_GRANTABLE 4 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema USER_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL +def information_schema USER_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL +def information_schema USER_STATISTICS CONNECTED_TIME 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL +def information_schema USER_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL +def information_schema USER_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select NEVER NULL +def information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select NEVER NULL +def information_schema USER_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL +def information_schema USER_STATISTICS USER 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select NEVER NULL +def information_schema VIEWS ALGORITHM 11 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select NEVER NULL +def information_schema VIEWS CHARACTER_SET_CLIENT 9 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema VIEWS CHECK_OPTION 5 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) select NEVER NULL +def information_schema VIEWS COLLATION_CONNECTION 10 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL +def information_schema VIEWS DEFINER 7 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) select NEVER NULL +def information_schema VIEWS IS_UPDATABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) select NEVER NULL +def information_schema VIEWS SECURITY_TYPE 8 NULL NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) select NEVER NULL +def information_schema VIEWS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema VIEWS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema VIEWS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select NEVER NULL ########################################################################## # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH ########################################################################## diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index 0105b6f891c..1a1e9e0ddfb 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -3,125 +3,125 @@ WHERE table_schema = 'information_schema' AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY table_schema, table_name, column_name; 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 DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION -def information_schema ALL_PLUGINS LOAD_OPTION 11 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ALL_PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ALL_PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ALL_PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL def information_schema ALL_PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema ALL_PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ALL_PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_LICENSE 10 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_MATURITY 12 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_STATUS 3 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_TYPE 4 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema ALL_PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema APPLICABLE_ROLES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL +def information_schema ALL_PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL +def information_schema APPLICABLE_ROLES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL def information_schema APPLICABLE_ROLES IS_DEFAULT 4 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema APPLICABLE_ROLES ROLE_NAME 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL -def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) NEVER NULL -def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL -def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL -def information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS BYTES_SENT 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS CLIENT 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS CONNECTED_TIME 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS CPU_TIME 6 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL -def information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_DELETED 12 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_INSERTED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_READ 10 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_SENT 11 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS ROWS_UPDATED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema COLLATIONS CHARACTER_SET_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema COLLATIONS COLLATION_NAME 1 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11) NEVER NULL -def information_schema COLLATIONS IS_COMPILED 5 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema COLLATIONS IS_DEFAULT 4 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL -def information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema APPLICABLE_ROLES IS_GRANTABLE 3 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema APPLICABLE_ROLES ROLE_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL +def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema CHARACTER_SETS DESCRIPTION 3 NULL NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) NEVER NULL +def information_schema CHARACTER_SETS MAXLEN 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL +def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL +def information_schema CLIENT_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS CLIENT 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CLIENT_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS CONNECTED_TIME 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL +def information_schema CLIENT_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema CLIENT_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema CLIENT_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema COLLATIONS CHARACTER_SET_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema COLLATIONS COLLATION_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema COLLATIONS ID 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(11) NEVER NULL +def information_schema COLLATIONS IS_COMPILED 5 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema COLLATIONS IS_DEFAULT 4 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema COLLATIONS SORTLEN 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL +def information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema COLUMNS CHARACTER_SET_NAME 14 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema COLUMNS COLLATION_NAME 15 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema COLUMNS COLUMN_COMMENT 20 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) NEVER NULL +def information_schema COLUMNS COLUMN_COMMENT 20 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) NEVER NULL def information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema COLUMNS COLUMN_KEY 17 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema COLUMNS COLUMN_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMNS COLUMN_TYPE 16 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema COLUMNS DATA_TYPE 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMNS COLUMN_KEY 17 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema COLUMNS COLUMN_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMNS COLUMN_TYPE 16 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema COLUMNS DATA_TYPE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema COLUMNS EXTRA 18 '' NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) NEVER NULL +def information_schema COLUMNS EXTRA 18 NULL NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30) NEVER NULL def information_schema COLUMNS GENERATION_EXPRESSION 22 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema COLUMNS IS_GENERATED 21 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL -def information_schema COLUMNS IS_NULLABLE 7 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema COLUMNS IS_GENERATED 21 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL +def information_schema COLUMNS IS_NULLABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema COLUMNS PRIVILEGES 19 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL -def information_schema COLUMNS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema COLUMNS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMNS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMN_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL -def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMNS ORDINAL_POSITION 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema COLUMNS PRIVILEGES 19 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL +def information_schema COLUMNS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema COLUMNS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMNS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMN_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ENABLED_ROLES ROLE_NAME 1 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL -def information_schema ENGINES COMMENT 3 '' NO varchar 160 480 NULL NULL NULL utf8 utf8_general_ci varchar(160) NEVER NULL -def information_schema ENGINES ENGINE 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ENGINES COMMENT 3 NULL NO varchar 160 480 NULL NULL NULL utf8 utf8_general_ci varchar(160) NEVER NULL +def information_schema ENGINES ENGINE 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ENGINES SAVEPOINTS 6 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema ENGINES SUPPORT 2 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL +def information_schema ENGINES SUPPORT 2 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL def information_schema ENGINES TRANSACTIONS 4 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema ENGINES XA 5 NULL YES varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema EVENTS CHARACTER_SET_CLIENT 22 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema EVENTS COLLATION_CONNECTION 23 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema EVENTS CREATED 17 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema EVENTS DATABASE_COLLATION 24 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema EVENTS DEFINER 4 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema EVENTS CHARACTER_SET_CLIENT 22 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema EVENTS COLLATION_CONNECTION 23 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema EVENTS CREATED 17 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL +def information_schema EVENTS DATABASE_COLLATION 24 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema EVENTS DEFINER 4 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL def information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema EVENTS EVENT_BODY 6 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL -def information_schema EVENTS EVENT_CATALOG 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema EVENTS EVENT_COMMENT 20 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema EVENTS EVENT_DEFINITION 7 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema EVENTS EVENT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema EVENTS EVENT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema EVENTS EVENT_TYPE 8 '' NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) NEVER NULL +def information_schema EVENTS EVENT_BODY 6 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL +def information_schema EVENTS EVENT_CATALOG 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema EVENTS EVENT_COMMENT 20 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema EVENTS EVENT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema EVENTS EVENT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema EVENTS EVENT_TYPE 8 NULL NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) NEVER NULL def information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) NEVER NULL def information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL NULL utf8 utf8_general_ci varchar(256) NEVER NULL -def information_schema EVENTS LAST_ALTERED 18 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL +def information_schema EVENTS LAST_ALTERED 18 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema EVENTS ON_COMPLETION 16 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL -def information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL -def information_schema EVENTS SQL_MODE 12 '' NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) NEVER NULL +def information_schema EVENTS ON_COMPLETION 16 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL +def information_schema EVENTS ORIGINATOR 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL +def information_schema EVENTS SQL_MODE 12 NULL NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) NEVER NULL def information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema EVENTS STATUS 15 '' NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) NEVER NULL -def information_schema EVENTS TIME_ZONE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema EVENTS STATUS 15 NULL NO varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) NEVER NULL +def information_schema EVENTS TIME_ZONE 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL @@ -131,12 +131,12 @@ def information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL N def information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL -def information_schema FILES ENGINE 10 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL +def information_schema FILES ENGINE 10 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema FILES EXTENT_SIZE 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_general_ci varchar(255) NEVER NULL -def information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL +def information_schema FILES FILE_ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema FILES FILE_NAME 2 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema FILES FILE_TYPE 3 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL +def information_schema FILES FILE_TYPE 3 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL def information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL @@ -149,9 +149,9 @@ def information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 20 0 NULL def information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) NEVER NULL -def information_schema FILES STATUS 37 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL +def information_schema FILES STATUS 37 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL def information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema FILES TABLE_CATALOG 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema FILES TABLE_CATALOG 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL @@ -160,82 +160,82 @@ def information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 def information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema FILES VERSION 25 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL -def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL -def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GEOMETRY_COLUMNS MAX_PPR 12 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL -def information_schema GEOMETRY_COLUMNS SRID 13 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL -def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL -def information_schema GLOBAL_STATUS VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema INDEX_STATISTICS INDEX_NAME 3 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL -def information_schema INDEX_STATISTICS ROWS_READ 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema INDEX_STATISTICS TABLE_NAME 2 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL -def information_schema INDEX_STATISTICS TABLE_SCHEMA 1 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL +def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL +def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL +def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GEOMETRY_COLUMNS MAX_PPR 12 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL +def information_schema GEOMETRY_COLUMNS SRID 13 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL +def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL +def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema INDEX_STATISTICS INDEX_NAME 3 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL +def information_schema INDEX_STATISTICS ROWS_READ 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema INDEX_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL +def information_schema INDEX_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL def information_schema KEYWORDS WORD 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema KEY_CACHES BLOCK_SIZE 5 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES DIRTY_BLOCKS 8 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES FULL_SIZE 4 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES KEY_CACHE_NAME 1 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL -def information_schema KEY_CACHES READS 10 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES READ_REQUESTS 9 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES BLOCK_SIZE 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES DIRTY_BLOCKS 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES FULL_SIZE 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES KEY_CACHE_NAME 1 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL +def information_schema KEY_CACHES READS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES READ_REQUESTS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema KEY_CACHES SEGMENTS 2 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned NEVER NULL def information_schema KEY_CACHES SEGMENT_NUMBER 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(3) unsigned NEVER NULL -def information_schema KEY_CACHES UNUSED_BLOCKS 7 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES USED_BLOCKS 6 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES WRITES 12 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_CACHES WRITE_REQUESTS 11 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL +def information_schema KEY_CACHES UNUSED_BLOCKS 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES USED_BLOCKS 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES WRITES 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_CACHES WRITE_REQUESTS 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL def information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(10) NEVER NULL def information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL -def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(20) NEVER NULL -def information_schema OPTIMIZER_TRACE QUERY 1 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema OPTIMIZER_TRACE TRACE 2 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES 4 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) NEVER NULL +def information_schema OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(20) NEVER NULL +def information_schema OPTIMIZER_TRACE QUERY 1 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema OPTIMIZER_TRACE TRACE 2 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema PARAMETERS CHARACTER_MAXIMUM_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL def information_schema PARAMETERS CHARACTER_OCTET_LENGTH 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL def information_schema PARAMETERS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PARAMETERS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PARAMETERS DATA_TYPE 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PARAMETERS DATA_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PARAMETERS DATETIME_PRECISION 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema PARAMETERS DTD_IDENTIFIER 15 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema PARAMETERS DTD_IDENTIFIER 15 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema PARAMETERS NUMERIC_PRECISION 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL def information_schema PARAMETERS NUMERIC_SCALE 11 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL -def information_schema PARAMETERS ORDINAL_POSITION 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL +def information_schema PARAMETERS ORDINAL_POSITION 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL def information_schema PARAMETERS PARAMETER_MODE 5 NULL YES varchar 5 15 NULL NULL NULL utf8 utf8_general_ci varchar(5) NEVER NULL def information_schema PARAMETERS PARAMETER_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PARAMETERS ROUTINE_TYPE 16 '' NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) NEVER NULL -def information_schema PARAMETERS SPECIFIC_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema PARAMETERS SPECIFIC_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PARAMETERS SPECIFIC_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema PARAMETERS ROUTINE_TYPE 16 NULL NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) NEVER NULL +def information_schema PARAMETERS SPECIFIC_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema PARAMETERS SPECIFIC_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PARAMETERS SPECIFIC_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PARTITIONS AVG_ROW_LENGTH 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema PARTITIONS DATA_FREE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema PARTITIONS DATA_LENGTH 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema PARTITIONS INDEX_LENGTH 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema PARTITIONS NODEGROUP 24 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL -def information_schema PARTITIONS PARTITION_COMMENT 23 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL +def information_schema PARTITIONS NODEGROUP 24 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL +def information_schema PARTITIONS PARTITION_COMMENT 23 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL def information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 18 54 NULL NULL NULL utf8 utf8_general_ci varchar(18) NEVER NULL @@ -246,133 +246,133 @@ def information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 N def information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PARTITIONS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema PARTITIONS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema PARTITIONS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PARTITIONS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema PARTITIONS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PARTITIONS TABLE_ROWS 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema PARTITIONS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema PLUGINS LOAD_OPTION 11 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PLUGINS LOAD_OPTION 11 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PLUGINS PLUGIN_AUTH_VERSION 13 NULL YES varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema PLUGINS PLUGIN_LICENSE 10 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL -def information_schema PLUGINS PLUGIN_MATURITY 12 '' NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL -def information_schema PLUGINS PLUGIN_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PLUGINS PLUGIN_STATUS 3 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL -def information_schema PLUGINS PLUGIN_TYPE 4 '' NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL -def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema PLUGINS PLUGIN_VERSION 2 '' NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL -def information_schema PROCESSLIST COMMAND 5 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL +def information_schema PLUGINS PLUGIN_LICENSE 10 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL +def information_schema PLUGINS PLUGIN_MATURITY 12 NULL NO varchar 12 36 NULL NULL NULL utf8 utf8_general_ci varchar(12) NEVER NULL +def information_schema PLUGINS PLUGIN_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PLUGINS PLUGIN_STATUS 3 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL +def information_schema PLUGINS PLUGIN_TYPE 4 NULL NO varchar 80 240 NULL NULL NULL utf8 utf8_general_ci varchar(80) NEVER NULL +def information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL +def information_schema PLUGINS PLUGIN_VERSION 2 NULL NO varchar 20 60 NULL NULL NULL utf8 utf8_general_ci varchar(20) NEVER NULL +def information_schema PROCESSLIST COMMAND 5 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL def information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PROCESSLIST EXAMINED_ROWS 15 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL -def information_schema PROCESSLIST HOST 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL +def information_schema PROCESSLIST EXAMINED_ROWS 15 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL +def information_schema PROCESSLIST HOST 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema PROCESSLIST ID 1 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL def information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema PROCESSLIST INFO_BINARY 17 NULL YES blob 65535 65535 NULL NULL NULL NULL NULL blob NEVER NULL -def information_schema PROCESSLIST MAX_MEMORY_USED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL -def information_schema PROCESSLIST MAX_STAGE 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL -def information_schema PROCESSLIST MEMORY_USED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL -def information_schema PROCESSLIST PROGRESS 12 0.000 NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) NEVER NULL -def information_schema PROCESSLIST QUERY_ID 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL -def information_schema PROCESSLIST STAGE 10 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL +def information_schema PROCESSLIST MAX_MEMORY_USED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL +def information_schema PROCESSLIST MAX_STAGE 11 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL +def information_schema PROCESSLIST MEMORY_USED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(7) NEVER NULL +def information_schema PROCESSLIST PROGRESS 12 NULL NO decimal NULL NULL 7 3 NULL NULL NULL decimal(7,3) NEVER NULL +def information_schema PROCESSLIST QUERY_ID 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL +def information_schema PROCESSLIST STAGE 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL def information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema PROCESSLIST TID 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL -def information_schema PROCESSLIST TIME 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL -def information_schema PROCESSLIST TIME_MS 9 0.000 NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) NEVER NULL -def information_schema PROCESSLIST USER 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema PROCESSLIST TID 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL +def information_schema PROCESSLIST TIME 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(7) NEVER NULL +def information_schema PROCESSLIST TIME_MS 9 NULL NO decimal NULL NULL 22 3 NULL NULL NULL decimal(22,3) NEVER NULL +def information_schema PROCESSLIST USER 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ROUTINES CHARACTER_MAXIMUM_LENGTH 7 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL def information_schema ROUTINES CHARACTER_OCTET_LENGTH 8 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL -def information_schema ROUTINES CHARACTER_SET_CLIENT 29 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema ROUTINES CHARACTER_SET_CLIENT 29 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema ROUTINES CHARACTER_SET_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES COLLATION_CONNECTION 30 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema ROUTINES COLLATION_CONNECTION 30 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema ROUTINES COLLATION_NAME 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES CREATED 24 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL -def information_schema ROUTINES DATABASE_COLLATION 31 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema ROUTINES DATA_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ROUTINES CREATED 24 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL +def information_schema ROUTINES DATABASE_COLLATION 31 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema ROUTINES DATA_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ROUTINES DATETIME_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema ROUTINES DEFINER 28 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema ROUTINES DEFINER 28 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL def information_schema ROUTINES DTD_IDENTIFIER 14 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema ROUTINES EXTERNAL_LANGUAGE 18 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema ROUTINES EXTERNAL_NAME 17 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES IS_DETERMINISTIC 20 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema ROUTINES LAST_ALTERED 25 '0000-00-00 00:00:00' NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL +def information_schema ROUTINES IS_DETERMINISTIC 20 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema ROUTINES LAST_ALTERED 25 NULL NO datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema ROUTINES NUMERIC_PRECISION 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL def information_schema ROUTINES NUMERIC_SCALE 10 NULL YES int NULL NULL 10 0 NULL NULL NULL int(21) NEVER NULL -def information_schema ROUTINES PARAMETER_STYLE 19 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL -def information_schema ROUTINES ROUTINE_BODY 15 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL -def information_schema ROUTINES ROUTINE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema ROUTINES ROUTINE_COMMENT 27 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema ROUTINES PARAMETER_STYLE 19 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL +def information_schema ROUTINES ROUTINE_BODY 15 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL +def information_schema ROUTINES ROUTINE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema ROUTINES ROUTINE_COMMENT 27 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema ROUTINES ROUTINE_DEFINITION 16 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema ROUTINES ROUTINE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES ROUTINE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES ROUTINE_TYPE 5 '' NO varchar 13 39 NULL NULL NULL utf8 utf8_general_ci varchar(13) NEVER NULL -def information_schema ROUTINES SECURITY_TYPE 23 '' NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) NEVER NULL -def information_schema ROUTINES SPECIFIC_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES SQL_DATA_ACCESS 21 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema ROUTINES SQL_MODE 26 '' NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) NEVER NULL +def information_schema ROUTINES ROUTINE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ROUTINES ROUTINE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ROUTINES ROUTINE_TYPE 5 NULL NO varchar 13 39 NULL NULL NULL utf8 utf8_general_ci varchar(13) NEVER NULL +def information_schema ROUTINES SECURITY_TYPE 23 NULL NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) NEVER NULL +def information_schema ROUTINES SPECIFIC_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ROUTINES SQL_DATA_ACCESS 21 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema ROUTINES SQL_MODE 26 NULL NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) NEVER NULL def information_schema ROUTINES SQL_PATH 22 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SCHEMATA CATALOG_NAME 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema SCHEMATA SCHEMA_NAME 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SCHEMATA CATALOG_NAME 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema SCHEMATA SCHEMA_NAME 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema SCHEMA_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL -def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SESSION_STATUS VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SESSION_STATUS VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema SESSION_VARIABLES VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema SPATIAL_REF_SYS AUTH_NAME 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(5) NEVER NULL -def information_schema SPATIAL_REF_SYS SRID 1 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL -def information_schema SPATIAL_REF_SYS SRTEXT 4 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema SCHEMA_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SESSION_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema SPATIAL_REF_SYS AUTH_SRID 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(5) NEVER NULL +def information_schema SPATIAL_REF_SYS SRID 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL +def information_schema SPATIAL_REF_SYS SRTEXT 4 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL def information_schema SQL_FUNCTIONS FUNCTION 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1) NEVER NULL -def information_schema STATISTICS COLUMN_NAME 8 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema STATISTICS COLUMN_NAME 8 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL -def information_schema STATISTICS INDEX_COMMENT 16 '' NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) NEVER NULL -def information_schema STATISTICS INDEX_NAME 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema STATISTICS INDEX_SCHEMA 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema STATISTICS INDEX_TYPE 14 '' NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL -def information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(1) NEVER NULL -def information_schema STATISTICS NULLABLE 13 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema STATISTICS INDEX_COMMENT 16 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024) NEVER NULL +def information_schema STATISTICS INDEX_NAME 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema STATISTICS INDEX_SCHEMA 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema STATISTICS INDEX_TYPE 14 NULL NO varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) NEVER NULL +def information_schema STATISTICS NON_UNIQUE 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(1) NEVER NULL +def information_schema STATISTICS NULLABLE 13 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) NEVER NULL -def information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(2) NEVER NULL +def information_schema STATISTICS SEQ_IN_INDEX 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(2) NEVER NULL def information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL -def information_schema STATISTICS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema STATISTICS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema STATISTICS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema STATISTICS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema STATISTICS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema STATISTICS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema SYSTEM_VARIABLES COMMAND_LINE_ARGUMENT 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema SYSTEM_VARIABLES DEFAULT_VALUE 5 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL def information_schema SYSTEM_VARIABLES ENUM_VALUE_LIST 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL def information_schema SYSTEM_VARIABLES GLOBAL_VALUE 3 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SYSTEM_VARIABLES GLOBAL_VALUE_ORIGIN 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema SYSTEM_VARIABLES NUMERIC_BLOCK_SIZE 11 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) NEVER NULL def information_schema SYSTEM_VARIABLES NUMERIC_MAX_VALUE 10 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) NEVER NULL def information_schema SYSTEM_VARIABLES NUMERIC_MIN_VALUE 9 NULL YES varchar 21 63 NULL NULL NULL utf8 utf8_general_ci varchar(21) NEVER NULL -def information_schema SYSTEM_VARIABLES READ_ONLY 13 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema SYSTEM_VARIABLES READ_ONLY 13 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema SYSTEM_VARIABLES SESSION_VALUE 2 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT 8 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema SYSTEM_VARIABLES VARIABLE_TYPE 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_COMMENT 8 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_SCOPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema SYSTEM_VARIABLES VARIABLE_TYPE 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL @@ -386,104 +386,104 @@ def information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 20 0 NUL def information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLES MAX_INDEX_LENGTH 22 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) NEVER NULL -def information_schema TABLES TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema TABLES TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL def information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema TABLES TABLE_COMMENT 21 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema TABLES TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLES TABLE_COMMENT 21 NULL NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def information_schema TABLES TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema TABLES TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLES TABLE_TYPE 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLES TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLES TABLE_TYPE 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLES TEMPORARY 23 NULL YES varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1) NEVER NULL def information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime NEVER NULL def information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLESPACES AUTOEXTEND_SIZE 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema TABLESPACES ENGINE 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLESPACES ENGINE 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLESPACES EXTENT_SIZE 5 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLESPACES LOGFILE_GROUP_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLESPACES MAXIMUM_SIZE 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLESPACES NODEGROUP_ID 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL def information_schema TABLESPACES TABLESPACE_COMMENT 9 NULL YES varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL -def information_schema TABLESPACES TABLESPACE_NAME 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLESPACES TABLESPACE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema TABLESPACES TABLESPACE_TYPE 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL -def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema TABLE_PRIVILEGES TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TABLE_STATISTICS ROWS_CHANGED 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema TABLE_STATISTICS ROWS_READ 3 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema TABLE_STATISTICS TABLE_NAME 2 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL -def information_schema TABLE_STATISTICS TABLE_SCHEMA 1 '' NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema TABLE_PRIVILEGES TABLE_NAME 4 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TABLE_STATISTICS ROWS_CHANGED 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema TABLE_STATISTICS ROWS_CHANGED_X_INDEXES 5 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema TABLE_STATISTICS ROWS_READ 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema TABLE_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL +def information_schema TABLE_STATISTICS TABLE_SCHEMA 1 NULL NO varchar 192 576 NULL NULL NULL utf8 utf8_general_ci varchar(192) NEVER NULL def information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL -def information_schema TRIGGERS ACTION_ORIENTATION 11 '' NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) NEVER NULL -def information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema TRIGGERS ACTION_ORDER 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(4) NEVER NULL +def information_schema TRIGGERS ACTION_ORIENTATION 11 NULL NO varchar 9 27 NULL NULL NULL utf8 utf8_general_ci varchar(9) NEVER NULL +def information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL def information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TRIGGERS ACTION_STATEMENT 10 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL -def information_schema TRIGGERS ACTION_TIMING 12 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL -def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema TRIGGERS COLLATION_CONNECTION 21 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema TRIGGERS ACTION_TIMING 12 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL +def information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema TRIGGERS COLLATION_CONNECTION 21 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL 2 NULL NULL datetime(2) NEVER NULL -def information_schema TRIGGERS DATABASE_COLLATION 22 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema TRIGGERS DEFINER 19 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL -def information_schema TRIGGERS EVENT_MANIPULATION 4 '' NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL -def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TRIGGERS EVENT_OBJECT_TABLE 7 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TRIGGERS SQL_MODE 18 '' NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) NEVER NULL -def information_schema TRIGGERS TRIGGER_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema TRIGGERS TRIGGER_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema TRIGGERS TRIGGER_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema USER_PRIVILEGES GRANTEE 1 '' NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL -def information_schema USER_PRIVILEGES IS_GRANTABLE 4 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema USER_PRIVILEGES TABLE_CATALOG 2 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema USER_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL -def information_schema USER_STATISTICS BYTES_RECEIVED 7 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS BYTES_SENT 8 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL -def information_schema USER_STATISTICS CONNECTED_TIME 4 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL -def information_schema USER_STATISTICS CPU_TIME 6 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL -def information_schema USER_STATISTICS DENIED_CONNECTIONS 20 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS EMPTY_QUERIES 23 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS LOST_CONNECTIONS 21 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS OTHER_COMMANDS 17 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS ROWS_DELETED 12 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS ROWS_INSERTED 13 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS ROWS_READ 10 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS ROWS_SENT 11 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS ROWS_UPDATED 14 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS SELECT_COMMANDS 15 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL -def information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS 24 0 NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL -def information_schema USER_STATISTICS UPDATE_COMMANDS 16 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL -def information_schema USER_STATISTICS USER 1 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL -def information_schema VIEWS ALGORITHM 11 '' NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) NEVER NULL -def information_schema VIEWS CHARACTER_SET_CLIENT 9 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema VIEWS CHECK_OPTION 5 '' NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL -def information_schema VIEWS COLLATION_CONNECTION 10 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL -def information_schema VIEWS DEFINER 7 '' NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL -def information_schema VIEWS IS_UPDATABLE 6 '' NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL -def information_schema VIEWS SECURITY_TYPE 8 '' NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) NEVER NULL -def information_schema VIEWS TABLE_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema VIEWS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema VIEWS TABLE_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema VIEWS VIEW_DEFINITION 4 '' NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL +def information_schema TRIGGERS DATABASE_COLLATION 22 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema TRIGGERS DEFINER 19 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema TRIGGERS EVENT_MANIPULATION 4 NULL NO varchar 6 18 NULL NULL NULL utf8 utf8_general_ci varchar(6) NEVER NULL +def information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TRIGGERS SQL_MODE 18 NULL NO varchar 8192 24576 NULL NULL NULL utf8 utf8_general_ci varchar(8192) NEVER NULL +def information_schema TRIGGERS TRIGGER_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema TRIGGERS TRIGGER_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema TRIGGERS TRIGGER_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema USER_PRIVILEGES GRANTEE 1 NULL NO varchar 190 570 NULL NULL NULL utf8 utf8_general_ci varchar(190) NEVER NULL +def information_schema USER_PRIVILEGES IS_GRANTABLE 4 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema USER_STATISTICS ACCESS_DENIED 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS BINLOG_BYTES_WRITTEN 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS BUSY_TIME 5 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL +def information_schema USER_STATISTICS BYTES_RECEIVED 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS BYTES_SENT 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS COMMIT_TRANSACTIONS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS CONCURRENT_CONNECTIONS 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL +def information_schema USER_STATISTICS CONNECTED_TIME 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL +def information_schema USER_STATISTICS CPU_TIME 6 NULL NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL +def information_schema USER_STATISTICS DENIED_CONNECTIONS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS EMPTY_QUERIES 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS LOST_CONNECTIONS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS MAX_STATEMENT_TIME_EXCEEDED 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS OTHER_COMMANDS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS ROLLBACK_TRANSACTIONS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS ROWS_DELETED 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS ROWS_INSERTED 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS ROWS_READ 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS ROWS_SENT 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS ROWS_UPDATED 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS SELECT_COMMANDS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS TOTAL_CONNECTIONS 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) NEVER NULL +def information_schema USER_STATISTICS TOTAL_SSL_CONNECTIONS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned NEVER NULL +def information_schema USER_STATISTICS UPDATE_COMMANDS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL +def information_schema USER_STATISTICS USER 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) NEVER NULL +def information_schema VIEWS ALGORITHM 11 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) NEVER NULL +def information_schema VIEWS CHARACTER_SET_CLIENT 9 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema VIEWS CHECK_OPTION 5 NULL NO varchar 8 24 NULL NULL NULL utf8 utf8_general_ci varchar(8) NEVER NULL +def information_schema VIEWS COLLATION_CONNECTION 10 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL +def information_schema VIEWS DEFINER 7 NULL NO varchar 189 567 NULL NULL NULL utf8 utf8_general_ci varchar(189) NEVER NULL +def information_schema VIEWS IS_UPDATABLE 6 NULL NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3) NEVER NULL +def information_schema VIEWS SECURITY_TYPE 8 NULL NO varchar 7 21 NULL NULL NULL utf8 utf8_general_ci varchar(7) NEVER NULL +def information_schema VIEWS TABLE_CATALOG 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema VIEWS TABLE_NAME 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema VIEWS TABLE_SCHEMA 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext NEVER NULL ########################################################################## # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH ########################################################################## diff --git a/mysql-test/suite/funcs_1/r/is_engines.result b/mysql-test/suite/funcs_1/r/is_engines.result index 54372ae9f39..949fa93f83d 100644 --- a/mysql-test/suite/funcs_1/r/is_engines.result +++ b/mysql-test/suite/funcs_1/r/is_engines.result @@ -28,27 +28,27 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.ENGINES; Field Type Null Key Default Extra -ENGINE varchar(64) NO -SUPPORT varchar(8) NO -COMMENT varchar(160) NO +ENGINE varchar(64) NO NULL +SUPPORT varchar(8) NO NULL +COMMENT varchar(160) NO NULL TRANSACTIONS varchar(3) YES NULL XA varchar(3) YES NULL SAVEPOINTS varchar(3) YES NULL SHOW CREATE TABLE information_schema.ENGINES; Table Create Table ENGINES CREATE TEMPORARY TABLE `ENGINES` ( - `ENGINE` varchar(64) NOT NULL DEFAULT '', - `SUPPORT` varchar(8) NOT NULL DEFAULT '', - `COMMENT` varchar(160) NOT NULL DEFAULT '', - `TRANSACTIONS` varchar(3) DEFAULT NULL, - `XA` varchar(3) DEFAULT NULL, - `SAVEPOINTS` varchar(3) DEFAULT NULL + `ENGINE` varchar(64) NOT NULL, + `SUPPORT` varchar(8) NOT NULL, + `COMMENT` varchar(160) NOT NULL, + `TRANSACTIONS` varchar(3), + `XA` varchar(3), + `SAVEPOINTS` varchar(3) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.ENGINES; Field Type Null Key Default Extra -ENGINE varchar(64) NO -SUPPORT varchar(8) NO -COMMENT varchar(160) NO +ENGINE varchar(64) NO NULL +SUPPORT varchar(8) NO NULL +COMMENT varchar(160) NO NULL TRANSACTIONS varchar(3) YES NULL XA varchar(3) YES NULL SAVEPOINTS varchar(3) YES NULL diff --git a/mysql-test/suite/funcs_1/r/is_events.result b/mysql-test/suite/funcs_1/r/is_events.result index ca9e7427513..09bd4e804a1 100644 --- a/mysql-test/suite/funcs_1/r/is_events.result +++ b/mysql-test/suite/funcs_1/r/is_events.result @@ -28,84 +28,84 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.EVENTS; Field Type Null Key Default Extra -EVENT_CATALOG varchar(64) NO -EVENT_SCHEMA varchar(64) NO -EVENT_NAME varchar(64) NO -DEFINER varchar(189) NO -TIME_ZONE varchar(64) NO -EVENT_BODY varchar(8) NO -EVENT_DEFINITION longtext NO -EVENT_TYPE varchar(9) NO +EVENT_CATALOG varchar(64) NO NULL +EVENT_SCHEMA varchar(64) NO NULL +EVENT_NAME varchar(64) NO NULL +DEFINER varchar(189) NO NULL +TIME_ZONE varchar(64) NO NULL +EVENT_BODY varchar(8) NO NULL +EVENT_DEFINITION longtext NO NULL +EVENT_TYPE varchar(9) NO NULL EXECUTE_AT datetime YES NULL INTERVAL_VALUE varchar(256) YES NULL INTERVAL_FIELD varchar(18) YES NULL -SQL_MODE varchar(8192) NO +SQL_MODE varchar(8192) NO NULL STARTS datetime YES NULL ENDS datetime YES NULL -STATUS varchar(18) NO -ON_COMPLETION varchar(12) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 +STATUS varchar(18) NO NULL +ON_COMPLETION varchar(12) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL LAST_EXECUTED datetime YES NULL -EVENT_COMMENT varchar(64) NO -ORIGINATOR bigint(10) NO 0 -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +EVENT_COMMENT varchar(64) NO NULL +ORIGINATOR bigint(10) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SHOW CREATE TABLE information_schema.EVENTS; Table Create Table EVENTS CREATE TEMPORARY TABLE `EVENTS` ( - `EVENT_CATALOG` varchar(64) NOT NULL DEFAULT '', - `EVENT_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `EVENT_NAME` varchar(64) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `TIME_ZONE` varchar(64) NOT NULL DEFAULT '', - `EVENT_BODY` varchar(8) NOT NULL DEFAULT '', - `EVENT_DEFINITION` longtext NOT NULL DEFAULT '', - `EVENT_TYPE` varchar(9) NOT NULL DEFAULT '', - `EXECUTE_AT` datetime DEFAULT NULL, - `INTERVAL_VALUE` varchar(256) DEFAULT NULL, - `INTERVAL_FIELD` varchar(18) DEFAULT NULL, - `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `STARTS` datetime DEFAULT NULL, - `ENDS` datetime DEFAULT NULL, - `STATUS` varchar(18) NOT NULL DEFAULT '', - `ON_COMPLETION` varchar(12) NOT NULL DEFAULT '', - `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `LAST_EXECUTED` datetime DEFAULT NULL, - `EVENT_COMMENT` varchar(64) NOT NULL DEFAULT '', - `ORIGINATOR` bigint(10) NOT NULL DEFAULT 0, - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' + `EVENT_CATALOG` varchar(64) NOT NULL, + `EVENT_SCHEMA` varchar(64) NOT NULL, + `EVENT_NAME` varchar(64) NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `TIME_ZONE` varchar(64) NOT NULL, + `EVENT_BODY` varchar(8) NOT NULL, + `EVENT_DEFINITION` longtext NOT NULL, + `EVENT_TYPE` varchar(9) NOT NULL, + `EXECUTE_AT` datetime, + `INTERVAL_VALUE` varchar(256), + `INTERVAL_FIELD` varchar(18), + `SQL_MODE` varchar(8192) NOT NULL, + `STARTS` datetime, + `ENDS` datetime, + `STATUS` varchar(18) NOT NULL, + `ON_COMPLETION` varchar(12) NOT NULL, + `CREATED` datetime NOT NULL, + `LAST_ALTERED` datetime NOT NULL, + `LAST_EXECUTED` datetime, + `EVENT_COMMENT` varchar(64) NOT NULL, + `ORIGINATOR` bigint(10) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `DATABASE_COLLATION` varchar(32) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.EVENTS; Field Type Null Key Default Extra -EVENT_CATALOG varchar(64) NO -EVENT_SCHEMA varchar(64) NO -EVENT_NAME varchar(64) NO -DEFINER varchar(189) NO -TIME_ZONE varchar(64) NO -EVENT_BODY varchar(8) NO -EVENT_DEFINITION longtext NO -EVENT_TYPE varchar(9) NO +EVENT_CATALOG varchar(64) NO NULL +EVENT_SCHEMA varchar(64) NO NULL +EVENT_NAME varchar(64) NO NULL +DEFINER varchar(189) NO NULL +TIME_ZONE varchar(64) NO NULL +EVENT_BODY varchar(8) NO NULL +EVENT_DEFINITION longtext NO NULL +EVENT_TYPE varchar(9) NO NULL EXECUTE_AT datetime YES NULL INTERVAL_VALUE varchar(256) YES NULL INTERVAL_FIELD varchar(18) YES NULL -SQL_MODE varchar(8192) NO +SQL_MODE varchar(8192) NO NULL STARTS datetime YES NULL ENDS datetime YES NULL -STATUS varchar(18) NO -ON_COMPLETION varchar(12) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 +STATUS varchar(18) NO NULL +ON_COMPLETION varchar(12) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL LAST_EXECUTED datetime YES NULL -EVENT_COMMENT varchar(64) NO -ORIGINATOR bigint(10) NO 0 -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +EVENT_COMMENT varchar(64) NO NULL +ORIGINATOR bigint(10) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SELECT event_catalog, event_name, event_body, event_type, event_type, status, on_completion FROM information_schema.events diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result index efb67e32cee..6b4f3712d4e 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result @@ -28,14 +28,14 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.KEY_COLUMN_USAGE; Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(512) NO -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 +CONSTRAINT_CATALOG varchar(512) NO NULL +CONSTRAINT_SCHEMA varchar(64) NO NULL +CONSTRAINT_NAME varchar(64) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +ORDINAL_POSITION bigint(10) NO NULL POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL REFERENCED_TABLE_SCHEMA varchar(64) YES NULL REFERENCED_TABLE_NAME varchar(64) YES NULL @@ -43,29 +43,29 @@ REFERENCED_COLUMN_NAME varchar(64) YES NULL SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE; Table Create Table KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( - `CONSTRAINT_CATALOG` varchar(512) NOT NULL DEFAULT '', - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` bigint(10) NOT NULL DEFAULT 0, - `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) DEFAULT NULL, - `REFERENCED_TABLE_SCHEMA` varchar(64) DEFAULT NULL, - `REFERENCED_TABLE_NAME` varchar(64) DEFAULT NULL, - `REFERENCED_COLUMN_NAME` varchar(64) DEFAULT NULL + `CONSTRAINT_CATALOG` varchar(512) NOT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL, + `CONSTRAINT_NAME` varchar(64) NOT NULL, + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `COLUMN_NAME` varchar(64) NOT NULL, + `ORDINAL_POSITION` bigint(10) NOT NULL, + `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10), + `REFERENCED_TABLE_SCHEMA` varchar(64), + `REFERENCED_TABLE_NAME` varchar(64), + `REFERENCED_COLUMN_NAME` varchar(64) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE; Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(512) NO -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 +CONSTRAINT_CATALOG varchar(512) NO NULL +CONSTRAINT_SCHEMA varchar(64) NO NULL +CONSTRAINT_NAME varchar(64) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +ORDINAL_POSITION bigint(10) NO NULL POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL REFERENCED_TABLE_SCHEMA varchar(64) YES NULL REFERENCED_TABLE_NAME varchar(64) YES NULL diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result index cf67be8f7a0..b21498a4a83 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result @@ -28,14 +28,14 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.KEY_COLUMN_USAGE; Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(512) NO -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 +CONSTRAINT_CATALOG varchar(512) NO NULL +CONSTRAINT_SCHEMA varchar(64) NO NULL +CONSTRAINT_NAME varchar(64) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +ORDINAL_POSITION bigint(10) NO NULL POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL REFERENCED_TABLE_SCHEMA varchar(64) YES NULL REFERENCED_TABLE_NAME varchar(64) YES NULL @@ -43,29 +43,29 @@ REFERENCED_COLUMN_NAME varchar(64) YES NULL SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE; Table Create Table KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( - `CONSTRAINT_CATALOG` varchar(512) NOT NULL DEFAULT '', - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `ORDINAL_POSITION` bigint(10) NOT NULL DEFAULT 0, - `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) DEFAULT NULL, - `REFERENCED_TABLE_SCHEMA` varchar(64) DEFAULT NULL, - `REFERENCED_TABLE_NAME` varchar(64) DEFAULT NULL, - `REFERENCED_COLUMN_NAME` varchar(64) DEFAULT NULL + `CONSTRAINT_CATALOG` varchar(512) NOT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL, + `CONSTRAINT_NAME` varchar(64) NOT NULL, + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `COLUMN_NAME` varchar(64) NOT NULL, + `ORDINAL_POSITION` bigint(10) NOT NULL, + `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10), + `REFERENCED_TABLE_SCHEMA` varchar(64), + `REFERENCED_TABLE_NAME` varchar(64), + `REFERENCED_COLUMN_NAME` varchar(64) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE; Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(512) NO -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 +CONSTRAINT_CATALOG varchar(512) NO NULL +CONSTRAINT_SCHEMA varchar(64) NO NULL +CONSTRAINT_NAME varchar(64) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +COLUMN_NAME varchar(64) NO NULL +ORDINAL_POSITION bigint(10) NO NULL POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL REFERENCED_TABLE_SCHEMA varchar(64) YES NULL REFERENCED_TABLE_NAME varchar(64) YES NULL diff --git a/mysql-test/suite/funcs_1/r/is_routines.result b/mysql-test/suite/funcs_1/r/is_routines.result index 5f8e965de84..2b268d78ee7 100644 --- a/mysql-test/suite/funcs_1/r/is_routines.result +++ b/mysql-test/suite/funcs_1/r/is_routines.result @@ -29,12 +29,12 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.ROUTINES; Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(512) NO -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(13) NO -DATA_TYPE varchar(64) NO +SPECIFIC_NAME varchar(64) NO NULL +ROUTINE_CATALOG varchar(512) NO NULL +ROUTINE_SCHEMA varchar(64) NO NULL +ROUTINE_NAME varchar(64) NO NULL +ROUTINE_TYPE varchar(13) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH int(21) YES NULL CHARACTER_OCTET_LENGTH int(21) YES NULL NUMERIC_PRECISION int(21) YES NULL @@ -43,66 +43,66 @@ DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL DTD_IDENTIFIER longtext YES NULL -ROUTINE_BODY varchar(8) NO +ROUTINE_BODY varchar(8) NO NULL ROUTINE_DEFINITION longtext YES NULL EXTERNAL_NAME varchar(64) YES NULL EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO +PARAMETER_STYLE varchar(8) NO NULL +IS_DETERMINISTIC varchar(3) NO NULL +SQL_DATA_ACCESS varchar(64) NO NULL SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE varchar(8192) NO -ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SECURITY_TYPE varchar(7) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL +SQL_MODE varchar(8192) NO NULL +ROUTINE_COMMENT longtext NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SHOW CREATE TABLE information_schema.ROUTINES; Table Create Table ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_TYPE` varchar(13) NOT NULL DEFAULT '', - `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL, - `NUMERIC_PRECISION` int(21) DEFAULT NULL, - `NUMERIC_SCALE` int(21) DEFAULT NULL, - `DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL, - `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, - `COLLATION_NAME` varchar(64) DEFAULT NULL, - `DTD_IDENTIFIER` longtext DEFAULT NULL, - `ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '', - `ROUTINE_DEFINITION` longtext DEFAULT NULL, - `EXTERNAL_NAME` varchar(64) DEFAULT NULL, - `EXTERNAL_LANGUAGE` varchar(64) DEFAULT NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL DEFAULT '', - `IS_DETERMINISTIC` varchar(3) NOT NULL DEFAULT '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL DEFAULT '', - `SQL_PATH` varchar(64) DEFAULT NULL, - `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', - `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `ROUTINE_COMMENT` longtext NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' + `SPECIFIC_NAME` varchar(64) NOT NULL, + `ROUTINE_CATALOG` varchar(512) NOT NULL, + `ROUTINE_SCHEMA` varchar(64) NOT NULL, + `ROUTINE_NAME` varchar(64) NOT NULL, + `ROUTINE_TYPE` varchar(13) NOT NULL, + `DATA_TYPE` varchar(64) NOT NULL, + `CHARACTER_MAXIMUM_LENGTH` int(21), + `CHARACTER_OCTET_LENGTH` int(21), + `NUMERIC_PRECISION` int(21), + `NUMERIC_SCALE` int(21), + `DATETIME_PRECISION` bigint(21) unsigned, + `CHARACTER_SET_NAME` varchar(64), + `COLLATION_NAME` varchar(64), + `DTD_IDENTIFIER` longtext, + `ROUTINE_BODY` varchar(8) NOT NULL, + `ROUTINE_DEFINITION` longtext, + `EXTERNAL_NAME` varchar(64), + `EXTERNAL_LANGUAGE` varchar(64), + `PARAMETER_STYLE` varchar(8) NOT NULL, + `IS_DETERMINISTIC` varchar(3) NOT NULL, + `SQL_DATA_ACCESS` varchar(64) NOT NULL, + `SQL_PATH` varchar(64), + `SECURITY_TYPE` varchar(7) NOT NULL, + `CREATED` datetime NOT NULL, + `LAST_ALTERED` datetime NOT NULL, + `SQL_MODE` varchar(8192) NOT NULL, + `ROUTINE_COMMENT` longtext NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `DATABASE_COLLATION` varchar(32) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.ROUTINES; Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(512) NO -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(13) NO -DATA_TYPE varchar(64) NO +SPECIFIC_NAME varchar(64) NO NULL +ROUTINE_CATALOG varchar(512) NO NULL +ROUTINE_SCHEMA varchar(64) NO NULL +ROUTINE_NAME varchar(64) NO NULL +ROUTINE_TYPE varchar(13) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH int(21) YES NULL CHARACTER_OCTET_LENGTH int(21) YES NULL NUMERIC_PRECISION int(21) YES NULL @@ -111,23 +111,23 @@ DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL DTD_IDENTIFIER longtext YES NULL -ROUTINE_BODY varchar(8) NO +ROUTINE_BODY varchar(8) NO NULL ROUTINE_DEFINITION longtext YES NULL EXTERNAL_NAME varchar(64) YES NULL EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO +PARAMETER_STYLE varchar(8) NO NULL +IS_DETERMINISTIC varchar(3) NO NULL +SQL_DATA_ACCESS varchar(64) NO NULL SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE varchar(8192) NO -ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SECURITY_TYPE varchar(7) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL +SQL_MODE varchar(8192) NO NULL +ROUTINE_COMMENT longtext NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL USE test; DROP PROCEDURE IF EXISTS sp_for_routines; DROP FUNCTION IF EXISTS function_for_routines; diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result index 983ad198052..eefd2826eb6 100644 --- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result @@ -29,12 +29,12 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.ROUTINES; Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(512) NO -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(13) NO -DATA_TYPE varchar(64) NO +SPECIFIC_NAME varchar(64) NO NULL +ROUTINE_CATALOG varchar(512) NO NULL +ROUTINE_SCHEMA varchar(64) NO NULL +ROUTINE_NAME varchar(64) NO NULL +ROUTINE_TYPE varchar(13) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH int(21) YES NULL CHARACTER_OCTET_LENGTH int(21) YES NULL NUMERIC_PRECISION int(21) YES NULL @@ -43,66 +43,66 @@ DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL DTD_IDENTIFIER longtext YES NULL -ROUTINE_BODY varchar(8) NO +ROUTINE_BODY varchar(8) NO NULL ROUTINE_DEFINITION longtext YES NULL EXTERNAL_NAME varchar(64) YES NULL EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO +PARAMETER_STYLE varchar(8) NO NULL +IS_DETERMINISTIC varchar(3) NO NULL +SQL_DATA_ACCESS varchar(64) NO NULL SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE varchar(8192) NO -ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SECURITY_TYPE varchar(7) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL +SQL_MODE varchar(8192) NO NULL +ROUTINE_COMMENT longtext NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SHOW CREATE TABLE information_schema.ROUTINES; Table Create Table ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '', - `ROUTINE_TYPE` varchar(13) NOT NULL DEFAULT '', - `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL, - `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL, - `NUMERIC_PRECISION` int(21) DEFAULT NULL, - `NUMERIC_SCALE` int(21) DEFAULT NULL, - `DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL, - `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, - `COLLATION_NAME` varchar(64) DEFAULT NULL, - `DTD_IDENTIFIER` longtext DEFAULT NULL, - `ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '', - `ROUTINE_DEFINITION` longtext DEFAULT NULL, - `EXTERNAL_NAME` varchar(64) DEFAULT NULL, - `EXTERNAL_LANGUAGE` varchar(64) DEFAULT NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL DEFAULT '', - `IS_DETERMINISTIC` varchar(3) NOT NULL DEFAULT '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL DEFAULT '', - `SQL_PATH` varchar(64) DEFAULT NULL, - `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', - `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `ROUTINE_COMMENT` longtext NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' + `SPECIFIC_NAME` varchar(64) NOT NULL, + `ROUTINE_CATALOG` varchar(512) NOT NULL, + `ROUTINE_SCHEMA` varchar(64) NOT NULL, + `ROUTINE_NAME` varchar(64) NOT NULL, + `ROUTINE_TYPE` varchar(13) NOT NULL, + `DATA_TYPE` varchar(64) NOT NULL, + `CHARACTER_MAXIMUM_LENGTH` int(21), + `CHARACTER_OCTET_LENGTH` int(21), + `NUMERIC_PRECISION` int(21), + `NUMERIC_SCALE` int(21), + `DATETIME_PRECISION` bigint(21) unsigned, + `CHARACTER_SET_NAME` varchar(64), + `COLLATION_NAME` varchar(64), + `DTD_IDENTIFIER` longtext, + `ROUTINE_BODY` varchar(8) NOT NULL, + `ROUTINE_DEFINITION` longtext, + `EXTERNAL_NAME` varchar(64), + `EXTERNAL_LANGUAGE` varchar(64), + `PARAMETER_STYLE` varchar(8) NOT NULL, + `IS_DETERMINISTIC` varchar(3) NOT NULL, + `SQL_DATA_ACCESS` varchar(64) NOT NULL, + `SQL_PATH` varchar(64), + `SECURITY_TYPE` varchar(7) NOT NULL, + `CREATED` datetime NOT NULL, + `LAST_ALTERED` datetime NOT NULL, + `SQL_MODE` varchar(8192) NOT NULL, + `ROUTINE_COMMENT` longtext NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `DATABASE_COLLATION` varchar(32) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.ROUTINES; Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(512) NO -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(13) NO -DATA_TYPE varchar(64) NO +SPECIFIC_NAME varchar(64) NO NULL +ROUTINE_CATALOG varchar(512) NO NULL +ROUTINE_SCHEMA varchar(64) NO NULL +ROUTINE_NAME varchar(64) NO NULL +ROUTINE_TYPE varchar(13) NO NULL +DATA_TYPE varchar(64) NO NULL CHARACTER_MAXIMUM_LENGTH int(21) YES NULL CHARACTER_OCTET_LENGTH int(21) YES NULL NUMERIC_PRECISION int(21) YES NULL @@ -111,23 +111,23 @@ DATETIME_PRECISION bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL DTD_IDENTIFIER longtext YES NULL -ROUTINE_BODY varchar(8) NO +ROUTINE_BODY varchar(8) NO NULL ROUTINE_DEFINITION longtext YES NULL EXTERNAL_NAME varchar(64) YES NULL EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO +PARAMETER_STYLE varchar(8) NO NULL +IS_DETERMINISTIC varchar(3) NO NULL +SQL_DATA_ACCESS varchar(64) NO NULL SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE varchar(8192) NO -ROUTINE_COMMENT longtext NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SECURITY_TYPE varchar(7) NO NULL +CREATED datetime NO NULL +LAST_ALTERED datetime NO NULL +SQL_MODE varchar(8192) NO NULL +ROUTINE_COMMENT longtext NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL USE test; DROP PROCEDURE IF EXISTS sp_for_routines; DROP FUNCTION IF EXISTS function_for_routines; diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges.result b/mysql-test/suite/funcs_1/r/is_schema_privileges.result index 8669b2873ed..119eda6d7af 100644 --- a/mysql-test/suite/funcs_1/r/is_schema_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges.result @@ -28,27 +28,27 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.SCHEMA_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SHOW CREATE TABLE information_schema.SCHEMA_PRIVILEGES; Table Create Table SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', - `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' + `GRANTEE` varchar(190) NOT NULL, + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `PRIVILEGE_TYPE` varchar(64) NOT NULL, + `IS_GRANTABLE` varchar(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.SCHEMA_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SELECT GRANTEE, TABLE_CATALOG, TABLE_SCHEMA, PRIVILEGE_TYPE FROM information_schema.schema_privileges WHERE table_catalog IS NOT NULL; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE diff --git a/mysql-test/suite/funcs_1/r/is_schemata.result b/mysql-test/suite/funcs_1/r/is_schemata.result index 6db6ac8f150..b0339886636 100644 --- a/mysql-test/suite/funcs_1/r/is_schemata.result +++ b/mysql-test/suite/funcs_1/r/is_schemata.result @@ -28,26 +28,26 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.SCHEMATA; Field Type Null Key Default Extra -CATALOG_NAME varchar(512) NO -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(32) NO -DEFAULT_COLLATION_NAME varchar(32) NO +CATALOG_NAME varchar(512) NO NULL +SCHEMA_NAME varchar(64) NO NULL +DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL +DEFAULT_COLLATION_NAME varchar(32) NO NULL SQL_PATH varchar(512) YES NULL SHOW CREATE TABLE information_schema.SCHEMATA; Table Create Table SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( - `CATALOG_NAME` varchar(512) NOT NULL DEFAULT '', - `SCHEMA_NAME` varchar(64) NOT NULL DEFAULT '', - `DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATION_NAME` varchar(32) NOT NULL DEFAULT '', - `SQL_PATH` varchar(512) DEFAULT NULL + `CATALOG_NAME` varchar(512) NOT NULL, + `SCHEMA_NAME` varchar(64) NOT NULL, + `DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATION_NAME` varchar(32) NOT NULL, + `SQL_PATH` varchar(512) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.SCHEMATA; Field Type Null Key Default Extra -CATALOG_NAME varchar(512) NO -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(32) NO -DEFAULT_COLLATION_NAME varchar(32) NO +CATALOG_NAME varchar(512) NO NULL +SCHEMA_NAME varchar(64) NO NULL +DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL +DEFAULT_COLLATION_NAME varchar(32) NO NULL SQL_PATH varchar(512) YES NULL SELECT catalog_name, schema_name, sql_path FROM information_schema.schemata diff --git a/mysql-test/suite/funcs_1/r/is_schemata_embedded.result b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result index bc993e8dc9f..3a97fb5eeef 100644 --- a/mysql-test/suite/funcs_1/r/is_schemata_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_schemata_embedded.result @@ -28,26 +28,26 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.SCHEMATA; Field Type Null Key Default Extra -CATALOG_NAME varchar(512) NO -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(32) NO -DEFAULT_COLLATION_NAME varchar(32) NO +CATALOG_NAME varchar(512) NO NULL +SCHEMA_NAME varchar(64) NO NULL +DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL +DEFAULT_COLLATION_NAME varchar(32) NO NULL SQL_PATH varchar(512) YES NULL SHOW CREATE TABLE information_schema.SCHEMATA; Table Create Table SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( - `CATALOG_NAME` varchar(512) NOT NULL DEFAULT '', - `SCHEMA_NAME` varchar(64) NOT NULL DEFAULT '', - `DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '', - `DEFAULT_COLLATION_NAME` varchar(32) NOT NULL DEFAULT '', - `SQL_PATH` varchar(512) DEFAULT NULL + `CATALOG_NAME` varchar(512) NOT NULL, + `SCHEMA_NAME` varchar(64) NOT NULL, + `DEFAULT_CHARACTER_SET_NAME` varchar(32) NOT NULL, + `DEFAULT_COLLATION_NAME` varchar(32) NOT NULL, + `SQL_PATH` varchar(512) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.SCHEMATA; Field Type Null Key Default Extra -CATALOG_NAME varchar(512) NO -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(32) NO -DEFAULT_COLLATION_NAME varchar(32) NO +CATALOG_NAME varchar(512) NO NULL +SCHEMA_NAME varchar(64) NO NULL +DEFAULT_CHARACTER_SET_NAME varchar(32) NO NULL +DEFAULT_COLLATION_NAME varchar(32) NO NULL SQL_PATH varchar(512) YES NULL SELECT catalog_name, schema_name, sql_path FROM information_schema.schemata diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index ad9af516fde..09d5dcaa264 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -28,60 +28,60 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.STATISTICS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -NON_UNIQUE bigint(1) NO 0 -INDEX_SCHEMA varchar(64) NO -INDEX_NAME varchar(64) NO -SEQ_IN_INDEX bigint(2) NO 0 -COLUMN_NAME varchar(64) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +NON_UNIQUE bigint(1) NO NULL +INDEX_SCHEMA varchar(64) NO NULL +INDEX_NAME varchar(64) NO NULL +SEQ_IN_INDEX bigint(2) NO NULL +COLUMN_NAME varchar(64) NO NULL COLLATION varchar(1) YES NULL CARDINALITY bigint(21) YES NULL SUB_PART bigint(3) YES NULL PACKED varchar(10) YES NULL -NULLABLE varchar(3) NO -INDEX_TYPE varchar(16) NO +NULLABLE varchar(3) NO NULL +INDEX_TYPE varchar(16) NO NULL COMMENT varchar(16) YES NULL -INDEX_COMMENT varchar(1024) NO +INDEX_COMMENT varchar(1024) NO NULL SHOW CREATE TABLE information_schema.STATISTICS; Table Create Table STATISTICS CREATE TEMPORARY TABLE `STATISTICS` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `NON_UNIQUE` bigint(1) NOT NULL DEFAULT 0, - `INDEX_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `INDEX_NAME` varchar(64) NOT NULL DEFAULT '', - `SEQ_IN_INDEX` bigint(2) NOT NULL DEFAULT 0, - `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', - `COLLATION` varchar(1) DEFAULT NULL, - `CARDINALITY` bigint(21) DEFAULT NULL, - `SUB_PART` bigint(3) DEFAULT NULL, - `PACKED` varchar(10) DEFAULT NULL, - `NULLABLE` varchar(3) NOT NULL DEFAULT '', - `INDEX_TYPE` varchar(16) NOT NULL DEFAULT '', - `COMMENT` varchar(16) DEFAULT NULL, - `INDEX_COMMENT` varchar(1024) NOT NULL DEFAULT '' + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `NON_UNIQUE` bigint(1) NOT NULL, + `INDEX_SCHEMA` varchar(64) NOT NULL, + `INDEX_NAME` varchar(64) NOT NULL, + `SEQ_IN_INDEX` bigint(2) NOT NULL, + `COLUMN_NAME` varchar(64) NOT NULL, + `COLLATION` varchar(1), + `CARDINALITY` bigint(21), + `SUB_PART` bigint(3), + `PACKED` varchar(10), + `NULLABLE` varchar(3) NOT NULL, + `INDEX_TYPE` varchar(16) NOT NULL, + `COMMENT` varchar(16), + `INDEX_COMMENT` varchar(1024) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.STATISTICS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -NON_UNIQUE bigint(1) NO 0 -INDEX_SCHEMA varchar(64) NO -INDEX_NAME varchar(64) NO -SEQ_IN_INDEX bigint(2) NO 0 -COLUMN_NAME varchar(64) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +NON_UNIQUE bigint(1) NO NULL +INDEX_SCHEMA varchar(64) NO NULL +INDEX_NAME varchar(64) NO NULL +SEQ_IN_INDEX bigint(2) NO NULL +COLUMN_NAME varchar(64) NO NULL COLLATION varchar(1) YES NULL CARDINALITY bigint(21) YES NULL SUB_PART bigint(3) YES NULL PACKED varchar(10) YES NULL -NULLABLE varchar(3) NO -INDEX_TYPE varchar(16) NO +NULLABLE varchar(3) NO NULL +INDEX_TYPE varchar(16) NO NULL COMMENT varchar(16) YES NULL -INDEX_COMMENT varchar(1024) NO +INDEX_COMMENT varchar(1024) NO NULL SELECT table_catalog, table_schema, table_name, index_schema, index_name FROM information_schema.statistics WHERE table_catalog IS NOT NULL ORDER BY table_schema, table_name, index_schema, index_name; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result index e0b861c8589..5e1a9f44e7f 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -28,30 +28,30 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TABLE_CONSTRAINTS; Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(512) NO -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -CONSTRAINT_TYPE varchar(64) NO +CONSTRAINT_CATALOG varchar(512) NO NULL +CONSTRAINT_SCHEMA varchar(64) NO NULL +CONSTRAINT_NAME varchar(64) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +CONSTRAINT_TYPE varchar(64) NO NULL SHOW CREATE TABLE information_schema.TABLE_CONSTRAINTS; Table Create Table TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` ( - `CONSTRAINT_CATALOG` varchar(512) NOT NULL DEFAULT '', - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `CONSTRAINT_TYPE` varchar(64) NOT NULL DEFAULT '' + `CONSTRAINT_CATALOG` varchar(512) NOT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL, + `CONSTRAINT_NAME` varchar(64) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `CONSTRAINT_TYPE` varchar(64) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLE_CONSTRAINTS; Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(512) NO -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -CONSTRAINT_TYPE varchar(64) NO +CONSTRAINT_CATALOG varchar(512) NO NULL +CONSTRAINT_SCHEMA varchar(64) NO NULL +CONSTRAINT_NAME varchar(64) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +CONSTRAINT_TYPE varchar(64) NO NULL SELECT constraint_catalog, constraint_schema, constraint_name, table_schema, table_name FROM information_schema.table_constraints diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result index d7065b54788..0d3e3268074 100644 --- a/mysql-test/suite/funcs_1/r/is_table_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -28,30 +28,30 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TABLE_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SHOW CREATE TABLE information_schema.TABLE_PRIVILEGES; Table Create Table TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', - `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' + `GRANTEE` varchar(190) NOT NULL, + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `PRIVILEGE_TYPE` varchar(64) NOT NULL, + `IS_GRANTABLE` varchar(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLE_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SELECT table_catalog, table_schema, table_name, privilege_type FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name privilege_type diff --git a/mysql-test/suite/funcs_1/r/is_tables.result b/mysql-test/suite/funcs_1/r/is_tables.result index 739d00eacb9..010818cad3c 100644 --- a/mysql-test/suite/funcs_1/r/is_tables.result +++ b/mysql-test/suite/funcs_1/r/is_tables.result @@ -28,10 +28,10 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TABLES; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +TABLE_TYPE varchar(64) NO NULL ENGINE varchar(64) YES NULL VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL @@ -48,42 +48,42 @@ CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(32) YES NULL CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(2048) YES NULL -TABLE_COMMENT varchar(2048) NO +TABLE_COMMENT varchar(2048) NO NULL MAX_INDEX_LENGTH bigint(21) unsigned YES NULL TEMPORARY varchar(1) YES NULL SHOW CREATE TABLE information_schema.TABLES; Table Create Table TABLES CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', - `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) unsigned DEFAULT NULL, - `ROW_FORMAT` varchar(10) 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(32) DEFAULT NULL, - `CHECKSUM` bigint(21) unsigned DEFAULT NULL, - `CREATE_OPTIONS` varchar(2048) DEFAULT NULL, - `TABLE_COMMENT` varchar(2048) NOT NULL DEFAULT '', - `MAX_INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, - `TEMPORARY` varchar(1) DEFAULT NULL + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `TABLE_TYPE` varchar(64) NOT NULL, + `ENGINE` varchar(64), + `VERSION` bigint(21) unsigned, + `ROW_FORMAT` varchar(10), + `TABLE_ROWS` bigint(21) unsigned, + `AVG_ROW_LENGTH` bigint(21) unsigned, + `DATA_LENGTH` bigint(21) unsigned, + `MAX_DATA_LENGTH` bigint(21) unsigned, + `INDEX_LENGTH` bigint(21) unsigned, + `DATA_FREE` bigint(21) unsigned, + `AUTO_INCREMENT` bigint(21) unsigned, + `CREATE_TIME` datetime, + `UPDATE_TIME` datetime, + `CHECK_TIME` datetime, + `TABLE_COLLATION` varchar(32), + `CHECKSUM` bigint(21) unsigned, + `CREATE_OPTIONS` varchar(2048), + `TABLE_COMMENT` varchar(2048) NOT NULL, + `MAX_INDEX_LENGTH` bigint(21) unsigned, + `TEMPORARY` varchar(1) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLES; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +TABLE_TYPE varchar(64) NO NULL ENGINE varchar(64) YES NULL VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL @@ -100,7 +100,7 @@ CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(32) YES NULL CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(2048) YES NULL -TABLE_COMMENT varchar(2048) NO +TABLE_COMMENT varchar(2048) NO NULL MAX_INDEX_LENGTH bigint(21) unsigned YES NULL TEMPORARY varchar(1) YES NULL SELECT table_catalog, table_schema, table_name diff --git a/mysql-test/suite/funcs_1/r/is_tables_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_embedded.result index 4d54128e5b0..c71414d71ff 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_tables_embedded.result @@ -28,10 +28,10 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TABLES; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +TABLE_TYPE varchar(64) NO NULL ENGINE varchar(64) YES NULL VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL @@ -48,42 +48,42 @@ CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(32) YES NULL CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(2048) YES NULL -TABLE_COMMENT varchar(2048) NO +TABLE_COMMENT varchar(2048) NO NULL MAX_INDEX_LENGTH bigint(21) unsigned YES NULL TEMPORARY varchar(1) YES NULL SHOW CREATE TABLE information_schema.TABLES; Table Create Table TABLES CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', - `ENGINE` varchar(64) DEFAULT NULL, - `VERSION` bigint(21) unsigned DEFAULT NULL, - `ROW_FORMAT` varchar(10) 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(32) DEFAULT NULL, - `CHECKSUM` bigint(21) unsigned DEFAULT NULL, - `CREATE_OPTIONS` varchar(2048) DEFAULT NULL, - `TABLE_COMMENT` varchar(2048) NOT NULL DEFAULT '', - `MAX_INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, - `TEMPORARY` varchar(1) DEFAULT NULL + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `TABLE_TYPE` varchar(64) NOT NULL, + `ENGINE` varchar(64), + `VERSION` bigint(21) unsigned, + `ROW_FORMAT` varchar(10), + `TABLE_ROWS` bigint(21) unsigned, + `AVG_ROW_LENGTH` bigint(21) unsigned, + `DATA_LENGTH` bigint(21) unsigned, + `MAX_DATA_LENGTH` bigint(21) unsigned, + `INDEX_LENGTH` bigint(21) unsigned, + `DATA_FREE` bigint(21) unsigned, + `AUTO_INCREMENT` bigint(21) unsigned, + `CREATE_TIME` datetime, + `UPDATE_TIME` datetime, + `CHECK_TIME` datetime, + `TABLE_COLLATION` varchar(32), + `CHECKSUM` bigint(21) unsigned, + `CREATE_OPTIONS` varchar(2048), + `TABLE_COMMENT` varchar(2048) NOT NULL, + `MAX_INDEX_LENGTH` bigint(21) unsigned, + `TEMPORARY` varchar(1) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLES; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +TABLE_TYPE varchar(64) NO NULL ENGINE varchar(64) YES NULL VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL @@ -100,7 +100,7 @@ CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(32) YES NULL CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(2048) YES NULL -TABLE_COMMENT varchar(2048) NO +TABLE_COMMENT varchar(2048) NO NULL MAX_INDEX_LENGTH bigint(21) unsigned YES NULL TEMPORARY varchar(1) YES NULL SELECT table_catalog, table_schema, table_name diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result index d9ba88cba5a..3960588b3c5 100644 --- a/mysql-test/suite/funcs_1/r/is_triggers.result +++ b/mysql-test/suite/funcs_1/r/is_triggers.result @@ -30,78 +30,78 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TRIGGERS; Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(512) NO -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(512) NO -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 +TRIGGER_CATALOG varchar(512) NO NULL +TRIGGER_SCHEMA varchar(64) NO NULL +TRIGGER_NAME varchar(64) NO NULL +EVENT_MANIPULATION varchar(6) NO NULL +EVENT_OBJECT_CATALOG varchar(512) NO NULL +EVENT_OBJECT_SCHEMA varchar(64) NO NULL +EVENT_OBJECT_TABLE varchar(64) NO NULL +ACTION_ORDER bigint(4) NO NULL ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO NULL +ACTION_TIMING varchar(6) NO NULL ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO +ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL +ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL CREATED datetime(2) YES NULL -SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SQL_MODE varchar(8192) NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SHOW CREATE TABLE information_schema.TRIGGERS; Table Create Table TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( - `TRIGGER_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TRIGGER_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TRIGGER_NAME` varchar(64) NOT NULL DEFAULT '', - `EVENT_MANIPULATION` varchar(6) NOT NULL DEFAULT '', - `EVENT_OBJECT_CATALOG` varchar(512) NOT NULL DEFAULT '', - `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `EVENT_OBJECT_TABLE` varchar(64) NOT NULL DEFAULT '', - `ACTION_ORDER` bigint(4) NOT NULL DEFAULT 0, - `ACTION_CONDITION` longtext DEFAULT NULL, - `ACTION_STATEMENT` longtext NOT NULL DEFAULT '', - `ACTION_ORIENTATION` varchar(9) NOT NULL DEFAULT '', - `ACTION_TIMING` varchar(6) NOT NULL DEFAULT '', - `ACTION_REFERENCE_OLD_TABLE` varchar(64) DEFAULT NULL, - `ACTION_REFERENCE_NEW_TABLE` varchar(64) DEFAULT NULL, - `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL DEFAULT '', - `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL DEFAULT '', - `CREATED` datetime(2) DEFAULT NULL, - `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' + `TRIGGER_CATALOG` varchar(512) NOT NULL, + `TRIGGER_SCHEMA` varchar(64) NOT NULL, + `TRIGGER_NAME` varchar(64) NOT NULL, + `EVENT_MANIPULATION` varchar(6) NOT NULL, + `EVENT_OBJECT_CATALOG` varchar(512) NOT NULL, + `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL, + `EVENT_OBJECT_TABLE` varchar(64) NOT NULL, + `ACTION_ORDER` bigint(4) NOT NULL, + `ACTION_CONDITION` longtext, + `ACTION_STATEMENT` longtext NOT NULL, + `ACTION_ORIENTATION` varchar(9) NOT NULL, + `ACTION_TIMING` varchar(6) NOT NULL, + `ACTION_REFERENCE_OLD_TABLE` varchar(64), + `ACTION_REFERENCE_NEW_TABLE` varchar(64), + `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL, + `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL, + `CREATED` datetime(2), + `SQL_MODE` varchar(8192) NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `DATABASE_COLLATION` varchar(32) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TRIGGERS; Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(512) NO -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(512) NO -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 +TRIGGER_CATALOG varchar(512) NO NULL +TRIGGER_SCHEMA varchar(64) NO NULL +TRIGGER_NAME varchar(64) NO NULL +EVENT_MANIPULATION varchar(6) NO NULL +EVENT_OBJECT_CATALOG varchar(512) NO NULL +EVENT_OBJECT_SCHEMA varchar(64) NO NULL +EVENT_OBJECT_TABLE varchar(64) NO NULL +ACTION_ORDER bigint(4) NO NULL ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO NULL +ACTION_TIMING varchar(6) NO NULL ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO +ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL +ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL CREATED datetime(2) YES NULL -SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SQL_MODE varchar(8192) NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SELECT * FROM information_schema.triggers WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL diff --git a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result index 6ec9e7868ce..6ed646c1a2c 100644 --- a/mysql-test/suite/funcs_1/r/is_triggers_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_triggers_embedded.result @@ -30,78 +30,78 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.TRIGGERS; Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(512) NO -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(512) NO -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 +TRIGGER_CATALOG varchar(512) NO NULL +TRIGGER_SCHEMA varchar(64) NO NULL +TRIGGER_NAME varchar(64) NO NULL +EVENT_MANIPULATION varchar(6) NO NULL +EVENT_OBJECT_CATALOG varchar(512) NO NULL +EVENT_OBJECT_SCHEMA varchar(64) NO NULL +EVENT_OBJECT_TABLE varchar(64) NO NULL +ACTION_ORDER bigint(4) NO NULL ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO NULL +ACTION_TIMING varchar(6) NO NULL ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO +ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL +ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL CREATED datetime(2) YES NULL -SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SQL_MODE varchar(8192) NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SHOW CREATE TABLE information_schema.TRIGGERS; Table Create Table TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( - `TRIGGER_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TRIGGER_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TRIGGER_NAME` varchar(64) NOT NULL DEFAULT '', - `EVENT_MANIPULATION` varchar(6) NOT NULL DEFAULT '', - `EVENT_OBJECT_CATALOG` varchar(512) NOT NULL DEFAULT '', - `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `EVENT_OBJECT_TABLE` varchar(64) NOT NULL DEFAULT '', - `ACTION_ORDER` bigint(4) NOT NULL DEFAULT 0, - `ACTION_CONDITION` longtext DEFAULT NULL, - `ACTION_STATEMENT` longtext NOT NULL DEFAULT '', - `ACTION_ORIENTATION` varchar(9) NOT NULL DEFAULT '', - `ACTION_TIMING` varchar(6) NOT NULL DEFAULT '', - `ACTION_REFERENCE_OLD_TABLE` varchar(64) DEFAULT NULL, - `ACTION_REFERENCE_NEW_TABLE` varchar(64) DEFAULT NULL, - `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL DEFAULT '', - `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL DEFAULT '', - `CREATED` datetime(2) DEFAULT NULL, - `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' + `TRIGGER_CATALOG` varchar(512) NOT NULL, + `TRIGGER_SCHEMA` varchar(64) NOT NULL, + `TRIGGER_NAME` varchar(64) NOT NULL, + `EVENT_MANIPULATION` varchar(6) NOT NULL, + `EVENT_OBJECT_CATALOG` varchar(512) NOT NULL, + `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL, + `EVENT_OBJECT_TABLE` varchar(64) NOT NULL, + `ACTION_ORDER` bigint(4) NOT NULL, + `ACTION_CONDITION` longtext, + `ACTION_STATEMENT` longtext NOT NULL, + `ACTION_ORIENTATION` varchar(9) NOT NULL, + `ACTION_TIMING` varchar(6) NOT NULL, + `ACTION_REFERENCE_OLD_TABLE` varchar(64), + `ACTION_REFERENCE_NEW_TABLE` varchar(64), + `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL, + `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL, + `CREATED` datetime(2), + `SQL_MODE` varchar(8192) NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `DATABASE_COLLATION` varchar(32) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TRIGGERS; Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(512) NO -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(512) NO -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 +TRIGGER_CATALOG varchar(512) NO NULL +TRIGGER_SCHEMA varchar(64) NO NULL +TRIGGER_NAME varchar(64) NO NULL +EVENT_MANIPULATION varchar(6) NO NULL +EVENT_OBJECT_CATALOG varchar(512) NO NULL +EVENT_OBJECT_SCHEMA varchar(64) NO NULL +EVENT_OBJECT_TABLE varchar(64) NO NULL +ACTION_ORDER bigint(4) NO NULL ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO NULL +ACTION_TIMING varchar(6) NO NULL ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO +ACTION_REFERENCE_OLD_ROW varchar(3) NO NULL +ACTION_REFERENCE_NEW_ROW varchar(3) NO NULL CREATED datetime(2) YES NULL -SQL_MODE varchar(8192) NO -DEFINER varchar(189) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -DATABASE_COLLATION varchar(32) NO +SQL_MODE varchar(8192) NO NULL +DEFINER varchar(189) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +DATABASE_COLLATION varchar(32) NO NULL SELECT * FROM information_schema.triggers WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result index f7a83dd3ddb..95ef390629f 100644 --- a/mysql-test/suite/funcs_1/r/is_user_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -28,24 +28,24 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.USER_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SHOW CREATE TABLE information_schema.USER_PRIVILEGES; Table Create Table USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( - `GRANTEE` varchar(190) NOT NULL DEFAULT '', - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', - `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' + `GRANTEE` varchar(190) NOT NULL, + `TABLE_CATALOG` varchar(512) NOT NULL, + `PRIVILEGE_TYPE` varchar(64) NOT NULL, + `IS_GRANTABLE` varchar(3) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.USER_PRIVILEGES; Field Type Null Key Default Extra -GRANTEE varchar(190) NO -TABLE_CATALOG varchar(512) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO +GRANTEE varchar(190) NO NULL +TABLE_CATALOG varchar(512) NO NULL +PRIVILEGE_TYPE varchar(64) NO NULL +IS_GRANTABLE varchar(3) NO NULL SELECT grantee, table_catalog, privilege_type FROM information_schema.user_privileges WHERE table_catalog IS NULL OR table_catalog <> 'def'; diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result index e6a2715bbb3..45cfd87f46c 100644 --- a/mysql-test/suite/funcs_1/r/is_views.result +++ b/mysql-test/suite/funcs_1/r/is_views.result @@ -28,45 +28,45 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.VIEWS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO -SECURITY_TYPE varchar(7) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -ALGORITHM varchar(10) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO NULL +IS_UPDATABLE varchar(3) NO NULL +DEFINER varchar(189) NO NULL +SECURITY_TYPE varchar(7) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +ALGORITHM varchar(10) NO NULL SHOW CREATE TABLE information_schema.VIEWS; Table Create Table VIEWS CREATE TEMPORARY TABLE `VIEWS` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `VIEW_DEFINITION` longtext NOT NULL DEFAULT '', - `CHECK_OPTION` varchar(8) NOT NULL DEFAULT '', - `IS_UPDATABLE` varchar(3) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `ALGORITHM` varchar(10) NOT NULL DEFAULT '' + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `VIEW_DEFINITION` longtext NOT NULL, + `CHECK_OPTION` varchar(8) NOT NULL, + `IS_UPDATABLE` varchar(3) NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `SECURITY_TYPE` varchar(7) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `ALGORITHM` varchar(10) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.VIEWS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO -SECURITY_TYPE varchar(7) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -ALGORITHM varchar(10) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO NULL +IS_UPDATABLE varchar(3) NO NULL +DEFINER varchar(189) NO NULL +SECURITY_TYPE varchar(7) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +ALGORITHM varchar(10) NO NULL SELECT table_catalog, table_schema, table_name FROM information_schema.views WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name diff --git a/mysql-test/suite/funcs_1/r/is_views_embedded.result b/mysql-test/suite/funcs_1/r/is_views_embedded.result index cc6ade7daaf..044c80f473b 100644 --- a/mysql-test/suite/funcs_1/r/is_views_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_views_embedded.result @@ -28,45 +28,45 @@ DROP FUNCTION test.f1; ######################################################################### DESCRIBE information_schema.VIEWS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO -SECURITY_TYPE varchar(7) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -ALGORITHM varchar(10) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO NULL +IS_UPDATABLE varchar(3) NO NULL +DEFINER varchar(189) NO NULL +SECURITY_TYPE varchar(7) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +ALGORITHM varchar(10) NO NULL SHOW CREATE TABLE information_schema.VIEWS; Table Create Table VIEWS CREATE TEMPORARY TABLE `VIEWS` ( - `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '', - `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `VIEW_DEFINITION` longtext NOT NULL DEFAULT '', - `CHECK_OPTION` varchar(8) NOT NULL DEFAULT '', - `IS_UPDATABLE` varchar(3) NOT NULL DEFAULT '', - `DEFINER` varchar(189) NOT NULL DEFAULT '', - `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', - `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', - `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', - `ALGORITHM` varchar(10) NOT NULL DEFAULT '' + `TABLE_CATALOG` varchar(512) NOT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL, + `TABLE_NAME` varchar(64) NOT NULL, + `VIEW_DEFINITION` longtext NOT NULL, + `CHECK_OPTION` varchar(8) NOT NULL, + `IS_UPDATABLE` varchar(3) NOT NULL, + `DEFINER` varchar(189) NOT NULL, + `SECURITY_TYPE` varchar(7) NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL, + `COLLATION_CONNECTION` varchar(32) NOT NULL, + `ALGORITHM` varchar(10) NOT NULL ) DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.VIEWS; Field Type Null Key Default Extra -TABLE_CATALOG varchar(512) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(189) NO -SECURITY_TYPE varchar(7) NO -CHARACTER_SET_CLIENT varchar(32) NO -COLLATION_CONNECTION varchar(32) NO -ALGORITHM varchar(10) NO +TABLE_CATALOG varchar(512) NO NULL +TABLE_SCHEMA varchar(64) NO NULL +TABLE_NAME varchar(64) NO NULL +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO NULL +IS_UPDATABLE varchar(3) NO NULL +DEFINER varchar(189) NO NULL +SECURITY_TYPE varchar(7) NO NULL +CHARACTER_SET_CLIENT varchar(32) NO NULL +COLLATION_CONNECTION varchar(32) NO NULL +ALGORITHM varchar(10) NO NULL SELECT table_catalog, table_schema, table_name FROM information_schema.views WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result index f3f561fd479..cc5c63cadd5 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result @@ -24,24 +24,24 @@ connection default; SHOW CREATE TABLE processlist; Table Create Table PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress @@ -104,24 +104,24 @@ SHOW/SELECT shows only the processes (1) of the user. SHOW CREATE TABLE processlist; Table Create Table PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result index a68e62e4642..aedf557fad5 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result @@ -24,24 +24,24 @@ connection default; SHOW CREATE TABLE processlist; Table Create Table PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress @@ -104,24 +104,24 @@ SHOW/SELECT shows only the processes (1) of the user. SHOW CREATE TABLE processlist; Table Create Table PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress diff --git a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result index ad109501f98..7853a125645 100644 --- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result @@ -12,24 +12,24 @@ USE test; SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST; Table Create Table PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 # Ensure that the information about the own connection is correct. #-------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/processlist_val_ps.result b/mysql-test/suite/funcs_1/r/processlist_val_ps.result index 169053cb6be..1bbf0609cbc 100644 --- a/mysql-test/suite/funcs_1/r/processlist_val_ps.result +++ b/mysql-test/suite/funcs_1/r/processlist_val_ps.result @@ -12,24 +12,24 @@ USE test; SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST; Table Create Table PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( - `ID` bigint(4) NOT NULL DEFAULT 0, - `USER` varchar(128) NOT NULL DEFAULT '', - `HOST` varchar(64) NOT NULL DEFAULT '', - `DB` varchar(64) DEFAULT NULL, - `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` int(7) NOT NULL DEFAULT 0, - `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext DEFAULT NULL, - `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000, - `STAGE` tinyint(2) NOT NULL DEFAULT 0, - `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0, - `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000, - `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0, - `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0, - `QUERY_ID` bigint(4) NOT NULL DEFAULT 0, - `INFO_BINARY` blob DEFAULT NULL, - `TID` bigint(4) NOT NULL DEFAULT 0 + `ID` bigint(4) NOT NULL, + `USER` varchar(128) NOT NULL, + `HOST` varchar(64) NOT NULL, + `DB` varchar(64), + `COMMAND` varchar(16) NOT NULL, + `TIME` int(7) NOT NULL, + `STATE` varchar(64), + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL, + `STAGE` tinyint(2) NOT NULL, + `MAX_STAGE` tinyint(2) NOT NULL, + `PROGRESS` decimal(7,3) NOT NULL, + `MEMORY_USED` bigint(7) NOT NULL, + `MAX_MEMORY_USED` bigint(7) NOT NULL, + `EXAMINED_ROWS` int(7) NOT NULL, + `QUERY_ID` bigint(4) NOT NULL, + `INFO_BINARY` blob, + `TID` bigint(4) NOT NULL ) DEFAULT CHARSET=utf8 # Ensure that the information about the own connection is correct. #-------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test index 9db247fd6fd..bb9cc2a6ffb 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test +++ b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test @@ -14,7 +14,7 @@ # --source include/have_innodb.inc ---source include/is_embedded.inc +--source include/is_embedded_no_privileges.inc let $my_where = WHERE table_schema = 'information_schema' AND table_name <> 'profiling' AND table_name not like 'innodb_%'; diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test index 3d0cca24474..bb2200604f3 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test +++ b/mysql-test/suite/funcs_1/t/is_columns_myisam_embedded.test @@ -10,10 +10,8 @@ # 2008-06-06 mleich Create this this variant for the embedded server. # -if (`SELECT VERSION() NOT LIKE '%embedded%'`) -{ - --skip Test requires: embedded server -} +--source include/is_embedded_no_privileges.inc + let $engine_type= MyISAM; SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; --source suite/funcs_1/datadict/datadict_load.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test index d1ed45425ec..9ef1b6d869a 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test +++ b/mysql-test/suite/funcs_1/t/is_columns_mysql_embedded.test @@ -10,10 +10,7 @@ # 2008-06-06 mleich Create this variant for the embedded server # -if (`SELECT VERSION() NOT LIKE '%embedded%'`) -{ - --skip Test requires: embedded server -} +--source include/is_embedded_no_privileges.inc let $my_where = WHERE table_schema = 'mysql'; --source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/galera/r/enforce_storage_engine2.result b/mysql-test/suite/galera/r/enforce_storage_engine2.result index 8b174139eae..e0fb8d867dc 100644 --- a/mysql-test/suite/galera/r/enforce_storage_engine2.result +++ b/mysql-test/suite/galera/r/enforce_storage_engine2.result @@ -9,6 +9,7 @@ CREATE TABLE t1(i INT) ENGINE=INNODB; CREATE TABLE t2(i INT) ENGINE=MYISAM; Warnings: Note 1266 Using storage engine InnoDB for table 't2' +Note 1266 Using storage engine InnoDB for table 't2' connection node_2; SHOW TABLES; Tables_in_test diff --git a/mysql-test/suite/galera/r/galera_create_table_like.result b/mysql-test/suite/galera/r/galera_create_table_like.result index 82543331ad5..d1633077dcb 100644 --- a/mysql-test/suite/galera/r/galera_create_table_like.result +++ b/mysql-test/suite/galera/r/galera_create_table_like.result @@ -49,3 +49,8 @@ DROP TABLE schema2.real_table2; DROP TABLE schema2.real_table3; DROP SCHEMA schema1; DROP SCHEMA schema2; +use test; +CREATE TEMPORARY TABLE t (c INT) ENGINE=mrg_myisam UNION=(t,t2) insert_method=FIRST; +CREATE TABLE t2 LIKE t; +ERROR HY000: Table 't' is differently defined or of non-MyISAM type or doesn't exist +DROP TABLE t; diff --git a/mysql-test/suite/galera/r/galera_myisam_transactions.result b/mysql-test/suite/galera/r/galera_myisam_transactions.result index 091c5ffb6f6..8a30e265d28 100644 --- a/mysql-test/suite/galera/r/galera_myisam_transactions.result +++ b/mysql-test/suite/galera/r/galera_myisam_transactions.result @@ -37,3 +37,14 @@ SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 DROP TABLE t1, t2, t3; +SET SESSION lock_wait_timeout=2; +SET GLOBAL wsrep_replicate_myisam= ON; +CREATE TEMPORARY TABLE t1 (i INT, PRIMARY KEY pk (i)) ENGINE=MyISAM; +Warnings: +Warning 1280 Name 'pk' ignored for PRIMARY key. +PREPARE stmt FROM "INSERT INTO t1 (id) SELECT * FROM (SELECT 4 AS i) AS y"; +INSERT INTO t1 VALUES(4); +DEALLOCATE PREPARE stmt; +COMMIT; +DROP TABLE t1; +SET GLOBAL wsrep_replicate_myisam=OFF; diff --git a/mysql-test/suite/sys_vars/r/wsrep_slave_threads_basic.result b/mysql-test/suite/galera/r/wsrep_slave_threads_basic.result index 62be5a42416..62be5a42416 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_slave_threads_basic.result +++ b/mysql-test/suite/galera/r/wsrep_slave_threads_basic.result diff --git a/mysql-test/suite/galera/t/galera_create_table_like.test b/mysql-test/suite/galera/t/galera_create_table_like.test index 0e0e8b0ffcf..3cf51521be1 100644 --- a/mysql-test/suite/galera/t/galera_create_table_like.test +++ b/mysql-test/suite/galera/t/galera_create_table_like.test @@ -48,3 +48,12 @@ DROP TABLE schema2.real_table3; DROP SCHEMA schema1; DROP SCHEMA schema2; + +# +# MDEV-25856: SIGSEGV in ha_myisammrg::append_create_info +# +use test; +CREATE TEMPORARY TABLE t (c INT) ENGINE=mrg_myisam UNION=(t,t2) insert_method=FIRST; +--error 1472 +CREATE TABLE t2 LIKE t; +DROP TABLE t; diff --git a/mysql-test/suite/galera/t/galera_myisam_transactions.test b/mysql-test/suite/galera/t/galera_myisam_transactions.test index 00e0bf3fdca..30677ddbe4d 100644 --- a/mysql-test/suite/galera/t/galera_myisam_transactions.test +++ b/mysql-test/suite/galera/t/galera_myisam_transactions.test @@ -34,3 +34,16 @@ SELECT COUNT(*) = 0 FROM t2; SELECT COUNT(*) = 0 FROM t2; DROP TABLE t1, t2, t3; + +# +# MDEV-25201 : Assertion `thd->wsrep_trx_meta.gtid.seqno == (-1)' failed in int wsrep_to_isolation_begin(THD*, const char*, const char*, const TABLE_LIST*, Alter_info*) +# +SET SESSION lock_wait_timeout=2; +SET GLOBAL wsrep_replicate_myisam= ON; +CREATE TEMPORARY TABLE t1 (i INT, PRIMARY KEY pk (i)) ENGINE=MyISAM; +PREPARE stmt FROM "INSERT INTO t1 (id) SELECT * FROM (SELECT 4 AS i) AS y"; +INSERT INTO t1 VALUES(4); +DEALLOCATE PREPARE stmt; +COMMIT; +DROP TABLE t1; +SET GLOBAL wsrep_replicate_myisam=OFF; diff --git a/mysql-test/suite/sys_vars/t/wsrep_slave_threads_basic.test b/mysql-test/suite/galera/t/wsrep_slave_threads_basic.test index 80b4648982d..ecf159f8365 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_slave_threads_basic.test +++ b/mysql-test/suite/galera/t/wsrep_slave_threads_basic.test @@ -1,4 +1,4 @@ ---source include/have_wsrep.inc +--source include/galera_cluster.inc --echo # --echo # wsrep_slave_threads diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result index 27856fa136b..88db4c040f5 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522.result @@ -334,7 +334,7 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Number of columns don't match, table has 6 columns but the tablespace meta-data file has 5 columns) +ERROR HY000: Schema mismatch (Column c3 not found in tablespace.) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -919,6 +919,22 @@ c1 c2 15 1 16 1 DROP TABLE t1; +CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, i3 INT, PRIMARY KEY (id)) engine=innodb; +CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb; +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +ALTER TABLE t2 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Column DB_ROW_ID ordinal value mismatch, it's at 3 in the table and 4 in the tablespace meta-data file) +DROP TABLE t1, t2; +CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb; +CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, i3 INT, PRIMARY KEY (id)) engine=innodb; +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; +UNLOCK TABLES; +ALTER TABLE t2 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Column i3 not found in tablespace.) +DROP TABLE t1, t2; call mtr.add_suppression("Got error -1 when reading table '.*'"); call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'"); call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); diff --git a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_with_chunks.result b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_with_chunks.result index 4bf244c9588..efb652091bf 100644 --- a/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_with_chunks.result +++ b/mysql-test/suite/innodb/r/innodb_buffer_pool_resize_with_chunks.result @@ -1,6 +1,6 @@ select @@innodb_buffer_pool_chunk_size; @@innodb_buffer_pool_chunk_size -2097152 +4194304 create table t1 (id int not null, val int not null default '0', primary key (id)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; create or replace view view0 as select 1 union all select 1; set @`v_id` := 0; @@ -18,9 +18,9 @@ count(val) 262144 drop table t1; drop view view0; -set global innodb_buffer_pool_size = 1048576; +set global innodb_buffer_pool_size = 2*1048576; Warnings: -Warning 1292 Truncated incorrect innodb_buffer_pool_size value: '1048576' +Warning 1292 Truncated incorrect innodb_buffer_pool_size value: '2097152' select @@innodb_buffer_pool_size; @@innodb_buffer_pool_size -6291456 +4194304 diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result index f8b53f1b2c8..8fa779e8e11 100644 --- a/mysql-test/suite/innodb/r/innodb_information_schema.result +++ b/mysql-test/suite/innodb/r/innodb_information_schema.result @@ -1,18 +1,18 @@ lock_mode lock_type lock_table lock_index lock_rec lock_data -X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc''''' -X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc''''' -X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""' -X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""' -X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\' -X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\' -X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0' -X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0' -X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0 -X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0 -X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615 -X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615 -X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record -X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record +X RECORD `test`.```t'\"_str` PRIMARY 1 # +X RECORD `test`.```t'\"_str` PRIMARY 1 # +X RECORD `test`.```t'\"_str` PRIMARY 2 # +X RECORD `test`.```t'\"_str` PRIMARY 2 # +X RECORD `test`.```t'\"_str` PRIMARY 3 # +X RECORD `test`.```t'\"_str` PRIMARY 3 # +X RECORD `test`.```t'\"_str` PRIMARY 4 # +X RECORD `test`.```t'\"_str` PRIMARY 4 # +X RECORD `test`.```t'\"_str` PRIMARY 5 # +X RECORD `test`.```t'\"_str` PRIMARY 5 # +X RECORD `test`.`t_max` PRIMARY 2 # +X RECORD `test`.`t_max` PRIMARY 2 # +X RECORD `test`.`t_min` PRIMARY 2 # +X RECORD `test`.`t_min` PRIMARY 2 # lock_table COUNT(*) `test`.`t_max` 2 `test`.`t_min` 2 @@ -22,28 +22,28 @@ lock_table COUNT(*) "test"."t_min" 2 "test"."`t'\""_str" 10 Field Type Null Key Default Extra -trx_id varchar(18) NO -trx_state varchar(13) NO -trx_started datetime NO 0000-00-00 00:00:00 +trx_id varchar(18) NO NULL +trx_state varchar(13) NO NULL +trx_started datetime NO NULL trx_requested_lock_id varchar(81) YES NULL trx_wait_started datetime YES NULL -trx_weight bigint(21) unsigned NO 0 -trx_mysql_thread_id bigint(21) unsigned NO 0 +trx_weight bigint(21) unsigned NO NULL +trx_mysql_thread_id bigint(21) unsigned NO NULL trx_query varchar(1024) YES NULL trx_operation_state varchar(64) YES NULL -trx_tables_in_use bigint(21) unsigned NO 0 -trx_tables_locked bigint(21) unsigned NO 0 -trx_lock_structs bigint(21) unsigned NO 0 -trx_lock_memory_bytes bigint(21) unsigned NO 0 -trx_rows_locked bigint(21) unsigned NO 0 -trx_rows_modified bigint(21) unsigned NO 0 -trx_concurrency_tickets bigint(21) unsigned NO 0 -trx_isolation_level varchar(16) NO -trx_unique_checks int(1) NO 0 -trx_foreign_key_checks int(1) NO 0 +trx_tables_in_use bigint(21) unsigned NO NULL +trx_tables_locked bigint(21) unsigned NO NULL +trx_lock_structs bigint(21) unsigned NO NULL +trx_lock_memory_bytes bigint(21) unsigned NO NULL +trx_rows_locked bigint(21) unsigned NO NULL +trx_rows_modified bigint(21) unsigned NO NULL +trx_concurrency_tickets bigint(21) unsigned NO NULL +trx_isolation_level varchar(16) NO NULL +trx_unique_checks int(1) NO NULL +trx_foreign_key_checks int(1) NO NULL trx_last_foreign_key_error varchar(256) YES NULL -trx_is_read_only int(1) NO 0 -trx_autocommit_non_locking int(1) NO 0 +trx_is_read_only int(1) NO NULL +trx_autocommit_non_locking int(1) NO NULL trx_state trx_weight trx_tables_in_use trx_tables_locked trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks RUNNING 3 0 1 6 1 0 REPEATABLE READ 1 1 trx_isolation_level trx_unique_checks trx_foreign_key_checks diff --git a/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff new file mode 100644 index 00000000000..b36ed067913 --- /dev/null +++ b/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff @@ -0,0 +1,16 @@ +--- ./suite/innodb/r/restart.result 2022-01-18 20:36:56.054653376 +1100 ++++ suite/innodb/r/restart.reject 2022-01-19 08:12:28.602794678 +1100 +@@ -32,10 +32,10 @@ + SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; + SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); +-ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of '5242879' + SHOW WARNINGS; + Level Code Message +-Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_size=PAGE_SIZE +-Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++Warning 1210 innodb_buffer_pool_size must be at least 5242880 for innodb_page_size=16384 ++Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of '5242879' + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); + SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff new file mode 100644 index 00000000000..8fa057814c4 --- /dev/null +++ b/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff @@ -0,0 +1,16 @@ +--- ./suite/innodb/r/restart.result 2022-01-18 20:36:56.054653376 +1100 ++++ suite/innodb/r/restart.reject 2022-01-19 08:07:57.402230887 +1100 +@@ -32,10 +32,10 @@ + SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; + SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); +-ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of '10485759' + SHOW WARNINGS; + Level Code Message +-Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_size=PAGE_SIZE +-Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++Warning 1210 innodb_buffer_pool_size must be at least 10485760 for innodb_page_size=32768 ++Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of '10485759' + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); + SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff new file mode 100644 index 00000000000..7d0846360e0 --- /dev/null +++ b/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff @@ -0,0 +1,16 @@ +--- ./suite/innodb/r/restart.result 2022-01-18 20:36:56.054653376 +1100 ++++ suite/innodb/r/restart.reject 2022-01-19 08:13:56.397475513 +1100 +@@ -32,10 +32,10 @@ + SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; + SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); +-ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of '2097151' + SHOW WARNINGS; + Level Code Message +-Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_size=PAGE_SIZE +-Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++Warning 1210 innodb_buffer_pool_size must be at least 2097152 for innodb_page_size=4096 ++Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of '2097151' + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); + SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff new file mode 100644 index 00000000000..3ac9f45b196 --- /dev/null +++ b/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff @@ -0,0 +1,16 @@ +--- ./suite/innodb/r/restart.result 2022-01-18 20:36:56.054653376 +1100 ++++ suite/innodb/r/restart.reject 2022-01-19 08:11:32.418759095 +1100 +@@ -32,10 +32,10 @@ + SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; + SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); +-ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of '20971519' + SHOW WARNINGS; + Level Code Message +-Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_size=PAGE_SIZE +-Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++Warning 1210 innodb_buffer_pool_size must be at least 20971520 for innodb_page_size=65536 ++Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of '20971519' + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); + SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff new file mode 100644 index 00000000000..4da55ebfcef --- /dev/null +++ b/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff @@ -0,0 +1,16 @@ +--- ./suite/innodb/r/restart.result 2022-01-18 20:36:56.054653376 +1100 ++++ suite/innodb/r/restart.reject 2022-01-19 08:13:11.027788852 +1100 +@@ -32,10 +32,10 @@ + SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; + SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); +-ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of '3145727' + SHOW WARNINGS; + Level Code Message +-Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_size=PAGE_SIZE +-Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' ++Warning 1210 innodb_buffer_pool_size must be at least 3145728 for innodb_page_size=8192 ++Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of '3145727' + EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); + SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/r/restart.result b/mysql-test/suite/innodb/r/restart.result index b2132bed267..2c786572cd8 100644 --- a/mysql-test/suite/innodb/r/restart.result +++ b/mysql-test/suite/innodb/r/restart.result @@ -28,3 +28,16 @@ a SELECT * FROM td; a DROP TABLE tr,tc,td; +# +# MDEV-27467 innodb to enfore the minimum innodb_buffer_pool_size in SET (resize) the same as startup +# +SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; +SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; +EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); +ERROR 42000: Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' +SHOW WARNINGS; +Level Code Message +Warning 1210 innodb_buffer_pool_size must be at least MIN_VAL for innodb_page_size=PAGE_SIZE +Error 1231 Variable 'innodb_buffer_pool_size' can't be set to the value of 'WRONG_VALUE' +EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); +SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/r/skip_symbolic_links.result b/mysql-test/suite/innodb/r/skip_symbolic_links.result new file mode 100644 index 00000000000..e7a8a3cf86b --- /dev/null +++ b/mysql-test/suite/innodb/r/skip_symbolic_links.result @@ -0,0 +1,56 @@ +SELECT @@have_symlink; +@@have_symlink +DISABLED +CREATE TABLE t1(a INT) ENGINE=InnoDB DATA DIRECTORY 'MYSQL_TMP_DIR'; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +DROP TABLE t1; +CREATE TABLE t1(a INT) ENGINE=InnoDB; +ALTER TABLE t1 DATA DIRECTORY 'MYSQL_TMP_DIR'; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +# restart: --symbolic-links +CREATE TABLE t1(a INT PRIMARY KEY, b INT) ENGINE=InnoDB +DATA DIRECTORY 'MYSQL_TMP_DIR'; +CREATE TABLE t2(a INT PRIMARY KEY, b INT) ENGINE=InnoDB +DATA DIRECTORY 'MYSQL_TMP_DIR'; +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; +# restart +ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +ALTER TABLE t2 FORCE, ALGORITHM=COPY; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +t1.ibd +DROP TABLE t2; +RENAME TABLE t1 TO t2; +ALTER TABLE t2 ADD UNIQUE INDEX(b), RENAME TO t3; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +ALTER TABLE t3 RENAME TO t2; +ALTER TABLE t2 DROP INDEX b, RENAME TO t1; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +ALTER TABLE t1 CHANGE b c INT; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +ALTER TABLE t1 CHANGE c b INT NOT NULL; +Warnings: +Warning 1618 <DATA DIRECTORY> option ignored +t1.ibd +TRUNCATE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/101_compatibility.test b/mysql-test/suite/innodb/t/101_compatibility.test index eb1ec3b26ac..878daad2756 100644 --- a/mysql-test/suite/innodb/t/101_compatibility.test +++ b/mysql-test/suite/innodb/t/101_compatibility.test @@ -1,5 +1,6 @@ --source include/innodb_page_size.inc --source include/not_embedded.inc +--source include/have_symlink.inc -- echo # -- echo # MDEV-11623 MariaDB 10.1 fails to start datadir created with diff --git a/mysql-test/suite/innodb/t/create_isl_with_direct.test b/mysql-test/suite/innodb/t/create_isl_with_direct.test index 1427264e13e..2092d03b72f 100644 --- a/mysql-test/suite/innodb/t/create_isl_with_direct.test +++ b/mysql-test/suite/innodb/t/create_isl_with_direct.test @@ -1,5 +1,6 @@ --source include/not_embedded.inc --source include/have_innodb.inc +--source include/have_symlink.inc --disable_query_log CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*"); diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test index 0b1c7d216b2..47ea4325403 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522.test @@ -1069,6 +1069,43 @@ SELECT * FROM t1; DROP TABLE t1; + +CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, i3 INT, PRIMARY KEY (id)) engine=innodb; +CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb; + +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; + +--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd +--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg + +UNLOCK TABLES; +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t2 IMPORT TABLESPACE; + +DROP TABLE t1, t2; + + +CREATE TABLE t1 ( id INT NOT NULL, i1 INT, i2 INT, PRIMARY KEY (id)) engine=innodb; +CREATE TABLE t2 ( id INT NOT NULL, i1 INT, i2 INT, i3 INT, PRIMARY KEY (id)) engine=innodb; + +ALTER TABLE t2 DISCARD TABLESPACE; +FLUSH TABLES t1 FOR EXPORT; + +--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd +--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg + +UNLOCK TABLES; +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t2 IMPORT TABLESPACE; + +--remove_file $MYSQLD_DATADIR/test/t2.ibd +--remove_file $MYSQLD_DATADIR/test/t2.cfg + + +DROP TABLE t1, t2; + + call mtr.add_suppression("Got error -1 when reading table '.*'"); call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'"); call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test index a0d80ea8374..9b51612854f 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test +++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test @@ -4,6 +4,7 @@ --echo # --source include/have_innodb.inc +--source include/have_symlink.inc --disable_query_log # These values can change during the test diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-debug.test b/mysql-test/suite/innodb/t/innodb-wl5980-debug.test index 2c5e2b48870..dbb8ad33676 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5980-debug.test +++ b/mysql-test/suite/innodb/t/innodb-wl5980-debug.test @@ -8,6 +8,7 @@ --source include/not_embedded.inc --source include/have_debug.inc --source include/have_innodb.inc +--source include/have_symlink.inc # These messages are expected in the log call mtr.add_suppression("Cannot find space id [0-9]+ in the tablespace memory cache"); diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.opt b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.opt index b97a3995457..ade197de338 100644 --- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.opt +++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.opt @@ -1,3 +1,3 @@ --innodb-buffer-pool-size=16M ---innodb-buffer-pool-chunk-size=2M +--innodb-buffer-pool-chunk-size=4M --innodb-page-size=4k diff --git a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test index b04b0306bf1..7a26db65d33 100644 --- a/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test +++ b/mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test @@ -49,7 +49,7 @@ drop table t1; drop view view0; # Try to shrink buffer pool to smaller than chunk size -set global innodb_buffer_pool_size = 1048576; +set global innodb_buffer_pool_size = 2*1048576; --source include/wait_condition.inc select @@innodb_buffer_pool_size; diff --git a/mysql-test/suite/innodb/t/innodb_information_schema.test b/mysql-test/suite/innodb/t/innodb_information_schema.test index da7ee016f29..5bc1115c58e 100644 --- a/mysql-test/suite/innodb/t/innodb_information_schema.test +++ b/mysql-test/suite/innodb/t/innodb_information_schema.test @@ -148,6 +148,8 @@ if (!$success) -- echo Timeout waiting for rows in INNODB_LOCKS to appear } +--replace_column 6 # +--sorted_result SELECT lock_mode, lock_type, lock_table, lock_index, lock_rec, lock_data FROM INFORMATION_SCHEMA.INNODB_LOCKS ORDER BY lock_data; diff --git a/mysql-test/suite/innodb/t/restart.opt b/mysql-test/suite/innodb/t/restart.opt new file mode 100644 index 00000000000..ce43e89cb2b --- /dev/null +++ b/mysql-test/suite/innodb/t/restart.opt @@ -0,0 +1,2 @@ +--loose-innodb_disable_resize_buffer_pool_debug=0 +--innodb-buffer-pool-chunk-size=1M diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test index a7a7855ba7b..cd5e7532354 100644 --- a/mysql-test/suite/innodb/t/restart.test +++ b/mysql-test/suite/innodb/t/restart.test @@ -1,5 +1,6 @@ --source include/innodb_page_size.inc --source include/not_embedded.inc +--source include/have_symlink.inc let datadir= `select @@datadir`; let page_size= `select @@innodb_page_size`; @@ -77,3 +78,26 @@ SELECT * FROM tr; SELECT * FROM tc; SELECT * FROM td; DROP TABLE tr,tc,td; + +--echo # +--echo # MDEV-27467 innodb to enfore the minimum innodb_buffer_pool_size in SET (resize) the same as startup +--echo # + +let $wait_timeout = 180; +let $wait_condition = + SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at ' + FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status'; + +SELECT @@innodb_buffer_pool_size INTO @innodb_buffer_pool_size_orig; +SELECT CEILING((256 + 64) * @@innodb_page_size / 1048576) * 1048576 INTO @min_pool_size; +--error ER_WRONG_VALUE_FOR_VAR +EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size -1); + +SHOW WARNINGS; + +EXECUTE IMMEDIATE 'SET GLOBAL innodb_buffer_pool_size = ?' USING (@min_pool_size); + +--source include/wait_condition.inc + +SET GLOBAL innodb_buffer_pool_size = @innodb_buffer_pool_size_orig; diff --git a/mysql-test/suite/innodb/t/skip_symbolic_links.opt b/mysql-test/suite/innodb/t/skip_symbolic_links.opt new file mode 100644 index 00000000000..c7844699cdb --- /dev/null +++ b/mysql-test/suite/innodb/t/skip_symbolic_links.opt @@ -0,0 +1 @@ +--skip-symbolic-links diff --git a/mysql-test/suite/innodb/t/skip_symbolic_links.test b/mysql-test/suite/innodb/t/skip_symbolic_links.test new file mode 100644 index 00000000000..b5274d220c8 --- /dev/null +++ b/mysql-test/suite/innodb/t/skip_symbolic_links.test @@ -0,0 +1,51 @@ +--source include/have_innodb.inc +--source include/not_windows.inc + +SELECT @@have_symlink; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval CREATE TABLE t1(a INT) ENGINE=InnoDB DATA DIRECTORY '$MYSQL_TMP_DIR'; +DROP TABLE t1; +CREATE TABLE t1(a INT) ENGINE=InnoDB; + +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval ALTER TABLE t1 DATA DIRECTORY '$MYSQL_TMP_DIR'; +SHOW CREATE TABLE t1; + +DROP TABLE t1; + +--let $restart_parameters=--symbolic-links +--source include/restart_mysqld.inc + +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval CREATE TABLE t1(a INT PRIMARY KEY, b INT) ENGINE=InnoDB +DATA DIRECTORY '$MYSQL_TMP_DIR'; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval CREATE TABLE t2(a INT PRIMARY KEY, b INT) ENGINE=InnoDB +DATA DIRECTORY '$MYSQL_TMP_DIR'; + +TRUNCATE TABLE t1; +TRUNCATE TABLE t2; + +--let $restart_parameters= +--source include/restart_mysqld.inc + +# Native ALTER will retain DATA DIRECTORY +ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; +ALTER TABLE t2 FORCE, ALGORITHM=COPY; +OPTIMIZE TABLE t1; +--list_files $MYSQL_TMP_DIR/test +DROP TABLE t2; + +RENAME TABLE t1 TO t2; +ALTER TABLE t2 ADD UNIQUE INDEX(b), RENAME TO t3; + +ALTER TABLE t3 RENAME TO t2; +ALTER TABLE t2 DROP INDEX b, RENAME TO t1; +ALTER TABLE t1 CHANGE b c INT; +ALTER TABLE t1 CHANGE c b INT NOT NULL; + +--list_files $MYSQL_TMP_DIR/test +# TRUNCATE TABLE will discard DATA DIRECTORY. +TRUNCATE TABLE t1; +--list_files $MYSQL_TMP_DIR/test +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result index ec417af97c5..0a408ab4ce7 100644 --- a/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_plugin.result @@ -161,6 +161,7 @@ id title body SELECT COUNT(*) FROM articles; COUNT(*) 5 +INSERT INTO articles (title, body) VALUES ('111', '1234 1234 1234'); DROP TABLE articles; # Test Part 5: Test Uninstall Plugin After Index is Built CREATE TABLE articles ( diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test b/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test index cd31500b23f..b22ac456668 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_plugin.test @@ -158,6 +158,8 @@ SELECT * FROM articles WHERE SELECT * FROM articles WHERE MATCH(title, body) AGAINST('full text search'); SELECT COUNT(*) FROM articles; + +INSERT INTO articles (title, body) VALUES ('111', '1234 1234 1234'); DROP TABLE articles; -- echo # Test Part 5: Test Uninstall Plugin After Index is Built diff --git a/mysql-test/suite/innodb_gis/r/rtree_split.result b/mysql-test/suite/innodb_gis/r/rtree_split.result index df88960ba3d..2d6e8a1dfbe 100644 --- a/mysql-test/suite/innodb_gis/r/rtree_split.result +++ b/mysql-test/suite/innodb_gis/r/rtree_split.result @@ -61,3 +61,10 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1); count(*) 57344 drop table t1; +# +# MDEV-27417 Spatial index tries to update +# change buffer bookkeeping page +# +CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB; +INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_gis/t/rtree_split.test b/mysql-test/suite/innodb_gis/t/rtree_split.test index 6f285187508..8697141ddea 100644 --- a/mysql-test/suite/innodb_gis/t/rtree_split.test +++ b/mysql-test/suite/innodb_gis/t/rtree_split.test @@ -73,3 +73,11 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1); # Clean up. drop table t1; + +--echo # +--echo # MDEV-27417 Spatial index tries to update +--echo # change buffer bookkeeping page +--echo # +CREATE TEMPORARY TABLE t1 (c POINT NOT NULL, SPATIAL(c)) ENGINE=InnoDB; +INSERT INTO t1 SELECT PointFromText('POINT(0 0)') FROM seq_1_to_366; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/r/wl5522_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_zip.result index 49121b906ce..210b3b1b0d6 100644 --- a/mysql-test/suite/innodb_zip/r/wl5522_zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_zip.result @@ -319,7 +319,7 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Number of columns don't match, table has 6 columns but the tablespace meta-data file has 5 columns) +ERROR HY000: Schema mismatch (Column c3 not found in tablespace.) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; diff --git a/mysql-test/suite/innodb_zip/t/restart.test b/mysql-test/suite/innodb_zip/t/restart.test index e0e42a682ab..6962d62b21f 100644 --- a/mysql-test/suite/innodb_zip/t/restart.test +++ b/mysql-test/suite/innodb_zip/t/restart.test @@ -5,6 +5,7 @@ --source include/have_partition.inc --source include/not_embedded.inc --source include/innodb_checksum_algorithm.inc +--source include/have_symlink.inc SET default_storage_engine=InnoDB; LET $MYSQLD_DATADIR = `select @@datadir`; diff --git a/mysql-test/suite/maria/fulltext2.result b/mysql-test/suite/maria/fulltext2.result index 1e4e6636ef6..6cffc5cf404 100644 --- a/mysql-test/suite/maria/fulltext2.result +++ b/mysql-test/suite/maria/fulltext2.result @@ -84,3 +84,10 @@ select count(*) from t1 where match a against ('aaayyy' in boolean mode); count(*) 0 drop table t1; +set names utf8mb4; +create table t1 (a int, b text, fulltext (b)) charset=utf8mb4 collate=utf8mb4_unicode_ci engine=aria; +insert t1 values (1000, 'C͓̙̯͔̩ͅͅi̩̘̜̲a̯̲̬̳̜̖̤o͕͓̜͓̺̖̗,̠̬͚ ̺T͇̲h͈̱e ̬̜D̖o̦̖͔̗͖̩̘c̣̼t̝͉̫̮̗o͉̫̭r̙͎̗.͓̪̥'); +select a from t1 where match(b) against ('ciao' in boolean mode); +a +1000 +drop table t1; diff --git a/mysql-test/suite/maria/fulltext2.test b/mysql-test/suite/maria/fulltext2.test index 060b748eb4f..7bfbe600ff7 100644 --- a/mysql-test/suite/maria/fulltext2.test +++ b/mysql-test/suite/maria/fulltext2.test @@ -75,3 +75,12 @@ select count(*) from t1 where match a against ('aaaxxx' in boolean mode); select count(*) from t1 where match a against ('aaayyy' in boolean mode); drop table t1; + +# +# MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches +# +set names utf8mb4; +create table t1 (a int, b text, fulltext (b)) charset=utf8mb4 collate=utf8mb4_unicode_ci engine=aria; +insert t1 values (1000, 'C͓̙̯͔̩ͅͅi̩̘̜̲a̯̲̬̳̜̖̤o͕͓̜͓̺̖̗,̠̬͚ ̺T͇̲h͈̱e ̬̜D̖o̦̖͔̗͖̩̘c̣̼t̝͉̫̮̗o͉̫̭r̙͎̗.͓̪̥'); +select a from t1 where match(b) against ('ciao' in boolean mode); +drop table t1; diff --git a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test index d0cb83d069f..f01028b6494 100644 --- a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test +++ b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test @@ -1,4 +1,5 @@ --source include/have_debug.inc +--source include/have_symlink.inc let $table_data_dir=$MYSQLTEST_VARDIR/tmp/ddir; let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; mkdir $table_data_dir; diff --git a/mysql-test/suite/mariabackup/data_directory.test b/mysql-test/suite/mariabackup/data_directory.test index 50789a34c78..a89b7bdccc4 100644 --- a/mysql-test/suite/mariabackup/data_directory.test +++ b/mysql-test/suite/mariabackup/data_directory.test @@ -1,3 +1,4 @@ +--source include/have_symlink.inc let $table_data_dir=$MYSQLTEST_VARDIR/ddir; mkdir $table_data_dir; --replace_result $table_data_dir table_data_dir diff --git a/mysql-test/suite/mariabackup/partition_datadir.test b/mysql-test/suite/mariabackup/partition_datadir.test index c525d34a02c..36520d331bf 100644 --- a/mysql-test/suite/mariabackup/partition_datadir.test +++ b/mysql-test/suite/mariabackup/partition_datadir.test @@ -1,4 +1,5 @@ --source include/have_partition.inc +--source include/have_symlink.inc let $targetdir=$MYSQLTEST_VARDIR/backup; mkdir $targetdir; mkdir $MYSQLTEST_VARDIR/partitdata; diff --git a/mysql-test/suite/parts/t/alter_data_directory_innodb.test b/mysql-test/suite/parts/t/alter_data_directory_innodb.test index ac15e9bec6c..def04e14173 100644 --- a/mysql-test/suite/parts/t/alter_data_directory_innodb.test +++ b/mysql-test/suite/parts/t/alter_data_directory_innodb.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_partition.inc +--source include/have_symlink.inc --echo # --echo # MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally not in the datadir) to the datadir diff --git a/mysql-test/suite/parts/t/reorganize_partition_innodb.test b/mysql-test/suite/parts/t/reorganize_partition_innodb.test index db73650c54b..77109c38c96 100644 --- a/mysql-test/suite/parts/t/reorganize_partition_innodb.test +++ b/mysql-test/suite/parts/t/reorganize_partition_innodb.test @@ -1,5 +1,6 @@ --source include/have_innodb.inc --source include/have_partition.inc +--source include/have_symlink.inc --echo # --echo # MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally not in the datadir) to the datadir diff --git a/mysql-test/suite/plugins/r/locales.result b/mysql-test/suite/plugins/r/locales.result index 106bf22923c..2ea88493705 100644 --- a/mysql-test/suite/plugins/r/locales.result +++ b/mysql-test/suite/plugins/r/locales.result @@ -17,7 +17,7 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU 14 cs_CZ Czech - Czech Republic 8 7 , czech 15 da_DK Danish - Denmark 9 7 , . danish 16 de_AT German - Austria 9 10 , german -17 es_ES Spanish - Spain 10 9 , spanish +17 es_ES Spanish - Spain 10 9 , . spanish 18 et_EE Estonian - Estonia 9 9 , estonian 19 eu_ES Basque - Basque 9 10 , english 20 fi_FI Finnish - Finland 9 11 , english @@ -82,24 +82,24 @@ ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOU 79 en_ZA English - South Africa 9 9 . , english 80 en_ZW English - Zimbabwe 9 9 . , english 81 es_AR Spanish - Argentina 10 9 , . spanish -82 es_BO Spanish - Bolivia 10 9 , spanish -83 es_CL Spanish - Chile 10 9 , spanish -84 es_CO Spanish - Columbia 10 9 , spanish -85 es_CR Spanish - Costa Rica 10 9 . spanish -86 es_DO Spanish - Dominican Republic 10 9 . spanish -87 es_EC Spanish - Ecuador 10 9 , spanish -88 es_GT Spanish - Guatemala 10 9 . spanish -89 es_HN Spanish - Honduras 10 9 . spanish -90 es_MX Spanish - Mexico 10 9 . spanish -91 es_NI Spanish - Nicaragua 10 9 . spanish -92 es_PA Spanish - Panama 10 9 . spanish -93 es_PE Spanish - Peru 10 9 . spanish -94 es_PR Spanish - Puerto Rico 10 9 . spanish -95 es_PY Spanish - Paraguay 10 9 , spanish -96 es_SV Spanish - El Salvador 10 9 . spanish +82 es_BO Spanish - Bolivia 10 9 , . spanish +83 es_CL Spanish - Chile 10 9 , . spanish +84 es_CO Spanish - Columbia 10 9 , . spanish +85 es_CR Spanish - Costa Rica 10 9 , spanish +86 es_DO Spanish - Dominican Republic 10 9 . , spanish +87 es_EC Spanish - Ecuador 10 9 , . spanish +88 es_GT Spanish - Guatemala 10 9 . , spanish +89 es_HN Spanish - Honduras 10 9 . , spanish +90 es_MX Spanish - Mexico 10 9 . , spanish +91 es_NI Spanish - Nicaragua 10 9 . , spanish +92 es_PA Spanish - Panama 10 9 . , spanish +93 es_PE Spanish - Peru 10 9 . , spanish +94 es_PR Spanish - Puerto Rico 10 9 . , spanish +95 es_PY Spanish - Paraguay 10 9 , . spanish +96 es_SV Spanish - El Salvador 10 9 . , spanish 97 es_US Spanish - United States 10 9 . , spanish -98 es_UY Spanish - Uruguay 10 9 , spanish -99 es_VE Spanish - Venezuela 10 9 , spanish +98 es_UY Spanish - Uruguay 10 9 , . spanish +99 es_VE Spanish - Venezuela 10 9 , . spanish 100 fr_BE French - Belgium 9 8 , . french 101 fr_CA French - Canada 9 8 , french 102 fr_CH French - Switzerland 9 8 , french diff --git a/mysql-test/suite/rpl/r/rpl_empty_string_is_null.result b/mysql-test/suite/rpl/r/rpl_empty_string_is_null.result new file mode 100644 index 00000000000..5f35b56c559 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_empty_string_is_null.result @@ -0,0 +1,16 @@ +include/master-slave.inc +[connection master] +# +# MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT +# +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE TABLE t1 AS SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +connection slave; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `TABLE_NAME` varchar(64) CHARACTER SET utf8 NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +connection master; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result b/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result new file mode 100644 index 00000000000..be18f95c2c0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_seconds_behind_master_spike.result @@ -0,0 +1,40 @@ +include/master-slave.inc +[connection master] +connection slave; +include/stop_slave.inc +SET @save_dbug= @@GLOBAL.debug_dbug; +SET @@global.debug_dbug="+d,pause_sql_thread_on_fde"; +include/start_slave.inc +# Future events must be logged at least 2 seconds after +# the slave starts +connection master; +# Write events to ensure slave will be consistent with master +create table t1 (a int); +insert into t1 values (1); +# Flush logs on master forces slave to generate a Format description +# event in its relay log +flush logs; +connection slave; +# Ignore FDEs that happen before the CREATE/INSERT commands +SET DEBUG_SYNC='now WAIT_FOR paused_on_fde'; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; +SET DEBUG_SYNC='now WAIT_FOR paused_on_fde'; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; +# On the next FDE, the slave should have the master CREATE/INSERT events +SET DEBUG_SYNC='now WAIT_FOR paused_on_fde'; +select count(*)=1 from t1; +count(*)=1 +1 +# The relay log FDE has been processed - here we check to ensure it was +# not considered in Seconds_Behind_Master calculation +connection slave1; +# Safely resume slave SQL thread +SET @@global.debug_dbug=''; +SET DEBUG_SYNC='pause_sql_thread_on_fde CLEAR'; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; +SET DEBUG_SYNC='RESET'; +connection master; +DROP TABLE t1; +connection slave; +SET @@global.debug_dbug=$save_dbug; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_empty_string_is_null.test b/mysql-test/suite/rpl/t/rpl_empty_string_is_null.test new file mode 100644 index 00000000000..a0fecbb54ac --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_empty_string_is_null.test @@ -0,0 +1,15 @@ +--source include/master-slave.inc +--source include/have_binlog_format_row.inc + +--echo # +--echo # MDEV-18918 SQL mode EMPTY_STRING_IS_NULL breaks RBR upon CREATE TABLE .. SELECT +--echo # + +SET SQL_MODE= 'EMPTY_STRING_IS_NULL'; +CREATE TABLE t1 AS SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE 1 = 0; +--sync_slave_with_master +SHOW CREATE TABLE t1; +--connection master +DROP TABLE t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test b/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test new file mode 100644 index 00000000000..029625a09ad --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_seconds_behind_master_spike.test @@ -0,0 +1,88 @@ +# +# Purpose: +# This test validates that a slave's relay log format description event is +# not used to calculate the Seconds_Behind_Master time displayed by +# SHOW SLAVE STATUS. +# +# Methodology: +# Ensure that a slave's reported Seconds_Behind_Master does not point before +# a time in which we can prove that it has progressed beyond. The slave's +# relay log events are created using the timestamp at which the IO thread was +# created. Therefore, after starting the slave's IO thread, we sleep so any +# proceeding events are forced to have later timestamps. After sleeping, we run +# MDL statements on the master and save the time at which they are binlogged. +# Once the slave executes these MDL commands, we have proven that the slave has +# caught up to this saved timestamp. At this point, if the value of +# Seconds_Behind_Master points before the time in which the MDL events were +# logged, it is invalid. +# +# References: +# MDEV-16091: Seconds_Behind_Master spikes to millions of seconds +# +--source include/have_debug.inc +--source include/have_innodb.inc +--source include/master-slave.inc + +--connection slave +--source include/stop_slave.inc +SET @save_dbug= @@GLOBAL.debug_dbug; +SET @@global.debug_dbug="+d,pause_sql_thread_on_fde"; +--source include/start_slave.inc + +--let $sleep_time=2 +--echo # Future events must be logged at least $sleep_time seconds after +--echo # the slave starts +--sleep $sleep_time + +--connection master +--echo # Write events to ensure slave will be consistent with master +create table t1 (a int); +insert into t1 values (1); +--let $t_master_events_logged= `SELECT UNIX_TIMESTAMP()` + +--echo # Flush logs on master forces slave to generate a Format description +--echo # event in its relay log +flush logs; + +--connection slave +--echo # Ignore FDEs that happen before the CREATE/INSERT commands +SET DEBUG_SYNC='now WAIT_FOR paused_on_fde'; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; +SET DEBUG_SYNC='now WAIT_FOR paused_on_fde'; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; + +--echo # On the next FDE, the slave should have the master CREATE/INSERT events +SET DEBUG_SYNC='now WAIT_FOR paused_on_fde'; +select count(*)=1 from t1; + +--echo # The relay log FDE has been processed - here we check to ensure it was +--echo # not considered in Seconds_Behind_Master calculation +--connection slave1 +let $sbm= query_get_value(SHOW SLAVE STATUS, Seconds_Behind_Master, 1); +--let $t_now= `SELECT UNIX_TIMESTAMP()` + +# Ensure Seconds_Behind_Master does not point beyond when we have proven the +# events we have proven to have executed. The extra second is needed as a +# buffer because the recorded times are not exact with when the events were +# recorded on the master. +if(`select $sbm > $t_now - $t_master_events_logged + 1`) +{ + die "A relay log event was incorrectly used to set Seconds_Behind_Master"; +} + +--echo # Safely resume slave SQL thread +SET @@global.debug_dbug=''; +SET DEBUG_SYNC='pause_sql_thread_on_fde CLEAR'; +SET DEBUG_SYNC='now SIGNAL sql_thread_continue'; + +# Reset last sql_thread_continue signal +SET DEBUG_SYNC='RESET'; + +# Cleanup +--connection master +DROP TABLE t1; + +--connection slave +SET @@global.debug_dbug=$save_dbug; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index 7a4b67b3600..4fd826e5d07 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -279,7 +279,7 @@ DEFAULT_VALUE 134217728 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT The size of the memory buffer InnoDB uses to cache data and indexes of its tables. -NUMERIC_MIN_VALUE 5242880 +NUMERIC_MIN_VALUE 2097152 NUMERIC_MAX_VALUE 9223372036854775807 NUMERIC_BLOCK_SIZE 1048576 ENUM_VALUE_LIST NULL diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff index 9ec15d3079a..e0aad7fa6d0 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff @@ -1,7 +1,7 @@ ---- sysvars_server_embedded.result -+++ sysvars_server_embedded.result -@@ -34,7 +34,7 @@ READ_ONLY NO - COMMAND_LINE_ARGUMENT REQUIRED +--- ../../mysql-test/suite/sys_vars/r/sysvars_server_embedded.result 2022-01-27 20:42:19.039084441 +0200 ++++ ../../mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.result~ 2022-01-28 16:12:40.038627481 +0200 +@@ -14,7 +14,7 @@ + order by variable_name; VARIABLE_NAME ARIA_BLOCK_SIZE VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE BIGINT UNSIGNED @@ -563,7 +563,7 @@ -VARIABLE_TYPE BIGINT UNSIGNED +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored) - NUMERIC_MIN_VALUE 4 + NUMERIC_MIN_VALUE 64 NUMERIC_MAX_VALUE 8388608 @@ -1954,7 +1954,7 @@ READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED @@ -799,8 +799,8 @@ +VARIABLE_TYPE INT VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing. NUMERIC_MIN_VALUE -1 - NUMERIC_MAX_VALUE 200 -@@ -2344,7 +2344,7 @@ READ_ONLY YES + NUMERIC_MAX_VALUE 1048576 +@@ -2144,7 +2144,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZE VARIABLE_SCOPE GLOBAL diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result index c804cf220d2..d8703f755da 100644 --- a/mysql-test/suite/vcol/r/not_supported.result +++ b/mysql-test/suite/vcol/r/not_supported.result @@ -34,3 +34,11 @@ select * from t8; a b v 1234567890 2 2009-02-14 00:31:30 drop table t1, t3_ok, t8; +# +# Bug#33141966 - INCONSISTENT BEHAVIOR IF A COLUMN OF TYPE SERIAL IS SET AS GENERATED +# +create table t1 (a int, b serial as (a+1)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'as (a+1))' at line 1 +# +# End of 10.2 tests +# diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test index 1ea7970523a..2b5baf4ff4b 100644 --- a/mysql-test/suite/vcol/t/not_supported.test +++ b/mysql-test/suite/vcol/t/not_supported.test @@ -39,3 +39,13 @@ select * from t1; select * from t8; drop table t1, t3_ok, t8; + +--echo # +--echo # Bug#33141966 - INCONSISTENT BEHAVIOR IF A COLUMN OF TYPE SERIAL IS SET AS GENERATED +--echo # +--error ER_PARSE_ERROR +create table t1 (a int, b serial as (a+1)); + +--echo # +--echo # End of 10.2 tests +--echo # diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result index 1197a0e805a..69db9d49237 100644 --- a/mysql-test/suite/versioning/r/create.result +++ b/mysql-test/suite/versioning/r/create.result @@ -631,8 +631,32 @@ Table Create Table t1 CREATE TABLE `t1` ( `x` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING, `y` int(11) DEFAULT NULL, - `row_start` timestamp(6) GENERATED ALWAYS AS ROW START WITHOUT SYSTEM VERSIONING, - `row_end` timestamp(6) GENERATED ALWAYS AS ROW END WITHOUT SYSTEM VERSIONING, + `row_start` timestamp(6) GENERATED ALWAYS AS ROW START, + `row_end` timestamp(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING drop table t1; +# +# MDEV-27452 TIMESTAMP(0) system field is allowed for certain creation of system-versioned table +# +create or replace table t ( +a int, +s timestamp as row start, +e timestamp as row end, +period for system_time (s, e)) +with system versioning; +ERROR HY000: `s` must be of type TIMESTAMP(6) for system-versioned table `t` +create or replace table t ( +a int with system versioning, +s timestamp as row start, +e timestamp as row end, +period for system_time (s, e)); +ERROR HY000: `s` must be of type TIMESTAMP(6) for system-versioned table `t` +create or replace table t ( +a int with system versioning, +b int with system versioning, +s timestamp(6) as row start, +e timestamp(6) as row end, +period for system_time (s, e)); +insert into t () values (),(); +drop table t; diff --git a/mysql-test/suite/versioning/r/truncate_privilege.result b/mysql-test/suite/versioning/r/not_embedded.result index e2b48c494be..f17ab18349c 100644 --- a/mysql-test/suite/versioning/r/truncate_privilege.result +++ b/mysql-test/suite/versioning/r/not_embedded.result @@ -1,3 +1,39 @@ +# +# SYSTEM_VERSIONING_ASOF sysvar +# +create table t (a int) with system versioning; +set @before= UNIX_TIMESTAMP(now(6)); +insert into t values (1); +set @after= UNIX_TIMESTAMP(now(6)); +update t set a= 2; +set global system_versioning_asof= FROM_UNIXTIME(@after); +set system_versioning_asof= FROM_UNIXTIME(@after); +select * from t as nonempty; +a +1 +connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1; +connection subcon; +select * from t as nonempty; +a +1 +disconnect subcon; +connection default; +set global system_versioning_asof= FROM_UNIXTIME(@before); +select * from t as nonempty; +a +1 +connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1; +connection subcon; +select * from t as empty; +a +disconnect subcon; +connection default; +drop table t; +set global system_versioning_asof= DEFAULT; +set system_versioning_asof= DEFAULT; +# +# DELETE HISTORY and privileges +# connect root,localhost,root,,test; connection root; create database mysqltest; @@ -31,3 +67,6 @@ GRANT DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost` GRANT DELETE HISTORY ON `mysqltest`.`t` TO `mysqltest_1`@`localhost` drop user mysqltest_1@localhost; drop database mysqltest; +disconnect user1; +disconnect root; +connection default; diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index 7a70b825e4a..af5db4802d6 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -559,6 +559,18 @@ t1 CREATE TABLE `t1` ( (PARTITION `ver_p1` HISTORY ENGINE = DEFAULT_ENGINE, PARTITION `ver_pn` CURRENT ENGINE = DEFAULT_ENGINE) # +# MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table +# +create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i)) +engine=innodb with system versioning partition by key() partitions 2; +insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b'); +alter table t1 drop system versioning; +replace into t1 select * from t1; +select * from t1 where i > 0 or pk = 1000 limit 1; +pk i c +1 1 a +drop table t1; +# # MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table # create or replace table t1 (f int) with system versioning partition by hash(f); @@ -763,6 +775,38 @@ alter table t1 add x serial; alter table t1 add partition (partition p1 history); alter table t1 add partition (partition p2 history); drop table t1; +# +# MDEV-27217 DELETE partition selection doesn't work for history partitions +# +create table t1 (f char) with system versioning +partition by system_time limit 10 ( +partition p0 history, +partition p1 history, +partition p2 history, +partition pn current); +delete from t1 partition (p1); +ERROR HY000: Not allowed for system-versioned table `test`.`t1` +delete from t1 partition (p0, pn); +ERROR HY000: Not allowed for system-versioned table `test`.`t1` +delete from t1 partition (p0, p1); +ERROR HY000: Not allowed for system-versioned table `test`.`t1` +delete from t1 partition (p0, p1, pn); +ERROR HY000: Not allowed for system-versioned table `test`.`t1` +drop table t1; +set timestamp=unix_timestamp('2000-01-01 00:00:00'); +create or replace table t1 (i int) with system versioning +partition by system_time interval 1 day ( +partition p0 history, +partition p1 history, +partition pn current); +set timestamp=unix_timestamp('2000-01-02 00:00:00'); +insert t1 values (1); +delete from t1 partition (p0, pn); +ERROR HY000: Not allowed for system-versioned table `test`.`t1` +delete from t1 partition (p0, p1, pn); +ERROR HY000: Not allowed for system-versioned table `test`.`t1` +drop table t1; +set timestamp= default; # End of 10.3 tests # # MDEV-22283 Server crashes in key_copy or unexpected error 156: The table already existed in the storage engine diff --git a/mysql-test/suite/versioning/r/partition_innodb.result b/mysql-test/suite/versioning/r/partition_innodb.result deleted file mode 100644 index 1bc0549a735..00000000000 --- a/mysql-test/suite/versioning/r/partition_innodb.result +++ /dev/null @@ -1,80 +0,0 @@ -# MDEV-15951 system versioning by trx id doesn't work with partitioning -# currently trx_id does not support partitioning by system_time -create or replace table t1( -i int, -row_start bigint unsigned generated always as row start, -row_end bigint unsigned generated always as row end, -period for system_time(row_start, row_end) -) engine=InnoDB with system versioning partition by system_time ( -partition p0 history, -partition pn current -); -ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1` -create or replace table t1( -i int, -row_start bigint unsigned generated always as row start, -row_end bigint unsigned generated always as row end, -period for system_time(row_start, row_end) -) engine=InnoDB with system versioning; -alter table t1 partition by system_time ( -partition p0 history, -partition pn current -); -ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1` -drop table t1; -create or replace table t ( -a int primary key, -row_start bigint unsigned as row start invisible, -row_end bigint unsigned as row end invisible, -period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by key() ( -partition p1, -partition p2 -); -ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END -create or replace table t ( -a int primary key, -row_start bigint unsigned as row start invisible, -row_end bigint unsigned as row end invisible, -period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by key(a, row_start) ( -partition p1, -partition p2 -); -ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END -create or replace table t ( -a int primary key, -row_start bigint unsigned as row start invisible, -row_end bigint unsigned as row end invisible, -period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by hash(a + row_end * 2) ( -partition p1, -partition p2 -); -ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END -create or replace table t ( -a int primary key, -row_start bigint unsigned as row start invisible, -row_end bigint unsigned as row end invisible, -period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by range columns (a, row_start) ( -partition p1 values less than (100, 100) -); -ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END -# -# MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table -# -create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i)) -engine=innodb with system versioning partition by key() partitions 2; -insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b'); -alter table t1 drop system versioning; -replace into t1 select * from t1; -select * from t1 where i > 0 or pk = 1000 limit 1; -pk i c -1 1 a -drop table t1; -# End of 10.3 tests diff --git a/mysql-test/suite/versioning/r/sysvars-notembedded.result b/mysql-test/suite/versioning/r/sysvars-notembedded.result deleted file mode 100644 index 8b1ad6cfc58..00000000000 --- a/mysql-test/suite/versioning/r/sysvars-notembedded.result +++ /dev/null @@ -1,30 +0,0 @@ -create table t (a int) with system versioning; -set @before= UNIX_TIMESTAMP(now(6)); -insert into t values (1); -set @after= UNIX_TIMESTAMP(now(6)); -update t set a= 2; -set global system_versioning_asof= FROM_UNIXTIME(@after); -set system_versioning_asof= FROM_UNIXTIME(@after); -select * from t as nonempty; -a -1 -connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1; -connection subcon; -select * from t as nonempty; -a -1 -disconnect subcon; -connection default; -set global system_versioning_asof= FROM_UNIXTIME(@before); -select * from t as nonempty; -a -1 -connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1; -connection subcon; -select * from t as empty; -a -disconnect subcon; -connection default; -drop table t; -set global system_versioning_asof= DEFAULT; -set system_versioning_asof= DEFAULT; diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result index 9ddfb2d33dd..c20b744cba0 100644 --- a/mysql-test/suite/versioning/r/trx_id.result +++ b/mysql-test/suite/versioning/r/trx_id.result @@ -175,7 +175,78 @@ select x, row_start < row_end from t1 for system_time all; x row_start < row_end 4 1 2 1 +# +# MDEV-15951 system versioning by trx id doesn't work with partitioning +# currently trx_id does not support partitioning by system_time +# +create or replace table t1( +i int, +row_start bigint unsigned generated always as row start, +row_end bigint unsigned generated always as row end, +period for system_time(row_start, row_end) +) engine=InnoDB with system versioning partition by system_time ( +partition p0 history, +partition pn current +); +ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1` +create or replace table t1( +i int, +row_start bigint unsigned generated always as row start, +row_end bigint unsigned generated always as row end, +period for system_time(row_start, row_end) +) engine=InnoDB with system versioning; +alter table t1 partition by system_time ( +partition p0 history, +partition pn current +); +ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1` +drop table t1; +create or replace table t ( +a int primary key, +row_start bigint unsigned as row start invisible, +row_end bigint unsigned as row end invisible, +period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by key() ( +partition p1, +partition p2 +); +ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END +create or replace table t ( +a int primary key, +row_start bigint unsigned as row start invisible, +row_end bigint unsigned as row end invisible, +period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by key(a, row_start) ( +partition p1, +partition p2 +); +ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END +create or replace table t ( +a int primary key, +row_start bigint unsigned as row start invisible, +row_end bigint unsigned as row end invisible, +period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by hash(a + row_end * 2) ( +partition p1, +partition p2 +); +ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END +create or replace table t ( +a int primary key, +row_start bigint unsigned as row start invisible, +row_end bigint unsigned as row end invisible, +period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by range columns (a, row_start) ( +partition p1 values less than (100, 100) +); +ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END +# # MDEV-16010 Too many rows with AS OF point_in_the_past_or_NULL +# create or replace table t1 ( x int, row_start bigint unsigned as row start invisible, diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result index 201c90216af..a01d51f62cd 100644 --- a/mysql-test/suite/versioning/r/update.result +++ b/mysql-test/suite/versioning/r/update.result @@ -400,6 +400,17 @@ a check_row(row_start, row_end) 1 CURRENT ROW drop tables t1, t2, t3; # +# MDEV-26778 row_start is not updated in current row for InnoDB +# +create or replace table t1 (x int) with system versioning; +insert t1 values (1); +update t1 set x= 1; +select row_start into @r from t1; +select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r; +check_row_ts(row_start, row_end) +CURRENT ROW +drop table t1; +# # MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table with unique blob # create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning; diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test index 61fac4d6a1f..f50d75ded9e 100644 --- a/mysql-test/suite/versioning/t/create.test +++ b/mysql-test/suite/versioning/t/create.test @@ -468,3 +468,32 @@ create or replace table t1 ( show create table t1; drop table t1; + +--echo # +--echo # MDEV-27452 TIMESTAMP(0) system field is allowed for certain creation of system-versioned table +--echo # +--error ER_VERS_FIELD_WRONG_TYPE +create or replace table t ( + a int, + s timestamp as row start, + e timestamp as row end, + period for system_time (s, e)) +with system versioning; + +--error ER_VERS_FIELD_WRONG_TYPE +create or replace table t ( + a int with system versioning, + s timestamp as row start, + e timestamp as row end, + period for system_time (s, e)); + +create or replace table t ( + a int with system versioning, + b int with system versioning, + s timestamp(6) as row start, + e timestamp(6) as row end, + period for system_time (s, e)); +insert into t () values (),(); + +# cleanup +drop table t; diff --git a/mysql-test/suite/versioning/t/not_embedded.test b/mysql-test/suite/versioning/t/not_embedded.test new file mode 100644 index 00000000000..2afae013e70 --- /dev/null +++ b/mysql-test/suite/versioning/t/not_embedded.test @@ -0,0 +1,79 @@ +--source include/not_embedded.inc +--source include/have_innodb.inc + +--echo # +--echo # SYSTEM_VERSIONING_ASOF sysvar +--echo # +create table t (a int) with system versioning; +set @before= UNIX_TIMESTAMP(now(6)); +insert into t values (1); +set @after= UNIX_TIMESTAMP(now(6)); +update t set a= 2; + +set global system_versioning_asof= FROM_UNIXTIME(@after); +set system_versioning_asof= FROM_UNIXTIME(@after); +select * from t as nonempty; + +--connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1) +--connection subcon +select * from t as nonempty; +--disconnect subcon +--connection default + +set global system_versioning_asof= FROM_UNIXTIME(@before); +select * from t as nonempty; + +--connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1) +--connection subcon +select * from t as empty; +--disconnect subcon +--connection default + +drop table t; + +set global system_versioning_asof= DEFAULT; +set system_versioning_asof= DEFAULT; + +--echo # +--echo # DELETE HISTORY and privileges +--echo # + +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + +connect (root,localhost,root,,test); +connection root; + +--disable_warnings +create database mysqltest; +--enable_warnings + +create user mysqltest_1@localhost; +connect (user1,localhost,mysqltest_1,,test); +connection user1; + +connection root; +create table mysqltest.t (a int) with system versioning; + +connection user1; +show grants; +--error ER_TABLEACCESS_DENIED_ERROR +delete history from mysqltest.t before system_time now(); + +connection root; +grant delete history on mysqltest.* to mysqltest_1@localhost; +grant delete history on mysqltest.t to mysqltest_1@localhost; + +connection user1; +show grants; +delete history from mysqltest.t before system_time now(); + +connection root; +grant all on *.* to mysqltest_1@localhost; +show grants for mysqltest_1@localhost; + +drop user mysqltest_1@localhost; +drop database mysqltest; +--disconnect user1 +--disconnect root +--connection default diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index d36167c14b5..71ddbace3d7 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -490,6 +490,17 @@ partition by system_time interval column_get(column_create(7,7), 7 as int) secon show create table t1; --echo # +--echo # MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table +--echo # +create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i)) +engine=innodb with system versioning partition by key() partitions 2; +insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b'); +alter table t1 drop system versioning; +replace into t1 select * from t1; +select * from t1 where i > 0 or pk = 1000 limit 1; +drop table t1; + +--echo # --echo # MDEV-19175 Server crashes in ha_partition::vers_can_native upon INSERT DELAYED into versioned partitioned table --echo # create or replace table t1 (f int) with system versioning partition by hash(f); @@ -728,6 +739,40 @@ alter table t1 add partition (partition p1 history); alter table t1 add partition (partition p2 history); drop table t1; +--echo # +--echo # MDEV-27217 DELETE partition selection doesn't work for history partitions +--echo # +create table t1 (f char) with system versioning +partition by system_time limit 10 ( + partition p0 history, + partition p1 history, + partition p2 history, + partition pn current); + +--error ER_VERS_NOT_ALLOWED +delete from t1 partition (p1); +--error ER_VERS_NOT_ALLOWED +delete from t1 partition (p0, pn); +--error ER_VERS_NOT_ALLOWED +delete from t1 partition (p0, p1); +--error ER_VERS_NOT_ALLOWED +delete from t1 partition (p0, p1, pn); +drop table t1; + +set timestamp=unix_timestamp('2000-01-01 00:00:00'); +create or replace table t1 (i int) with system versioning +partition by system_time interval 1 day ( + partition p0 history, + partition p1 history, + partition pn current); +set timestamp=unix_timestamp('2000-01-02 00:00:00'); +insert t1 values (1); +--error ER_VERS_NOT_ALLOWED +delete from t1 partition (p0, pn); +--error ER_VERS_NOT_ALLOWED +delete from t1 partition (p0, p1, pn); +drop table t1; +set timestamp= default; --echo # End of 10.3 tests --echo # diff --git a/mysql-test/suite/versioning/t/partition_innodb.test b/mysql-test/suite/versioning/t/partition_innodb.test deleted file mode 100644 index e09a684961e..00000000000 --- a/mysql-test/suite/versioning/t/partition_innodb.test +++ /dev/null @@ -1,93 +0,0 @@ ---source include/have_innodb.inc ---source include/have_partition.inc ---source suite/versioning/common.inc - ---echo # MDEV-15951 system versioning by trx id doesn't work with partitioning ---echo # currently trx_id does not support partitioning by system_time ---error ER_VERS_FIELD_WRONG_TYPE -create or replace table t1( - i int, - row_start bigint unsigned generated always as row start, - row_end bigint unsigned generated always as row end, - period for system_time(row_start, row_end) -) engine=InnoDB with system versioning partition by system_time ( - partition p0 history, - partition pn current -); - -create or replace table t1( - i int, - row_start bigint unsigned generated always as row start, - row_end bigint unsigned generated always as row end, - period for system_time(row_start, row_end) -) engine=InnoDB with system versioning; - ---error ER_VERS_FIELD_WRONG_TYPE -alter table t1 partition by system_time ( - partition p0 history, - partition pn current -); - -drop table t1; - ---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED -create or replace table t ( - a int primary key, - row_start bigint unsigned as row start invisible, - row_end bigint unsigned as row end invisible, - period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by key() ( - partition p1, - partition p2 -); - ---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED -create or replace table t ( - a int primary key, - row_start bigint unsigned as row start invisible, - row_end bigint unsigned as row end invisible, - period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by key(a, row_start) ( - partition p1, - partition p2 -); - ---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED -create or replace table t ( - a int primary key, - row_start bigint unsigned as row start invisible, - row_end bigint unsigned as row end invisible, - period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by hash(a + row_end * 2) ( - partition p1, - partition p2 -); - ---error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED -create or replace table t ( - a int primary key, - row_start bigint unsigned as row start invisible, - row_end bigint unsigned as row end invisible, - period for system_time(row_start, row_end) -) engine=innodb with system versioning -partition by range columns (a, row_start) ( - partition p1 values less than (100, 100) -); - ---echo # ---echo # MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table ---echo # -create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i)) -engine=innodb with system versioning partition by key() partitions 2; -insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b'); -alter table t1 drop system versioning; -replace into t1 select * from t1; -select * from t1 where i > 0 or pk = 1000 limit 1; -drop table t1; - ---echo # End of 10.3 tests - ---source suite/versioning/common_finish.inc diff --git a/mysql-test/suite/versioning/t/sysvars-notembedded.test b/mysql-test/suite/versioning/t/sysvars-notembedded.test deleted file mode 100644 index 314972bc375..00000000000 --- a/mysql-test/suite/versioning/t/sysvars-notembedded.test +++ /dev/null @@ -1,31 +0,0 @@ -source include/not_embedded.inc; - -create table t (a int) with system versioning; -set @before= UNIX_TIMESTAMP(now(6)); -insert into t values (1); -set @after= UNIX_TIMESTAMP(now(6)); -update t set a= 2; - -set global system_versioning_asof= FROM_UNIXTIME(@after); -set system_versioning_asof= FROM_UNIXTIME(@after); -select * from t as nonempty; - ---connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1) ---connection subcon -select * from t as nonempty; ---disconnect subcon ---connection default - -set global system_versioning_asof= FROM_UNIXTIME(@before); -select * from t as nonempty; - ---connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1) ---connection subcon -select * from t as empty; ---disconnect subcon ---connection default - -drop table t; - -set global system_versioning_asof= DEFAULT; -set system_versioning_asof= DEFAULT; diff --git a/mysql-test/suite/versioning/t/truncate_privilege.test b/mysql-test/suite/versioning/t/truncate_privilege.test deleted file mode 100644 index dcdad59039a..00000000000 --- a/mysql-test/suite/versioning/t/truncate_privilege.test +++ /dev/null @@ -1,41 +0,0 @@ -# Can't test with embedded server --- source include/not_embedded.inc - ---source include/have_innodb.inc - -# Save the initial number of concurrent sessions ---source include/count_sessions.inc - -connect (root,localhost,root,,test); -connection root; - ---disable_warnings -create database mysqltest; ---enable_warnings - -create user mysqltest_1@localhost; -connect (user1,localhost,mysqltest_1,,test); -connection user1; - -connection root; -create table mysqltest.t (a int) with system versioning; - -connection user1; -show grants; ---error ER_TABLEACCESS_DENIED_ERROR -delete history from mysqltest.t before system_time now(); - -connection root; -grant delete history on mysqltest.* to mysqltest_1@localhost; -grant delete history on mysqltest.t to mysqltest_1@localhost; - -connection user1; -show grants; -delete history from mysqltest.t before system_time now(); - -connection root; -grant all on *.* to mysqltest_1@localhost; -show grants for mysqltest_1@localhost; - -drop user mysqltest_1@localhost; -drop database mysqltest; diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test index f3784f1b068..c03911eb798 100644 --- a/mysql-test/suite/versioning/t/trx_id.test +++ b/mysql-test/suite/versioning/t/trx_id.test @@ -3,6 +3,7 @@ if (!$TEST_VERSIONING_SO) --skip needs test_versioning plugin } --source include/have_innodb.inc +--source include/have_partition.inc --source include/default_charset.inc --disable_query_log @@ -155,7 +156,87 @@ update t1 set x= 4; commit; select x, row_start < row_end from t1 for system_time all; +--echo # +--echo # MDEV-15951 system versioning by trx id doesn't work with partitioning +--echo # currently trx_id does not support partitioning by system_time +--echo # +--error ER_VERS_FIELD_WRONG_TYPE +create or replace table t1( + i int, + row_start bigint unsigned generated always as row start, + row_end bigint unsigned generated always as row end, + period for system_time(row_start, row_end) +) engine=InnoDB with system versioning partition by system_time ( + partition p0 history, + partition pn current +); + +create or replace table t1( + i int, + row_start bigint unsigned generated always as row start, + row_end bigint unsigned generated always as row end, + period for system_time(row_start, row_end) +) engine=InnoDB with system versioning; + +--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/ +--error ER_VERS_FIELD_WRONG_TYPE +alter table t1 partition by system_time ( + partition p0 history, + partition pn current +); + +drop table t1; + +--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED +create or replace table t ( + a int primary key, + row_start bigint unsigned as row start invisible, + row_end bigint unsigned as row end invisible, + period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by key() ( + partition p1, + partition p2 +); + +--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED +create or replace table t ( + a int primary key, + row_start bigint unsigned as row start invisible, + row_end bigint unsigned as row end invisible, + period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by key(a, row_start) ( + partition p1, + partition p2 +); + +--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED +create or replace table t ( + a int primary key, + row_start bigint unsigned as row start invisible, + row_end bigint unsigned as row end invisible, + period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by hash(a + row_end * 2) ( + partition p1, + partition p2 +); + +--error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED +create or replace table t ( + a int primary key, + row_start bigint unsigned as row start invisible, + row_end bigint unsigned as row end invisible, + period for system_time(row_start, row_end) +) engine=innodb with system versioning +partition by range columns (a, row_start) ( + partition p1 values less than (100, 100) +); + +--echo # --echo # MDEV-16010 Too many rows with AS OF point_in_the_past_or_NULL +--echo # create or replace table t1 ( x int, row_start bigint unsigned as row start invisible, diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test index 652388e14ff..478f5ad231f 100644 --- a/mysql-test/suite/versioning/t/update.test +++ b/mysql-test/suite/versioning/t/update.test @@ -327,6 +327,16 @@ select *, check_row(row_start, row_end) from t2 for system_time all order by row drop tables t1, t2, t3; --echo # +--echo # MDEV-26778 row_start is not updated in current row for InnoDB +--echo # +create or replace table t1 (x int) with system versioning; +insert t1 values (1); +update t1 set x= 1; +select row_start into @r from t1; +select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r; +drop table t1; + +--echo # --echo # MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table with unique blob --echo # create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning; diff --git a/mysys_ssl/my_sha.ic b/mysys_ssl/my_sha.inl index 6bba614765e..6bba614765e 100644 --- a/mysys_ssl/my_sha.ic +++ b/mysys_ssl/my_sha.inl diff --git a/mysys_ssl/my_sha1.cc b/mysys_ssl/my_sha1.cc index b53e214468d..29563742e6b 100644 --- a/mysys_ssl/my_sha1.cc +++ b/mysys_ssl/my_sha1.cc @@ -15,4 +15,4 @@ #define NUM 1 -#include "my_sha.ic" +#include "my_sha.inl" diff --git a/mysys_ssl/my_sha224.cc b/mysys_ssl/my_sha224.cc index 200b6ed161c..5fffdce7794 100644 --- a/mysys_ssl/my_sha224.cc +++ b/mysys_ssl/my_sha224.cc @@ -15,4 +15,4 @@ #define NUM 224 -#include "my_sha.ic" +#include "my_sha.inl" diff --git a/mysys_ssl/my_sha256.cc b/mysys_ssl/my_sha256.cc index 1562809f91a..59e871de121 100644 --- a/mysys_ssl/my_sha256.cc +++ b/mysys_ssl/my_sha256.cc @@ -15,4 +15,4 @@ #define NUM 256 -#include "my_sha.ic" +#include "my_sha.inl" diff --git a/mysys_ssl/my_sha384.cc b/mysys_ssl/my_sha384.cc index 6bb64470105..40707de0a8d 100644 --- a/mysys_ssl/my_sha384.cc +++ b/mysys_ssl/my_sha384.cc @@ -15,4 +15,4 @@ #define NUM 384 -#include "my_sha.ic" +#include "my_sha.inl" diff --git a/mysys_ssl/my_sha512.cc b/mysys_ssl/my_sha512.cc index 1047d0dbe46..6a5a04d72f0 100644 --- a/mysys_ssl/my_sha512.cc +++ b/mysys_ssl/my_sha512.cc @@ -15,4 +15,4 @@ #define NUM 512 -#include "my_sha.ic" +#include "my_sha.inl" diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt index 44e0142afe9..6d2dc72b097 100644 --- a/plugin/auth_pam/CMakeLists.txt +++ b/plugin/auth_pam/CMakeLists.txt @@ -1,3 +1,7 @@ +IF(WIN32) + RETURN() +ENDIF() + INCLUDE (CheckIncludeFiles) INCLUDE (CheckFunctionExists) diff --git a/plugin/disks/mysql-test/disks/disks.result b/plugin/disks/mysql-test/disks/disks.result index 0b4ee6249aa..319e1eac10f 100644 --- a/plugin/disks/mysql-test/disks/disks.result +++ b/plugin/disks/mysql-test/disks/disks.result @@ -1,11 +1,11 @@ show create table information_schema.disks; Table Create Table DISKS CREATE TEMPORARY TABLE `DISKS` ( - `Disk` varchar(4096) NOT NULL DEFAULT '', - `Path` varchar(4096) NOT NULL DEFAULT '', - `Total` bigint(32) NOT NULL DEFAULT 0, - `Used` bigint(32) NOT NULL DEFAULT 0, - `Available` bigint(32) NOT NULL DEFAULT 0 + `Disk` varchar(4096) NOT NULL, + `Path` varchar(4096) NOT NULL, + `Total` bigint(32) NOT NULL, + `Used` bigint(32) NOT NULL, + `Available` bigint(32) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks; sum(Total) > sum(Available) sum(Total)>sum(Used) diff --git a/plugin/query_response_time/mysql-test/query_response_time/basic.result b/plugin/query_response_time/mysql-test/query_response_time/basic.result index d2de1b23e5f..c8dd4f89f74 100644 --- a/plugin/query_response_time/mysql-test/query_response_time/basic.result +++ b/plugin/query_response_time/mysql-test/query_response_time/basic.result @@ -6,9 +6,9 @@ query_response_time_stats OFF SHOW CREATE TABLE INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; Table Create Table QUERY_RESPONSE_TIME CREATE TEMPORARY TABLE `QUERY_RESPONSE_TIME` ( - `TIME` varchar(14) NOT NULL DEFAULT '', - `COUNT` int(11) unsigned NOT NULL DEFAULT 0, - `TOTAL` varchar(14) NOT NULL DEFAULT '' + `TIME` varchar(14) NOT NULL, + `COUNT` int(11) unsigned NOT NULL, + `TOTAL` varchar(14) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SELECT PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE, PLUGIN_AUTHOR, PLUGIN_DESCRIPTION, PLUGIN_LICENSE, PLUGIN_MATURITY FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'query_response_time%';; PLUGIN_NAME QUERY_RESPONSE_TIME diff --git a/plugin/user_variables/mysql-test/user_variables/basic.result b/plugin/user_variables/mysql-test/user_variables/basic.result index a4d01957830..e86205dc330 100644 --- a/plugin/user_variables/mysql-test/user_variables/basic.result +++ b/plugin/user_variables/mysql-test/user_variables/basic.result @@ -11,10 +11,10 @@ PLUGIN_MATURITY Stable SHOW CREATE TABLE INFORMATION_SCHEMA.USER_VARIABLES; Table Create Table user_variables CREATE TEMPORARY TABLE `user_variables` ( - `VARIABLE_NAME` varchar(64) NOT NULL DEFAULT '', - `VARIABLE_VALUE` varchar(2048) DEFAULT NULL, - `VARIABLE_TYPE` varchar(64) NOT NULL DEFAULT '', - `CHARACTER_SET_NAME` varchar(32) DEFAULT NULL + `VARIABLE_NAME` varchar(64) NOT NULL, + `VARIABLE_VALUE` varchar(2048), + `VARIABLE_TYPE` varchar(64) NOT NULL, + `CHARACTER_SET_NAME` varchar(32) ) ENGINE=MEMORY DEFAULT CHARSET=utf8 FLUSH USER_VARIABLES; SELECT COUNT(*) FROM INFORMATION_SCHEMA.USER_VARIABLES; diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 192ca15c83e..4ff2b3e36e7 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -163,6 +163,7 @@ ENDIF() SET(HOSTNAME "uname -n") SET(MYSQLD_USER "mysql") +SET(MYSQLD_GROUP "mysql") ENDIF(UNIX) # Really ugly, one script, "mysql_install_db", needs prefix set to ".", diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 15b1427078f..4e61c1016ad 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -31,6 +31,7 @@ defaults="" defaults_group_suffix="" mysqld_opt="" user="" +group="" silent_startup="--silent-startup" force=0 @@ -95,6 +96,11 @@ Usage: $0 [OPTIONS] user. You must be root to use this option. By default mysqld runs using your current login name and files and directories that it creates will be owned by you. + --group=group_name The login group to use for running mysqld. Files and + directories created by mysqld will be owned by this + group. You must be root to use this option. By default + mysqld runs using your current group and files and + directories that it creates will be owned by you. All other options are passed to the mysqld program @@ -144,11 +150,11 @@ parse_arguments() --ldata=*|--datadir=*|--data=*) ldata=`parse_arg "$arg"` ;; --log-error=*) log_error=`parse_arg "$arg"` ;; - --user=*) # Note that the user will be passed to mysqld so that it runs # as 'user' (crucial e.g. if log-bin=/some_other_path/ # where a chown of datadir won't help) - user=`parse_arg "$arg"` ;; + --user=*) user=`parse_arg "$arg"` ;; + --group=*) group=`parse_arg "$arg"` ;; --skip-name-resolve) ip_only=1 ;; --verbose) verbose=1 ; silent_startup="" ;; --rpm) in_rpm=1 ;; @@ -467,7 +473,12 @@ do fi if test -n "$user" then - chown $user "$dir" + if test -z "$group" + then + chown $user $dir + else + chown $user:$group $dir + fi if test $? -ne 0 then echo "Cannot change ownership of the database directories to the '$user'" @@ -501,6 +512,11 @@ then args="$args --user=$user" fi +if test -n "$group" +then + args="$args --group=$group" +fi + if test -f "$ldata/mysql/user.frm" then echo "mysql.user table already exists!" @@ -524,7 +540,7 @@ mysqld_install_cmd_line() { "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silent_startup\ "--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" \ - "--plugin-dir=${plugindir}" \ + "--plugin-dir=${plugindir}" --loose-disable-plugin-file-key-management \ $args --max_allowed_packet=8M \ --net_buffer_length=16K } @@ -559,6 +575,7 @@ cat_sql() s_echo "Installing MariaDB/MySQL system tables in '$ldata' ..." if cat_sql | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null then + printf "@VERSION@-MariaDB" > "$ldata/mysql_upgrade_info" s_echo "OK" else log_file_place=$ldata diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 77ed36218d3..17b8a135fc1 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -20,9 +20,10 @@ use Getopt::Long; use POSIX qw(strftime getcwd); +use File::Path qw(mkpath); $|=1; -$VER="2.20"; +$VER="3.0"; my @defaults_options; # Leading --no-defaults, --defaults-file, etc. @@ -147,6 +148,7 @@ sub main usage() if (!defined($ARGV[0]) || (!($ARGV[0] =~ m/^start$/i) && !($ARGV[0] =~ m/^stop$/i) && + !($ARGV[0] =~ m/^reload$/i) && !($ARGV[0] =~ m/^report$/i))); if (!$opt_no_log) @@ -160,7 +162,7 @@ sub main print strftime "%a %b %e %H:%M:%S %Y", localtime; print "\n"; } - if ($ARGV[0] =~ m/^start$/i) + if (($ARGV[0] =~ m/^start$/i) || ($ARGV[0] =~ m/^reload$/i)) { if (!defined(($mysqld= my_which($opt_mysqld))) && $opt_verbose) { @@ -169,7 +171,11 @@ sub main print "This is OK, if you are using option \"mysqld=...\" in "; print "groups [mysqldN] separately for each.\n\n"; } - start_mysqlds(); + if ($ARGV[0] =~ m/^start$/i) { + start_mysqlds(); + } elsif ($ARGV[0] =~ m/^reload$/i) { + reload_mysqlds(); + } } else { @@ -332,6 +338,39 @@ sub start_mysqlds() for ($j = 0, $tmp= ""; defined($options[$j]); $j++) { + if ("--datadir=" eq substr($options[$j], 0, 10)) { + $datadir = $options[$j]; + $datadir =~ s/\-\-datadir\=//; + eval { mkpath($datadir) }; + if ($@) { + print "FATAL ERROR: Cannot create data directory $datadir: $!\n"; + exit(1); + } + if (! -d $datadir."/mysql") { + if (-w $datadir) { + print "\n\nInstalling new database in $datadir\n\n"; + $install_cmd="@bindir@/mysql_install_db "; + $install_cmd.="--user=mysql "; + $install_cmd.="--datadir=$datadir"; + system($install_cmd); + } else { + print "\n"; + print "FATAL ERROR: Tried to create mysqld under group [$groups[$i]],\n"; + print "but the data directory is not writable.\n"; + print "data directory used: $datadir\n"; + exit(1); + } + } + + if (! -d $datadir."/mysql") { + print "\n"; + print "FATAL ERROR: Tried to start mysqld under group [$groups[$i]],\n"; + print "but no data directory was found or could be created.\n"; + print "data directory used: $datadir\n"; + exit(1); + } + } + if ("--mysqladmin=" eq substr($options[$j], 0, 13)) { # catch this and ignore @@ -412,6 +451,58 @@ sub start_mysqlds() } #### +#### reload multiple servers +#### + +sub reload_mysqlds() +{ + my (@groups, $com, $tmp, $i, @options, $j); + + if (!$opt_no_log) + { + w2log("\nReloading MySQL servers\n","$opt_log",0,0); + } + else + { + print "\nReloading MySQL servers\n"; + } + @groups = &find_groups($groupids); + for ($i = 0; defined($groups[$i]); $i++) + { + $mysqld_server = $mysqld; + @options = defaults_for_group($groups[$i]); + + for ($j = 0, $tmp= ""; defined($options[$j]); $j++) + { + if ("--mysqladmin=" eq substr($options[$j], 0, 13)) + { + # catch this and ignore + } + elsif ("--mysqld=" eq substr($options[$j], 0, 9)) + { + $options[$j] =~ s/\-\-mysqld\=//; + $mysqld_server = $options[$j]; + } + elsif ("--pid-file=" eq substr($options[$j], 0, 11)) + { + $options[$j] =~ s/\-\-pid-file\=//; + $pid_file = $options[$j]; + } + } + $com = "killproc -p $pid_file -HUP $mysqld_server"; + system($com); + + $com = "touch $pid_file"; + system($com); + } + if (!$i && !$opt_no_log) + { + w2log("No MySQL servers to be reloaded (check your GNRs)", + "$opt_log", 0, 0); + } +} + +### #### stop multiple servers #### @@ -793,7 +884,7 @@ sub usage $my_progname version $VER by Jani Tolonen Description: -$my_progname can be used to start, or stop any number of separate +$my_progname can be used to start, reload, or stop any number of separate mysqld processes running in different TCP/IP ports and UNIX sockets. $my_progname can read group [mysqld_multi] from my.cnf file. You may @@ -811,16 +902,16 @@ integer starting from 1. These groups should be the same as the regular [mysqld] group, but with those port, socket and any other options that are to be used with each separate mysqld process. The number in the group name has another function; it can be used for starting, -stopping, or reporting any specific mysqld server. +reloading, stopping, or reporting any specific mysqld server. -Usage: $my_progname [OPTIONS] {start|stop|report} [GNR,GNR,GNR...] -or $my_progname [OPTIONS] {start|stop|report} [GNR-GNR,GNR,GNR-GNR,...] +Usage: $my_progname [OPTIONS] {start|reload|stop|report} [GNR,GNR,GNR...] +or $my_progname [OPTIONS] {start|reload|stop|report} [GNR-GNR,GNR,GNR-GNR,...] -The GNR means the group number. You can start, stop or report any GNR, +The GNR means the group number. You can start, reload, stop or report any GNR, or several of them at the same time. (See --example) The GNRs list can be comma separated or a dash combined. The latter means that all the GNRs between GNR1-GNR2 will be affected. Without GNR argument all the -groups found will either be started, stopped, or reported. Note that +groups found will either be started, reloaded, stopped, or reported. Note that syntax for specifying GNRs must appear without spaces. Options: diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 64209adbc85..59b487fac13 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -29,6 +29,7 @@ logging=init want_syslog=0 syslog_tag= user='@MYSQLD_USER@' +group='@MYSQLD_GROUP@' pid_file= err_log= err_log_base= @@ -299,6 +300,7 @@ parse_arguments() { --pid[-_]file=*) pid_file="$val" ;; --plugin[-_]dir=*) PLUGIN_DIR="$val" ;; --user=*) user="$val"; SET_USER=1 ;; + --group=*) group="$val"; SET_USER=1 ;; --log[-_]basename=*|--hostname=*|--loose[-_]log[-_]basename=*) pid_file="$val.pid"; err_log_base="$val"; @@ -701,6 +703,7 @@ then if test "$user" != "root" -o $SET_USER = 1 then USER_OPTION="--user=$user" + GROUP_OPTION="--group=$group" fi if test -n "$open_files" then @@ -723,7 +726,12 @@ then log_error "Fatal error Can't create database directory '$mysql_unix_port'" exit 1 fi - chown $user $mysql_unix_port_dir + if [ "$user" -a "$group" ]; then + chown $user:$group $mysql_unix_port_dir + else + [ "$user" ] && chown $user $mysql_unix_port_dir + [ "$group" ] && chgrp $group $mysql_unix_port_dir + fi chmod 755 $mysql_unix_port_dir fi diff --git a/sql/field.cc b/sql/field.cc index e3aa7d149a0..fb331f2f185 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -9822,16 +9822,8 @@ bool Field_num::is_equal(const Column_definition &new_field) const } -bool Field_enum::can_optimize_range(const Item_bool_func *cond, - const Item *item, - bool is_eq_func) const -{ - return item->cmp_type() != TIME_RESULT; -} - - -bool Field_enum::can_optimize_keypart_ref(const Item_bool_func *cond, - const Item *item) const +bool Field_enum::can_optimize_range_or_keypart_ref(const Item_bool_func *cond, + const Item *item) const { switch (item->cmp_type()) { diff --git a/sql/field.h b/sql/field.h index c19a501f1f9..c17d698a856 100644 --- a/sql/field.h +++ b/sql/field.h @@ -4284,6 +4284,8 @@ uint gis_field_options_read(const uchar *buf, size_t buf_len, class Field_enum :public Field_str { static void do_field_enum(Copy_field *copy_field); + bool can_optimize_range_or_keypart_ref(const Item_bool_func *cond, + const Item *item) const; protected: uint packlength; public: @@ -4370,7 +4372,10 @@ public: const uchar *from_end, uint param_data); bool can_optimize_keypart_ref(const Item_bool_func *cond, - const Item *item) const; + const Item *item) const + { + return can_optimize_range_or_keypart_ref(cond, item); + } bool can_optimize_group_min_max(const Item_bool_func *cond, const Item *const_item) const { @@ -4385,7 +4390,10 @@ public: } bool can_optimize_range(const Item_bool_func *cond, const Item *item, - bool is_eq_func) const; + bool is_eq_func) const + { + return can_optimize_range_or_keypart_ref(cond, item); + } private: int save_field_metadata(uchar *first_byte); bool is_equal(const Column_definition &new_field) const; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 7f53eeb565c..7666563891d 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3947,8 +3947,9 @@ int ha_partition::external_lock(THD *thd, int lock_type) These commands may be excluded because working history partition is needed only for versioned DML. */ thd->lex->sql_command != SQLCOM_SELECT && - thd->lex->sql_command != SQLCOM_INSERT_SELECT) - m_part_info->vers_set_hist_part(thd); + thd->lex->sql_command != SQLCOM_INSERT_SELECT && + (error= m_part_info->vers_set_hist_part(thd))) + goto err_handler; } DBUG_RETURN(0); @@ -4085,7 +4086,7 @@ int ha_partition::start_stmt(THD *thd, thr_lock_type lock_type) i= bitmap_get_next_set(&m_part_info->lock_partitions, i)) { if (unlikely((error= m_file[i]->start_stmt(thd, lock_type)))) - break; + DBUG_RETURN(error); /* Add partition to be called in reset(). */ bitmap_set_bit(&m_partitions_to_reset, i); } @@ -4104,7 +4105,7 @@ int ha_partition::start_stmt(THD *thd, thr_lock_type lock_type) // TODO: MDEV-20345 (see above) thd->lex->sql_command != SQLCOM_SELECT && thd->lex->sql_command != SQLCOM_INSERT_SELECT) - m_part_info->vers_set_hist_part(thd); + error= m_part_info->vers_set_hist_part(thd); default:; } DBUG_RETURN(error); diff --git a/sql/handler.cc b/sql/handler.cc index 49849f46908..4aff21851a6 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -4013,6 +4013,9 @@ void handler::print_error(int error, myf errflag) case HA_ERR_TABLE_IN_FK_CHECK: textno= ER_TABLE_IN_FK_CHECK; break; + case HA_ERR_PARTITION_LIST: + my_error(ER_VERS_NOT_ALLOWED, errflag, table->s->db.str, table->s->table_name.str); + DBUG_VOID_RETURN; default: { /* The error was "unknown" to this function. @@ -7545,6 +7548,8 @@ bool Table_scope_and_contents_source_st::vers_fix_system_fields( List_iterator<Create_field> it(alter_info->create_list); while (Create_field *f= it++) { + if (f->vers_sys_field()) + continue; if ((f->versioning == Column_definition::VERSIONING_NOT_SET && !add_versioning) || f->versioning == Column_definition::WITHOUT_VERSIONING) { @@ -7566,9 +7571,10 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields( if (!(options & HA_VERSIONED_TABLE)) return false; + uint versioned_fields= 0; + if (!(alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING)) { - uint versioned_fields= 0; uint fieldnr= 0; List_iterator<Create_field> field_it(alter_info->create_list); while (Create_field *f= field_it++) @@ -7599,7 +7605,7 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields( } } - if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING)) + if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING) && !versioned_fields) return false; bool can_native= ha_check_storage_engine_flag(db_type, diff --git a/sql/item.cc b/sql/item.cc index c45212af617..534f614b173 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -70,12 +70,11 @@ bool cmp_items(Item *a, Item *b) /** Set max_sum_func_level if it is needed */ -inline void set_max_sum_func_level(SELECT_LEX *select) +inline void set_max_sum_func_level(THD *thd, SELECT_LEX *select) { - LEX *lex_s= select->parent_lex; - if (lex_s->in_sum_func && - lex_s->in_sum_func->nest_level >= select->nest_level) - set_if_bigger(lex_s->in_sum_func->max_sum_func_level, + if (thd->lex->in_sum_func && + thd->lex->in_sum_func->nest_level >= select->nest_level) + set_if_bigger(thd->lex->in_sum_func->max_sum_func_level, select->nest_level - 1); } @@ -644,7 +643,6 @@ Item_ident::Item_ident(THD *thd, Name_resolution_context *context_arg, cached_table(0), depended_from(0), can_be_depended(TRUE) { name= *field_name_arg; - DBUG_ASSERT(!context || context->select_lex); } @@ -661,7 +659,6 @@ Item_ident::Item_ident(THD *thd, TABLE_LIST *view_arg, cached_table(NULL), depended_from(NULL), can_be_depended(TRUE) { name= *field_name_arg; - DBUG_ASSERT(!context || context->select_lex); } @@ -683,9 +680,7 @@ Item_ident::Item_ident(THD *thd, Item_ident *item) cached_table(item->cached_table), depended_from(item->depended_from), can_be_depended(item->can_be_depended) -{ - DBUG_ASSERT(!context || context->select_lex); -} +{} void Item_ident::cleanup() { @@ -5528,14 +5523,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) */ Name_resolution_context *last_checked_context= context; Item **ref= (Item **) not_found_item; - /* - There are cases when name resolution context is absent (when we are not - doing name resolution), but here the name resolution context should - be present because we are doing name resolution - */ - DBUG_ASSERT(context); - SELECT_LEX *current_sel= context->select_lex; - LEX *lex_s= context->select_lex->parent_lex; + SELECT_LEX *current_sel= thd->lex->current_select; Name_resolution_context *outer_context= 0; SELECT_LEX *select= 0; /* Currently derived tables cannot be correlated */ @@ -5637,18 +5625,19 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) return -1; thd->change_item_tree(reference, rf); select->inner_refs_list.push_back(rf, thd->mem_root); - rf->in_sum_func= lex_s->in_sum_func; + rf->in_sum_func= thd->lex->in_sum_func; } /* A reference is resolved to a nest level that's outer or the same as the nest level of the enclosing set function : adjust the value of max_arg_level for the function if it's needed. */ - if (lex_s->in_sum_func && - lex_s->in_sum_func->nest_level >= select->nest_level) + if (thd->lex->in_sum_func && + thd->lex == context->select_lex->parent_lex && + thd->lex->in_sum_func->nest_level >= select->nest_level) { Item::Type ref_type= (*reference)->type(); - set_if_bigger(lex_s->in_sum_func->max_arg_level, + set_if_bigger(thd->lex->in_sum_func->max_arg_level, select->nest_level); set_field(*from_field); fixed= 1; @@ -5669,10 +5658,11 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) ((ref_type == REF_ITEM || ref_type == FIELD_ITEM) ? (Item_ident*) (*reference) : 0), false); - if (lex_s->in_sum_func && - lex_s->in_sum_func->nest_level >= select->nest_level) + if (thd->lex->in_sum_func && + thd->lex == context->select_lex->parent_lex && + thd->lex->in_sum_func->nest_level >= select->nest_level) { - set_if_bigger(lex_s->in_sum_func->max_arg_level, + set_if_bigger(thd->lex->in_sum_func->max_arg_level, select->nest_level); } /* @@ -5764,7 +5754,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) { outer_context->select_lex->inner_refs_list.push_back((Item_outer_ref*)rf, thd->mem_root); - ((Item_outer_ref*)rf)->in_sum_func= lex_s->in_sum_func; + ((Item_outer_ref*)rf)->in_sum_func= thd->lex->in_sum_func; } thd->change_item_tree(reference, rf); /* @@ -5779,7 +5769,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) We can not "move" aggregate function in the place where its arguments are not defined. */ - set_max_sum_func_level(select); + set_max_sum_func_level(thd, select); mark_as_dependent(thd, last_checked_context->select_lex, context->select_lex, rf, rf, false); @@ -5792,7 +5782,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) We can not "move" aggregate function in the place where its arguments are not defined. */ - set_max_sum_func_level(select); + set_max_sum_func_level(thd, select); mark_as_dependent(thd, last_checked_context->select_lex, context->select_lex, this, (Item_ident*)*reference, false); @@ -5870,20 +5860,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) DBUG_ASSERT(fixed == 0); Field *from_field= (Field *)not_found_field; bool outer_fixed= false; - SELECT_LEX *select; - LEX *lex_s; - if (context) - { - select= context->select_lex; - lex_s= context->select_lex->parent_lex; - } - else - { - // No real name resolution, used somewhere in SP - DBUG_ASSERT(field); - select= NULL; - lex_s= NULL; - } + SELECT_LEX *select= thd->lex->current_select; if (select && select->in_tvc) { @@ -5951,7 +5928,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) We can not "move" aggregate function in the place where its arguments are not defined. */ - set_max_sum_func_level(select); + set_max_sum_func_level(thd, select); set_field(new_field); depended_from= (*((Item_field**)res))->depended_from; return 0; @@ -5979,7 +5956,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) We can not "move" aggregate function in the place where its arguments are not defined. */ - set_max_sum_func_level(select); + set_max_sum_func_level(thd, select); return FALSE; } } @@ -6016,11 +5993,12 @@ bool Item_field::fix_fields(THD *thd, Item **reference) goto mark_non_agg_field; } - if (lex_s && - lex_s->in_sum_func && - lex_s->in_sum_func->nest_level == + if (!thd->lex->current_select->no_wrap_view_item && + thd->lex->in_sum_func && + thd->lex == select->parent_lex && + thd->lex->in_sum_func->nest_level == select->nest_level) - set_if_bigger(lex_s->in_sum_func->max_arg_level, + set_if_bigger(thd->lex->in_sum_func->max_arg_level, select->nest_level); /* if it is not expression from merged VIEW we will set this field. @@ -6086,9 +6064,8 @@ bool Item_field::fix_fields(THD *thd, Item **reference) if (field->vcol_info) fix_session_vcol_expr_for_read(thd, field, field->vcol_info); if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY && - !outer_fixed && + !outer_fixed && !thd->lex->in_sum_func && select && - !lex_s->in_sum_func && select->cur_pos_in_select_list != UNDEF_POS && select->join) { @@ -6123,13 +6100,13 @@ mark_non_agg_field: */ select_lex= context->select_lex; } - if (!lex_s || !lex_s->in_sum_func) + if (!thd->lex->in_sum_func) select_lex->set_non_agg_field_used(true); else { if (outer_fixed) - lex_s->in_sum_func->outer_fields.push_back(this, thd->mem_root); - else if (lex_s->in_sum_func->nest_level != + thd->lex->in_sum_func->outer_fields.push_back(this, thd->mem_root); + else if (thd->lex->in_sum_func->nest_level != select->nest_level) select_lex->set_non_agg_field_used(true); } @@ -7588,12 +7565,6 @@ Item *get_field_item_for_having(THD *thd, Item *item, st_select_lex *sel) return NULL; } -Item *Item_ident::derived_field_transformer_for_having(THD *thd, uchar *arg) -{ - st_select_lex *sel= (st_select_lex *)arg; - context= &sel->context; - return this; -} Item *Item_field::derived_field_transformer_for_having(THD *thd, uchar *arg) { @@ -7613,13 +7584,12 @@ Item *Item_field::derived_field_transformer_for_having(THD *thd, uchar *arg) Item *Item_direct_view_ref::derived_field_transformer_for_having(THD *thd, uchar *arg) { - st_select_lex *sel= (st_select_lex *)arg; - context= &sel->context; if ((*ref)->marker & SUBSTITUTION_FL) { this->marker|= SUBSTITUTION_FL; return this; } + st_select_lex *sel= (st_select_lex *)arg; table_map tab_map= sel->master_unit()->derived->table->map; if ((item_equal && !(item_equal->used_tables() & tab_map)) || !item_equal) @@ -7882,9 +7852,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) { enum_parsing_place place= NO_MATTER; DBUG_ASSERT(fixed == 0); - - SELECT_LEX *current_sel= context->select_lex; - LEX *lex_s= context->select_lex->parent_lex; + SELECT_LEX *current_sel= thd->lex->current_select; if (set_properties_only) { @@ -8045,10 +8013,11 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) the nest level of the enclosing set function : adjust the value of max_arg_level for the function if it's needed. */ - if (lex_s->in_sum_func && - lex_s->in_sum_func->nest_level >= + if (thd->lex->in_sum_func && + thd->lex == context->select_lex->parent_lex && + thd->lex->in_sum_func->nest_level >= last_checked_context->select_lex->nest_level) - set_if_bigger(lex_s->in_sum_func->max_arg_level, + set_if_bigger(thd->lex->in_sum_func->max_arg_level, last_checked_context->select_lex->nest_level); return FALSE; } @@ -8068,10 +8037,11 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) the nest level of the enclosing set function : adjust the value of max_arg_level for the function if it's needed. */ - if (lex_s->in_sum_func && - lex_s->in_sum_func->nest_level >= + if (thd->lex->in_sum_func && + thd->lex == context->select_lex->parent_lex && + thd->lex->in_sum_func->nest_level >= last_checked_context->select_lex->nest_level) - set_if_bigger(lex_s->in_sum_func->max_arg_level, + set_if_bigger(thd->lex->in_sum_func->max_arg_level, last_checked_context->select_lex->nest_level); } } @@ -9595,6 +9565,7 @@ bool Item_default_value::val_native_result(THD *thd, Native *to) return Item_field::val_native_result(thd, to); } + table_map Item_default_value::used_tables() const { if (!field || !field->default_value) diff --git a/sql/item.h b/sql/item.h index 2e4383cf9ac..ad455457934 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3324,7 +3324,6 @@ public: Collect outer references */ virtual bool collect_outer_ref_processor(void *arg); - Item *derived_field_transformer_for_having(THD *thd, uchar *arg); friend bool insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, const char *table_name, List_iterator<Item> *it, @@ -5452,6 +5451,7 @@ public: return ref ? (*ref)->get_typelib() : NULL; } + bool is_json_type() { return (*ref)->is_json_type(); } bool walk(Item_processor processor, bool walk_subquery, void *arg) { if (ref && *ref) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index a250a968418..68d49b90475 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2273,8 +2273,10 @@ char *Item_func_password::alloc(THD *thd, const char *password, String *Item_func_encrypt::val_str(String *str) { DBUG_ASSERT(fixed == 1); + #ifdef HAVE_CRYPT String *res =args[0]->val_str(str); + char salt[3],*salt_ptr; if ((null_value=args[0]->null_value)) return 0; diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 9995c7c644d..82b30369734 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -856,7 +856,7 @@ public: String *val_str(String *); bool fix_length_and_dec() { - max_length= MAX_FIELD_NAME * system_charset_info->mbmaxlen; + max_length= NAME_CHAR_LEN * system_charset_info->mbmaxlen; maybe_null=1; return FALSE; } diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 56ab0f648ee..519896065e5 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -5227,9 +5227,8 @@ bool subselect_hash_sj_engine::make_semi_join_conds() tmp_table_ref->init_one_table(&empty_clex_str, &table_name, NULL, TL_READ); tmp_table_ref->table= tmp_table; - context= new (thd->mem_root) Name_resolution_context; + context= new Name_resolution_context; context->init(); - context->select_lex= item_in->unit->first_select(); context->first_name_resolution_table= context->last_name_resolution_table= tmp_table_ref; semi_join_conds_context= context; diff --git a/sql/item_sum.cc b/sql/item_sum.cc index a81cfd7ea82..581c94bd191 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -72,7 +72,6 @@ size_t Item_sum::ram_limitation(THD *thd) bool Item_sum::init_sum_func_check(THD *thd) { SELECT_LEX *curr_sel= thd->lex->current_select; - LEX *lex_s= (curr_sel ? curr_sel->parent_lex : thd->lex); if (curr_sel && curr_sel->name_visibility_map.is_clear_all()) { for (SELECT_LEX *sl= curr_sel; sl; sl= sl->context.outer_select()) @@ -88,9 +87,9 @@ bool Item_sum::init_sum_func_check(THD *thd) return TRUE; } /* Set a reference to the nesting set function if there is any */ - in_sum_func= lex_s->in_sum_func; + in_sum_func= thd->lex->in_sum_func; /* Save a pointer to object to be used in items for nested set functions */ - lex_s->in_sum_func= this; + thd->lex->in_sum_func= this; nest_level= thd->lex->current_select->nest_level; ref_by= 0; aggr_level= -1; @@ -157,7 +156,6 @@ bool Item_sum::init_sum_func_check(THD *thd) bool Item_sum::check_sum_func(THD *thd, Item **ref) { SELECT_LEX *curr_sel= thd->lex->current_select; - LEX *lex_s= curr_sel->parent_lex; nesting_map allow_sum_func(thd->lex->allow_sum_func); allow_sum_func.intersect(curr_sel->name_visibility_map); bool invalid= FALSE; @@ -320,7 +318,7 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref) if (sum_func() == SP_AGGREGATE_FUNC) aggr_sel->set_custom_agg_func_used(true); update_used_tables(); - lex_s->in_sum_func= in_sum_func; + thd->lex->in_sum_func= in_sum_func; return FALSE; } diff --git a/sql/log.cc b/sql/log.cc index c5a192d56d3..5fbfa0f75d4 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1692,7 +1692,7 @@ static int binlog_close_connection(handlerton *hton, THD *thd) binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); #ifdef WITH_WSREP - if (cache_mngr && !cache_mngr->trx_cache.empty()) { + if (WSREP(thd) && cache_mngr && !cache_mngr->trx_cache.empty()) { IO_CACHE* cache= cache_mngr->get_binlog_cache_log(true); uchar *buf; size_t len=0; @@ -3571,6 +3571,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, opt_slave_sql_verify_checksum ? (enum_binlog_checksum_alg) binlog_checksum_options : BINLOG_CHECKSUM_ALG_OFF; s.checksum_alg= relay_log_checksum_alg; + s.set_relay_log_event(); } else s.checksum_alg= (enum_binlog_checksum_alg)binlog_checksum_options; diff --git a/sql/log_event.cc b/sql/log_event.cc index a1562016aa4..de929330f2a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -168,6 +168,7 @@ static const char *HA_ERR(int i) case HA_ERR_LOGGING_IMPOSSIBLE: return "HA_ERR_LOGGING_IMPOSSIBLE"; case HA_ERR_CORRUPT_EVENT: return "HA_ERR_CORRUPT_EVENT"; case HA_ERR_ROWS_EVENT_APPLY : return "HA_ERR_ROWS_EVENT_APPLY"; + case HA_ERR_PARTITION_LIST : return "HA_ERR_PARTITION_LIST"; } return "No Error!"; } @@ -6567,7 +6568,8 @@ int Format_description_log_event::do_apply_event(rpl_group_info *rgi) original place when it comes to us; we'll know this by checking log_pos ("artificial" events have log_pos == 0). */ - if (!is_artificial_event() && created && thd->transaction.all.ha_list) + if (!thd->rli_fake && + !is_artificial_event() && created && thd->transaction.all.ha_list) { /* This is not an error (XA is safe), just an information */ rli->report(INFORMATION_LEVEL, 0, NULL, diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 7599401dcb4..a2bbe1447e9 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -10120,7 +10120,7 @@ key_or(RANGE_OPT_PARAM *param, SEL_ARG *key1,SEL_ARG *key2) uint max_part_no= MY_MAX(key1->max_part_no, key2->max_part_no); - for (key2=key2->first(); key2; ) + for (key2=key2->first(); ; ) { /* key1 consists of one or more ranges. tmp is the range currently @@ -10134,6 +10134,16 @@ key_or(RANGE_OPT_PARAM *param, SEL_ARG *key1,SEL_ARG *key2) ^ tmp */ + if (key1->min_flag & NO_MIN_RANGE && + key1->max_flag & NO_MAX_RANGE) + { + if (key1->maybe_flag) + return new SEL_ARG(SEL_ARG::MAYBE_KEY); + return 0; // Always true OR + } + if (!key2) + break; + SEL_ARG *tmp=key1->find_range(key2); /* @@ -10204,6 +10214,13 @@ key_or(RANGE_OPT_PARAM *param, SEL_ARG *key1,SEL_ARG *key2) key2->copy_min(tmp); if (!(key1=key1->tree_delete(tmp))) { // Only one key in tree + if (key2->min_flag & NO_MIN_RANGE && + key2->max_flag & NO_MAX_RANGE) + { + if (key2->maybe_flag) + return new SEL_ARG(SEL_ARG::MAYBE_KEY); + return 0; // Always true OR + } key1=key2; key1->make_root(); key2=key2_next; diff --git a/sql/opt_split.cc b/sql/opt_split.cc index d272638f00c..a356335855c 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -310,6 +310,8 @@ struct SplM_field_ext_info: public SplM_field_info occurred also in the select list of this join 9. There are defined some keys usable for ref access of fields from C with available statistics. + 10. The select doesn't use WITH ROLLUP (This limitation can probably be + lifted) @retval true if the answer is positive @@ -326,7 +328,8 @@ bool JOIN::check_for_splittable_materialized() (unit->first_select()->next_select()) || // !(3) (derived->prohibit_cond_pushdown) || // !(4) (derived->is_recursive_with_table()) || // !(5) - (table_count == 0 || const_tables == top_join_tab_count)) // !(6) + (table_count == 0 || const_tables == top_join_tab_count) || // !(6) + rollup.state != ROLLUP::STATE_NONE) // (10) return false; if (group_list) // (7.1) { @@ -1045,16 +1048,16 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count, Inject equalities for splitting used by the materialization join @param - remaining_tables used to filter out the equalities that cannot + excluded_tables used to filter out the equalities that cannot be pushed. @details - This function is called by JOIN_TAB::fix_splitting that is used - to fix the chosen splitting of a splittable materialized table T - in the final query execution plan. In this plan the table T - is joined just before the 'remaining_tables'. So all equalities - usable for splitting whose right parts do not depend on any of - remaining tables can be pushed into join for T. + This function injects equalities pushed into a derived table T for which + the split optimization has been chosen by the optimizer. The function + is called by JOIN::inject_splitting_cond_for_all_tables_with_split_op(). + All equalities usable for splitting T whose right parts do not depend on + any of the 'excluded_tables' can be pushed into the where clause of the + derived table T. The function also marks the select that specifies T as UNCACHEABLE_DEPENDENT_INJECTED. @@ -1063,7 +1066,7 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count, true on failure */ -bool JOIN::inject_best_splitting_cond(table_map remaining_tables) +bool JOIN::inject_best_splitting_cond(table_map excluded_tables) { Item *inj_cond= 0; List<Item> *inj_cond_list= &spl_opt_info->inj_cond_list; @@ -1071,7 +1074,7 @@ bool JOIN::inject_best_splitting_cond(table_map remaining_tables) KEY_FIELD *added_key_field; while ((added_key_field= li++)) { - if (remaining_tables & added_key_field->val->used_tables()) + if (excluded_tables & added_key_field->val->used_tables()) continue; if (inj_cond_list->push_back(added_key_field->cond, thd->mem_root)) return true; @@ -1088,7 +1091,7 @@ bool JOIN::inject_best_splitting_cond(table_map remaining_tables) if (inj_cond) inj_cond->fix_fields(thd,0); - if (inject_cond_into_where(inj_cond)) + if (inject_cond_into_where(inj_cond->copy_andor_structure(thd))) return true; select_lex->uncacheable|= UNCACHEABLE_DEPENDENT_INJECTED; @@ -1165,8 +1168,6 @@ bool JOIN_TAB::fix_splitting(SplM_plan_info *spl_plan, memcpy((char *) md_join->best_positions, (char *) spl_plan->best_positions, sizeof(POSITION) * md_join->table_count); - if (md_join->inject_best_splitting_cond(remaining_tables)) - return true; /* This is called for a proper work of JOIN::get_best_combination() called for the join that materializes T @@ -1210,7 +1211,8 @@ bool JOIN::fix_all_splittings_in_plan() if (tab->table->is_splittable()) { SplM_plan_info *spl_plan= cur_pos->spl_plan; - if (tab->fix_splitting(spl_plan, all_tables & ~prev_tables, + if (tab->fix_splitting(spl_plan, + all_tables & ~prev_tables, tablenr < const_tables )) return true; } @@ -1218,3 +1220,44 @@ bool JOIN::fix_all_splittings_in_plan() } return false; } + + +/** + @brief + Inject splitting conditions into WHERE of split derived + + @details + The function calls JOIN_TAB::inject_best_splitting_cond() for each + materialized derived table T used in this join for which the split + optimization has been chosen by the optimizer. It is done in order to + inject equalities pushed into the where clause of the specification + of T that would be helpful to employ the splitting technique. + + @retval + false on success + true on failure +*/ + +bool JOIN::inject_splitting_cond_for_all_tables_with_split_opt() +{ + table_map prev_tables= 0; + table_map all_tables= (table_map(1) << table_count) - 1; + for (uint tablenr= 0; tablenr < table_count; tablenr++) + { + POSITION *cur_pos= &best_positions[tablenr]; + JOIN_TAB *tab= cur_pos->table; + prev_tables|= tab->table->map; + if (!(tab->table->is_splittable() && cur_pos->spl_plan)) + continue; + SplM_opt_info *spl_opt_info= tab->table->spl_opt_info; + JOIN *join= spl_opt_info->join; + /* + Currently the equalities referencing columns of SJM tables with + look-up access cannot be pushed into materialized derived. + */ + if (join->inject_best_splitting_cond((all_tables & ~prev_tables) | + sjm_lookup_tables)) + return true; + } + return false; +} diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index e0c1d6dac4a..bff0f3d7ef6 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1600,6 +1600,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) { SELECT_LEX *parent_lex= parent_join->select_lex; TABLE_LIST *emb_tbl_nest= NULL; + TABLE_LIST *orig_tl; List<TABLE_LIST> *emb_join_list= &parent_lex->top_join_list; THD *thd= parent_join->thd; DBUG_ENTER("convert_subq_to_sj"); @@ -1761,17 +1762,17 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) because view's tables are inserted after the view) */ - for (tl= (TABLE_LIST*)(parent_lex->table_list.first); tl->next_local; tl= tl->next_local) + for (orig_tl= (TABLE_LIST*)(parent_lex->table_list.first); + orig_tl->next_local; + orig_tl= orig_tl->next_local) {} - tl->next_local= subq_lex->join->tables_list; + orig_tl->next_local= subq_lex->join->tables_list; /* A theory: no need to re-connect the next_global chain */ /* 3. Remove the original subquery predicate from the WHERE/ON */ - // The subqueries were replaced for Item_int(1) earlier - subq_pred->reset_strategy(SUBS_SEMI_JOIN); // for subsequent executions /*TODO: also reset the 'm_with_subquery' there. */ /* n. Adjust the parent_join->table_count counter */ @@ -1804,12 +1805,14 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Add the subquery-induced equalities too. */ SELECT_LEX *save_lex= thd->lex->current_select; + table_map subq_pred_used_tables; + thd->lex->current_select=subq_lex; if (subq_pred->left_expr->fix_fields_if_needed(thd, &subq_pred->left_expr)) - DBUG_RETURN(TRUE); + goto restore_tl_and_exit; thd->lex->current_select=save_lex; - table_map subq_pred_used_tables= subq_pred->used_tables(); + subq_pred_used_tables= subq_pred->used_tables(); sj_nest->nested_join->sj_corr_tables= subq_pred_used_tables; sj_nest->nested_join->sj_depends_on= subq_pred_used_tables | subq_pred->left_expr->used_tables(); @@ -1852,7 +1855,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, subq_lex->ref_pointer_array[0]); if (!item_eq) - DBUG_RETURN(TRUE); + goto restore_tl_and_exit; if (subq_pred->left_expr_orig != subq_pred->left_expr) thd->change_item_tree(item_eq->arguments(), subq_pred->left_expr); item_eq->in_equality_no= 0; @@ -1873,7 +1876,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Item_func_eq(thd, subq_pred->left_expr_orig->element_index(i), subq_lex->ref_pointer_array[i]); if (!item_eq) - DBUG_RETURN(TRUE); + goto restore_tl_and_exit; DBUG_ASSERT(subq_pred->left_expr->element_index(i)->is_fixed()); if (subq_pred->left_expr_orig->element_index(i) != subq_pred->left_expr->element_index(i)) @@ -1892,13 +1895,13 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) Item_row *row= new (thd->mem_root) Item_row(thd, subq_lex->pre_fix); /* fix fields on subquery was call so they should be the same */ if (!row) - DBUG_RETURN(TRUE); + goto restore_tl_and_exit; DBUG_ASSERT(subq_pred->left_expr->cols() == row->cols()); nested_join->sj_outer_expr_list.push_back(&subq_pred->left_expr); Item_func_eq *item_eq= new (thd->mem_root) Item_func_eq(thd, subq_pred->left_expr_orig, row); if (!item_eq) - DBUG_RETURN(TRUE); + goto restore_tl_and_exit; for (uint i= 0; i < row->cols(); i++) { if (row->element_index(i) != subq_lex->ref_pointer_array[i]) @@ -1917,9 +1920,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) we have in here). */ if (sj_nest->sj_on_expr->fix_fields_if_needed(thd, &sj_nest->sj_on_expr)) - { - DBUG_RETURN(TRUE); - } + goto restore_tl_and_exit; /* Walk through sj nest's WHERE and ON expressions and call @@ -1944,9 +1945,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) emb_tbl_nest->on_expr->top_level_item(); if (emb_tbl_nest->on_expr->fix_fields_if_needed(thd, &emb_tbl_nest->on_expr)) - { - DBUG_RETURN(TRUE); - } + goto restore_tl_and_exit; } else { @@ -1960,9 +1959,8 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) save_lex= thd->lex->current_select; thd->lex->current_select=parent_join->select_lex; if (parent_join->conds->fix_fields_if_needed(thd, &parent_join->conds)) - { - DBUG_RETURN(1); - } + goto restore_tl_and_exit; + thd->lex->current_select=save_lex; parent_join->select_lex->where= parent_join->conds; } @@ -1975,9 +1973,16 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) parent_lex->ftfunc_list->push_front(ifm, thd->mem_root); } + // The subqueries were replaced for Item_int(1) earlier + subq_pred->reset_strategy(SUBS_SEMI_JOIN); // for subsequent executions + parent_lex->have_merged_subqueries= TRUE; /* Fatal error may have been set to by fix_after_pullout() */ DBUG_RETURN(thd->is_fatal_error); + +restore_tl_and_exit: + orig_tl->next_local= NULL; + DBUG_RETURN(TRUE); } diff --git a/sql/partition_info.cc b/sql/partition_info.cc index a8459438be7..edcdd6d2b37 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -40,7 +40,7 @@ #include "ha_partition.h" -partition_info *partition_info::get_clone(THD *thd) +partition_info *partition_info::get_clone(THD *thd, bool empty_data_and_index_file) { MEM_ROOT *mem_root= thd->mem_root; DBUG_ENTER("partition_info::get_clone"); @@ -60,21 +60,22 @@ partition_info *partition_info::get_clone(THD *thd) { List_iterator<partition_element> subpart_it(part->subpartitions); partition_element *subpart; - partition_element *part_clone= new (mem_root) partition_element(); + partition_element *part_clone= new (mem_root) partition_element(*part); if (!part_clone) DBUG_RETURN(NULL); - - *part_clone= *part; part_clone->subpartitions.empty(); while ((subpart= (subpart_it++))) { - partition_element *subpart_clone= new (mem_root) partition_element(); + partition_element *subpart_clone= new (mem_root) partition_element(*subpart); if (!subpart_clone) DBUG_RETURN(NULL); - - *subpart_clone= *subpart; + if (empty_data_and_index_file) + subpart_clone->data_file_name= subpart_clone->index_file_name= NULL; part_clone->subpartitions.push_back(subpart_clone, mem_root); } + + if (empty_data_and_index_file) + part_clone->data_file_name= part_clone->index_file_name= NULL; clone->partitions.push_back(part_clone, mem_root); part_clone->list_val_list.empty(); List_iterator<part_elem_value> list_val_it(part->list_val_list); @@ -832,8 +833,13 @@ bool partition_info::has_unique_name(partition_element *element) DBUG_RETURN(TRUE); } -void partition_info::vers_set_hist_part(THD *thd) +int partition_info::vers_set_hist_part(THD *thd) { + if (table->pos_in_table_list && + table->pos_in_table_list->partition_names) + { + return HA_ERR_PARTITION_LIST; + } if (vers_info->limit) { ha_partition *hp= (ha_partition*)(table->file); @@ -841,9 +847,11 @@ void partition_info::vers_set_hist_part(THD *thd) List_iterator<partition_element> it(partitions); while (next != vers_info->hist_part) next= it++; + DBUG_ASSERT(bitmap_is_set(&read_partitions, next->id)); ha_rows records= hp->part_records(next); while ((next= it++) != vers_info->now_part) { + DBUG_ASSERT(bitmap_is_set(&read_partitions, next->id)); ha_rows next_records= hp->part_records(next); if (next_records == 0) break; @@ -856,13 +864,13 @@ void partition_info::vers_set_hist_part(THD *thd) goto warn; vers_info->hist_part= next; } - return; + return 0; } if (vers_info->interval.is_set()) { if (vers_info->hist_part->range_value > thd->query_start()) - return; + return 0; partition_element *next= NULL; List_iterator<partition_element> it(partitions); @@ -873,14 +881,15 @@ void partition_info::vers_set_hist_part(THD *thd) { vers_info->hist_part= next; if (next->range_value > thd->query_start()) - return; + return 0; } } - return; + return 0; warn: my_error(WARN_VERS_PART_FULL, MYF(ME_WARNING|ME_ERROR_LOG), table->s->db.str, table->s->table_name.str, vers_info->hist_part->partition_name); + return 0; } diff --git a/sql/partition_info.h b/sql/partition_info.h index 00ef815ce09..9fb20268738 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -327,7 +327,7 @@ public: } ~partition_info() {} - partition_info *get_clone(THD *thd); + partition_info *get_clone(THD *thd, bool empty_data_and_index_file= FALSE); bool set_named_partition_bitmap(const char *part_name, size_t length); bool set_partition_bitmaps(List<String> *partition_names); bool set_partition_bitmaps_from_table(TABLE_LIST *table_list); @@ -421,7 +421,7 @@ public: vers_info->limit= limit; return !limit; } - void vers_set_hist_part(THD *thd); + int vers_set_hist_part(THD *thd); bool vers_setup_expression(THD *thd, uint32 alter_add= 0); /* Stage 1. */ partition_element *get_partition(uint part_id) { diff --git a/sql/protocol.cc b/sql/protocol.cc index 1eb7a096ca9..5ec887e13d7 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -467,8 +467,12 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err, coming from server to have seq_no > 0, due to missing awareness of "out-of-band" operations. Make these clients happy. */ - if (!net->pkt_nr) - net->pkt_nr= 1; + if (!net->pkt_nr && + (sql_errno == ER_CONNECTION_KILLED || sql_errno == ER_SERVER_SHUTDOWN || + sql_errno == ER_QUERY_INTERRUPTED)) + { + net->pkt_nr= 1; + } ret= net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) buff, length); diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 1c6a1326538..c146bab1243 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -6641,8 +6641,8 @@ ER_BINLOG_UNSAFE_INSERT_TWO_KEYS ER_TABLE_IN_FK_CHECK eng "Table is being used in foreign key check" -ER_UNUSED_1 - eng "You should never see it" +ER_VERS_NOT_ALLOWED + eng "Not allowed for system-versioned table %`s.%`s" ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST eng "INSERT into autoincrement field which is not the first part in the composed primary key is unsafe" diff --git a/sql/slave.cc b/sql/slave.cc index 68ddc611c03..edea312c5ea 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4388,6 +4388,15 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, #ifdef WITH_WSREP wsrep_after_statement(thd); #endif /* WITH_WSREP */ + DBUG_EXECUTE_IF( + "pause_sql_thread_on_fde", + if (ev && typ == FORMAT_DESCRIPTION_EVENT) { + DBUG_ASSERT(!debug_sync_set_action( + thd, + STRING_WITH_LEN( + "now SIGNAL paused_on_fde WAIT_FOR sql_thread_continue"))); + }); + DBUG_RETURN(exec_res); } mysql_mutex_unlock(&rli->data_lock); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 5132b0e2e85..be47a48fec2 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4537,6 +4537,7 @@ restart: wsrep_thd_is_local(thd) && !is_stat_table(&(*start)->db, &(*start)->alias) && thd->get_command() != COM_STMT_PREPARE && + !thd->stmt_arena->is_stmt_prepare() && ((thd->lex->sql_command == SQLCOM_INSERT || thd->lex->sql_command == SQLCOM_INSERT_SELECT || thd->lex->sql_command == SQLCOM_REPLACE || @@ -6443,8 +6444,9 @@ find_field_in_tables(THD *thd, Item_ident *item, TRUE, &(item->cached_field_index)); #ifndef NO_EMBEDDED_ACCESS_CHECKS /* Check if there are sufficient access rights to the found field. */ - if (found && check_privileges && - check_column_grant_in_table_ref(thd, table_ref, name, length, found)) + if (found && check_privileges && !is_temporary_table(table_ref) && + check_column_grant_in_table_ref(thd, table_ref, name, length, + found)) found= WRONG_GRANT; #endif } @@ -6907,7 +6909,6 @@ set_new_item_local_context(THD *thd, Item_ident *item, TABLE_LIST *table_ref) if (!(context= new (thd->mem_root) Name_resolution_context)) return TRUE; context->init(); - context->select_lex= table_ref->select_lex; context->first_name_resolution_table= context->last_name_resolution_table= table_ref; item->context= context; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index da9835c188a..871b3733693 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -5183,18 +5183,19 @@ void LEX::free_arena_for_set_stmt() DBUG_VOID_RETURN; } -void LEX::restore_set_statement_var() +bool LEX::restore_set_statement_var() { + bool err= false; DBUG_ENTER("LEX::restore_set_statement_var"); if (!old_var_list.is_empty()) { DBUG_PRINT("info", ("vars: %d", old_var_list.elements)); - sql_set_variables(thd, &old_var_list, false); + err= sql_set_variables(thd, &old_var_list, false); old_var_list.empty(); free_arena_for_set_stmt(); } DBUG_ASSERT(!is_arena_for_set_stmt()); - DBUG_VOID_RETURN; + DBUG_RETURN(err); } unit_common_op st_select_lex_unit::common_op() diff --git a/sql/sql_lex.h b/sql/sql_lex.h index eb21419c7af..a4ded8deb34 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -3725,7 +3725,7 @@ public: int print_explain(select_result_sink *output, uint8 explain_flags, bool is_analyze, bool *printed_anything); - void restore_set_statement_var(); + bool restore_set_statement_var(); void init_last_field(Column_definition *field, const LEX_CSTRING *name, const CHARSET_INFO *cs); diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc index 45f81da80c9..fb7fa26f245 100644 --- a/sql/sql_locale.cc +++ b/sql/sql_locale.cc @@ -563,8 +563,8 @@ MY_LOCALE my_locale_es_ES 10, 9, ',', /* decimal point es_ES */ - '\0', /* thousands_sep es_ES */ - "\x80\x80", /* grouping es_ES */ + '.', /* thousands_sep es_ES */ + "\x03\x03", /* grouping es_ES */ &global_errmsgs[es_ES] ); /***** LOCALE END es_ES *****/ @@ -2649,8 +2649,8 @@ MY_LOCALE my_locale_es_BO 10, 9, ',', /* decimal point es_BO */ - '\0', /* thousands_sep es_BO */ - "\x80\x80", /* grouping es_BO */ + '.', /* thousands_sep es_BO */ + "\x03\x03", /* grouping es_BO */ &global_errmsgs[es_ES] ); /***** LOCALE END es_BO *****/ @@ -2669,8 +2669,8 @@ MY_LOCALE my_locale_es_CL 10, 9, ',', /* decimal point es_CL */ - '\0', /* thousands_sep es_CL */ - "\x80\x80", /* grouping es_CL */ + '.', /* thousands_sep es_CL */ + "\x03\x03", /* grouping es_CL */ &global_errmsgs[es_ES] ); /***** LOCALE END es_CL *****/ @@ -2689,8 +2689,8 @@ MY_LOCALE my_locale_es_CO 10, 9, ',', /* decimal point es_CO */ - '\0', /* thousands_sep es_CO */ - "\x80\x80", /* grouping es_CO */ + '.', /* thousands_sep es_CO */ + "\x03\x03", /* grouping es_CO */ &global_errmsgs[es_ES] ); /***** LOCALE END es_CO *****/ @@ -2708,9 +2708,9 @@ MY_LOCALE my_locale_es_CR &my_locale_typelib_ab_day_names_es_ES, 10, 9, - '.', /* decimal point es_CR */ - '\0', /* thousands_sep es_CR */ - "\x80\x80", /* grouping es_CR */ + ',', /* decimal point es_CR */ + ' ', /* thousands_sep es_CR */ + "\x03\x03", /* grouping es_CR */ &global_errmsgs[es_ES] ); /***** LOCALE END es_CR *****/ @@ -2729,8 +2729,8 @@ MY_LOCALE my_locale_es_DO 10, 9, '.', /* decimal point es_DO */ - '\0', /* thousands_sep es_DO */ - "\x80\x80", /* grouping es_DO */ + ',', /* thousands_sep es_DO */ + "\x03\x03", /* grouping es_DO */ &global_errmsgs[es_ES] ); /***** LOCALE END es_DO *****/ @@ -2749,8 +2749,8 @@ MY_LOCALE my_locale_es_EC 10, 9, ',', /* decimal point es_EC */ - '\0', /* thousands_sep es_EC */ - "\x80\x80", /* grouping es_EC */ + '.', /* thousands_sep es_EC */ + "\x03\x03", /* grouping es_EC */ &global_errmsgs[es_ES] ); /***** LOCALE END es_EC *****/ @@ -2769,8 +2769,8 @@ MY_LOCALE my_locale_es_GT 10, 9, '.', /* decimal point es_GT */ - '\0', /* thousands_sep es_GT */ - "\x80\x80", /* grouping es_GT */ + ',', /* thousands_sep es_GT */ + "\x03\x03", /* grouping es_GT */ &global_errmsgs[es_ES] ); /***** LOCALE END es_GT *****/ @@ -2789,8 +2789,8 @@ MY_LOCALE my_locale_es_HN 10, 9, '.', /* decimal point es_HN */ - '\0', /* thousands_sep es_HN */ - "\x80\x80", /* grouping es_HN */ + ',', /* thousands_sep es_HN */ + "\x03\x03", /* grouping es_HN */ &global_errmsgs[es_ES] ); /***** LOCALE END es_HN *****/ @@ -2809,8 +2809,8 @@ MY_LOCALE my_locale_es_MX 10, 9, '.', /* decimal point es_MX */ - '\0', /* thousands_sep es_MX */ - "\x80\x80", /* grouping es_MX */ + ',', /* thousands_sep es_MX */ + "\x03\x03", /* grouping es_MX */ &global_errmsgs[es_ES] ); /***** LOCALE END es_MX *****/ @@ -2829,8 +2829,8 @@ MY_LOCALE my_locale_es_NI 10, 9, '.', /* decimal point es_NI */ - '\0', /* thousands_sep es_NI */ - "\x80\x80", /* grouping es_NI */ + ',', /* thousands_sep es_NI */ + "\x03\x03", /* grouping es_NI */ &global_errmsgs[es_ES] ); /***** LOCALE END es_NI *****/ @@ -2849,8 +2849,8 @@ MY_LOCALE my_locale_es_PA 10, 9, '.', /* decimal point es_PA */ - '\0', /* thousands_sep es_PA */ - "\x80\x80", /* grouping es_PA */ + ',', /* thousands_sep es_PA */ + "\x03\x03", /* grouping es_PA */ &global_errmsgs[es_ES] ); /***** LOCALE END es_PA *****/ @@ -2869,8 +2869,8 @@ MY_LOCALE my_locale_es_PE 10, 9, '.', /* decimal point es_PE */ - '\0', /* thousands_sep es_PE */ - "\x80\x80", /* grouping es_PE */ + ',', /* thousands_sep es_PE */ + "\x03\x03", /* grouping es_PE */ &global_errmsgs[es_ES] ); /***** LOCALE END es_PE *****/ @@ -2889,8 +2889,8 @@ MY_LOCALE my_locale_es_PR 10, 9, '.', /* decimal point es_PR */ - '\0', /* thousands_sep es_PR */ - "\x80\x80", /* grouping es_PR */ + ',', /* thousands_sep es_PR */ + "\x03\x03", /* grouping es_PR */ &global_errmsgs[es_ES] ); /***** LOCALE END es_PR *****/ @@ -2909,8 +2909,8 @@ MY_LOCALE my_locale_es_PY 10, 9, ',', /* decimal point es_PY */ - '\0', /* thousands_sep es_PY */ - "\x80\x80", /* grouping es_PY */ + '.', /* thousands_sep es_PY */ + "\x03\x03", /* grouping es_PY */ &global_errmsgs[es_ES] ); /***** LOCALE END es_PY *****/ @@ -2929,8 +2929,8 @@ MY_LOCALE my_locale_es_SV 10, 9, '.', /* decimal point es_SV */ - '\0', /* thousands_sep es_SV */ - "\x80\x80", /* grouping es_SV */ + ',', /* thousands_sep es_SV */ + "\x03\x03", /* grouping es_SV */ &global_errmsgs[es_ES] ); /***** LOCALE END es_SV *****/ @@ -2969,8 +2969,8 @@ MY_LOCALE my_locale_es_UY 10, 9, ',', /* decimal point es_UY */ - '\0', /* thousands_sep es_UY */ - "\x80\x80", /* grouping es_UY */ + '.', /* thousands_sep es_UY */ + "\x03\x03", /* grouping es_UY */ &global_errmsgs[es_ES] ); /***** LOCALE END es_UY *****/ @@ -2989,8 +2989,8 @@ MY_LOCALE my_locale_es_VE 10, 9, ',', /* decimal point es_VE */ - '\0', /* thousands_sep es_VE */ - "\x80\x80", /* grouping es_VE */ + '.', /* thousands_sep es_VE */ + "\x03\x03", /* grouping es_VE */ &global_errmsgs[es_ES] ); /***** LOCALE END es_VE *****/ diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 69702813f08..0d7b34327fb 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -214,7 +214,7 @@ static struct /* support for Services */ -#include "sql_plugin_services.ic" +#include "sql_plugin_services.inl" /* A mutex LOCK_plugin must be acquired before accessing the diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.inl index 60ba38eae61..60ba38eae61 100644 --- a/sql/sql_plugin_services.ic +++ b/sql/sql_plugin_services.inl diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 980e37a7686..49b342d660d 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3046,7 +3046,6 @@ void reinit_stmt_before_use(THD *thd, LEX *lex) } for (; sl; sl= sl->next_select_in_list()) { - sl->parent_lex->in_sum_func= NULL; if (sl->changed_elements & TOUCHED_SEL_COND) { /* remove option which was put by mysql_explain_union() */ @@ -3181,6 +3180,7 @@ void reinit_stmt_before_use(THD *thd, LEX *lex) lex->result->set_thd(thd); } lex->allow_sum_func.clear_all(); + lex->in_sum_func= NULL; DBUG_VOID_RETURN; } @@ -4289,7 +4289,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) Restore original values of variables modified on handling SET STATEMENT clause. */ - thd->lex->restore_set_statement_var(); + error|= thd->lex->restore_set_statement_var(); /* The order is important */ lex->unit.cleanup(); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9311eb4fa18..4b92c4cb7a6 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3094,6 +3094,14 @@ setup_subq_exit: } if (make_aggr_tables_info()) DBUG_RETURN(1); + + /* + It could be that we've only done optimization stage 1 for + some of the derived tables, and never did stage 2. + Do it now, otherwise Explain data structure will not be complete. + */ + if (select_lex->handle_derived(thd->lex, DT_OPTIMIZE)) + DBUG_RETURN(1); } /* Even with zero matching rows, subqueries in the HAVING clause may @@ -10399,6 +10407,9 @@ bool JOIN::get_best_combination() hash_join= FALSE; fix_semijoin_strategies_for_picked_join_order(this); + + if (inject_splitting_cond_for_all_tables_with_split_opt()) + DBUG_RETURN(TRUE); JOIN_TAB_RANGE *root_range; if (!(root_range= new (thd->mem_root) JOIN_TAB_RANGE)) @@ -14434,8 +14445,6 @@ return_zero_rows(JOIN *join, select_result *result, List<TABLE_LIST> &tables, DBUG_RETURN(0); } - join->join_free(); - if (send_row) { /* @@ -14482,6 +14491,14 @@ return_zero_rows(JOIN *join, select_result *result, List<TABLE_LIST> &tables, if (likely(!send_error)) result->send_eof(); // Should be safe } + /* + JOIN::join_free() must be called after the virtual method + select::send_result_set_metadata() returned control since + implementation of this method could use data strutcures + that are released by the method JOIN::join_free(). + */ + join->join_free(); + DBUG_RETURN(0); } @@ -18589,8 +18606,15 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, The test for item->marker == 4 is ensure we don't create a group-by key over a bit field as heap tables can't handle that. */ - Field *new_field= (param->schema_table) ? - item->create_field_for_schema(thd, table) : + Field *new_field; + if (param->schema_table) + { + if ((new_field= item->create_field_for_schema(thd, table))) + new_field->flags|= NO_DEFAULT_VALUE_FLAG; + } + else + { + new_field= create_tmp_field(table, item, ©_func, tmp_from_field, &default_field[fieldnr], group != 0, @@ -18605,7 +18629,8 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields, */ item->marker == 4 || param->bit_fields_as_long, force_copy_fields); - if (!new_field) + } + if (unlikely(!new_field)) { if (unlikely(thd->is_fatal_error)) goto err; // Got OOM @@ -20847,11 +20872,8 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, */ if (shortcut_for_distinct && found_records != join->found_records) DBUG_RETURN(NESTED_LOOP_NO_MORE_ROWS); - } - else - { - join->thd->get_stmt_da()->inc_current_row_for_warning(); - join_tab->read_record.unlock_row(join_tab); + + DBUG_RETURN(NESTED_LOOP_OK); } } else @@ -20861,9 +20883,11 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, with the beginning coinciding with the current partial join. */ join->join_examined_rows++; - join->thd->get_stmt_da()->inc_current_row_for_warning(); - join_tab->read_record.unlock_row(join_tab); } + + join->thd->get_stmt_da()->inc_current_row_for_warning(); + join_tab->read_record.unlock_row(join_tab); + DBUG_RETURN(NESTED_LOOP_OK); } @@ -22603,21 +22627,6 @@ make_cond_for_table_from_pred(THD *thd, Item *root_cond, Item *cond, cond->marker=3; // Checked when read return (COND*) 0; } - /* - If cond is an equality injected for split optimization then - a. when retain_ref_cond == false : cond is removed unconditionally - (cond that supports ref access is removed by the preceding code) - b. when retain_ref_cond == true : cond is removed if it does not - support ref access - */ - if (left_item->type() == Item::FIELD_ITEM && - is_eq_cond_injected_for_split_opt((Item_func_eq *) cond) && - (!retain_ref_cond || - !test_if_ref(root_cond, (Item_field*) left_item,right_item))) - { - cond->marker=3; - return (COND*) 0; - } } cond->marker=2; cond->set_join_tab_idx(join_tab_idx_arg); @@ -28981,6 +28990,12 @@ AGGR_OP::end_send() table->reginfo.lock_type= TL_UNLOCK; bool in_first_read= true; + + /* + Reset the counter before copying rows from internal temporary table to + INSERT table. + */ + join_tab->join->thd->get_stmt_da()->reset_current_row_for_warning(); while (rc == NESTED_LOOP_OK) { int error; diff --git a/sql/sql_select.h b/sql/sql_select.h index 8d65a6183a0..28bf33997a0 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1797,6 +1797,7 @@ public: void add_keyuses_for_splitting(); bool inject_best_splitting_cond(table_map remaining_tables); bool fix_all_splittings_in_plan(); + bool inject_splitting_cond_for_all_tables_with_split_opt(); bool transform_in_predicates_into_in_subq(THD *thd); private: diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index 8d1a67eab85..03f2f1b117f 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -365,9 +365,14 @@ bool sequence_insert(THD *thd, LEX *lex, TABLE_LIST *org_table_list) seq->reserved_until= seq->start; error= seq->write_initial_sequence(table); - - if (trans_commit_stmt(thd)) - error= 1; + { + uint save_unsafe_rollback_flags= + thd->transaction.stmt.m_unsafe_rollback_flags; + if (trans_commit_stmt(thd)) + error= 1; + thd->transaction.stmt.m_unsafe_rollback_flags= + save_unsafe_rollback_flags; + } if (trans_commit_implicit(thd)) error= 1; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index cf3719b0cd0..e2c1940311c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -9470,7 +9470,7 @@ ST_FIELD_INFO stat_fields_info[]= {"SEQ_IN_INDEX", 2, MYSQL_TYPE_LONGLONG, 0, 0, "Seq_in_index", OPEN_FRM_ONLY}, {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Column_name", OPEN_FRM_ONLY}, - {"COLLATION", 1, MYSQL_TYPE_STRING, 0, 1, "Collation", OPEN_FRM_ONLY}, + {"COLLATION", 1, MYSQL_TYPE_STRING, 0, 1, "Collation", OPEN_FULL_TABLE}, {"CARDINALITY", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0, 1, "Cardinality", OPEN_FULL_TABLE}, {"SUB_PART", 3, MYSQL_TYPE_LONGLONG, 0, 1, "Sub_part", OPEN_FRM_ONLY}, diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 9a51ce49248..53adea74613 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2019, Oracle and/or its affiliates. - Copyright (c) 2010, 2021, MariaDB + Copyright (c) 2010, 2022, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -5786,8 +5786,15 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, #ifdef WITH_PARTITION_STORAGE_ENGINE /* Partition info is not handled by mysql_prepare_alter_table() call. */ if (src_table->table->part_info) - thd->work_part_info= src_table->table->part_info->get_clone(thd); -#endif + { + /* + The CREATE TABLE LIKE should not inherit the DATA DIRECTORY + and INDEX DIRECTORY from the base table. + So that TRUE argument for the get_clone. + */ + thd->work_part_info= src_table->table->part_info->get_clone(thd, TRUE); + } +#endif /*WITH_PARTITION_STORAGE_ENGINE*/ /* Adjust description of source table before using it for creation of @@ -8304,9 +8311,14 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, def->invisible= INVISIBLE_SYSTEM; alter_info->flags|= ALTER_CHANGE_COLUMN; if (field->flags & VERS_ROW_START) - create_info->vers_info.as_row.start= def->field_name= Vers_parse_info::default_start; + create_info->vers_info.period.start= + create_info->vers_info.as_row.start= + def->field_name= Vers_parse_info::default_start; + else - create_info->vers_info.as_row.end= def->field_name= Vers_parse_info::default_end; + create_info->vers_info.period.end= + create_info->vers_info.as_row.end= + def->field_name= Vers_parse_info::default_end; new_create_list.push_back(def, thd->mem_root); dropped_sys_vers_fields|= field->flags; drop_it.remove(); @@ -11618,20 +11630,28 @@ bool Sql_cmd_create_table_like::execute(THD *thd) tables, like mysql replication does. Also check if the requested engine is allowed/supported. */ - if (WSREP(thd) && - !check_engine(thd, create_table->db.str, create_table->table_name.str, - &create_info) && - (!thd->is_current_stmt_binlog_format_row() || - !create_info.tmp_table())) - { + if (WSREP(thd)) + { + handlerton *orig_ht= create_info.db_type; + if (!check_engine(thd, create_table->db.str, + create_table->table_name.str, + &create_info) && + (!thd->is_current_stmt_binlog_format_row() || + !create_info.tmp_table())) + { #ifdef WITH_WSREP - WSREP_TO_ISOLATION_BEGIN_ALTER(create_table->db.str, create_table->table_name.str, - first_table, &alter_info, NULL) - { - WSREP_WARN("CREATE TABLE isolation failure"); - DBUG_RETURN(true); - } + WSREP_TO_ISOLATION_BEGIN_ALTER(create_table->db.str, create_table->table_name.str, + first_table, &alter_info, NULL) + { + WSREP_WARN("CREATE TABLE isolation failure"); + DBUG_RETURN(true); + } #endif /* WITH_WSREP */ + } + // check_engine will set db_type to NULL if e.g. TEMPORARY is + // not supported by the storage engine, this case is checked + // again in mysql_create_table + create_info.db_type= orig_ht; } /* Regular CREATE TABLE */ res= mysql_create_table(thd, create_table, &create_info, &alter_info); diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 9091de619e6..81ed160560e 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -407,8 +407,18 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, bool res= FALSE; DBUG_ENTER("mysql_create_view"); - /* This is ensured in the parser. */ - DBUG_ASSERT(!lex->proc_list.first && !lex->result && + /* + This is ensured in the parser. + NOTE: Originally, the assert below contained the extra condition + && !lex->result + but in this form the assert is failed in case CREATE VIEW run under + cursor (the case when the byte 'flags' in the COM_STMT_EXECUTE packet has + the flag CURSOR_TYPE_READ_ONLY set). For the cursor use case + thd->lex->result is assigned a pointer to the class Select_materialize + inside the function mysql_open_cursor() just before handling of a statement + will be started and the function mysql_create_view() called. + */ + DBUG_ASSERT(!lex->proc_list.first && !lex->param_list.elements); /* diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 31f29042388..6bbdcbf86cb 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -34,7 +34,7 @@ #include "sql_plugin.h" #include "sql_priv.h" #include "sql_class.h" // set_var.h: THD -#include "sys_vars.ic" +#include "sys_vars.inl" #include "my_sys.h" #include "events.h" diff --git a/sql/sys_vars.ic b/sql/sys_vars.inl index 84d1cd6b331..84d1cd6b331 100644 --- a/sql/sys_vars.ic +++ b/sql/sys_vars.inl diff --git a/sql/table.cc b/sql/table.cc index 4df5af7a6c3..ae4c7b2ff66 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -8627,14 +8627,18 @@ void TABLE::vers_update_fields() return; } - if (versioned(VERS_TIMESTAMP) && - vers_start_field()->store_timestamp(in_use->query_start(), - in_use->query_start_sec_part())) + if (versioned(VERS_TIMESTAMP)) { - DBUG_ASSERT(0); + if (vers_start_field()->store_timestamp(in_use->query_start(), + in_use->query_start_sec_part())) + { + DBUG_ASSERT(0); + } + vers_start_field()->set_has_explicit_value(); } vers_end_field()->set_max(); + vers_end_field()->set_has_explicit_value(); bitmap_set_bit(read_set, vers_end_field()->field_index); file->column_bitmaps_signal(); if (vfield) @@ -8647,6 +8651,7 @@ void TABLE::vers_update_end() if (vers_end_field()->store_timestamp(in_use->query_start(), in_use->query_start_sec_part())) DBUG_ASSERT(0); + vers_end_field()->set_has_explicit_value(); } /** @@ -8956,6 +8961,24 @@ void TABLE_LIST::wrap_into_nested_join(List<TABLE_LIST> &join_list) /** + Check whether optimization has been performed and a derived table either + been merged to upper select level or materialized. + + @param table a TABLE_LIST object containing a derived table + + @return true in case the derived table has been merged to surrounding select, + false otherwise +*/ + +static inline bool derived_table_optimization_done(TABLE_LIST *table) +{ + return table->derived && + (table->derived->is_excluded() || + table->is_materialized_derived()); +} + + +/** @brief Initialize this derived table/view @@ -9005,13 +9028,15 @@ bool TABLE_LIST::init_derived(THD *thd, bool init_view) } } - if (init_view && !view) + if (init_view && !view && + !derived_table_optimization_done(this)) { /* This is all what we can do for a derived table for now. */ set_derived(); } - if (!is_view()) + if (!is_view() && + !derived_table_optimization_done(this)) { /* A subquery might be forced to be materialized due to a side-effect. */ if (!is_materialized_derived() && first_select->is_mergeable() && diff --git a/sql/table.h b/sql/table.h index 32393396ae7..832b204cba5 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1721,7 +1721,9 @@ public: bool vers_check_update(List<Item> &items); int delete_row(); + /* Used in majority of DML (called from fill_record()) */ void vers_update_fields(); + /* Used in DELETE, DUP REPLACE and insert history row */ void vers_update_end(); void find_constraint_correlated_indexes(); void clone_handler_for_update(); diff --git a/sql/tztime.cc b/sql/tztime.cc index 98e40205681..80035a5b906 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2628,9 +2628,9 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"leap", 'l', "Print the leap second information from the given time zone file. By convention, when --leap is used the next argument is the timezonefile", + {"leap", 'l', "Print the leap second information from the given time zone file. By convention, when --leap is used the next argument is the timezonefile.", &opt_leap, &opt_leap, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"verbose", 'v', "Write non critical warnings", + {"verbose", 'v', "Write non critical warnings.", &opt_verbose, &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -2640,6 +2640,15 @@ static struct my_option my_long_options[] = }; +static char **default_argv; + +static void free_allocated_data() +{ + free_defaults(default_argv); + my_end(0); +} + + C_MODE_START static my_bool get_one_option(int optid, const struct my_option *, char *argument); @@ -2651,11 +2660,21 @@ static void print_version(void) MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); } +static const char *default_timezone_dir= "/usr/share/zoneinfo/"; + + static void print_usage(void) { - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s [options] timezonedir\n", my_progname); - fprintf(stderr, " %s [options] timezonefile timezonename\n", my_progname); + fprintf(stdout, "Create SQL commands for loading system timezeone data for " + "MariaDB\n\n"); + fprintf(stdout, "Usage:\n"); + fprintf(stdout, " %s [options] timezonedir\n", my_progname); + fprintf(stdout, "or\n"); + fprintf(stdout, " %s [options] timezonefile timezonename\n", my_progname); + + fprintf(stdout, "\nA typical place for the system timezone directory is " + "\"%s\"\n", default_timezone_dir); + print_defaults("my",load_default_groups); puts(""); my_print_help(my_long_options); @@ -2676,9 +2695,11 @@ get_one_option(int optid, const struct my_option *opt, char *argument) print_version(); puts(""); print_usage(); + free_allocated_data(); exit(0); case 'V': print_version(); + free_allocated_data(); exit(0); } return 0; @@ -2700,7 +2721,6 @@ static const char *trunc_tables_const= int main(int argc, char **argv) { - char **default_argv; const char *trunc_tables; MY_INIT(argv[0]); @@ -2713,7 +2733,7 @@ main(int argc, char **argv) if ((argc != 1 && argc != 2) || (opt_leap && argc != 1)) { print_usage(); - free_defaults(default_argv); + free_allocated_data(); return 1; } @@ -2808,7 +2828,7 @@ main(int argc, char **argv) "END IF|\n" "\\d ;\n"); - free_defaults(default_argv); + free_allocated_data(); my_end(0); return 0; } diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 7d682f6e997..9ad3ef0c1c0 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -2719,7 +2719,7 @@ bool wsrep_create_like_table(THD* thd, TABLE_LIST* table, if (create_info->tmp_table()) { /* CREATE TEMPORARY TABLE LIKE must be skipped from replication */ - WSREP_DEBUG("CREATE TEMPORARY TABLE LIKE... skipped replication\n %s", + WSREP_DEBUG("CREATE TEMPORARY TABLE LIKE... skipped replication\n %s", thd->query()); } else if (!(thd->find_temporary_table(src_table))) @@ -2729,21 +2729,17 @@ bool wsrep_create_like_table(THD* thd, TABLE_LIST* table, } else { - /* here we have CREATE TABLE LIKE <temporary table> - the temporary table definition will be needed in slaves to - enable the create to succeed - */ - TABLE_LIST tbl; - bzero((void*) &tbl, sizeof(tbl)); - tbl.db= src_table->db; - tbl.table_name= tbl.alias= src_table->table_name; - tbl.table= src_table->table; + /* Non-MERGE tables ignore this call. */ + if (src_table->table->file->extra(HA_EXTRA_ADD_CHILDREN_LIST)) + return (true); + char buf[2048]; String query(buf, sizeof(buf), system_charset_info); query.length(0); // Have to zero it since constructor doesn't - (void) show_create_table(thd, &tbl, &query, NULL, WITH_DB_NAME); - WSREP_DEBUG("TMP TABLE: %s", query.ptr()); + int result __attribute__((unused))= + show_create_table(thd, src_table, &query, NULL, WITH_DB_NAME); + WSREP_DEBUG("TMP TABLE: %s ret_code %d", query.ptr(), result); thd->wsrep_TOI_pre_query= query.ptr(); thd->wsrep_TOI_pre_query_len= query.length(); @@ -2752,6 +2748,9 @@ bool wsrep_create_like_table(THD* thd, TABLE_LIST* table, thd->wsrep_TOI_pre_query= NULL; thd->wsrep_TOI_pre_query_len= 0; + + /* Non-MERGE tables ignore this call. */ + src_table->table->file->extra(HA_EXTRA_DETACH_CHILDREN); } return(false); diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp index 771e72b8dbd..491f388bc5f 100644 --- a/storage/connect/bsonudf.cpp +++ b/storage/connect/bsonudf.cpp @@ -201,7 +201,7 @@ my_bool BJNX::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm) p[--n] = 0; } else if (!IsNum(p)) { // Wrong array specification - sprintf(g->Message, "Invalid array specification %s", p); + snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s", p); return true; } // endif p diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index c1262b9630a..5785bc0f99e 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -5708,10 +5708,10 @@ static int connect_assisted_discovery(handlerton *, THD* thd, if (ttp == TAB_UNDEF && !topt->http) { topt->type= (src) ? "MYSQL" : (tab) ? "PROXY" : "DOS"; ttp= GetTypeID(topt->type); - sprintf(g->Message, "No table_type. Was set to %s", topt->type); + snprintf(g->Message, sizeof(g->Message), "No table_type. Was set to %s", topt->type); push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 0, g->Message); } else if (ttp == TAB_NIY) { - sprintf(g->Message, "Unsupported table type %s", topt->type); + snprintf(g->Message, sizeof(g->Message), "Unsupported table type %s", topt->type); rc= HA_ERR_INTERNAL_ERROR; goto err; #if defined(REST_SUPPORT) diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp index 41e73c946fb..18332362086 100644 --- a/storage/connect/jsonudf.cpp +++ b/storage/connect/jsonudf.cpp @@ -123,7 +123,7 @@ my_bool JSNX::SetArrayOptions(PGLOBAL g, char *p, int i, PSZ nm) p[--n] = 0; } else if (!IsNum(p)) { // Wrong array specification - sprintf(g->Message, "Invalid array specification %s", p); + snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s", p); return true; } // endif p diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index 76e0536633f..89514d6c3c2 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -399,15 +399,19 @@ PQRYRES SrcColumns(PGLOBAL g, const char *host, const char *db, int w; MYSQLC myc; PQRYRES qrp = NULL; + const char *p; if (!port) port = mysqld_port; if (!strnicmp(srcdef, "select ", 7) || strstr(srcdef, "%s")) { - query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 10); + query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 10); - if (strstr(srcdef, "%s")) - sprintf(query, srcdef, "1=1"); // dummy where clause + if ((p= strstr(srcdef, "%s"))) + { + /* Replace %s with 1=1 */ + sprintf(query, "%.*s1=1%s", (int) (p - srcdef), srcdef, p + 2); // dummy where clause + } else strcpy(query, srcdef); diff --git a/storage/connect/mysql-test/connect/r/misc.result b/storage/connect/mysql-test/connect/r/misc.result new file mode 100644 index 00000000000..6b6372f6e41 --- /dev/null +++ b/storage/connect/mysql-test/connect/r/misc.result @@ -0,0 +1,54 @@ +execute immediate concat('create table t engine=CONNECT table_type=JSON',REPEAT('1',5000), +' FILE_NAME=''users.json'' HTTP=''http://localhost:4142'' URI=''/users'''); +ERROR HY000: Unsupported table type JSON1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 +execute immediate concat('create table t engine=CONNECT table_type=OEM module=''libname'' +Option_list=''Myopt=foo'' subtype=''MYTYPE',REPEAT('1', 10000), ''''); +ERROR HY000: Subtype string too long +execute immediate concat('create table t engine=CONNECT table_type=DBF file_name=''', +REPLACE(@@secure_file_priv,'\\','/'),'cust.dbf', REPEAT('1', 10000), ''''); +ERROR HY000: Cannot open +create table t engine=connect table_type=mysql +CONNECTION='mysql://root@localhost:MASTER_MYPORT/test/foobar' + SRCDEF='SELECT 1,''%n'' FROM DUAL WHERE %s'; +select *from t; +ERROR HY000: Got error 174 'MakeSQL: Wrong place holders specification' from CONNECT +drop table t; +create table t engine=connect table_type=mysql +CONNECTION='mysql://root@localhost:MASTER_MYPORT/test/foobar' + SRCDEF='SELECT 1,%n FROM DUAL WHERE %s'; +ERROR HY000: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%n FROM DUAL WHERE 1=1 LIMIT 0' at line 1 [SELECT 1,%n FROM DUAL WHERE 1=1 LIMIT 0] +create table t engine=connect table_type=mysql +CONNECTION='mysql://root@localhost:MASTER_MYPORT/test/foobar' + SRCDEF='SELECT 1 FROM DUAL WHERE %s'; +select *from t; +1 +1 +drop table t; +create table beers ( +`Name` char(16) xpath='brandName', +`Origin` char(16) xpath='origin', +`Description` char(32) xpath='details') +engine=CONNECT table_type=XML file_name='MYSQLTEST_VARDIR/tmp/beer.xml' +tabname='table' option_list='rownode=tr,colnode=td%n'; +select * from beers; +Name Origin Description +NULL NULL NULL +NULL NULL NULL +drop table beers; +create table beers ( +`Name` char(16) xpath='brandName', +`Origin` char(16) xpath='origin', +`Description` char(32) xpath='details') +engine=CONNECT table_type=XML file_name='MYSQLTEST_VARDIR/tmp/beer.xml' +tabname='table' option_list='rownode=tr,colnode=td'; +insert into beers values('11','22','33'); +drop table beers; +execute immediate CONCAT('create table jsampall +(Author char(128) jpath=''$.AUTHOR["', REPEAT('a',10000),'"]'') +engine=CONNECT table_type=JSON +file_name=''',REPLACE(@@secure_file_priv,'\\','/'),'tmp/test.json'''); +select author from jsampall; +author +Jean-Christophe Bernadacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +William J. Pardi +drop table jsampall; diff --git a/storage/connect/mysql-test/connect/t/misc.test b/storage/connect/mysql-test/connect/t/misc.test new file mode 100644 index 00000000000..4dc8dded651 --- /dev/null +++ b/storage/connect/mysql-test/connect/t/misc.test @@ -0,0 +1,141 @@ + +# Overlong table type +--error ER_UNKNOWN_ERROR +execute immediate concat('create table t engine=CONNECT table_type=JSON',REPEAT('1',5000), +' FILE_NAME=''users.json'' HTTP=''http://localhost:4142'' URI=''/users'''); + +# Overlong subtype +--error ER_UNKNOWN_ERROR +execute immediate concat('create table t engine=CONNECT table_type=OEM module=''libname'' +Option_list=''Myopt=foo'' subtype=''MYTYPE',REPEAT('1', 10000), ''''); + + +# Overlong filename +--error ER_UNKNOWN_ERROR +execute immediate concat('create table t engine=CONNECT table_type=DBF file_name=''', + REPLACE(@@secure_file_priv,'\\','/'),'cust.dbf', REPEAT('1', 10000), ''''); + + +# Format string in SRCDEF +--replace_result $MASTER_MYPORT MASTER_MYPORT +eval create table t engine=connect table_type=mysql + CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/foobar' + SRCDEF='SELECT 1,''%n'' FROM DUAL WHERE %s'; +--error ER_GET_ERRMSG +select *from t; +drop table t; + +--replace_result $MASTER_MYPORT MASTER_MYPORT +--error ER_UNKNOWN_ERROR +eval create table t engine=connect table_type=mysql + CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/foobar' + SRCDEF='SELECT 1,%n FROM DUAL WHERE %s'; + +--replace_result $MASTER_MYPORT MASTER_MYPORT +eval create table t engine=connect table_type=mysql + CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/foobar' + SRCDEF='SELECT 1 FROM DUAL WHERE %s'; +select *from t; +drop table t; + +write_file $MYSQLTEST_VARDIR/tmp/beer.xml; +<?xml version="1.0"?> +<Beers> + <table> + <th><td>Name</td><td>Origin</td><td>Description</td></th> + <tr> + <td><brandName>Huntsman</brandName></td> + <td><origin>Bath, UK</origin></td> + <td><details>Wonderful hop, light alcohol</details></td> + </tr> + <tr> + <td><brandName>Tuborg</brandName></td> + <td><origin>Danmark</origin></td> + <td><details>In small bottles</details></td> + </tr> + </table> +</Beers> +EOF + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +# Format string in colnode +eval create table beers ( +`Name` char(16) xpath='brandName', +`Origin` char(16) xpath='origin', +`Description` char(32) xpath='details') +engine=CONNECT table_type=XML file_name='$MYSQLTEST_VARDIR/tmp/beer.xml' +tabname='table' option_list='rownode=tr,colnode=td%n'; +select * from beers; +drop table beers; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval create table beers ( +`Name` char(16) xpath='brandName', +`Origin` char(16) xpath='origin', +`Description` char(32) xpath='details') +engine=CONNECT table_type=XML file_name='$MYSQLTEST_VARDIR/tmp/beer.xml' +tabname='table' option_list='rownode=tr,colnode=td'; +insert into beers values('11','22','33'); +drop table beers; + +remove_file $MYSQLTEST_VARDIR/tmp/beer.xml; + +write_file $MYSQLTEST_VARDIR/tmp/test.json; +[ + { + "ISBN": "9782212090819", + "LANG": "fr", + "SUBJECT": "applications", + "AUTHOR": [ + { + "FIRSTNAME": "Jean-Christophe", + "LASTNAME": "Bernadac" + }, + { + "FIRSTNAME": "François", + "LASTNAME": "Knab" + } + ], + "TITLE": "Construire une application XML", + "PUBLISHER": { + "NAME": "Eyrolles", + "PLACE": "Paris" + }, + "DATEPUB": 1999 + }, + { + "ISBN": "9782840825685", + "LANG": "fr", + "SUBJECT": "applications", + "AUTHOR": [ + { + "FIRSTNAME": "William J.", + "LASTNAME": "Pardi" + } + ], + "TITLE": "XML en Action", + "TRANSLATED": { + "PREFIX": "adapté de l'anglais par", + "TRANSLATOR": { + "FIRSTNAME": "James", + "LASTNAME": "Guerin" + } + }, + "PUBLISHER": { + "NAME": "Microsoft Press", + "PLACE": "Paris" + }, + "DATEPUB": 1999 + } +] +EOF + +execute immediate CONCAT('create table jsampall +(Author char(128) jpath=''$.AUTHOR["', REPEAT('a',10000),'"]'') +engine=CONNECT table_type=JSON +file_name=''',REPLACE(@@secure_file_priv,'\\','/'),'tmp/test.json'''); + +select author from jsampall; +drop table jsampall; +remove_file $MYSQLTEST_VARDIR/tmp/test.json; + diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 8ff8d3a84e1..9175a4c9053 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -1422,7 +1422,7 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols) PGLOBAL& g = m_G; void *buffer; bool b; - UWORD n; + UWORD n, k; SWORD len, tp, ncol = 0; ODBCCOL *colp; RETCODE rc; @@ -1489,15 +1489,16 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols) } else { do { rc = SQLExecDirect(hstmt, (PUCHAR)sql, SQL_NTS); - } while (rc == SQL_STILL_EXECUTING); + } while (rc == SQL_STILL_EXECUTING); if (!Check(rc)) ThrowDBX(rc, "SQLExecDirect", hstmt); do { rc = SQLNumResultCols(hstmt, &ncol); - } while (rc == SQL_STILL_EXECUTING); + } while (rc == SQL_STILL_EXECUTING); + k = 0; // used for column number } // endif Srcdef for (n = 0, colp = tocols; colp; colp = (PODBCCOL)colp->GetNext()) @@ -1519,18 +1520,23 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols) sprintf(m_G->Message, MSG(INV_COLUMN_TYPE), colp->GetResultType(), SVP(colp->GetName())); ThrowDBX(m_G->Message); - } // endif tp + } // endif tp + + if (m_Tdb->Srcdef) + k = colp->GetIndex(); + else + k++; if (trace(1)) htrc("Binding col=%u type=%d buf=%p len=%d slen=%p\n", - n, tp, buffer, len, colp->GetStrLen()); + k, tp, buffer, len, colp->GetStrLen()); - rc = SQLBindCol(hstmt, colp->GetIndex(), tp, buffer, len, colp->GetStrLen()); + rc = SQLBindCol(hstmt, k, tp, buffer, len, colp->GetStrLen()); if (!Check(rc)) ThrowDBX(rc, "SQLBindCol", hstmt); - } // endif pcol + } // endif colp } catch(DBX *x) { if (trace(1)) diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp index a63eee75c1b..f481cd1034b 100644 --- a/storage/connect/plugutil.cpp +++ b/storage/connect/plugutil.cpp @@ -259,6 +259,12 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath) if (trace(2)) htrc("prefix=%-.256s fn=%-.256s path=%-.256s\n", prefix, FileName, defpath); + if (strlen(FileName) >= _MAX_PATH) + { + *pBuff= 0; /* Hope this is treated as error of some kind*/ + return FileName; + } + if (!strncmp(FileName, "//", 2) || !strncmp(FileName, "\\\\", 2)) { strcpy(pBuff, FileName); // Remote file return pBuff; diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 39761fc2f18..5788282dafc 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -93,7 +93,12 @@ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info) if (check_valid_path(module, strlen(module))) { strcpy(g->Message, "Module cannot contain a path"); return NULL; - } else + } + else if (strlen(subtype)+1+3 >= sizeof(getname)) { + strcpy(g->Message, "Subtype string too long"); + return NULL; + } + else PlugSetPath(soname, module, GetPluginDir()); // The exported name is always in uppercase diff --git a/storage/connect/tabbson.cpp b/storage/connect/tabbson.cpp index 8569e39f678..59d2b7ed1b0 100644 --- a/storage/connect/tabbson.cpp +++ b/storage/connect/tabbson.cpp @@ -1788,7 +1788,7 @@ bool BSONCOL::SetArrayOptions(PGLOBAL g, char* p, int i, PSZ nm) p[--n] = 0; } else if (!IsNum(p)) { // Wrong array specification - sprintf(g->Message, "Invalid array specification %s for %s", p, Name); + snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s for %s", p, Name); return true; } // endif p diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp index 53a0d2aa2c7..42658425fbd 100644 --- a/storage/connect/tabext.cpp +++ b/storage/connect/tabext.cpp @@ -142,8 +142,14 @@ bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) Username = GetStringCatInfo(g, "User", NULL); Password = GetStringCatInfo(g, "Password", NULL); - if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) + // Memory was Boolean, it is now integer + if (!(Memory = GetIntCatInfo("Memory", 0))) + Memory = GetBoolCatInfo("Memory", false) ? 1 : 0; + + if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) { Read_Only = true; + if (Memory == 2) Memory = 1; + } // endif Srcdef Qrystr = GetStringCatInfo(g, "Query_String", "?"); Sep = GetStringCatInfo(g, "Separator", NULL); @@ -166,10 +172,6 @@ bool EXTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) if (Catfunc == FNC_TABLE) Tabtyp = GetStringCatInfo(g, "Tabtype", NULL); - // Memory was Boolean, it is now integer - if (!(Memory = GetIntCatInfo("Memory", 0))) - Memory = GetBoolCatInfo("Memory", false) ? 1 : 0; - Pseudo = 2; // FILID is Ok but not ROWID return false; } // end of DefineAM @@ -284,6 +286,37 @@ int TDBEXT::Decode(PCSZ txt, char *buf, size_t n) return 0; } // end of Decode +/* + Count number of %s placeholders in string. + Returns -1 if other sprintf placeholders are found, .g %d +*/ +static int count_placeholders(const char *fmt) +{ + int cnt= 0; + for (const char *p=fmt; *p; p++) + { + if (*p == '%') + { + switch (p[1]) + { + case 's': + /* %s found */ + cnt++; + p++; + break; + case '%': + /* masking char for % found */ + p++; + break; + default: + /* some other placeholder found */ + return -1; + } + } + } + return cnt; +} + /***********************************************************************/ /* MakeSrcdef: make the SQL statement from SRDEF option. */ /***********************************************************************/ @@ -308,16 +341,29 @@ bool TDBEXT::MakeSrcdef(PGLOBAL g) ? To_CondFil->Having : PlugDup(g, "1=1"); } // endif ph - if (!stricmp(ph, "W")) { + int n_placeholders = count_placeholders(Srcdef); + if (n_placeholders < 0) + { + strcpy(g->Message, "MakeSQL: Wrong place holders specification"); + return true; + } + + if (!stricmp(ph, "W") && n_placeholders <= 1) { Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil1)); Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil1)); - } else if (!stricmp(ph, "WH")) { + } + else if (!stricmp(ph, "WH") && n_placeholders <= 2) + { Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil1) + strlen(fil2)); Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil1, fil2)); - } else if (!stricmp(ph, "H")) { + } + else if (!stricmp(ph, "H") && n_placeholders <= 1) + { Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil2)); Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil2)); - } else if (!stricmp(ph, "HW")) { + } + else if (!stricmp(ph, "HW") && n_placeholders <= 2) + { Query = new(g)STRING(g, strlen(Srcdef) + strlen(fil1) + strlen(fil2)); Query->SetLength(sprintf(Query->GetStr(), Srcdef, fil2, fil1)); } else { diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 56f22fa91ec..2697be2da13 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -1384,7 +1384,7 @@ bool JSONCOL::SetArrayOptions(PGLOBAL g, char *p, int i, PSZ nm) p[--n] = 0; } else if (!IsNum(p)) { // Wrong array specification - sprintf(g->Message, "Invalid array specification %s for %s", p, Name); + snprintf(g->Message, sizeof(g->Message), "Invalid array specification %s for %s", p, Name); return true; } // endif p diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index 674580535a5..b677f862cc8 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -904,6 +904,11 @@ bool TDBMYSQL::OpenDB(PGLOBAL g) /*********************************************************************/ if (Mode == MODE_READ || Mode == MODE_READX) { MakeSelect(g, Mode == MODE_READX); + if (Mode == MODE_READ && !Query) + { + Myc.Close(); + return true; + } m_Rc = (Mode == MODE_READ) ? Myc.ExecSQL(g, Query->GetStr()) : RC_OK; diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 6990fa4abba..693450668db 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -1517,9 +1517,13 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode) if (!mode) // Take care of an eventual extra column node a la html if (Tdbp->Colname) { - sprintf(pbuf, Tdbp->Colname, Rank + ((Tdbp->Usedom) ? 0 : 1)); - strcat(pbuf, "/"); - } // endif Colname + char *p = strstr(Tdbp->Colname, "%d"); + if (p) + snprintf(pbuf, len + 3, "%.*s%d%s/", (int) (p - Tdbp->Colname), Tdbp->Colname, + Rank + (Tdbp->Usedom ? 0 : 1), p + 2); + else + snprintf(pbuf, len + 3, "%s/", Tdbp->Colname); + } // endif Colname if (Xname) { if (Type == 2) { @@ -1809,6 +1813,9 @@ void XMLCOL::WriteColumn(PGLOBAL g) else if (Tdbp->Clist) ColNode = NULL; + // refresh CList in case its Listp was freed in SelectSingleNode above + if (Tdbp->Clist) + Tdbp->RowNode->SelectNodes(g, Tdbp->Colname, Tdbp->Clist); } // endfor i /*********************************************************************/ diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 2cfca67ddd1..864311a0abf 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -192,12 +192,6 @@ static page_cleaner_t page_cleaner; my_bool innodb_page_cleaner_disabled_debug; #endif /* UNIV_DEBUG */ -/** If LRU list of a buf_pool is less than this size then LRU eviction -should not happen. This is because when we do LRU flushing we also put -the blocks on free list. If LRU list is very small then we can end up -in thrashing. */ -#define BUF_LRU_MIN_LEN 256 - /* @} */ /******************************************************************//** diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 816306d6c88..1d42e889538 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 2011, 2021, Oracle and/or its affiliates. -Copyright (c) 2016, 2021, MariaDB Corporation. +Copyright (c) 2016, 2022, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -31,7 +31,7 @@ Full Text Search interface #include "fts0fts.h" #include "fts0priv.h" #include "fts0types.h" -#include "fts0types.ic" +#include "fts0types.inl" #include "fts0vlc.h" #include "fts0plugin.h" #include "dict0priv.h" @@ -230,9 +230,7 @@ ulint fts_add_doc_by_id( /*==============*/ fts_trx_table_t*ftt, /*!< in: FTS trx table */ - doc_id_t doc_id, /*!< in: doc id */ - ib_vector_t* fts_indexes MY_ATTRIBUTE((unused))); - /*!< in: affected fts indexes */ + doc_id_t doc_id); /*!< in: doc id */ /******************************************************************//** Update the last document id. This function could create a new transaction to update the last document id. @@ -2832,7 +2830,7 @@ fts_add( ut_a(row->state == FTS_INSERT || row->state == FTS_MODIFY); - fts_add_doc_by_id(ftt, doc_id, row->fts_indexes); + fts_add_doc_by_id(ftt, doc_id); mutex_enter(&table->fts->cache->deleted_lock); ++table->fts->cache->added; @@ -3398,9 +3396,7 @@ ulint fts_add_doc_by_id( /*==============*/ fts_trx_table_t*ftt, /*!< in: FTS trx table */ - doc_id_t doc_id, /*!< in: doc id */ - ib_vector_t* fts_indexes MY_ATTRIBUTE((unused))) - /*!< in: affected fts indexes */ + doc_id_t doc_id) /*!< in: doc id */ { mtr_t mtr; mem_heap_t* heap; @@ -4644,7 +4640,7 @@ fts_tokenize_add_word_for_parser( ut_ad(boolean_info->position >= 0); position = boolean_info->position + fts_param->add_pos; */ - position = fts_param->add_pos; + position = fts_param->add_pos++; fts_add_token(result_doc, str, position); diff --git a/storage/innobase/gis/gis0rtree.cc b/storage/innobase/gis/gis0rtree.cc index 122402eb34d..77dd6f7ae27 100644 --- a/storage/innobase/gis/gis0rtree.cc +++ b/storage/innobase/gis/gis0rtree.cc @@ -1258,15 +1258,6 @@ after_insert: page_zip = buf_block_get_page_zip(root_block); page_set_ssn_id(root_block, page_zip, next_ssn, mtr); - /* Insert fit on the page: update the free bits for the - left and right pages in the same mtr */ - - if (page_is_leaf(page)) { - ibuf_update_free_bits_for_two_pages_low( - block, new_block, mtr); - } - - /* If the new res insert fail, we need to do another split again. */ if (!rec) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 257074ae56d..4dd004178d6 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -4,7 +4,7 @@ Copyright (c) 2000, 2020, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 2022, MariaDB Corporation. Portions of this file contain modifications contributed and copyrighted by Google, Inc. Those modifications are gratefully acknowledged and are described @@ -3575,6 +3575,59 @@ static int innodb_init_abort() DBUG_RETURN(1); } +/** Return the minimum buffer pool size based on page size */ +static inline ulint min_buffer_pool_size() +{ + ulint s= (BUF_LRU_MIN_LEN + BUF_LRU_MIN_LEN / 4) * srv_page_size; + /* buf_pool_chunk_size minimum is 1M, so round up to a multiple */ + ulint alignment= 1U << 20; + return UT_CALC_ALIGN(s, alignment); +} + +/** Validate the requested buffer pool size. Also, reserve the necessary +memory needed for buffer pool resize. +@param[in] thd thread handle +@param[in] var pointer to system variable +@param[out] save immediate result for update function +@param[in] value incoming string +@return 0 on success, 1 on failure. +*/ +static +int +innodb_buffer_pool_size_validate( + THD* thd, + struct st_mysql_sys_var* var, + void* save, + struct st_mysql_value* value); + +/** Update the system variable innodb_buffer_pool_size using the "saved" +value. This function is registered as a callback with MySQL. +@param[in] thd thread handle +@param[in] var pointer to system variable +@param[out] var_ptr where the formal string goes +@param[in] save immediate result from check function */ +static +void +innodb_buffer_pool_size_update( + THD* thd, + struct st_mysql_sys_var* var, + void* var_ptr, + const void* save); + +/* If the default value of innodb_buffer_pool_size is increased to be more than +BUF_POOL_SIZE_THRESHOLD (srv/srv0start.cc), then srv_buf_pool_instances_default +can be removed and 8 used instead. The problem with the current setup is that +with 128MiB default buffer pool size and 8 instances by default we would emit +a warning when no options are specified. */ +static MYSQL_SYSVAR_ULONGLONG(buffer_pool_size, innobase_buffer_pool_size, + PLUGIN_VAR_RQCMDARG, + "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", + innodb_buffer_pool_size_validate, + innodb_buffer_pool_size_update, + 128ULL << 20, + 2ULL << 20, + LLONG_MAX, 1024*1024L); + /** Deprecation message about innodb_idle_flush_pct */ static const char* deprecated_idle_flush_pct = "innodb_idle_flush_pct is DEPRECATED and has no effect."; @@ -3763,12 +3816,15 @@ static int innodb_init_params() /* The buffer pool needs to be able to accommodate enough many pages, even for larger pages */ - if (srv_page_size > UNIV_PAGE_SIZE_DEF - && innobase_buffer_pool_size < (24 * 1024 * 1024)) { + MYSQL_SYSVAR_NAME(buffer_pool_size).min_val= min_buffer_pool_size(); + + if (innobase_buffer_pool_size < MYSQL_SYSVAR_NAME(buffer_pool_size).min_val) { ib::error() << "innodb_page_size=" << srv_page_size << " requires " - << "innodb_buffer_pool_size > 24M current " - << innobase_buffer_pool_size; + << "innodb_buffer_pool_size >= " + << (MYSQL_SYSVAR_NAME(buffer_pool_size).min_val >> 20) + << "MiB current " << (innobase_buffer_pool_size >> 20) + << "MiB"; DBUG_RETURN(HA_ERR_INITIALIZATION); } @@ -11557,9 +11613,12 @@ create_table_info_t::create_options_are_invalid() break; } - if (m_create_info->data_file_name - && m_create_info->data_file_name[0] != '\0' - && !create_option_data_directory_is_valid()) { + if (!m_create_info->data_file_name + || !m_create_info->data_file_name[0]) { + } else if (!my_use_symdir) { + my_error(WARN_OPTION_IGNORED, MYF(ME_WARNING), + "DATA DIRECTORY"); + } else if (!create_option_data_directory_is_valid()) { ret = "DATA DIRECTORY"; } @@ -11831,7 +11890,8 @@ create_table_info_t::parse_table_name( CREATE TABLE ... DATA DIRECTORY={path} TABLESPACE={name}... ; we ignore the DATA DIRECTORY. */ if (m_create_info->data_file_name - && m_create_info->data_file_name[0] != '\0') { + && m_create_info->data_file_name[0] + && my_use_symdir) { if (!create_option_data_directory_is_valid()) { push_warning_printf( m_thd, Sql_condition::WARN_LEVEL_WARN, @@ -12289,8 +12349,9 @@ create_table_info_t::set_tablespace_type( used with TEMPORARY tables. */ m_use_data_dir = m_use_file_per_table - && (m_create_info->data_file_name != NULL) - && (m_create_info->data_file_name[0] != '\0'); + && m_create_info->data_file_name + && m_create_info->data_file_name[0] + && my_use_symdir; } /** Initialize the create_table_info_t object. @@ -19216,36 +19277,6 @@ static MYSQL_SYSVAR_ULONG(autoextend_increment, "Data file autoextend increment in megabytes", NULL, NULL, 64L, 1L, 1000L, 0); -/** Validate the requested buffer pool size. Also, reserve the necessary -memory needed for buffer pool resize. -@param[in] thd thread handle -@param[in] var pointer to system variable -@param[out] save immediate result for update function -@param[in] value incoming string -@return 0 on success, 1 on failure. -*/ -static -int -innodb_buffer_pool_size_validate( - THD* thd, - struct st_mysql_sys_var* var, - void* save, - struct st_mysql_value* value); - -/* If the default value of innodb_buffer_pool_size is increased to be more than -BUF_POOL_SIZE_THRESHOLD (srv/srv0start.cc), then srv_buf_pool_instances_default -can be removed and 8 used instead. The problem with the current setup is that -with 128MiB default buffer pool size and 8 instances by default we would emit -a warning when no options are specified. */ -static MYSQL_SYSVAR_ULONGLONG(buffer_pool_size, innobase_buffer_pool_size, - PLUGIN_VAR_RQCMDARG, - "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", - innodb_buffer_pool_size_validate, - innodb_buffer_pool_size_update, - srv_buf_pool_def_size, - srv_buf_pool_min_size, - LLONG_MAX, 1024*1024L); - static MYSQL_SYSVAR_ULONG(buffer_pool_chunk_size, srv_buf_pool_chunk_unit, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "Size of a single memory chunk within each buffer pool instance" @@ -21365,8 +21396,19 @@ innodb_buffer_pool_size_validate( struct st_mysql_value* value) { longlong intbuf; + value->val_int(value, &intbuf); + if (static_cast<ulonglong>(intbuf) < MYSQL_SYSVAR_NAME(buffer_pool_size).min_val) { + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + ER_WRONG_ARGUMENTS, + "innodb_buffer_pool_size must be at least" + " %lld for innodb_page_size=%lu", + MYSQL_SYSVAR_NAME(buffer_pool_size).min_val, + srv_page_size); + return(1); + } + if (!srv_was_started) { push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WRONG_ARGUMENTS, @@ -21779,3 +21821,21 @@ void ins_node_t::vers_update_end(row_prebuilt_t *prebuilt, bool history_row) if (UNIV_LIKELY_NULL(local_heap)) mem_heap_free(local_heap); } + +/** Calculate aligned buffer pool size based on srv_buf_pool_chunk_unit, +if needed. +@param[in] size size in bytes +@return aligned size */ +ulint +buf_pool_size_align( + ulint size) +{ + const ib_uint64_t m = ((ib_uint64_t)srv_buf_pool_instances) * srv_buf_pool_chunk_unit; + size = ut_max((size_t) size, (size_t) MYSQL_SYSVAR_NAME(buffer_pool_size).min_val); + + if (size % m == 0) { + return(size); + } else { + return (ulint)((size / m + 1) * m); + } +} diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h index 54aea9d2d3d..ed64a92688a 100644 --- a/storage/innobase/include/btr0btr.h +++ b/storage/innobase/include/btr0btr.h @@ -792,7 +792,7 @@ btr_lift_page_up( #define BTR_N_LEAF_PAGES 1 #define BTR_TOTAL_SIZE 2 -#include "btr0btr.ic" +#include "btr0btr.inl" /**************************************************************** Global variable controlling if scrubbing should be performed */ diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.inl index d3827b7dc6f..d3827b7dc6f 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.inl diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index 1f1ac2a09e7..0eb06a3bc99 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -1058,6 +1058,6 @@ extern ulint btr_cur_n_sea_old; extern uint btr_cur_limit_optimistic_insert_debug; #endif /* UNIV_DEBUG */ -#include "btr0cur.ic" +#include "btr0cur.inl" #endif diff --git a/storage/innobase/include/btr0cur.ic b/storage/innobase/include/btr0cur.inl index be6ac28129e..be6ac28129e 100644 --- a/storage/innobase/include/btr0cur.ic +++ b/storage/innobase/include/btr0cur.inl diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h index b0b61a4d1ff..d8f9a0961e8 100644 --- a/storage/innobase/include/btr0pcur.h +++ b/storage/innobase/include/btr0pcur.h @@ -540,6 +540,6 @@ struct btr_pcur_t{ dict_index_t* index() const { return(btr_cur.index); } }; -#include "btr0pcur.ic" +#include "btr0pcur.inl" #endif diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.inl index d93da475a1f..d93da475a1f 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.inl diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h index adb14a7c16f..8ed0a13f0b5 100644 --- a/storage/innobase/include/btr0sea.h +++ b/storage/innobase/include/btr0sea.h @@ -308,6 +308,6 @@ again set this much timeout. This is to reduce contention. */ #define BTR_SEA_TIMEOUT 10000 #endif /* BTR_CUR_HASH_ADAPT */ -#include "btr0sea.ic" +#include "btr0sea.inl" #endif diff --git a/storage/innobase/include/btr0sea.ic b/storage/innobase/include/btr0sea.inl index 9db0084ce59..9db0084ce59 100644 --- a/storage/innobase/include/btr0sea.ic +++ b/storage/innobase/include/btr0sea.inl diff --git a/storage/innobase/include/buf0buddy.h b/storage/innobase/include/buf0buddy.h index 5119a1c58c4..63ec8cd0001 100644 --- a/storage/innobase/include/buf0buddy.h +++ b/storage/innobase/include/buf0buddy.h @@ -82,6 +82,6 @@ void buf_buddy_condense_free( buf_pool_t* buf_pool); -#include "buf0buddy.ic" +#include "buf0buddy.inl" #endif /* buf0buddy_h */ diff --git a/storage/innobase/include/buf0buddy.ic b/storage/innobase/include/buf0buddy.inl index 39ab46d80dd..39ab46d80dd 100644 --- a/storage/innobase/include/buf0buddy.ic +++ b/storage/innobase/include/buf0buddy.inl diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 1aba6adeb83..e61e3e4c283 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -94,6 +94,12 @@ struct fil_addr_t; #define MAX_PAGE_HASH_LOCKS 1024 /*!< The maximum number of page_hash locks */ +/** If LRU list of a buf_pool is less than this size then LRU eviction +should not happen. This is because when we do LRU flushing we also put +the blocks on free list. If LRU list is very small then we can end up +in thrashing. */ +#define BUF_LRU_MIN_LEN 256 + extern buf_pool_t* buf_pool_ptr; /*!< The buffer pools of the database */ @@ -1394,7 +1400,6 @@ buf_get_nth_chunk_block( if needed. @param[in] size size in bytes @return aligned size */ -UNIV_INLINE ulint buf_pool_size_align( ulint size); @@ -2485,7 +2490,7 @@ struct CheckUnzipLRUAndLRUList { }; #endif /* UNIV_DEBUG || defined UNIV_BUF_DEBUG */ -#include "buf0buf.ic" +#include "buf0buf.inl" #endif /* !UNIV_INNOCHECKSUM */ diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.inl index 9fcac6e2695..ac50588c217 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.inl @@ -1390,22 +1390,3 @@ buf_page_get_frame( return ((buf_block_t*) bpage)->frame; } } - -/** Calculate aligned buffer pool size based on srv_buf_pool_chunk_unit, -if needed. -@param[in] size size in bytes -@return aligned size */ -UNIV_INLINE -ulint -buf_pool_size_align( - ulint size) -{ - const ib_uint64_t m = ((ib_uint64_t)srv_buf_pool_instances) * srv_buf_pool_chunk_unit; - size = ut_max(size, srv_buf_pool_min_size); - - if (size % m == 0) { - return(size); - } else { - return (ulint)((size / m + 1) * m); - } -} diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h index e022dd55215..aa9eb78b8ef 100644 --- a/storage/innobase/include/buf0flu.h +++ b/storage/innobase/include/buf0flu.h @@ -397,6 +397,6 @@ private: bool m_interrupted; }; -#include "buf0flu.ic" +#include "buf0flu.inl" #endif diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.inl index 02f3d8ced57..02f3d8ced57 100644 --- a/storage/innobase/include/buf0flu.ic +++ b/storage/innobase/include/buf0flu.inl diff --git a/storage/innobase/include/data0data.h b/storage/innobase/include/data0data.h index fc774b6ee60..c2b8c3e00b6 100644 --- a/storage/innobase/include/data0data.h +++ b/storage/innobase/include/data0data.h @@ -705,6 +705,6 @@ struct big_rec_t { ulint n_fld); }; -#include "data0data.ic" +#include "data0data.inl" #endif diff --git a/storage/innobase/include/data0data.ic b/storage/innobase/include/data0data.inl index 39ade7b1e09..39ade7b1e09 100644 --- a/storage/innobase/include/data0data.ic +++ b/storage/innobase/include/data0data.inl diff --git a/storage/innobase/include/data0type.h b/storage/innobase/include/data0type.h index 0e496085113..3523a487d74 100644 --- a/storage/innobase/include/data0type.h +++ b/storage/innobase/include/data0type.h @@ -600,6 +600,6 @@ static const byte REC_INFO_METADATA_ADD static const byte REC_INFO_METADATA_ALTER = REC_INFO_METADATA_ADD | REC_INFO_DELETED_FLAG; -#include "data0type.ic" +#include "data0type.inl" #endif diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.inl index 037a71a9345..037a71a9345 100644 --- a/storage/innobase/include/data0type.ic +++ b/storage/innobase/include/data0type.inl diff --git a/storage/innobase/include/dict0boot.h b/storage/innobase/include/dict0boot.h index 778471b77ae..4daa1d23c4f 100644 --- a/storage/innobase/include/dict0boot.h +++ b/storage/innobase/include/dict0boot.h @@ -340,6 +340,6 @@ two) is assigned, the field DICT_HDR_ROW_ID on the dictionary header page is updated */ #define DICT_HDR_ROW_ID_WRITE_MARGIN 256 -#include "dict0boot.ic" +#include "dict0boot.inl" #endif diff --git a/storage/innobase/include/dict0boot.ic b/storage/innobase/include/dict0boot.inl index 7b0a2fd0b86..7b0a2fd0b86 100644 --- a/storage/innobase/include/dict0boot.ic +++ b/storage/innobase/include/dict0boot.inl diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h index 92f55ce4a14..e3c40c794e9 100644 --- a/storage/innobase/include/dict0crea.h +++ b/storage/innobase/include/dict0crea.h @@ -320,6 +320,6 @@ dict_get_v_col_pos( #define INDEX_CREATE_INDEX_TREE 3 #define INDEX_ADD_TO_CACHE 4 -#include "dict0crea.ic" +#include "dict0crea.inl" #endif diff --git a/storage/innobase/include/dict0crea.ic b/storage/innobase/include/dict0crea.inl index 5641206d313..5641206d313 100644 --- a/storage/innobase/include/dict0crea.ic +++ b/storage/innobase/include/dict0crea.inl diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 0f730ffbcb7..2326f00599b 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -1790,6 +1790,6 @@ bool dict_table_have_virtual_index( dict_table_t* table); -#include "dict0dict.ic" +#include "dict0dict.inl" #endif diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.inl index d00f4f8f6a3..d00f4f8f6a3 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.inl diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 8f0b08e7864..596800ee8d2 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -2521,6 +2521,6 @@ inline void dict_stats_empty_defrag_stats(dict_index_t* index) index->stat_defrag_n_page_split = 0; } -#include "dict0mem.ic" +#include "dict0mem.inl" #endif /* dict0mem_h */ diff --git a/storage/innobase/include/dict0mem.ic b/storage/innobase/include/dict0mem.inl index 090ec73278b..090ec73278b 100644 --- a/storage/innobase/include/dict0mem.ic +++ b/storage/innobase/include/dict0mem.inl diff --git a/storage/innobase/include/dict0pagecompress.h b/storage/innobase/include/dict0pagecompress.h index dfa6f2a244d..f1272dc447d 100644 --- a/storage/innobase/include/dict0pagecompress.h +++ b/storage/innobase/include/dict0pagecompress.h @@ -56,6 +56,6 @@ dict_table_page_compression_level( const dict_table_t* table) /*!< in: table */ __attribute__((const)); -#include "dict0pagecompress.ic" +#include "dict0pagecompress.inl" #endif diff --git a/storage/innobase/include/dict0pagecompress.ic b/storage/innobase/include/dict0pagecompress.inl index c959f9cada2..c959f9cada2 100644 --- a/storage/innobase/include/dict0pagecompress.ic +++ b/storage/innobase/include/dict0pagecompress.inl diff --git a/storage/innobase/include/dict0priv.h b/storage/innobase/include/dict0priv.h index 3f2792054e0..bef0ddad0aa 100644 --- a/storage/innobase/include/dict0priv.h +++ b/storage/innobase/include/dict0priv.h @@ -45,6 +45,6 @@ dict_table_check_if_in_cache_low( /*=============================*/ const char* table_name); /*!< in: table name */ -#include "dict0priv.ic" +#include "dict0priv.inl" #endif /* dict0priv.h */ diff --git a/storage/innobase/include/dict0priv.ic b/storage/innobase/include/dict0priv.inl index ff645378175..ff645378175 100644 --- a/storage/innobase/include/dict0priv.ic +++ b/storage/innobase/include/dict0priv.inl diff --git a/storage/innobase/include/dict0stats.h b/storage/innobase/include/dict0stats.h index 2e001cb56e9..dccb354f803 100644 --- a/storage/innobase/include/dict0stats.h +++ b/storage/innobase/include/dict0stats.h @@ -234,7 +234,7 @@ dberr_t dict_stats_report_error(dict_table_t* table, bool defragment = false) MY_ATTRIBUTE((nonnull, warn_unused_result)); -#include "dict0stats.ic" +#include "dict0stats.inl" #ifdef UNIV_ENABLE_UNIT_TEST_DICT_STATS void test_dict_stats_all(); diff --git a/storage/innobase/include/dict0stats.ic b/storage/innobase/include/dict0stats.inl index d4e23ecb0a4..d4e23ecb0a4 100644 --- a/storage/innobase/include/dict0stats.ic +++ b/storage/innobase/include/dict0stats.inl diff --git a/storage/innobase/include/eval0eval.h b/storage/innobase/include/eval0eval.h index ebd40924a49..a3ea046250b 100644 --- a/storage/innobase/include/eval0eval.h +++ b/storage/innobase/include/eval0eval.h @@ -104,6 +104,6 @@ eval_cmp( func_node_t* cmp_node); /*!< in: comparison node */ -#include "eval0eval.ic" +#include "eval0eval.inl" #endif diff --git a/storage/innobase/include/eval0eval.ic b/storage/innobase/include/eval0eval.inl index ae0887408b0..ae0887408b0 100644 --- a/storage/innobase/include/eval0eval.ic +++ b/storage/innobase/include/eval0eval.inl diff --git a/storage/innobase/include/eval0proc.h b/storage/innobase/include/eval0proc.h index 71700bb5933..a93140bf053 100644 --- a/storage/innobase/include/eval0proc.h +++ b/storage/innobase/include/eval0proc.h @@ -89,6 +89,6 @@ return_step( /*========*/ que_thr_t* thr); /*!< in: query thread */ -#include "eval0proc.ic" +#include "eval0proc.inl" #endif diff --git a/storage/innobase/include/eval0proc.ic b/storage/innobase/include/eval0proc.inl index b0c5f75b94e..b0c5f75b94e 100644 --- a/storage/innobase/include/eval0proc.ic +++ b/storage/innobase/include/eval0proc.inl diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h index 8a3023ae134..4182b0a7c9d 100644 --- a/storage/innobase/include/fil0crypt.h +++ b/storage/innobase/include/fil0crypt.h @@ -477,7 +477,7 @@ fil_space_get_scrub_status( const fil_space_t* space, fil_space_scrub_status_t* status); -#include "fil0crypt.ic" +#include "fil0crypt.inl" #endif /* !UNIV_INNOCHECKSUM */ /** diff --git a/storage/innobase/include/fil0crypt.ic b/storage/innobase/include/fil0crypt.inl index cc59b394368..cc59b394368 100644 --- a/storage/innobase/include/fil0crypt.ic +++ b/storage/innobase/include/fil0crypt.inl diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index 604ec51fced..0c0af083a00 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1595,7 +1595,7 @@ UNIV_INTERN ulint fil_space_get_block_size(const fil_space_t* space, unsigned offset); -#include "fil0fil.ic" +#include "fil0fil.inl" #endif /* UNIV_INNOCHECKSUM */ #endif /* fil0fil_h */ diff --git a/storage/innobase/include/fil0fil.ic b/storage/innobase/include/fil0fil.inl index 24e4157d1f3..24e4157d1f3 100644 --- a/storage/innobase/include/fil0fil.ic +++ b/storage/innobase/include/fil0fil.inl diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h index 772577ed20c..16d3274e481 100644 --- a/storage/innobase/include/fsp0fsp.h +++ b/storage/innobase/include/fsp0fsp.h @@ -783,6 +783,6 @@ inline ulint xdes_calc_descriptor_page(ulint zip_size, ulint offset) #endif /* UNIV_INNOCHECKSUM */ -#include "fsp0fsp.ic" +#include "fsp0fsp.inl" #endif diff --git a/storage/innobase/include/fsp0fsp.ic b/storage/innobase/include/fsp0fsp.inl index 31b9d8c5dbe..31b9d8c5dbe 100644 --- a/storage/innobase/include/fsp0fsp.ic +++ b/storage/innobase/include/fsp0fsp.inl diff --git a/storage/innobase/include/fsp0pagecompress.h b/storage/innobase/include/fsp0pagecompress.h index 27423858435..34a132582c6 100644 --- a/storage/innobase/include/fsp0pagecompress.h +++ b/storage/innobase/include/fsp0pagecompress.h @@ -48,6 +48,6 @@ fsp_flags_get_page_compression_level( /*=================================*/ ulint flags); /*!< in: tablespace flags */ -#include "fsp0pagecompress.ic" +#include "fsp0pagecompress.inl" #endif diff --git a/storage/innobase/include/fsp0pagecompress.ic b/storage/innobase/include/fsp0pagecompress.inl index 590a609c309..590a609c309 100644 --- a/storage/innobase/include/fsp0pagecompress.ic +++ b/storage/innobase/include/fsp0pagecompress.inl diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h index 6f00504525f..5517f05f1b6 100644 --- a/storage/innobase/include/fts0priv.h +++ b/storage/innobase/include/fts0priv.h @@ -511,6 +511,6 @@ fts_config_create_index_param_name( const dict_index_t* index) /*!< in: index for config */ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result)); -#include "fts0priv.ic" +#include "fts0priv.inl" #endif /* INNOBASE_FTS0PRIV_H */ diff --git a/storage/innobase/include/fts0priv.ic b/storage/innobase/include/fts0priv.inl index da14cfcb013..da14cfcb013 100644 --- a/storage/innobase/include/fts0priv.ic +++ b/storage/innobase/include/fts0priv.inl diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h index d49bc7c0254..2cddf152d04 100644 --- a/storage/innobase/include/fts0types.h +++ b/storage/innobase/include/fts0types.h @@ -351,6 +351,6 @@ fts_select_index( const byte* str, ulint len); -#include "fts0types.ic" +#include "fts0types.inl" #endif /* INNOBASE_FTS0TYPES_H */ diff --git a/storage/innobase/include/fts0types.ic b/storage/innobase/include/fts0types.inl index ed61726ff80..ed61726ff80 100644 --- a/storage/innobase/include/fts0types.ic +++ b/storage/innobase/include/fts0types.inl diff --git a/storage/innobase/include/fut0lst.h b/storage/innobase/include/fut0lst.h index 9fa928eda23..0782781b8df 100644 --- a/storage/innobase/include/fut0lst.h +++ b/storage/innobase/include/fut0lst.h @@ -195,7 +195,7 @@ flst_validate( const flst_base_node_t* base, /*!< in: pointer to base node of list */ mtr_t* mtr1); /*!< in: mtr */ -#include "fut0lst.ic" +#include "fut0lst.inl" #endif /* !UNIV_INNOCHECKSUM */ diff --git a/storage/innobase/include/fut0lst.ic b/storage/innobase/include/fut0lst.inl index ec4181b2c93..ec4181b2c93 100644 --- a/storage/innobase/include/fut0lst.ic +++ b/storage/innobase/include/fut0lst.inl diff --git a/storage/innobase/include/gis0rtree.h b/storage/innobase/include/gis0rtree.h index 01fcc2943d2..b4646cd357b 100644 --- a/storage/innobase/include/gis0rtree.h +++ b/storage/innobase/include/gis0rtree.h @@ -491,5 +491,5 @@ rtr_estimate_n_rows_in_range( const dtuple_t* tuple, page_cur_mode_t mode); -#include "gis0rtree.ic" +#include "gis0rtree.inl" #endif /*!< gis0rtree.h */ diff --git a/storage/innobase/include/gis0rtree.ic b/storage/innobase/include/gis0rtree.inl index c829f0de255..c829f0de255 100644 --- a/storage/innobase/include/gis0rtree.ic +++ b/storage/innobase/include/gis0rtree.inl diff --git a/storage/innobase/include/ha0ha.h b/storage/innobase/include/ha0ha.h index 1944309c8ec..b4a28e44e04 100644 --- a/storage/innobase/include/ha0ha.h +++ b/storage/innobase/include/ha0ha.h @@ -236,6 +236,6 @@ hash_assert_can_search( #define hash_assert_can_search(t, f) #endif /* UNIV_DEBUG */ -#include "ha0ha.ic" +#include "ha0ha.inl" #endif diff --git a/storage/innobase/include/ha0ha.ic b/storage/innobase/include/ha0ha.inl index 0612ef1bb25..0612ef1bb25 100644 --- a/storage/innobase/include/ha0ha.ic +++ b/storage/innobase/include/ha0ha.inl diff --git a/storage/innobase/include/ha0storage.h b/storage/innobase/include/ha0storage.h index db23ddc66ed..fdf50a2ee4a 100644 --- a/storage/innobase/include/ha0storage.h +++ b/storage/innobase/include/ha0storage.h @@ -132,6 +132,6 @@ ha_storage_get_size( /*================*/ const ha_storage_t* storage); /*!< in: hash storage */ -#include "ha0storage.ic" +#include "ha0storage.inl" #endif /* ha0storage_h */ diff --git a/storage/innobase/include/ha0storage.ic b/storage/innobase/include/ha0storage.inl index 8cc487faf47..8cc487faf47 100644 --- a/storage/innobase/include/ha0storage.ic +++ b/storage/innobase/include/ha0storage.inl diff --git a/storage/innobase/include/hash0hash.h b/storage/innobase/include/hash0hash.h index 4f55b051d80..e2565c62169 100644 --- a/storage/innobase/include/hash0hash.h +++ b/storage/innobase/include/hash0hash.h @@ -520,6 +520,6 @@ struct hash_table_t { #endif /* UNIV_DEBUG */ }; -#include "hash0hash.ic" +#include "hash0hash.inl" #endif diff --git a/storage/innobase/include/hash0hash.ic b/storage/innobase/include/hash0hash.inl index d6dd104572f..d6dd104572f 100644 --- a/storage/innobase/include/hash0hash.ic +++ b/storage/innobase/include/hash0hash.inl diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h index 45d674f2c02..73f7054c9fb 100644 --- a/storage/innobase/include/ibuf0ibuf.h +++ b/storage/innobase/include/ibuf0ibuf.h @@ -416,6 +416,6 @@ for the file segment from which the pages for the ibuf tree are allocated */ /* The insert buffer tree itself is always located in space 0. */ #define IBUF_SPACE_ID static_cast<ulint>(0) -#include "ibuf0ibuf.ic" +#include "ibuf0ibuf.inl" #endif diff --git a/storage/innobase/include/ibuf0ibuf.ic b/storage/innobase/include/ibuf0ibuf.inl index db8c122c0f7..db8c122c0f7 100644 --- a/storage/innobase/include/ibuf0ibuf.ic +++ b/storage/innobase/include/ibuf0ibuf.inl diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 53e8761971d..9c3f5d57f01 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -1047,6 +1047,6 @@ lock_get_info( #endif /* WITH_WSREP */ -#include "lock0lock.ic" +#include "lock0lock.inl" #endif diff --git a/storage/innobase/include/lock0lock.ic b/storage/innobase/include/lock0lock.inl index abe5052627b..abe5052627b 100644 --- a/storage/innobase/include/lock0lock.ic +++ b/storage/innobase/include/lock0lock.inl diff --git a/storage/innobase/include/lock0priv.h b/storage/innobase/include/lock0priv.h index 1a950ac1cfa..b7dcbfa2b86 100644 --- a/storage/innobase/include/lock0priv.h +++ b/storage/innobase/include/lock0priv.h @@ -685,6 +685,6 @@ inline void lock_reset_lock_and_trx_wait(lock_t* lock) lock->type_mode &= ~LOCK_WAIT; } -#include "lock0priv.ic" +#include "lock0priv.inl" #endif /* lock0priv_h */ diff --git a/storage/innobase/include/lock0priv.ic b/storage/innobase/include/lock0priv.inl index 8bb145e41fc..8bb145e41fc 100644 --- a/storage/innobase/include/lock0priv.ic +++ b/storage/innobase/include/lock0priv.inl diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index fb027e1a823..477bb0a1d05 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -803,6 +803,6 @@ extern os_event_t log_scrub_event; /** Whether log_scrub_thread is active */ extern bool log_scrub_thread_active; -#include "log0log.ic" +#include "log0log.inl" #endif diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.inl index 8dfd86d3078..8dfd86d3078 100644 --- a/storage/innobase/include/log0log.ic +++ b/storage/innobase/include/log0log.inl diff --git a/storage/innobase/include/mach0data.h b/storage/innobase/include/mach0data.h index 7b776759a67..d160ddbcb9e 100644 --- a/storage/innobase/include/mach0data.h +++ b/storage/innobase/include/mach0data.h @@ -389,6 +389,6 @@ mach_write_ulonglong( #endif /* !UNIV_INNOCHECKSUM */ -#include "mach0data.ic" +#include "mach0data.inl" #endif diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.inl index 80bd925d70b..80bd925d70b 100644 --- a/storage/innobase/include/mach0data.ic +++ b/storage/innobase/include/mach0data.inl diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h index 18ae845955a..3f0db717be8 100644 --- a/storage/innobase/include/mem0mem.h +++ b/storage/innobase/include/mem0mem.h @@ -343,5 +343,5 @@ struct mem_block_info_t { #define MEM_BLOCK_HEADER_SIZE UT_CALC_ALIGN(sizeof(mem_block_info_t),\ UNIV_MEM_ALIGNMENT) -#include "mem0mem.ic" +#include "mem0mem.inl" #endif diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.inl index 9236bbef05d..9236bbef05d 100644 --- a/storage/innobase/include/mem0mem.ic +++ b/storage/innobase/include/mem0mem.inl diff --git a/storage/innobase/include/mtr0log.h b/storage/innobase/include/mtr0log.h index 0c58f524015..d8060d106d6 100644 --- a/storage/innobase/include/mtr0log.h +++ b/storage/innobase/include/mtr0log.h @@ -252,6 +252,6 @@ mlog_parse_index( extra mlog buffer size for variable size data */ #define MLOG_BUF_MARGIN 256 -#include "mtr0log.ic" +#include "mtr0log.inl" #endif /* mtr0log_h */ diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.inl index 70bcaf43b9e..70bcaf43b9e 100644 --- a/storage/innobase/include/mtr0log.ic +++ b/storage/innobase/include/mtr0log.inl diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 08e7deb052b..f8a15aef7f9 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -486,6 +486,6 @@ private: lsn_t m_commit_lsn; }; -#include "mtr0mtr.ic" +#include "mtr0mtr.inl" #endif /* mtr0mtr_h */ diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.inl index c35de2bcbf9..c35de2bcbf9 100644 --- a/storage/innobase/include/mtr0mtr.ic +++ b/storage/innobase/include/mtr0mtr.inl diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 6ea3e3d399d..b301fcf5dfa 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -1566,6 +1566,6 @@ is_absolute_path( return(false); } -#include "os0file.ic" +#include "os0file.inl" #endif /* os0file_h */ diff --git a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0file.inl index e01fcb41afb..e01fcb41afb 100644 --- a/storage/innobase/include/os0file.ic +++ b/storage/innobase/include/os0file.inl diff --git a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h index 3cba50947a7..1de6952b7eb 100644 --- a/storage/innobase/include/page0cur.h +++ b/storage/innobase/include/page0cur.h @@ -397,6 +397,6 @@ struct page_cur_t{ buf_block_t* block; /*!< pointer to the block containing rec */ }; -#include "page0cur.ic" +#include "page0cur.inl" #endif diff --git a/storage/innobase/include/page0cur.ic b/storage/innobase/include/page0cur.inl index e53f6d8f463..e53f6d8f463 100644 --- a/storage/innobase/include/page0cur.ic +++ b/storage/innobase/include/page0cur.inl diff --git a/storage/innobase/include/page0page.h b/storage/innobase/include/page0page.h index 34792c27b68..e80a9a050fe 100644 --- a/storage/innobase/include/page0page.h +++ b/storage/innobase/include/page0page.h @@ -1307,6 +1307,6 @@ page_find_rec_max_not_deleted( #endif /* !UNIV_INNOCHECKSUM */ -#include "page0page.ic" +#include "page0page.inl" #endif diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.inl index 04e850ea301..04e850ea301 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.inl diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h index ec205fd79bf..4c2c88e6de0 100644 --- a/storage/innobase/include/page0zip.h +++ b/storage/innobase/include/page0zip.h @@ -531,7 +531,7 @@ void page_zip_reset_stat_per_index(); /*===========================*/ -#include "page0zip.ic" +#include "page0zip.inl" #endif /* !UNIV_INNOCHECKSUM */ #endif /* page0zip_h */ diff --git a/storage/innobase/include/page0zip.ic b/storage/innobase/include/page0zip.inl index 337debd30e9..337debd30e9 100644 --- a/storage/innobase/include/page0zip.ic +++ b/storage/innobase/include/page0zip.inl diff --git a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h index f018f73527d..594219bd5d9 100644 --- a/storage/innobase/include/que0que.h +++ b/storage/innobase/include/que0que.h @@ -431,6 +431,6 @@ struct que_fork_t{ /* Flag which is ORed to control structure statement node types */ #define QUE_NODE_CONTROL_STAT 1024 -#include "que0que.ic" +#include "que0que.inl" #endif diff --git a/storage/innobase/include/que0que.ic b/storage/innobase/include/que0que.inl index 1c3ac242bf2..1c3ac242bf2 100644 --- a/storage/innobase/include/que0que.ic +++ b/storage/innobase/include/que0que.inl diff --git a/storage/innobase/include/rem0cmp.h b/storage/innobase/include/rem0cmp.h index 65504d14416..43319e4c4d0 100644 --- a/storage/innobase/include/rem0cmp.h +++ b/storage/innobase/include/rem0cmp.h @@ -231,6 +231,6 @@ cmp_dfield_dfield_like_prefix( const dfield_t* dfield1, const dfield_t* dfield2); -#include "rem0cmp.ic" +#include "rem0cmp.inl" #endif diff --git a/storage/innobase/include/rem0cmp.ic b/storage/innobase/include/rem0cmp.inl index 4230543615a..4230543615a 100644 --- a/storage/innobase/include/rem0cmp.ic +++ b/storage/innobase/include/rem0cmp.inl diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h index 34e7c5f1b0f..23956dcb068 100644 --- a/storage/innobase/include/rem0rec.h +++ b/storage/innobase/include/rem0rec.h @@ -1390,7 +1390,7 @@ int wsrep_rec_get_foreign_key( ibool new_protocol); /* in: protocol > 1 */ #endif /* WITH_WSREP */ -#include "rem0rec.ic" +#include "rem0rec.inl" #endif /* !UNIV_INNOCHECKSUM */ #endif /* rem0rec_h */ diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.inl index 6cecd9f1f08..6cecd9f1f08 100644 --- a/storage/innobase/include/rem0rec.ic +++ b/storage/innobase/include/rem0rec.inl diff --git a/storage/innobase/include/row0ext.h b/storage/innobase/include/row0ext.h index 251f3125667..78886332aa6 100644 --- a/storage/innobase/include/row0ext.h +++ b/storage/innobase/include/row0ext.h @@ -96,6 +96,6 @@ struct row_ext_t{ ulint len[1]; /*!< prefix lengths; 0 if not cached */ }; -#include "row0ext.ic" +#include "row0ext.inl" #endif diff --git a/storage/innobase/include/row0ext.ic b/storage/innobase/include/row0ext.inl index 913b51b34d2..913b51b34d2 100644 --- a/storage/innobase/include/row0ext.ic +++ b/storage/innobase/include/row0ext.inl diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h index 93aa5c24230..35826e2f4d5 100644 --- a/storage/innobase/include/row0log.h +++ b/storage/innobase/include/row0log.h @@ -263,6 +263,6 @@ row_log_estimate_work( const dict_index_t* index); #endif /* HAVE_PSI_STAGE_INTERFACE */ -#include "row0log.ic" +#include "row0log.inl" #endif /* row0log.h */ diff --git a/storage/innobase/include/row0log.ic b/storage/innobase/include/row0log.inl index 44d17bbcdf1..44d17bbcdf1 100644 --- a/storage/innobase/include/row0log.ic +++ b/storage/innobase/include/row0log.inl diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h index b4dab3c2f1b..1e0fdc65238 100644 --- a/storage/innobase/include/row0row.h +++ b/storage/innobase/include/row0row.h @@ -427,6 +427,6 @@ row_mtr_start(mtr_t* mtr, dict_index_t* index, bool pessimistic) log_free_check(); } -#include "row0row.ic" +#include "row0row.inl" #endif diff --git a/storage/innobase/include/row0row.ic b/storage/innobase/include/row0row.inl index e89adb581f4..e89adb581f4 100644 --- a/storage/innobase/include/row0row.ic +++ b/storage/innobase/include/row0row.inl diff --git a/storage/innobase/include/row0sel.h b/storage/innobase/include/row0sel.h index 717e1a2be0b..a683a2178e4 100644 --- a/storage/innobase/include/row0sel.h +++ b/storage/innobase/include/row0sel.h @@ -477,6 +477,6 @@ row_sel_field_store_in_mysql_format_func( const byte* data, /*!< in: data to store */ ulint len); /*!< in: length of the data */ -#include "row0sel.ic" +#include "row0sel.inl" #endif diff --git a/storage/innobase/include/row0sel.ic b/storage/innobase/include/row0sel.inl index 7880605ca8f..7880605ca8f 100644 --- a/storage/innobase/include/row0sel.ic +++ b/storage/innobase/include/row0sel.inl diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h index 2b06d406296..2615bf55a04 100644 --- a/storage/innobase/include/row0upd.h +++ b/storage/innobase/include/row0upd.h @@ -638,6 +638,6 @@ public: changed in the update */ -#include "row0upd.ic" +#include "row0upd.inl" #endif diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.inl index fffb7650da3..fffb7650da3 100644 --- a/storage/innobase/include/row0upd.ic +++ b/storage/innobase/include/row0upd.inl diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index 934f88ac8ae..bfc24f43441 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -904,6 +904,6 @@ void srv_mon_default_on(void); /*====================*/ -#include "srv0mon.ic" +#include "srv0mon.inl" #endif diff --git a/storage/innobase/include/srv0mon.ic b/storage/innobase/include/srv0mon.inl index 158345b2f8c..158345b2f8c 100644 --- a/storage/innobase/include/srv0mon.ic +++ b/storage/innobase/include/srv0mon.inl diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index e08a54eac7b..40b382e8721 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -362,10 +362,6 @@ extern my_bool srv_load_corrupted; /** Requested size in bytes */ extern ulint srv_buf_pool_size; -/** Minimum pool size in bytes */ -extern const ulint srv_buf_pool_min_size; -/** Default pool size in bytes */ -extern const ulint srv_buf_pool_def_size; /** Requested buffer pool chunk size. Each buffer pool instance consists of one or more chunks. */ extern ulong srv_buf_pool_chunk_unit; diff --git a/storage/innobase/include/sync0arr.h b/storage/innobase/include/sync0arr.h index e4186b74370..99f980e28e0 100644 --- a/storage/innobase/include/sync0arr.h +++ b/storage/innobase/include/sync0arr.h @@ -125,6 +125,6 @@ sync_array_get_nth_cell( sync_array_t* arr, /*!< in: sync array */ ulint n); /*!< in: index */ -#include "sync0arr.ic" +#include "sync0arr.inl" #endif /* sync0arr_h */ diff --git a/storage/innobase/include/sync0arr.ic b/storage/innobase/include/sync0arr.inl index 962226b4934..962226b4934 100644 --- a/storage/innobase/include/sync0arr.ic +++ b/storage/innobase/include/sync0arr.inl diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h index 948a5442c53..87d123fc7a9 100644 --- a/storage/innobase/include/sync0rw.h +++ b/storage/innobase/include/sync0rw.h @@ -835,6 +835,6 @@ pfs_rw_lock_free_func( rw_lock_t* lock); /*!< in: rw-lock */ #endif /* UNIV_PFS_RWLOCK */ -#include "sync0rw.ic" +#include "sync0rw.inl" #endif /* sync0rw.h */ diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.inl index 603e902d01c..603e902d01c 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.inl diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index 4c0528ba5ec..a5a27555f5d 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -274,6 +274,6 @@ struct trx_purge_rec_t { roll_ptr_t roll_ptr; /*!< File pointr to UNDO record */ }; -#include "trx0purge.ic" +#include "trx0purge.inl" #endif /* trx0purge_h */ diff --git a/storage/innobase/include/trx0purge.ic b/storage/innobase/include/trx0purge.inl index e460676d58e..e460676d58e 100644 --- a/storage/innobase/include/trx0purge.ic +++ b/storage/innobase/include/trx0purge.inl diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index f27d8af0368..fa084ff274c 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -327,6 +327,6 @@ record */ /** The search tuple corresponding to TRX_UNDO_INSERT_METADATA */ extern const dtuple_t trx_undo_metadata; -#include "trx0rec.ic" +#include "trx0rec.inl" #endif /* trx0rec_h */ diff --git a/storage/innobase/include/trx0rec.ic b/storage/innobase/include/trx0rec.inl index 02244d68b6f..02244d68b6f 100644 --- a/storage/innobase/include/trx0rec.ic +++ b/storage/innobase/include/trx0rec.inl diff --git a/storage/innobase/include/trx0rseg.h b/storage/innobase/include/trx0rseg.h index 27548e96b0a..32153f82198 100644 --- a/storage/innobase/include/trx0rseg.h +++ b/storage/innobase/include/trx0rseg.h @@ -304,6 +304,6 @@ up to which replication has proceeded. void trx_rseg_update_binlog_offset(byte* rseg_header, const trx_t* trx, mtr_t* mtr); -#include "trx0rseg.ic" +#include "trx0rseg.inl" #endif diff --git a/storage/innobase/include/trx0rseg.ic b/storage/innobase/include/trx0rseg.inl index 0cff8fa1f5c..0cff8fa1f5c 100644 --- a/storage/innobase/include/trx0rseg.ic +++ b/storage/innobase/include/trx0rseg.inl diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index fa5ad1422e5..b84f458374e 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -1158,6 +1158,6 @@ struct commit_node_t{ mutex_exit(&t->mutex); \ } while (0) -#include "trx0trx.ic" +#include "trx0trx.inl" #endif diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.inl index 72310cbba06..72310cbba06 100644 --- a/storage/innobase/include/trx0trx.ic +++ b/storage/innobase/include/trx0trx.inl diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h index 6b043112af0..55b73f45faa 100644 --- a/storage/innobase/include/trx0undo.h +++ b/storage/innobase/include/trx0undo.h @@ -497,7 +497,7 @@ quite a large overhead. */ with the XA XID */ /* @} */ -#include "trx0undo.ic" +#include "trx0undo.inl" #endif /* !UNIV_INNOCHECKSUM */ #endif diff --git a/storage/innobase/include/trx0undo.ic b/storage/innobase/include/trx0undo.inl index 6d1ec16869e..6d1ec16869e 100644 --- a/storage/innobase/include/trx0undo.ic +++ b/storage/innobase/include/trx0undo.inl diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index f1e355ade4d..ddb27c107ff 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2021, MariaDB Corporation. +Copyright (c) 2013, 2022, MariaDB Corporation. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by diff --git a/storage/innobase/include/ut0byte.h b/storage/innobase/include/ut0byte.h index 4ce931e0189..1a90b523b2d 100644 --- a/storage/innobase/include/ut0byte.h +++ b/storage/innobase/include/ut0byte.h @@ -112,6 +112,6 @@ ut_bit_set_nth( ulint n, /*!< in: nth bit requested */ ibool val); /*!< in: value for the bit to set */ -#include "ut0byte.ic" +#include "ut0byte.inl" #endif diff --git a/storage/innobase/include/ut0byte.ic b/storage/innobase/include/ut0byte.inl index 6dd48090c3a..6dd48090c3a 100644 --- a/storage/innobase/include/ut0byte.ic +++ b/storage/innobase/include/ut0byte.inl diff --git a/storage/innobase/include/ut0list.h b/storage/innobase/include/ut0list.h index 7e27e10884b..765f6a2a339 100644 --- a/storage/innobase/include/ut0list.h +++ b/storage/innobase/include/ut0list.h @@ -141,6 +141,6 @@ struct ib_list_helper_t { void* data; /*!< user data */ }; -#include "ut0list.ic" +#include "ut0list.inl" #endif diff --git a/storage/innobase/include/ut0list.ic b/storage/innobase/include/ut0list.inl index 3bdba52bfaa..3bdba52bfaa 100644 --- a/storage/innobase/include/ut0list.ic +++ b/storage/innobase/include/ut0list.inl diff --git a/storage/innobase/include/ut0mem.h b/storage/innobase/include/ut0mem.h index 32d557d4f2a..99811c400da 100644 --- a/storage/innobase/include/ut0mem.h +++ b/storage/innobase/include/ut0mem.h @@ -126,6 +126,6 @@ ut_str_sql_format( ulint buf_size); /*!< in: output buffer size in bytes */ -#include "ut0mem.ic" +#include "ut0mem.inl" #endif diff --git a/storage/innobase/include/ut0mem.ic b/storage/innobase/include/ut0mem.inl index 8c8788a38aa..8c8788a38aa 100644 --- a/storage/innobase/include/ut0mem.ic +++ b/storage/innobase/include/ut0mem.inl diff --git a/storage/innobase/include/ut0rnd.h b/storage/innobase/include/ut0rnd.h index 5b1ae5bc0da..dba8d3f1a06 100644 --- a/storage/innobase/include/ut0rnd.h +++ b/storage/innobase/include/ut0rnd.h @@ -132,6 +132,6 @@ ut_fold_binary( ulint len) /*!< in: length */ MY_ATTRIBUTE((pure)); -#include "ut0rnd.ic" +#include "ut0rnd.inl" #endif diff --git a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.inl index c0105160a42..c0105160a42 100644 --- a/storage/innobase/include/ut0rnd.ic +++ b/storage/innobase/include/ut0rnd.inl diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h index 807d99fb872..7031fc47f6a 100644 --- a/storage/innobase/include/ut0ut.h +++ b/storage/innobase/include/ut0ut.h @@ -455,7 +455,7 @@ private: } // namespace ib -#include "ut0ut.ic" +#include "ut0ut.inl" #endif diff --git a/storage/innobase/include/ut0ut.ic b/storage/innobase/include/ut0ut.inl index 73feaf82c6a..73feaf82c6a 100644 --- a/storage/innobase/include/ut0ut.ic +++ b/storage/innobase/include/ut0ut.inl diff --git a/storage/innobase/include/ut0vec.h b/storage/innobase/include/ut0vec.h index cfdaee607be..f4660f9646c 100644 --- a/storage/innobase/include/ut0vec.h +++ b/storage/innobase/include/ut0vec.h @@ -280,6 +280,6 @@ struct ib_vector_t { ulint sizeof_value; }; -#include "ut0vec.ic" +#include "ut0vec.inl" #endif /* IB_VECTOR_H */ diff --git a/storage/innobase/include/ut0vec.ic b/storage/innobase/include/ut0vec.inl index 531f0f22ae0..531f0f22ae0 100644 --- a/storage/innobase/include/ut0vec.ic +++ b/storage/innobase/include/ut0vec.inl diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index e29684f6081..cd8e46fe623 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1342,15 +1342,7 @@ row_import::match_schema( { /* Do some simple checks. */ - if (m_table->n_cols != m_n_cols) { - ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH, - "Number of columns don't match, table has %u " - "columns but the tablespace meta-data file has " - ULINTPF " columns", - m_table->n_cols, m_n_cols); - - return(DB_ERROR); - } else if (UT_LIST_GET_LEN(m_table->indexes) != m_n_indexes) { + if (UT_LIST_GET_LEN(m_table->indexes) != m_n_indexes) { /* If the number of indexes don't match then it is better to abort the IMPORT. It is easy for the user to create a diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 8934a393a1d..2bfb1ffcd1d 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -216,9 +216,6 @@ UNIV_INTERN os_event_t srv_allow_writes_event; /** copy of innodb_buffer_pool_size */ ulint srv_buf_pool_size; -const ulint srv_buf_pool_min_size = 5 * 1024 * 1024; -/** Default pool size in bytes */ -const ulint srv_buf_pool_def_size = 128 * 1024 * 1024; /** Requested buffer pool chunk size. Each buffer pool instance consists of one or more chunks. */ ulong srv_buf_pool_chunk_unit; diff --git a/storage/maria/ma_ft_boolean_search.c b/storage/maria/ma_ft_boolean_search.c index 70ab6b2e3f6..7fe6d8ca2cc 100644 --- a/storage/maria/ma_ft_boolean_search.c +++ b/storage/maria/ma_ft_boolean_search.c @@ -195,11 +195,7 @@ static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param, switch (info->type) { case FT_TOKEN_WORD: ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root, - sizeof(FTB_WORD) + - (info->trunc ? MARIA_MAX_KEY_BUFF : - word_len * ftb_param->ftb->charset->mbmaxlen + - HA_FT_WLEN + - ftb_param->ftb->info->s->rec_reflength)); + sizeof(FTB_WORD) + HA_MAX_KEY_BUFF); ftbw->len= word_len + 1; ftbw->flags= 0; ftbw->off= 0; diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index 2af53142fc7..de0f7a111fc 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -129,7 +129,8 @@ SET(ROCKSDB_SE_SOURCES # This is a strong requirement coming from RocksDB. No conditional checks here. #ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX #) -if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64") + +if (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) SET(ATOMIC_EXTRA_LIBS -latomic) else() SET(ATOMIC_EXTRA_LIBS) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index b4fcb097b71..ce9bb7d49e2 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -637,6 +637,8 @@ static my_bool rocksdb_large_prefix = 0; static my_bool rocksdb_allow_to_start_after_corruption = 0; static char* rocksdb_git_hash; +uint32_t rocksdb_ignore_datadic_errors = 0; + char *compression_types_val= const_cast<char*>(get_rocksdb_supported_compression_types()); static unsigned long rocksdb_write_policy = @@ -1907,6 +1909,15 @@ static MYSQL_SYSVAR_UINT( nullptr, nullptr, 1 /* default value */, 0 /* min value */, 2 /* max value */, 0); +static MYSQL_SYSVAR_UINT( + ignore_datadic_errors, rocksdb_ignore_datadic_errors, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Ignore MyRocks' data directory errors. " + "(CAUTION: Use only to start the server and perform repairs. Do NOT use " + "for regular operation)", + nullptr, nullptr, 0 /* default value */, 0 /* min value */, + 1 /* max value */, 0); + static MYSQL_SYSVAR_STR(datadir, rocksdb_datadir, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, "RocksDB data directory", nullptr, nullptr, @@ -2142,6 +2153,8 @@ static struct st_mysql_sys_var *rocksdb_system_variables[] = { MYSQL_SYSVAR(rollback_on_timeout), MYSQL_SYSVAR(enable_insert_with_update_caching), + + MYSQL_SYSVAR(ignore_datadic_errors), nullptr}; static rocksdb::WriteOptions rdb_get_rocksdb_write_options( @@ -5204,6 +5217,13 @@ static int rocksdb_init_func(void *const p) { DBUG_RETURN(1); } + if (rocksdb_ignore_datadic_errors) + { + sql_print_information( + "CAUTION: Running with rocksdb_ignore_datadic_errors=1. " + " This should only be used to perform repairs"); + } + if (rdb_check_rocksdb_corruption()) { // NO_LINT_DEBUG sql_print_error( @@ -5635,7 +5655,14 @@ static int rocksdb_init_func(void *const p) { if (ddl_manager.init(&dict_manager, &cf_manager, rocksdb_validate_tables)) { // NO_LINT_DEBUG sql_print_error("RocksDB: Failed to initialize DDL manager."); - DBUG_RETURN(HA_EXIT_FAILURE); + + if (rocksdb_ignore_datadic_errors) + { + sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, " + "trying to continue"); + } + else + DBUG_RETURN(HA_EXIT_FAILURE); } Rdb_sst_info::init(rdb); @@ -6699,6 +6726,26 @@ int ha_rocksdb::open(const char *const name, int mode, uint test_if_locked) { "dictionary"); DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE); } + if (m_tbl_def->m_key_count != table->s->keys + has_hidden_pk(table)? 1:0) + { + sql_print_error("MyRocks: DDL mismatch: .frm file has %u indexes, " + "MyRocks has %u (%s hidden pk)", + table->s->keys, m_tbl_def->m_key_count, + has_hidden_pk(table)? "1" : "no"); + + if (rocksdb_ignore_datadic_errors) + { + sql_print_error("MyRocks: rocksdb_ignore_datadic_errors=1, " + "trying to continue"); + } + else + { + my_error(ER_INTERNAL_ERROR, MYF(0), + "MyRocks: DDL mismatch. Check the error log for details"); + DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE); + } + } + m_lock_rows = RDB_LOCK_NONE; m_key_descr_arr = m_tbl_def->m_key_descr_arr; @@ -11593,6 +11640,12 @@ void Rdb_drop_index_thread::run() { "from cf id %u. MyRocks data dictionary may " "get corrupted.", d.cf_id); + if (rocksdb_ignore_datadic_errors) + { + sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, " + "trying to continue"); + continue; + } abort(); } rocksdb::ColumnFamilyHandle *cfh = cf_manager.get_cf(d.cf_id); diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h index 270c8c6f319..766b04ac7d2 100644 --- a/storage/rocksdb/ha_rocksdb.h +++ b/storage/rocksdb/ha_rocksdb.h @@ -1060,6 +1060,8 @@ const int MYROCKS_MARIADB_PLUGIN_MATURITY_LEVEL= MariaDB_PLUGIN_MATURITY_STABLE; extern bool prevent_myrocks_loading; +extern uint32_t rocksdb_ignore_datadic_errors; + void sql_print_verbose_info(const char *format, ...); } // namespace myrocks diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result index e5a8d2dd2d3..b3df869a0a7 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result @@ -157,13 +157,13 @@ Warning 1265 Data truncated for column 'v64' at row 1 Warning 1265 Data truncated for column 'v65000' at row 1 INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'v0' at row 5 -Warning 1265 Data truncated for column 'v1' at row 5 -Warning 1265 Data truncated for column 'v64' at row 5 -Warning 1265 Data truncated for column 'v0' at row 6 -Warning 1265 Data truncated for column 'v1' at row 6 -Warning 1265 Data truncated for column 'v64' at row 6 -Warning 1265 Data truncated for column 'v65000' at row 6 +Warning 1265 Data truncated for column 'v0' at row 2 +Warning 1265 Data truncated for column 'v1' at row 2 +Warning 1265 Data truncated for column 'v64' at row 2 +Warning 1265 Data truncated for column 'v0' at row 3 +Warning 1265 Data truncated for column 'v1' at row 3 +Warning 1265 Data truncated for column 'v64' at row 3 +Warning 1265 Data truncated for column 'v65000' at row 3 SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1; HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000)) 0 @@ -675,15 +675,15 @@ Warning 1265 Data truncated for column 'c20' at row 1 Warning 1265 Data truncated for column 'c255' at row 1 INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'c' at row 5 -Warning 1265 Data truncated for column 'c0' at row 5 -Warning 1265 Data truncated for column 'c1' at row 5 -Warning 1265 Data truncated for column 'c20' at row 5 -Warning 1265 Data truncated for column 'c' at row 6 -Warning 1265 Data truncated for column 'c0' at row 6 -Warning 1265 Data truncated for column 'c1' at row 6 -Warning 1265 Data truncated for column 'c20' at row 6 -Warning 1265 Data truncated for column 'c255' at row 6 +Warning 1265 Data truncated for column 'c' at row 2 +Warning 1265 Data truncated for column 'c0' at row 2 +Warning 1265 Data truncated for column 'c1' at row 2 +Warning 1265 Data truncated for column 'c20' at row 2 +Warning 1265 Data truncated for column 'c' at row 3 +Warning 1265 Data truncated for column 'c0' at row 3 +Warning 1265 Data truncated for column 'c1' at row 3 +Warning 1265 Data truncated for column 'c20' at row 3 +Warning 1265 Data truncated for column 'c255' at row 3 SELECT c,c0,c1,c20,c255 FROM t1; c c0 c1 c20 c255 @@ -845,13 +845,13 @@ Warning 1265 Data truncated for column 'v64' at row 1 Warning 1265 Data truncated for column 'v65000' at row 1 INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'v0' at row 5 -Warning 1265 Data truncated for column 'v1' at row 5 -Warning 1265 Data truncated for column 'v64' at row 5 -Warning 1265 Data truncated for column 'v65000' at row 5 -Warning 1265 Data truncated for column 'v0' at row 6 -Warning 1265 Data truncated for column 'v1' at row 6 -Warning 1265 Data truncated for column 'v64' at row 6 +Warning 1265 Data truncated for column 'v0' at row 2 +Warning 1265 Data truncated for column 'v1' at row 2 +Warning 1265 Data truncated for column 'v64' at row 2 +Warning 1265 Data truncated for column 'v65000' at row 2 +Warning 1265 Data truncated for column 'v0' at row 3 +Warning 1265 Data truncated for column 'v1' at row 3 +Warning 1265 Data truncated for column 'v64' at row 3 SELECT v0, v1, v64, LENGTH(v65000) FROM t1; v0 v1 v64 LENGTH(v65000) 0 @@ -2038,70 +2038,70 @@ Warning 1264 Out of range value for column 'b1' at row 1 Warning 1264 Out of range value for column 'b20' at row 1 INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615); Warnings: -Warning 1264 Out of range value for column 'i' at row 8 -Warning 1264 Out of range value for column 'i0' at row 8 -Warning 1264 Out of range value for column 'i1' at row 8 -Warning 1264 Out of range value for column 'i20' at row 8 -Warning 1264 Out of range value for column 't' at row 8 -Warning 1264 Out of range value for column 't0' at row 8 -Warning 1264 Out of range value for column 't1' at row 8 -Warning 1264 Out of range value for column 't20' at row 8 -Warning 1264 Out of range value for column 's' at row 8 -Warning 1264 Out of range value for column 's0' at row 8 -Warning 1264 Out of range value for column 's1' at row 8 -Warning 1264 Out of range value for column 's20' at row 8 -Warning 1264 Out of range value for column 'm' at row 8 -Warning 1264 Out of range value for column 'm0' at row 8 -Warning 1264 Out of range value for column 'm1' at row 8 -Warning 1264 Out of range value for column 'm20' at row 8 -Warning 1264 Out of range value for column 'i' at row 9 -Warning 1264 Out of range value for column 'i0' at row 9 -Warning 1264 Out of range value for column 'i1' at row 9 -Warning 1264 Out of range value for column 'i20' at row 9 -Warning 1264 Out of range value for column 't' at row 9 -Warning 1264 Out of range value for column 't0' at row 9 -Warning 1264 Out of range value for column 't1' at row 9 -Warning 1264 Out of range value for column 't20' at row 9 -Warning 1264 Out of range value for column 's' at row 9 -Warning 1264 Out of range value for column 's0' at row 9 -Warning 1264 Out of range value for column 's1' at row 9 -Warning 1264 Out of range value for column 's20' at row 9 -Warning 1264 Out of range value for column 'm' at row 9 -Warning 1264 Out of range value for column 'm0' at row 9 -Warning 1264 Out of range value for column 'm1' at row 9 -Warning 1264 Out of range value for column 'm20' at row 9 -Warning 1264 Out of range value for column 'i' at row 10 -Warning 1264 Out of range value for column 'i0' at row 10 -Warning 1264 Out of range value for column 'i1' at row 10 -Warning 1264 Out of range value for column 'i20' at row 10 -Warning 1264 Out of range value for column 't' at row 10 -Warning 1264 Out of range value for column 't0' at row 10 -Warning 1264 Out of range value for column 't1' at row 10 -Warning 1264 Out of range value for column 't20' at row 10 -Warning 1264 Out of range value for column 's' at row 10 -Warning 1264 Out of range value for column 's0' at row 10 -Warning 1264 Out of range value for column 's1' at row 10 -Warning 1264 Out of range value for column 's20' at row 10 -Warning 1264 Out of range value for column 'm' at row 10 -Warning 1264 Out of range value for column 'm0' at row 10 -Warning 1264 Out of range value for column 'm1' at row 10 -Warning 1264 Out of range value for column 'm20' at row 10 -Warning 1264 Out of range value for column 'i' at row 11 -Warning 1264 Out of range value for column 'i0' at row 11 -Warning 1264 Out of range value for column 'i1' at row 11 -Warning 1264 Out of range value for column 'i20' at row 11 -Warning 1264 Out of range value for column 't' at row 11 -Warning 1264 Out of range value for column 't0' at row 11 -Warning 1264 Out of range value for column 't1' at row 11 -Warning 1264 Out of range value for column 't20' at row 11 -Warning 1264 Out of range value for column 's' at row 11 -Warning 1264 Out of range value for column 's0' at row 11 -Warning 1264 Out of range value for column 's1' at row 11 -Warning 1264 Out of range value for column 's20' at row 11 -Warning 1264 Out of range value for column 'm' at row 11 -Warning 1264 Out of range value for column 'm0' at row 11 -Warning 1264 Out of range value for column 'm1' at row 11 -Warning 1264 Out of range value for column 'm20' at row 11 +Warning 1264 Out of range value for column 'i' at row 1 +Warning 1264 Out of range value for column 'i0' at row 1 +Warning 1264 Out of range value for column 'i1' at row 1 +Warning 1264 Out of range value for column 'i20' at row 1 +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 't0' at row 1 +Warning 1264 Out of range value for column 't1' at row 1 +Warning 1264 Out of range value for column 't20' at row 1 +Warning 1264 Out of range value for column 's' at row 1 +Warning 1264 Out of range value for column 's0' at row 1 +Warning 1264 Out of range value for column 's1' at row 1 +Warning 1264 Out of range value for column 's20' at row 1 +Warning 1264 Out of range value for column 'm' at row 1 +Warning 1264 Out of range value for column 'm0' at row 1 +Warning 1264 Out of range value for column 'm1' at row 1 +Warning 1264 Out of range value for column 'm20' at row 1 +Warning 1264 Out of range value for column 'i' at row 2 +Warning 1264 Out of range value for column 'i0' at row 2 +Warning 1264 Out of range value for column 'i1' at row 2 +Warning 1264 Out of range value for column 'i20' at row 2 +Warning 1264 Out of range value for column 't' at row 2 +Warning 1264 Out of range value for column 't0' at row 2 +Warning 1264 Out of range value for column 't1' at row 2 +Warning 1264 Out of range value for column 't20' at row 2 +Warning 1264 Out of range value for column 's' at row 2 +Warning 1264 Out of range value for column 's0' at row 2 +Warning 1264 Out of range value for column 's1' at row 2 +Warning 1264 Out of range value for column 's20' at row 2 +Warning 1264 Out of range value for column 'm' at row 2 +Warning 1264 Out of range value for column 'm0' at row 2 +Warning 1264 Out of range value for column 'm1' at row 2 +Warning 1264 Out of range value for column 'm20' at row 2 +Warning 1264 Out of range value for column 'i' at row 3 +Warning 1264 Out of range value for column 'i0' at row 3 +Warning 1264 Out of range value for column 'i1' at row 3 +Warning 1264 Out of range value for column 'i20' at row 3 +Warning 1264 Out of range value for column 't' at row 3 +Warning 1264 Out of range value for column 't0' at row 3 +Warning 1264 Out of range value for column 't1' at row 3 +Warning 1264 Out of range value for column 't20' at row 3 +Warning 1264 Out of range value for column 's' at row 3 +Warning 1264 Out of range value for column 's0' at row 3 +Warning 1264 Out of range value for column 's1' at row 3 +Warning 1264 Out of range value for column 's20' at row 3 +Warning 1264 Out of range value for column 'm' at row 3 +Warning 1264 Out of range value for column 'm0' at row 3 +Warning 1264 Out of range value for column 'm1' at row 3 +Warning 1264 Out of range value for column 'm20' at row 3 +Warning 1264 Out of range value for column 'i' at row 4 +Warning 1264 Out of range value for column 'i0' at row 4 +Warning 1264 Out of range value for column 'i1' at row 4 +Warning 1264 Out of range value for column 'i20' at row 4 +Warning 1264 Out of range value for column 't' at row 4 +Warning 1264 Out of range value for column 't0' at row 4 +Warning 1264 Out of range value for column 't1' at row 4 +Warning 1264 Out of range value for column 't20' at row 4 +Warning 1264 Out of range value for column 's' at row 4 +Warning 1264 Out of range value for column 's0' at row 4 +Warning 1264 Out of range value for column 's1' at row 4 +Warning 1264 Out of range value for column 's20' at row 4 +Warning 1264 Out of range value for column 'm' at row 4 +Warning 1264 Out of range value for column 'm0' at row 4 +Warning 1264 Out of range value for column 'm1' at row 4 +Warning 1264 Out of range value for column 'm20' at row 4 SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 -2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result index ac87cb02571..f0cd1a7e8b3 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result @@ -146,13 +146,13 @@ Warning 1265 Data truncated for column 'v64' at row 1 Warning 1265 Data truncated for column 'v65000' at row 1 INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'v0' at row 5 -Warning 1265 Data truncated for column 'v1' at row 5 -Warning 1265 Data truncated for column 'v64' at row 5 -Warning 1265 Data truncated for column 'v0' at row 6 -Warning 1265 Data truncated for column 'v1' at row 6 -Warning 1265 Data truncated for column 'v64' at row 6 -Warning 1265 Data truncated for column 'v65000' at row 6 +Warning 1265 Data truncated for column 'v0' at row 2 +Warning 1265 Data truncated for column 'v1' at row 2 +Warning 1265 Data truncated for column 'v64' at row 2 +Warning 1265 Data truncated for column 'v0' at row 3 +Warning 1265 Data truncated for column 'v1' at row 3 +Warning 1265 Data truncated for column 'v64' at row 3 +Warning 1265 Data truncated for column 'v65000' at row 3 SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1; HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000)) 0 @@ -587,15 +587,15 @@ Warning 1265 Data truncated for column 'c20' at row 1 Warning 1265 Data truncated for column 'c255' at row 1 INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'c' at row 5 -Warning 1265 Data truncated for column 'c0' at row 5 -Warning 1265 Data truncated for column 'c1' at row 5 -Warning 1265 Data truncated for column 'c20' at row 5 -Warning 1265 Data truncated for column 'c' at row 6 -Warning 1265 Data truncated for column 'c0' at row 6 -Warning 1265 Data truncated for column 'c1' at row 6 -Warning 1265 Data truncated for column 'c20' at row 6 -Warning 1265 Data truncated for column 'c255' at row 6 +Warning 1265 Data truncated for column 'c' at row 2 +Warning 1265 Data truncated for column 'c0' at row 2 +Warning 1265 Data truncated for column 'c1' at row 2 +Warning 1265 Data truncated for column 'c20' at row 2 +Warning 1265 Data truncated for column 'c' at row 3 +Warning 1265 Data truncated for column 'c0' at row 3 +Warning 1265 Data truncated for column 'c1' at row 3 +Warning 1265 Data truncated for column 'c20' at row 3 +Warning 1265 Data truncated for column 'c255' at row 3 SELECT c,c0,c1,c20,c255 FROM t1; c c0 c1 c20 c255 @@ -746,13 +746,13 @@ Warning 1265 Data truncated for column 'v64' at row 1 Warning 1265 Data truncated for column 'v65000' at row 1 INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'v0' at row 5 -Warning 1265 Data truncated for column 'v1' at row 5 -Warning 1265 Data truncated for column 'v64' at row 5 -Warning 1265 Data truncated for column 'v65000' at row 5 -Warning 1265 Data truncated for column 'v0' at row 6 -Warning 1265 Data truncated for column 'v1' at row 6 -Warning 1265 Data truncated for column 'v64' at row 6 +Warning 1265 Data truncated for column 'v0' at row 2 +Warning 1265 Data truncated for column 'v1' at row 2 +Warning 1265 Data truncated for column 'v64' at row 2 +Warning 1265 Data truncated for column 'v65000' at row 2 +Warning 1265 Data truncated for column 'v0' at row 3 +Warning 1265 Data truncated for column 'v1' at row 3 +Warning 1265 Data truncated for column 'v64' at row 3 SELECT v0, v1, v64, LENGTH(v65000) FROM t1; v0 v1 v64 LENGTH(v65000) 0 @@ -1803,70 +1803,70 @@ Warning 1264 Out of range value for column 'b1' at row 1 Warning 1264 Out of range value for column 'b20' at row 1 INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615); Warnings: -Warning 1264 Out of range value for column 'i' at row 8 -Warning 1264 Out of range value for column 'i0' at row 8 -Warning 1264 Out of range value for column 'i1' at row 8 -Warning 1264 Out of range value for column 'i20' at row 8 -Warning 1264 Out of range value for column 't' at row 8 -Warning 1264 Out of range value for column 't0' at row 8 -Warning 1264 Out of range value for column 't1' at row 8 -Warning 1264 Out of range value for column 't20' at row 8 -Warning 1264 Out of range value for column 's' at row 8 -Warning 1264 Out of range value for column 's0' at row 8 -Warning 1264 Out of range value for column 's1' at row 8 -Warning 1264 Out of range value for column 's20' at row 8 -Warning 1264 Out of range value for column 'm' at row 8 -Warning 1264 Out of range value for column 'm0' at row 8 -Warning 1264 Out of range value for column 'm1' at row 8 -Warning 1264 Out of range value for column 'm20' at row 8 -Warning 1264 Out of range value for column 'i' at row 9 -Warning 1264 Out of range value for column 'i0' at row 9 -Warning 1264 Out of range value for column 'i1' at row 9 -Warning 1264 Out of range value for column 'i20' at row 9 -Warning 1264 Out of range value for column 't' at row 9 -Warning 1264 Out of range value for column 't0' at row 9 -Warning 1264 Out of range value for column 't1' at row 9 -Warning 1264 Out of range value for column 't20' at row 9 -Warning 1264 Out of range value for column 's' at row 9 -Warning 1264 Out of range value for column 's0' at row 9 -Warning 1264 Out of range value for column 's1' at row 9 -Warning 1264 Out of range value for column 's20' at row 9 -Warning 1264 Out of range value for column 'm' at row 9 -Warning 1264 Out of range value for column 'm0' at row 9 -Warning 1264 Out of range value for column 'm1' at row 9 -Warning 1264 Out of range value for column 'm20' at row 9 -Warning 1264 Out of range value for column 'i' at row 10 -Warning 1264 Out of range value for column 'i0' at row 10 -Warning 1264 Out of range value for column 'i1' at row 10 -Warning 1264 Out of range value for column 'i20' at row 10 -Warning 1264 Out of range value for column 't' at row 10 -Warning 1264 Out of range value for column 't0' at row 10 -Warning 1264 Out of range value for column 't1' at row 10 -Warning 1264 Out of range value for column 't20' at row 10 -Warning 1264 Out of range value for column 's' at row 10 -Warning 1264 Out of range value for column 's0' at row 10 -Warning 1264 Out of range value for column 's1' at row 10 -Warning 1264 Out of range value for column 's20' at row 10 -Warning 1264 Out of range value for column 'm' at row 10 -Warning 1264 Out of range value for column 'm0' at row 10 -Warning 1264 Out of range value for column 'm1' at row 10 -Warning 1264 Out of range value for column 'm20' at row 10 -Warning 1264 Out of range value for column 'i' at row 11 -Warning 1264 Out of range value for column 'i0' at row 11 -Warning 1264 Out of range value for column 'i1' at row 11 -Warning 1264 Out of range value for column 'i20' at row 11 -Warning 1264 Out of range value for column 't' at row 11 -Warning 1264 Out of range value for column 't0' at row 11 -Warning 1264 Out of range value for column 't1' at row 11 -Warning 1264 Out of range value for column 't20' at row 11 -Warning 1264 Out of range value for column 's' at row 11 -Warning 1264 Out of range value for column 's0' at row 11 -Warning 1264 Out of range value for column 's1' at row 11 -Warning 1264 Out of range value for column 's20' at row 11 -Warning 1264 Out of range value for column 'm' at row 11 -Warning 1264 Out of range value for column 'm0' at row 11 -Warning 1264 Out of range value for column 'm1' at row 11 -Warning 1264 Out of range value for column 'm20' at row 11 +Warning 1264 Out of range value for column 'i' at row 1 +Warning 1264 Out of range value for column 'i0' at row 1 +Warning 1264 Out of range value for column 'i1' at row 1 +Warning 1264 Out of range value for column 'i20' at row 1 +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 't0' at row 1 +Warning 1264 Out of range value for column 't1' at row 1 +Warning 1264 Out of range value for column 't20' at row 1 +Warning 1264 Out of range value for column 's' at row 1 +Warning 1264 Out of range value for column 's0' at row 1 +Warning 1264 Out of range value for column 's1' at row 1 +Warning 1264 Out of range value for column 's20' at row 1 +Warning 1264 Out of range value for column 'm' at row 1 +Warning 1264 Out of range value for column 'm0' at row 1 +Warning 1264 Out of range value for column 'm1' at row 1 +Warning 1264 Out of range value for column 'm20' at row 1 +Warning 1264 Out of range value for column 'i' at row 2 +Warning 1264 Out of range value for column 'i0' at row 2 +Warning 1264 Out of range value for column 'i1' at row 2 +Warning 1264 Out of range value for column 'i20' at row 2 +Warning 1264 Out of range value for column 't' at row 2 +Warning 1264 Out of range value for column 't0' at row 2 +Warning 1264 Out of range value for column 't1' at row 2 +Warning 1264 Out of range value for column 't20' at row 2 +Warning 1264 Out of range value for column 's' at row 2 +Warning 1264 Out of range value for column 's0' at row 2 +Warning 1264 Out of range value for column 's1' at row 2 +Warning 1264 Out of range value for column 's20' at row 2 +Warning 1264 Out of range value for column 'm' at row 2 +Warning 1264 Out of range value for column 'm0' at row 2 +Warning 1264 Out of range value for column 'm1' at row 2 +Warning 1264 Out of range value for column 'm20' at row 2 +Warning 1264 Out of range value for column 'i' at row 3 +Warning 1264 Out of range value for column 'i0' at row 3 +Warning 1264 Out of range value for column 'i1' at row 3 +Warning 1264 Out of range value for column 'i20' at row 3 +Warning 1264 Out of range value for column 't' at row 3 +Warning 1264 Out of range value for column 't0' at row 3 +Warning 1264 Out of range value for column 't1' at row 3 +Warning 1264 Out of range value for column 't20' at row 3 +Warning 1264 Out of range value for column 's' at row 3 +Warning 1264 Out of range value for column 's0' at row 3 +Warning 1264 Out of range value for column 's1' at row 3 +Warning 1264 Out of range value for column 's20' at row 3 +Warning 1264 Out of range value for column 'm' at row 3 +Warning 1264 Out of range value for column 'm0' at row 3 +Warning 1264 Out of range value for column 'm1' at row 3 +Warning 1264 Out of range value for column 'm20' at row 3 +Warning 1264 Out of range value for column 'i' at row 4 +Warning 1264 Out of range value for column 'i0' at row 4 +Warning 1264 Out of range value for column 'i1' at row 4 +Warning 1264 Out of range value for column 'i20' at row 4 +Warning 1264 Out of range value for column 't' at row 4 +Warning 1264 Out of range value for column 't0' at row 4 +Warning 1264 Out of range value for column 't1' at row 4 +Warning 1264 Out of range value for column 't20' at row 4 +Warning 1264 Out of range value for column 's' at row 4 +Warning 1264 Out of range value for column 's0' at row 4 +Warning 1264 Out of range value for column 's1' at row 4 +Warning 1264 Out of range value for column 's20' at row 4 +Warning 1264 Out of range value for column 'm' at row 4 +Warning 1264 Out of range value for column 'm0' at row 4 +Warning 1264 Out of range value for column 'm1' at row 4 +Warning 1264 Out of range value for column 'm20' at row 4 SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 -2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result index 439f9be9a8a..13445fc9326 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_unsigned.result @@ -656,54 +656,54 @@ Warning 1264 Out of range value for column 'b1' at row 1 Warning 1264 Out of range value for column 'b20' at row 1 INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615); Warnings: -Warning 1264 Out of range value for column 'i' at row 8 -Warning 1264 Out of range value for column 'i0' at row 8 -Warning 1264 Out of range value for column 'i1' at row 8 -Warning 1264 Out of range value for column 'i20' at row 8 -Warning 1264 Out of range value for column 't' at row 8 -Warning 1264 Out of range value for column 't0' at row 8 -Warning 1264 Out of range value for column 't1' at row 8 -Warning 1264 Out of range value for column 't20' at row 8 -Warning 1264 Out of range value for column 's' at row 8 -Warning 1264 Out of range value for column 's0' at row 8 -Warning 1264 Out of range value for column 's1' at row 8 -Warning 1264 Out of range value for column 's20' at row 8 -Warning 1264 Out of range value for column 'm' at row 8 -Warning 1264 Out of range value for column 'm0' at row 8 -Warning 1264 Out of range value for column 'm1' at row 8 -Warning 1264 Out of range value for column 'm20' at row 8 -Warning 1264 Out of range value for column 'i' at row 9 -Warning 1264 Out of range value for column 'i0' at row 9 -Warning 1264 Out of range value for column 'i1' at row 9 -Warning 1264 Out of range value for column 'i20' at row 9 -Warning 1264 Out of range value for column 't' at row 9 -Warning 1264 Out of range value for column 't0' at row 9 -Warning 1264 Out of range value for column 't1' at row 9 -Warning 1264 Out of range value for column 't20' at row 9 -Warning 1264 Out of range value for column 's' at row 9 -Warning 1264 Out of range value for column 's0' at row 9 -Warning 1264 Out of range value for column 's1' at row 9 -Warning 1264 Out of range value for column 's20' at row 9 -Warning 1264 Out of range value for column 'm' at row 9 -Warning 1264 Out of range value for column 'm0' at row 9 -Warning 1264 Out of range value for column 'm1' at row 9 -Warning 1264 Out of range value for column 'm20' at row 9 -Warning 1264 Out of range value for column 'i' at row 10 -Warning 1264 Out of range value for column 'i0' at row 10 -Warning 1264 Out of range value for column 'i1' at row 10 -Warning 1264 Out of range value for column 'i20' at row 10 -Warning 1264 Out of range value for column 't' at row 10 -Warning 1264 Out of range value for column 't0' at row 10 -Warning 1264 Out of range value for column 't1' at row 10 -Warning 1264 Out of range value for column 't20' at row 10 -Warning 1264 Out of range value for column 's' at row 10 -Warning 1264 Out of range value for column 's0' at row 10 -Warning 1264 Out of range value for column 's1' at row 10 -Warning 1264 Out of range value for column 's20' at row 10 -Warning 1264 Out of range value for column 'm' at row 10 -Warning 1264 Out of range value for column 'm0' at row 10 -Warning 1264 Out of range value for column 'm1' at row 10 -Warning 1264 Out of range value for column 'm20' at row 10 +Warning 1264 Out of range value for column 'i' at row 1 +Warning 1264 Out of range value for column 'i0' at row 1 +Warning 1264 Out of range value for column 'i1' at row 1 +Warning 1264 Out of range value for column 'i20' at row 1 +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 't0' at row 1 +Warning 1264 Out of range value for column 't1' at row 1 +Warning 1264 Out of range value for column 't20' at row 1 +Warning 1264 Out of range value for column 's' at row 1 +Warning 1264 Out of range value for column 's0' at row 1 +Warning 1264 Out of range value for column 's1' at row 1 +Warning 1264 Out of range value for column 's20' at row 1 +Warning 1264 Out of range value for column 'm' at row 1 +Warning 1264 Out of range value for column 'm0' at row 1 +Warning 1264 Out of range value for column 'm1' at row 1 +Warning 1264 Out of range value for column 'm20' at row 1 +Warning 1264 Out of range value for column 'i' at row 2 +Warning 1264 Out of range value for column 'i0' at row 2 +Warning 1264 Out of range value for column 'i1' at row 2 +Warning 1264 Out of range value for column 'i20' at row 2 +Warning 1264 Out of range value for column 't' at row 2 +Warning 1264 Out of range value for column 't0' at row 2 +Warning 1264 Out of range value for column 't1' at row 2 +Warning 1264 Out of range value for column 't20' at row 2 +Warning 1264 Out of range value for column 's' at row 2 +Warning 1264 Out of range value for column 's0' at row 2 +Warning 1264 Out of range value for column 's1' at row 2 +Warning 1264 Out of range value for column 's20' at row 2 +Warning 1264 Out of range value for column 'm' at row 2 +Warning 1264 Out of range value for column 'm0' at row 2 +Warning 1264 Out of range value for column 'm1' at row 2 +Warning 1264 Out of range value for column 'm20' at row 2 +Warning 1264 Out of range value for column 'i' at row 3 +Warning 1264 Out of range value for column 'i0' at row 3 +Warning 1264 Out of range value for column 'i1' at row 3 +Warning 1264 Out of range value for column 'i20' at row 3 +Warning 1264 Out of range value for column 't' at row 3 +Warning 1264 Out of range value for column 't0' at row 3 +Warning 1264 Out of range value for column 't1' at row 3 +Warning 1264 Out of range value for column 't20' at row 3 +Warning 1264 Out of range value for column 's' at row 3 +Warning 1264 Out of range value for column 's0' at row 3 +Warning 1264 Out of range value for column 's1' at row 3 +Warning 1264 Out of range value for column 's20' at row 3 +Warning 1264 Out of range value for column 'm' at row 3 +Warning 1264 Out of range value for column 'm0' at row 3 +Warning 1264 Out of range value for column 'm1' at row 3 +Warning 1264 Out of range value for column 'm20' at row 3 SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result index 47f7bb923ba..01fa9dac7fd 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/corrupted_data_reads_debug.result @@ -20,7 +20,7 @@ set @tmp1=@@rocksdb_verify_row_debug_checksums; set rocksdb_verify_row_debug_checksums=1; set session debug_dbug= "+d,myrocks_simulate_bad_row_read1"; select * from t1 where pk=1; -ERROR HY000: Got error 202 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_row_read1"; set rocksdb_verify_row_debug_checksums=@tmp1; select * from t1 where pk=1; @@ -28,11 +28,11 @@ pk col1 1 1 set session debug_dbug= "+d,myrocks_simulate_bad_row_read2"; select * from t1 where pk=1; -ERROR HY000: Got error 202 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_row_read2"; set session debug_dbug= "+d,myrocks_simulate_bad_row_read3"; select * from t1 where pk=1; -ERROR HY000: Got error 202 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_row_read3"; insert into t1 values(4,'0123456789'); select * from t1; @@ -56,7 +56,7 @@ pk col1 ABCD 1 set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1"; select * from t2; -ERROR HY000: Got error 202 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1"; drop table t2; create table t2 ( @@ -69,6 +69,6 @@ pk col1 ABCD 1 set session debug_dbug= "+d,myrocks_simulate_bad_pk_read1"; select * from t2; -ERROR HY000: Got error 202 'Found data corruption.' from ROCKSDB +ERROR HY000: Got error 203 'Found data corruption.' from ROCKSDB set session debug_dbug= "-d,myrocks_simulate_bad_pk_read1"; drop table t2; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result b/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result index 3ec9294e3a1..7824839808e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/i_s_deadlock.result @@ -13,15 +13,15 @@ connection default; show create table information_schema.rocksdb_deadlock; Table Create Table ROCKSDB_DEADLOCK CREATE TEMPORARY TABLE `ROCKSDB_DEADLOCK` ( - `DEADLOCK_ID` bigint(8) NOT NULL DEFAULT 0, - `TIMESTAMP` bigint(8) NOT NULL DEFAULT 0, - `TRANSACTION_ID` bigint(8) NOT NULL DEFAULT 0, - `CF_NAME` varchar(193) NOT NULL DEFAULT '', - `WAITING_KEY` varchar(513) NOT NULL DEFAULT '', - `LOCK_TYPE` varchar(193) NOT NULL DEFAULT '', - `INDEX_NAME` varchar(193) NOT NULL DEFAULT '', - `TABLE_NAME` varchar(193) NOT NULL DEFAULT '', - `ROLLED_BACK` bigint(8) NOT NULL DEFAULT 0 + `DEADLOCK_ID` bigint(8) NOT NULL, + `TIMESTAMP` bigint(8) NOT NULL, + `TRANSACTION_ID` bigint(8) NOT NULL, + `CF_NAME` varchar(193) NOT NULL, + `WAITING_KEY` varchar(513) NOT NULL, + `LOCK_TYPE` varchar(193) NOT NULL, + `INDEX_NAME` varchar(193) NOT NULL, + `TABLE_NAME` varchar(193) NOT NULL, + `ROLLED_BACK` bigint(8) NOT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 create table t (i int primary key) engine=rocksdb; insert into t values (1), (2), (3); diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result index daca7f7f78d..4f0d68845a3 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result @@ -932,6 +932,7 @@ rocksdb_force_flush_memtable_now OFF rocksdb_force_index_records_in_range 0 rocksdb_git_hash # rocksdb_hash_index_allow_collision ON +rocksdb_ignore_datadic_errors 0 rocksdb_ignore_unknown_options ON rocksdb_index_type kBinarySearch rocksdb_info_log_level error_level diff --git a/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result b/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result index 95dae68b4e6..9691eeeffdf 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/tbl_opt_data_index_dir.result @@ -1,16 +1,16 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data'; -ERROR HY000: Can't create table `test`.`t1` (errno: 198 "Unknown error 198") +ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") show warnings; Level Code Message -Error 1005 Can't create table `test`.`t1` (errno: 198 "Unknown error 198") -Warning 1296 Got error 198 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB +Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") +Warning 1296 Got error XXX 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index'; -ERROR HY000: Can't create table `test`.`t1` (errno: 199 "Unknown error 199") +ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") show warnings; Level Code Message -Error 1005 Can't create table `test`.`t1` (errno: 199 "Unknown error 199") -Warning 1296 Got error 199 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB +Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") +Warning 1296 Got error XXX 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id) ( PARTITION P0 VALUES LESS THAN (1000) @@ -19,11 +19,11 @@ PARTITION P1 VALUES LESS THAN (2000) DATA DIRECTORY = '/foo/bar/data/', PARTITION P2 VALUES LESS THAN (MAXVALUE) ); -ERROR HY000: Can't create table `test`.`t1` (errno: 198 "Unknown error 198") +ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") show warnings; Level Code Message -Error 1005 Can't create table `test`.`t1` (errno: 198 "Unknown error 198") -Warning 1296 Got error 198 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB +Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") +Warning 1296 Got error XXX 'Specifying DATA DIRECTORY for an individual table is not supported.' from ROCKSDB Error 6 Error on delete of './test/t1.par' (Errcode: 2 "No such file or directory") CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id) ( @@ -33,9 +33,9 @@ PARTITION P1 VALUES LESS THAN (2000) INDEX DIRECTORY = '/foo/bar/data/', PARTITION P2 VALUES LESS THAN (MAXVALUE) ); -ERROR HY000: Can't create table `test`.`t1` (errno: 199 "Unknown error 199") +ERROR HY000: Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") show warnings; Level Code Message -Error 1005 Can't create table `test`.`t1` (errno: 199 "Unknown error 199") -Warning 1296 Got error 199 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB +Error 1005 Can't create table `test`.`t1` (errno: XXX "Unknown error XXX") +Warning 1296 Got error XXX 'Specifying INDEX DIRECTORY for an individual table is not supported.' from ROCKSDB Error 6 Error on delete of './test/t1.par' (Errcode: 2 "No such file or directory") diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_char.result b/storage/rocksdb/mysql-test/rocksdb/r/type_char.result index 1786dfae1e7..b35b5cb1832 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_char.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_char.result @@ -29,15 +29,15 @@ Warning 1265 Data truncated for column 'c20' at row 1 Warning 1265 Data truncated for column 'c255' at row 1 INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'c' at row 5 -Warning 1265 Data truncated for column 'c0' at row 5 -Warning 1265 Data truncated for column 'c1' at row 5 -Warning 1265 Data truncated for column 'c20' at row 5 -Warning 1265 Data truncated for column 'c' at row 6 -Warning 1265 Data truncated for column 'c0' at row 6 -Warning 1265 Data truncated for column 'c1' at row 6 -Warning 1265 Data truncated for column 'c20' at row 6 -Warning 1265 Data truncated for column 'c255' at row 6 +Warning 1265 Data truncated for column 'c' at row 2 +Warning 1265 Data truncated for column 'c0' at row 2 +Warning 1265 Data truncated for column 'c1' at row 2 +Warning 1265 Data truncated for column 'c20' at row 2 +Warning 1265 Data truncated for column 'c' at row 3 +Warning 1265 Data truncated for column 'c0' at row 3 +Warning 1265 Data truncated for column 'c1' at row 3 +Warning 1265 Data truncated for column 'c20' at row 3 +Warning 1265 Data truncated for column 'c255' at row 3 SELECT c,c0,c1,c20,c255 FROM t1; c c0 c1 c20 c255 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_int.result b/storage/rocksdb/mysql-test/rocksdb/r/type_int.result index 306042912d0..b949a723f22 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_int.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_int.result @@ -129,70 +129,70 @@ Warning 1264 Out of range value for column 'b1' at row 1 Warning 1264 Out of range value for column 'b20' at row 1 INSERT INTO t1 (i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20) SELECT b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b FROM t1 WHERE b IN (-9223372036854775808,9223372036854775807,18446744073709551615); Warnings: -Warning 1264 Out of range value for column 'i' at row 8 -Warning 1264 Out of range value for column 'i0' at row 8 -Warning 1264 Out of range value for column 'i1' at row 8 -Warning 1264 Out of range value for column 'i20' at row 8 -Warning 1264 Out of range value for column 't' at row 8 -Warning 1264 Out of range value for column 't0' at row 8 -Warning 1264 Out of range value for column 't1' at row 8 -Warning 1264 Out of range value for column 't20' at row 8 -Warning 1264 Out of range value for column 's' at row 8 -Warning 1264 Out of range value for column 's0' at row 8 -Warning 1264 Out of range value for column 's1' at row 8 -Warning 1264 Out of range value for column 's20' at row 8 -Warning 1264 Out of range value for column 'm' at row 8 -Warning 1264 Out of range value for column 'm0' at row 8 -Warning 1264 Out of range value for column 'm1' at row 8 -Warning 1264 Out of range value for column 'm20' at row 8 -Warning 1264 Out of range value for column 'i' at row 9 -Warning 1264 Out of range value for column 'i0' at row 9 -Warning 1264 Out of range value for column 'i1' at row 9 -Warning 1264 Out of range value for column 'i20' at row 9 -Warning 1264 Out of range value for column 't' at row 9 -Warning 1264 Out of range value for column 't0' at row 9 -Warning 1264 Out of range value for column 't1' at row 9 -Warning 1264 Out of range value for column 't20' at row 9 -Warning 1264 Out of range value for column 's' at row 9 -Warning 1264 Out of range value for column 's0' at row 9 -Warning 1264 Out of range value for column 's1' at row 9 -Warning 1264 Out of range value for column 's20' at row 9 -Warning 1264 Out of range value for column 'm' at row 9 -Warning 1264 Out of range value for column 'm0' at row 9 -Warning 1264 Out of range value for column 'm1' at row 9 -Warning 1264 Out of range value for column 'm20' at row 9 -Warning 1264 Out of range value for column 'i' at row 10 -Warning 1264 Out of range value for column 'i0' at row 10 -Warning 1264 Out of range value for column 'i1' at row 10 -Warning 1264 Out of range value for column 'i20' at row 10 -Warning 1264 Out of range value for column 't' at row 10 -Warning 1264 Out of range value for column 't0' at row 10 -Warning 1264 Out of range value for column 't1' at row 10 -Warning 1264 Out of range value for column 't20' at row 10 -Warning 1264 Out of range value for column 's' at row 10 -Warning 1264 Out of range value for column 's0' at row 10 -Warning 1264 Out of range value for column 's1' at row 10 -Warning 1264 Out of range value for column 's20' at row 10 -Warning 1264 Out of range value for column 'm' at row 10 -Warning 1264 Out of range value for column 'm0' at row 10 -Warning 1264 Out of range value for column 'm1' at row 10 -Warning 1264 Out of range value for column 'm20' at row 10 -Warning 1264 Out of range value for column 'i' at row 11 -Warning 1264 Out of range value for column 'i0' at row 11 -Warning 1264 Out of range value for column 'i1' at row 11 -Warning 1264 Out of range value for column 'i20' at row 11 -Warning 1264 Out of range value for column 't' at row 11 -Warning 1264 Out of range value for column 't0' at row 11 -Warning 1264 Out of range value for column 't1' at row 11 -Warning 1264 Out of range value for column 't20' at row 11 -Warning 1264 Out of range value for column 's' at row 11 -Warning 1264 Out of range value for column 's0' at row 11 -Warning 1264 Out of range value for column 's1' at row 11 -Warning 1264 Out of range value for column 's20' at row 11 -Warning 1264 Out of range value for column 'm' at row 11 -Warning 1264 Out of range value for column 'm0' at row 11 -Warning 1264 Out of range value for column 'm1' at row 11 -Warning 1264 Out of range value for column 'm20' at row 11 +Warning 1264 Out of range value for column 'i' at row 1 +Warning 1264 Out of range value for column 'i0' at row 1 +Warning 1264 Out of range value for column 'i1' at row 1 +Warning 1264 Out of range value for column 'i20' at row 1 +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 't0' at row 1 +Warning 1264 Out of range value for column 't1' at row 1 +Warning 1264 Out of range value for column 't20' at row 1 +Warning 1264 Out of range value for column 's' at row 1 +Warning 1264 Out of range value for column 's0' at row 1 +Warning 1264 Out of range value for column 's1' at row 1 +Warning 1264 Out of range value for column 's20' at row 1 +Warning 1264 Out of range value for column 'm' at row 1 +Warning 1264 Out of range value for column 'm0' at row 1 +Warning 1264 Out of range value for column 'm1' at row 1 +Warning 1264 Out of range value for column 'm20' at row 1 +Warning 1264 Out of range value for column 'i' at row 2 +Warning 1264 Out of range value for column 'i0' at row 2 +Warning 1264 Out of range value for column 'i1' at row 2 +Warning 1264 Out of range value for column 'i20' at row 2 +Warning 1264 Out of range value for column 't' at row 2 +Warning 1264 Out of range value for column 't0' at row 2 +Warning 1264 Out of range value for column 't1' at row 2 +Warning 1264 Out of range value for column 't20' at row 2 +Warning 1264 Out of range value for column 's' at row 2 +Warning 1264 Out of range value for column 's0' at row 2 +Warning 1264 Out of range value for column 's1' at row 2 +Warning 1264 Out of range value for column 's20' at row 2 +Warning 1264 Out of range value for column 'm' at row 2 +Warning 1264 Out of range value for column 'm0' at row 2 +Warning 1264 Out of range value for column 'm1' at row 2 +Warning 1264 Out of range value for column 'm20' at row 2 +Warning 1264 Out of range value for column 'i' at row 3 +Warning 1264 Out of range value for column 'i0' at row 3 +Warning 1264 Out of range value for column 'i1' at row 3 +Warning 1264 Out of range value for column 'i20' at row 3 +Warning 1264 Out of range value for column 't' at row 3 +Warning 1264 Out of range value for column 't0' at row 3 +Warning 1264 Out of range value for column 't1' at row 3 +Warning 1264 Out of range value for column 't20' at row 3 +Warning 1264 Out of range value for column 's' at row 3 +Warning 1264 Out of range value for column 's0' at row 3 +Warning 1264 Out of range value for column 's1' at row 3 +Warning 1264 Out of range value for column 's20' at row 3 +Warning 1264 Out of range value for column 'm' at row 3 +Warning 1264 Out of range value for column 'm0' at row 3 +Warning 1264 Out of range value for column 'm1' at row 3 +Warning 1264 Out of range value for column 'm20' at row 3 +Warning 1264 Out of range value for column 'i' at row 4 +Warning 1264 Out of range value for column 'i0' at row 4 +Warning 1264 Out of range value for column 'i1' at row 4 +Warning 1264 Out of range value for column 'i20' at row 4 +Warning 1264 Out of range value for column 't' at row 4 +Warning 1264 Out of range value for column 't0' at row 4 +Warning 1264 Out of range value for column 't1' at row 4 +Warning 1264 Out of range value for column 't20' at row 4 +Warning 1264 Out of range value for column 's' at row 4 +Warning 1264 Out of range value for column 's0' at row 4 +Warning 1264 Out of range value for column 's1' at row 4 +Warning 1264 Out of range value for column 's20' at row 4 +Warning 1264 Out of range value for column 'm' at row 4 +Warning 1264 Out of range value for column 'm0' at row 4 +Warning 1264 Out of range value for column 'm1' at row 4 +Warning 1264 Out of range value for column 'm20' at row 4 SELECT i,i0,i1,i20,t,t0,t1,t20,s,s0,s1,s20,m,m0,m1,m20,b,b0,b1,b20 FROM t1; i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 -2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result index 6de8c0331cd..090a9dbb4e2 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varbinary.result @@ -65,13 +65,13 @@ Warning 1265 Data truncated for column 'v64' at row 1 Warning 1265 Data truncated for column 'v65000' at row 1 INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'v0' at row 5 -Warning 1265 Data truncated for column 'v1' at row 5 -Warning 1265 Data truncated for column 'v64' at row 5 -Warning 1265 Data truncated for column 'v0' at row 6 -Warning 1265 Data truncated for column 'v1' at row 6 -Warning 1265 Data truncated for column 'v64' at row 6 -Warning 1265 Data truncated for column 'v65000' at row 6 +Warning 1265 Data truncated for column 'v0' at row 2 +Warning 1265 Data truncated for column 'v1' at row 2 +Warning 1265 Data truncated for column 'v64' at row 2 +Warning 1265 Data truncated for column 'v0' at row 3 +Warning 1265 Data truncated for column 'v1' at row 3 +Warning 1265 Data truncated for column 'v64' at row 3 +Warning 1265 Data truncated for column 'v65000' at row 3 SELECT HEX(v0), HEX(v1), HEX(v64), LENGTH(HEX(v65000)) FROM t1; HEX(v0) HEX(v1) HEX(v64) LENGTH(HEX(v65000)) 0 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result index 4c5ef47590a..745cfa5991e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_varchar.result @@ -110,13 +110,13 @@ Warning 1265 Data truncated for column 'v64' at row 1 Warning 1265 Data truncated for column 'v65000' at row 1 INSERT INTO t1 (v0,v1,v64,v65000) SELECT v65000, v65000, CONCAT('a',v65000), CONCAT(v65000,v1) FROM t1; Warnings: -Warning 1265 Data truncated for column 'v0' at row 5 -Warning 1265 Data truncated for column 'v1' at row 5 -Warning 1265 Data truncated for column 'v64' at row 5 -Warning 1265 Data truncated for column 'v65000' at row 5 -Warning 1265 Data truncated for column 'v0' at row 6 -Warning 1265 Data truncated for column 'v1' at row 6 -Warning 1265 Data truncated for column 'v64' at row 6 +Warning 1265 Data truncated for column 'v0' at row 2 +Warning 1265 Data truncated for column 'v1' at row 2 +Warning 1265 Data truncated for column 'v64' at row 2 +Warning 1265 Data truncated for column 'v65000' at row 2 +Warning 1265 Data truncated for column 'v0' at row 3 +Warning 1265 Data truncated for column 'v1' at row 3 +Warning 1265 Data truncated for column 'v64' at row 3 SELECT v0, v1, v64, LENGTH(v65000) FROM t1; v0 v1 v64 LENGTH(v65000) 0 diff --git a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test index 6fcfd491af1..e2595b10fd7 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test @@ -17,23 +17,23 @@ DROP TABLE IF EXISTS t1; # opposed to "Unknown error nn" on Linux/etc. # Replacing 'error:' with 'error' below to make the output uniform. ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ --error ER_CANT_CREATE_TABLE CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data'; ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ show warnings; ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ --error ER_CANT_CREATE_TABLE CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index'; ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ show warnings; # # Verify that we'll get the same error codes when using the partitions. # ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ --error ER_CANT_CREATE_TABLE CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id) ( @@ -43,10 +43,10 @@ CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE DATA DIRECTORY = '/foo/bar/data/', PARTITION P2 VALUES LESS THAN (MAXVALUE) ); ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ show warnings; ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ --error ER_CANT_CREATE_TABLE CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id) ( @@ -56,5 +56,5 @@ CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE INDEX DIRECTORY = '/foo/bar/data/', PARTITION P2 VALUES LESS THAN (MAXVALUE) ); ---replace_result error: error +--replace_regex /err(no:|or):? \d+/err\1 XXX/ show warnings; diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result new file mode 100644 index 00000000000..daa70a80683 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors_basic.result @@ -0,0 +1,7 @@ +SET @start_global_value = @@global.ROCKSDB_IGNORE_DATADIC_ERRORS; +SELECT @start_global_value; +@start_global_value +0 +"Trying to set variable @@global.ROCKSDB_IGNORE_DATADIC_ERRORS to 444. It should fail because it is readonly." +SET @@global.ROCKSDB_IGNORE_DATADIC_ERRORS = 444; +ERROR HY000: Variable 'rocksdb_ignore_datadic_errors' is a read only variable diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test new file mode 100644 index 00000000000..b412a018869 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors_basic.test @@ -0,0 +1,6 @@ +--source include/have_rocksdb.inc + +--let $sys_var=ROCKSDB_IGNORE_DATADIC_ERRORS +--let $read_only=1 +--let $session=0 +--source include/rocksdb_sys_var.inc diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc index 99f1178d897..cad6833e466 100644 --- a/storage/rocksdb/rdb_datadic.cc +++ b/storage/rocksdb/rdb_datadic.cc @@ -5261,6 +5261,12 @@ void Rdb_dict_manager::log_start_drop_index(GL_INDEX_ID gl_index_id, "from index id (%u,%u). MyRocks data dictionary may " "get corrupted.", gl_index_id.cf_id, gl_index_id.index_id); + if (rocksdb_ignore_datadic_errors) + { + sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, " + "trying to continue"); + return; + } abort(); } } diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 988c2305b04..eb4052abdf5 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -1126,7 +1126,8 @@ THR_LOCK_DATA **ha_spider::store_lock( if ( sql_command == SQLCOM_DROP_TABLE || sql_command == SQLCOM_ALTER_TABLE || - sql_command == SQLCOM_SHOW_CREATE + sql_command == SQLCOM_SHOW_CREATE || + sql_command == SQLCOM_SHOW_FIELDS ) { if ( lock_type == TL_READ_NO_INSERT && @@ -8797,7 +8798,8 @@ int ha_spider::info( spider_param_table_init_error_interval()) { pthread_mutex_unlock(&share->sts_mutex); - if (sql_command == SQLCOM_SHOW_CREATE) + if (sql_command == SQLCOM_SHOW_CREATE || + sql_command == SQLCOM_SHOW_FIELDS) { if (thd->is_error()) { @@ -8871,7 +8873,8 @@ int ha_spider::info( share->init_error = TRUE; share->init = TRUE; } - if (sql_command == SQLCOM_SHOW_CREATE) + if (sql_command == SQLCOM_SHOW_CREATE || + sql_command == SQLCOM_SHOW_FIELDS) { if (thd->is_error()) { @@ -8934,7 +8937,8 @@ int ha_spider::info( share->init_error = TRUE; share->init = TRUE; } - if (sql_command == SQLCOM_SHOW_CREATE) + if (sql_command == SQLCOM_SHOW_CREATE || + sql_command == SQLCOM_SHOW_FIELDS) { if (thd->is_error()) { @@ -8963,7 +8967,8 @@ int ha_spider::info( if ((error_num = spider_create_sts_thread(share))) { pthread_mutex_unlock(&share->sts_mutex); - if (sql_command == SQLCOM_SHOW_CREATE) + if (sql_command == SQLCOM_SHOW_CREATE || + sql_command == SQLCOM_SHOW_FIELDS) { if (thd->is_error()) { @@ -8994,7 +8999,8 @@ int ha_spider::info( { if ((error_num = check_crd())) { - if (sql_command == SQLCOM_SHOW_CREATE) + if (sql_command == SQLCOM_SHOW_CREATE || + sql_command == SQLCOM_SHOW_FIELDS) { if (thd->is_error()) { diff --git a/storage/spider/mysql-test/spider/r/ha_part.result b/storage/spider/mysql-test/spider/r/ha_part.result index 315f37298bc..d70d62404c0 100644 --- a/storage/spider/mysql-test/spider/r/ha_part.result +++ b/storage/spider/mysql-test/spider/r/ha_part.result @@ -248,6 +248,15 @@ a b date_format(c, '%Y-%m-%d %H:%i:%s') 8 g 2011-05-05 21:33:30 9 h 2011-05-05 22:32:10 DROP TABLE ta_l2; +connection master_1; +CREATE TABLE t (c INT) PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT ENGINE=SPIDER); +SHOW FIELDS FROM t; +Field Type Null Key Default Extra +c int(11) YES NULL +SHOW FIELDS FROM t; +Field Type Null Key Default Extra +c int(11) YES NULL +DROP TABLE t; deinit connection master_1; diff --git a/storage/spider/mysql-test/spider/t/ha_part.test b/storage/spider/mysql-test/spider/t/ha_part.test index 72ddcfd1f10..7e9d6f7715c 100644 --- a/storage/spider/mysql-test/spider/t/ha_part.test +++ b/storage/spider/mysql-test/spider/t/ha_part.test @@ -982,6 +982,13 @@ if ($HAVE_PARTITION) } } +--connection master_1 + +CREATE TABLE t (c INT) PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT ENGINE=SPIDER); +SHOW FIELDS FROM t; +SHOW FIELDS FROM t; +DROP TABLE t; + --echo --echo deinit --disable_warnings diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index fdaa34eeaf0..91d48a36c96 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -50,7 +50,7 @@ #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80) #define IS_MB2_CHAR(x,y) (isbig5head(x) && isbig5tail(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" static const uchar ctype_big5[257] = @@ -6681,13 +6681,13 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_MB2(x,y) (big5code(x, y)) #define WEIGHT_MB2_FRM(x,y) (big5strokexfrm((uint16) WEIGHT_MB2(x, y))) #define DEFINE_STRNXFRM -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _big5_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (big5code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -6696,14 +6696,14 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_MB2(x,y) (big5code(x, y)) #define WEIGHT_MB2_FRM(x,y) (big5strokexfrm((uint16) WEIGHT_MB2(x, y))) #define DEFINE_STRNXFRM -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _big5_nopad_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (big5code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_handler_big5_chinese_ci= diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c index 94450af4b91..aeca63a86f9 100644 --- a/strings/ctype-cp932.c +++ b/strings/ctype-cp932.c @@ -188,7 +188,7 @@ static const uchar sort_order_cp932[]= #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80 || iscp932kata(x)) #define IS_MB2_CHAR(x,y) (iscp932head(x) && iscp932tail(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" #define cp932code(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d)) @@ -34636,14 +34636,14 @@ size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) sort_order_cp932[(uchar) (x)]) #define WEIGHT_MB2(x,y) (cp932code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _cp932_bin #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) (uchar) (x)) #define WEIGHT_MB2(x,y) (cp932code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -34651,7 +34651,7 @@ size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) sort_order_cp932[(uchar) (x)]) #define WEIGHT_MB2(x,y) (cp932code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -34659,7 +34659,7 @@ size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) (uchar) (x)) #define WEIGHT_MB2(x,y) (cp932code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_handler_cp932_japanese_ci= diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 22f8c4ec7c0..62e42f2f942 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -207,7 +207,7 @@ static const uchar sort_order_euc_kr[]= #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80) #define IS_MB2_CHAR(x,y) (iseuc_kr_head(x) && iseuc_kr_tail(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" static MY_UNICASE_CHARACTER cA3[256]= @@ -9929,27 +9929,27 @@ my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), #define MY_FUNCTION_NAME(x) my_ ## x ## _euckr_korean_ci #define WEIGHT_MB1(x) (sort_order_euc_kr[(uchar) (x)]) #define WEIGHT_MB2(x,y) (euckrcode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _euckr_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (euckrcode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _euckr_korean_nopad_ci #define WEIGHT_MB1(x) (sort_order_euc_kr[(uchar) (x)]) #define WEIGHT_MB2(x,y) (euckrcode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _euckr_nopad_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (euckrcode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_handler_euckr_korean_ci= diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c index 58ea37d36e6..f61e02697a6 100644 --- a/strings/ctype-eucjpms.c +++ b/strings/ctype-eucjpms.c @@ -201,7 +201,7 @@ static const uchar sort_order_eucjpms[]= #define IS_MB3_CHAR(x,y,z) (iseucjpms_ss3(x) && IS_MB2_JIS(y,z)) #define IS_MB_PREFIX2(x,y) (iseucjpms_ss3(x) && iseucjpms(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _eucjpms_japanese_ci #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) @@ -209,7 +209,7 @@ static const uchar sort_order_eucjpms[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _eucjpms_bin @@ -218,7 +218,7 @@ static const uchar sort_order_eucjpms[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -228,7 +228,7 @@ static const uchar sort_order_eucjpms[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -238,7 +238,7 @@ static const uchar sort_order_eucjpms[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" /* Case info pages for JIS-X-0208 range */ diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 84246ad6671..f3a8a23bf18 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -170,7 +170,7 @@ static const uchar sort_order_gb2312[]= #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80) #define IS_MB2_CHAR(x,y) (isgb2312head(x) && isgb2312tail(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" static MY_UNICASE_CHARACTER cA2[256]= @@ -6334,27 +6334,27 @@ my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)), #define MY_FUNCTION_NAME(x) my_ ## x ## _gb2312_chinese_ci #define WEIGHT_MB1(x) (sort_order_gb2312[(uchar) (x)]) #define WEIGHT_MB2(x,y) (gb2312code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _gb2312_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (gb2312code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _gb2312_chinese_nopad_ci #define WEIGHT_MB1(x) (sort_order_gb2312[(uchar) (x)]) #define WEIGHT_MB2(x,y) (gb2312code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _gb2312_nopad_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (gb2312code(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_handler_gb2312_chinese_ci= diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index d7ea47c409f..7d6488f727b 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -47,7 +47,7 @@ #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80) #define IS_MB2_CHAR(x,y) (isgbkhead(x) && isgbktail(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" static const uchar ctype_gbk[257] = @@ -10616,13 +10616,13 @@ my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_MB1(x) (sort_order_gbk[(uchar) (x)]) #define WEIGHT_MB2(x,y) (gbksortorder(gbkcode(x,y))) #define DEFINE_STRNXFRM -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _gbk_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (gbkcode(x,y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -10630,14 +10630,14 @@ my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_MB1(x) (sort_order_gbk[(uchar) (x)]) #define WEIGHT_MB2(x,y) (gbksortorder(gbkcode(x,y))) #define DEFINE_STRNXFRM -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _gbk_nopad_bin #define WEIGHT_MB1(x) ((uchar) (x)) #define WEIGHT_MB2(x,y) (gbkcode(x,y)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_handler_gbk_chinese_ci= diff --git a/strings/ctype-mb.ic b/strings/ctype-mb.inl index 336c482d24f..336c482d24f 100644 --- a/strings/ctype-mb.ic +++ b/strings/ctype-mb.inl diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index bd2bf432a34..e15ba5e36fc 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -189,7 +189,7 @@ static const uchar sort_order_sjis[]= #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80 || issjiskata(x)) #define IS_MB2_CHAR(x,y) (issjishead(x) && issjistail(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" #define sjiscode(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d)) @@ -34015,14 +34015,14 @@ size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) sort_order_sjis[(uchar) (x)]) #define WEIGHT_MB2(x,y) (sjiscode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _sjis_bin #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) (uchar) (x)) #define WEIGHT_MB2(x,y) (sjiscode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -34030,7 +34030,7 @@ size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) sort_order_sjis[(uchar) (x)]) #define WEIGHT_MB2(x,y) (sjiscode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -34038,7 +34038,7 @@ size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_PAD_SPACE (256 * (int) ' ') #define WEIGHT_MB1(x) (256 * (int) (uchar) (x)) #define WEIGHT_MB2(x,y) (sjiscode(x, y)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_handler_sjis_japanese_ci= diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 36ab6f5c0b1..2e6b1239c0a 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1211,27 +1211,27 @@ static inline int my_weight_mb2_utf16mb2_general_ci(uchar b0, uchar b1) #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b0,b1) #define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) ((int) MY_UTF16_WC2(b0, b1)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b0, b1, b2, b3)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16_general_nopad_ci #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b0,b1) #define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16_nopad_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) ((int) MY_UTF16_WC2(b0, b1)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b0, b1, b2, b3)) -#include "strcoll.ic" +#include "strcoll.inl" #undef IS_MB2_CHAR #undef IS_MB4_CHAR @@ -1412,7 +1412,7 @@ my_charlen_utf16(CHARSET_INFO *cs, const uchar *str, const uchar *end) #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16 #define CHARLEN(cs,str,end) my_charlen_utf16(cs,str,end) #define DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN -#include "ctype-mb.ic" +#include "ctype-mb.inl" #undef MY_FUNCTION_NAME #undef CHARLEN #undef DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN @@ -1748,27 +1748,27 @@ struct charset_info_st my_charset_utf16_nopad_bin= #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b1,b0) #define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16le_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) ((int) MY_UTF16_WC2(b1, b0)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b1, b0, b3, b2)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16le_general_nopad_ci #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b1,b0) #define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _utf16le_nopad_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) ((int) MY_UTF16_WC2(b1, b0)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b1, b0, b3, b2)) -#include "strcoll.ic" +#include "strcoll.inl" #undef IS_MB2_CHAR #undef IS_MB4_CHAR @@ -2115,24 +2115,24 @@ static inline int my_weight_utf32_general_ci(uchar b0, uchar b1, #define UNICASE_PAGES my_unicase_default_pages #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB4(b0,b1,b2,b3) my_weight_utf32_general_ci(b0, b1, b2, b3) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _utf32_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF32_WC4(b0, b1, b2, b3)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _utf32_general_nopad_ci #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB4(b0,b1,b2,b3) my_weight_utf32_general_ci(b0, b1, b2, b3) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _utf32_nopad_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF32_WC4(b0, b1, b2, b3)) -#include "strcoll.ic" +#include "strcoll.inl" #undef IS_MB2_CHAR #undef IS_MB4_CHAR @@ -2302,7 +2302,7 @@ my_charlen_utf32(CHARSET_INFO *cs __attribute__((unused)), #define MY_FUNCTION_NAME(x) my_ ## x ## _utf32 #define CHARLEN(cs,str,end) my_charlen_utf32(cs,str,end) #define DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN -#include "ctype-mb.ic" +#include "ctype-mb.inl" #undef MY_FUNCTION_NAME #undef CHARLEN #undef DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN @@ -2974,7 +2974,7 @@ static const uchar to_upper_ucs2[] = { }; -/* Definitions for strcoll.ic */ +/* Definitions for strcoll.inl */ #define IS_MB2_CHAR(x,y) (1) #define UCS2_CODE(b0,b1) (((uchar) b0) << 8 | ((uchar) b1)) @@ -2997,7 +2997,7 @@ static inline int my_weight_mb2_ucs2_general_ci(uchar b0, uchar b1) #define UNICASE_PAGES my_unicase_default_pages #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) my_weight_mb2_ucs2_general_ci(b0,b1) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_bin @@ -3006,21 +3006,21 @@ static inline int my_weight_mb2_ucs2_general_ci(uchar b0, uchar b1) #define OPTIMIZE_ASCII 0 #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) UCS2_CODE(b0,b1) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_general_nopad_ci #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) my_weight_mb2_ucs2_general_ci(b0,b1) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD #define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_nopad_bin #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) #define WEIGHT_MB2(b0,b1) UCS2_CODE(b0,b1) -#include "strcoll.ic" +#include "strcoll.inl" static int diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 34600eda1a5..356c1fc092c 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -200,7 +200,7 @@ static const uchar sort_order_ujis[]= #define IS_MB3_CHAR(x, y, z) (isujis_ss3(x) && IS_MB2_JIS(y,z)) #define IS_MB_PREFIX2(x,y) (isujis_ss3(x) && isujis(y)) #define DEFINE_ASIAN_ROUTINES -#include "ctype-mb.ic" +#include "ctype-mb.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _ujis_japanese_ci #define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x)) @@ -208,7 +208,7 @@ static const uchar sort_order_ujis[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _ujis_bin @@ -217,7 +217,7 @@ static const uchar sort_order_ujis[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -227,7 +227,7 @@ static const uchar sort_order_ujis[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -237,7 +237,7 @@ static const uchar sort_order_ujis[]= #define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \ (((uint) (uchar) (y)) << 8)) #define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z)) -#include "strcoll.ic" +#include "strcoll.inl" static diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 7a87dbb7c05..69ebb6b523e 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -31,7 +31,7 @@ #include "ctype-unidata.h" -/* Definitions for strcoll.ic */ +/* Definitions for strcoll.inl */ #define IS_MB1_CHAR(x) ((uchar) (x) < 0x80) #define IS_MB1_MBHEAD_UNUSED_GAP(x) ((uchar) (x) < 0xC2) #define IS_MB2_CHAR(x,y) IS_UTF8MB2_STEP2(x,y) @@ -5211,7 +5211,7 @@ int my_charlen_utf8(CHARSET_INFO *cs __attribute__((unused)), #define MY_FUNCTION_NAME(x) my_ ## x ## _utf8 #define CHARLEN(cs,str,end) my_charlen_utf8(cs,str,end) #define DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN -#include "ctype-mb.ic" +#include "ctype-mb.inl" #undef MY_FUNCTION_NAME #undef CHARLEN #undef DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN @@ -5252,7 +5252,7 @@ static inline int my_weight_mb3_utf8_general_ci(uchar b0, uchar b1, uchar b2) #define WEIGHT_MB1(x) my_weight_mb1_utf8_general_ci(x) #define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y) #define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -5261,7 +5261,7 @@ static inline int my_weight_mb3_utf8_general_ci(uchar b0, uchar b1, uchar b2) #define WEIGHT_MB1(x) my_weight_mb1_utf8_general_ci(x) #define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y) #define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z) -#include "strcoll.ic" +#include "strcoll.inl" static inline int my_weight_mb1_utf8_general_mysql500_ci(uchar b) @@ -5298,7 +5298,7 @@ my_weight_mb3_utf8_general_mysql500_ci(uchar b0, uchar b1, uchar b2) #define WEIGHT_MB1(x) my_weight_mb1_utf8_general_mysql500_ci(x) #define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_mysql500_ci(x,y) #define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_mysql500_ci(x,y,z) -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_bin @@ -5309,7 +5309,7 @@ my_weight_mb3_utf8_general_mysql500_ci(uchar b0, uchar b1, uchar b2) #define WEIGHT_MB1(x) ((int) (uchar) (x)) #define WEIGHT_MB2(x,y) ((int) UTF8MB2_CODE(x,y)) #define WEIGHT_MB3(x,y,z) ((int) UTF8MB3_CODE(x,y,z)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -5318,7 +5318,7 @@ my_weight_mb3_utf8_general_mysql500_ci(uchar b0, uchar b1, uchar b2) #define WEIGHT_MB1(x) ((int) (uchar) (x)) #define WEIGHT_MB2(x,y) ((int) UTF8MB2_CODE(x,y)) #define WEIGHT_MB3(x,y,z) ((int) UTF8MB3_CODE(x,y,z)) -#include "strcoll.ic" +#include "strcoll.inl" /* TODO-10.2: join this with pad_max_char() in ctype-mb.c @@ -7035,7 +7035,7 @@ my_charlen_filename(CHARSET_INFO *cs, const uchar *str, const uchar *end) #define MY_FUNCTION_NAME(x) my_ ## x ## _filename #define CHARLEN(cs,str,end) my_charlen_filename(cs,str,end) #define DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN -#include "ctype-mb.ic" +#include "ctype-mb.inl" #undef MY_FUNCTION_NAME #undef CHARLEN #undef DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN @@ -7056,7 +7056,7 @@ my_charlen_filename(CHARSET_INFO *cs, const uchar *str, const uchar *end) #define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y) #define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z) */ -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_filename_handler = @@ -7639,7 +7639,7 @@ my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), #define MY_FUNCTION_NAME(x) my_ ## x ## _utf8mb4 #define CHARLEN(cs,str,end) my_charlen_utf8mb4(cs,str,end) #define DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN -#include "ctype-mb.ic" +#include "ctype-mb.inl" #undef MY_FUNCTION_NAME #undef CHARLEN #undef DEFINE_WELL_FORMED_CHAR_LENGTH_USING_CHARLEN @@ -7663,7 +7663,7 @@ my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), All non-BMP characters have the same weight. */ #define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER -#include "strcoll.ic" +#include "strcoll.inl" #define MY_FUNCTION_NAME(x) my_ ## x ## _utf8mb4_bin @@ -7672,7 +7672,7 @@ my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_MB2(b0,b1) ((int) UTF8MB2_CODE(b0,b1)) #define WEIGHT_MB3(b0,b1,b2) ((int) UTF8MB3_CODE(b0,b1,b2)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) UTF8MB4_CODE(b0,b1,b2,b3)) -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -7686,7 +7686,7 @@ my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), All non-BMP characters have the same weight. */ #define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER -#include "strcoll.ic" +#include "strcoll.inl" #define DEFINE_STRNNCOLLSP_NOPAD @@ -7696,7 +7696,7 @@ my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), #define WEIGHT_MB2(b0,b1) ((int) UTF8MB2_CODE(b0,b1)) #define WEIGHT_MB3(b0,b1,b2) ((int) UTF8MB3_CODE(b0,b1,b2)) #define WEIGHT_MB4(b0,b1,b2,b3) ((int) UTF8MB4_CODE(b0,b1,b2,b3)) -#include "strcoll.ic" +#include "strcoll.inl" static MY_COLLATION_HANDLER my_collation_utf8mb4_general_ci_handler= diff --git a/strings/strcoll.ic b/strings/strcoll.inl index 392a5dac589..392a5dac589 100644 --- a/strings/strcoll.ic +++ b/strings/strcoll.inl diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index ccbd24d30f9..4c1db775c19 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -29,6 +29,7 @@ ELSE() SET(CFLAGS ${CMAKE_C_FLAGS}) SET(CXXFLAGS ${CMAKE_CXX_FLAGS}) SET(MYSQLD_USER "mysql") + SET(MYSQLD_GROUP "mysql") SET(ini_file_extension "cnf") SET(HOSTNAME "uname -n") ENDIF() @@ -79,7 +80,7 @@ IF(UNIX) INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles) ENDFOREACH() IF(RPM) - EXECUTE_PROCESS(COMMAND rpm -q --qf "%{VERSION}" libsepol + EXECUTE_PROCESS(COMMAND rpm -q --qf "%{VERSION}" libsepol."${CMAKE_SYSTEM_PROCESSOR}" OUTPUT_VARIABLE LIBSEPOL_VERSION RESULT_VARIABLE err) IF (NOT err) SET(CPACK_RPM_server_PACKAGE_REQUIRES diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in index ca9262dd211..b7a55596029 100644 --- a/support-files/mariadb.service.in +++ b/support-files/mariadb.service.in @@ -62,6 +62,8 @@ PrivateDevices=false # Prevent writes to /usr, /boot, and /etc ProtectSystem=full +@SYSTEMD_READWRITEPATH@ + # Doesn't yet work properly with SELinux enabled # NoNewPrivileges=true diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in index af99f0f3c5a..8878ff27703 100644 --- a/support-files/mariadb@.service.in +++ b/support-files/mariadb@.service.in @@ -190,6 +190,8 @@ PrivateDevices=false # Prevent writes to /usr, /boot, and /etc ProtectSystem=full +@SYSTEMD_READWRITEPATH@ + # Requires kernel 4.14 or later and SELinux transition rule for mysqld_t # (https://github.com/systemd/systemd/issues/3845) # NoNewPrivileges=true diff --git a/support-files/mysql-log-rotate.sh b/support-files/mysql-log-rotate.sh index 293229d8482..9f501a4c456 100644 --- a/support-files/mysql-log-rotate.sh +++ b/support-files/mysql-log-rotate.sh @@ -20,6 +20,7 @@ @localstatedir@/mysqld.log { # create 600 mysql mysql + su mysql mysql notifempty daily rotate 3 diff --git a/support-files/policy/selinux/mariadb-server.te b/support-files/policy/selinux/mariadb-server.te index 71924012283..851f8add61c 100644 --- a/support-files/policy/selinux/mariadb-server.te +++ b/support-files/policy/selinux/mariadb-server.te @@ -77,6 +77,7 @@ allow mysqld_t user_tmp_t:dir { write add_name }; allow mysqld_t user_tmp_t:file create; allow mysqld_t bin_t:lnk_file read; allow mysqld_t tmp_t:file { append create read write open getattr unlink setattr }; +allow mysqld_t usermodehelper_t:file { read open }; # Allows too much leeway - the mariabackup/wsrep rules in fc should fix it, but # keep for the moment. diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 8ebe0a4c2a8..f223f7fe4a0 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -1,5 +1,5 @@ /* Copyright (c) 2002, 2014, Oracle and/or its affiliates. - Copyright (c) 2008, 2020, MariaDB + Copyright (c) 2008, 2022, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20667,6 +20667,91 @@ static void test_mdev_26145() myquery(rc); } +static void test_mdev24827() +{ + int rc; + MYSQL_STMT *stmt; + unsigned long cursor = CURSOR_TYPE_READ_ONLY; + const char* query= + "SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 " + "WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1"; + + myheader("test_mdev24827"); + + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); + myquery(rc); + + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t2"); + myquery(rc); + + rc= mysql_query(mysql, "CREATE TABLE t1 (c1 INT PRIMARY KEY, c2 INT)"); + myquery(rc); + + rc= mysql_query(mysql, "CREATE TABLE t2 (c1 INT PRIMARY KEY, c2 INT, " + "KEY idx_c2(c2))"); + myquery(rc); + + rc= mysql_query(mysql, "INSERT INTO t1 (c1, c2) " + "SELECT seq, seq FROM seq_1_to_10000"); + myquery(rc); + + rc= mysql_query(mysql, "INSERT INTO t2 (c1, c2) " + "SELECT seq, seq FROM seq_1_to_20000"); + myquery(rc); + + stmt= mysql_stmt_init(mysql); + check_stmt(stmt); + + rc= mysql_stmt_prepare(stmt, query, strlen(query)); + check_execute(stmt, rc); + + rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor); + check_execute(stmt, rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + mysql_stmt_close(stmt); + + rc= mysql_query(mysql, "DROP TABLE t1"); + myquery(rc); + + rc= mysql_query(mysql, "DROP TABLE t2"); + myquery(rc); +} + +static void test_mdev_20516() +{ + MYSQL_STMT *stmt; + int rc; + unsigned long cursor= CURSOR_TYPE_READ_ONLY; + const char* query= + "CREATE VIEW v1 AS SELECT * FROM t1"; + + myheader("test_mdev_20516"); + + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); + myquery(rc); + + rc= mysql_query(mysql, "CREATE TABLE t1(a INT)"); + myquery(rc); + + stmt= mysql_stmt_init(mysql); + check_stmt(stmt); + + rc= mysql_stmt_prepare(stmt, query, strlen(query)); + check_execute(stmt, rc); + + rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor); + check_execute(stmt, rc); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + mysql_stmt_close(stmt); + + rc= mysql_query(mysql, "DROP TABLE t1"); + myquery(rc); +} + static void print_metadata(MYSQL_RES *rs_metadata, int num_fields) { int i; @@ -21203,6 +21288,8 @@ static void test_mdev20261() static struct my_tests_st my_tests[]= { + { "test_mdev_20516", test_mdev_20516 }, + { "test_mdev24827", test_mdev24827 }, { "test_mdev_26145", test_mdev_26145 }, { "disable_query_logs", disable_query_logs }, { "test_view_sp_list_fields", test_view_sp_list_fields }, |