diff --git a/.bzrignore b/.bzrignore index 409b6148125..74c81c48e05 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1097,7 +1097,6 @@ CPackSourceConfig.cmake Docs/INFO_BIN Docs/INFO_SRC tags -sql/.empty Testing info_macros.cmake VERSION.dep diff --git a/CMakeLists.txt b/CMakeLists.txt index 74697ce232d..9ec4ef14ec5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,14 +300,16 @@ ADD_SUBDIRECTORY(vio) ADD_SUBDIRECTORY(regex) ADD_SUBDIRECTORY(mysys) ADD_SUBDIRECTORY(libmysql) - +ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(extra) +ADD_SUBDIRECTORY(libservices) +ADD_SUBDIRECTORY(scripts) +ADD_SUBDIRECTORY(sql/share) +ADD_SUBDIRECTORY(support-files) + IF(NOT WITHOUT_SERVER) ADD_SUBDIRECTORY(tests) - ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(sql) - ADD_SUBDIRECTORY(sql/share) - ADD_SUBDIRECTORY(libservices) OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF) IF(WITH_EMBEDDED_SERVER) ADD_SUBDIRECTORY(libmysqld) @@ -316,12 +318,11 @@ IF(NOT WITHOUT_SERVER) ADD_SUBDIRECTORY(mysql-test) ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess) - ADD_SUBDIRECTORY(support-files) - ADD_SUBDIRECTORY(scripts) ADD_SUBDIRECTORY(sql-bench) - IF(UNIX) - ADD_SUBDIRECTORY(man) - ENDIF() +ENDIF() + +IF(UNIX) + ADD_SUBDIRECTORY(man) ENDIF() INCLUDE(cmake/abi_check.cmake) diff --git a/client/get_password.c b/client/get_password.c index c6653183f48..09d307b5553 100644 --- a/client/get_password.c +++ b/client/get_password.c @@ -23,10 +23,6 @@ #include #include -#if defined(HAVE_BROKEN_GETPASS) && !defined(HAVE_GETPASSPHRASE) -#undef HAVE_GETPASS -#endif - #ifdef HAVE_GETPASS #ifdef HAVE_PWD_H #include diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 91a2bd2aef3..d10504425f5 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2012, Monty Program Ab + Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2009, 2012, Monty Program Ab 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 @@ -743,7 +743,7 @@ print_use_stmt(PRINT_EVENT_INFO* pinfo, const Query_log_event *ev) return; // In case of rewrite rule print USE statement for db_to - fprintf(result_file, "use %s%s\n", db_to, pinfo->delimiter); + my_fprintf(result_file, "use %`s%s\n", db_to, pinfo->delimiter); // Copy the *original* db to pinfo to suppress emiting // of USE stmts by log_event print-functions. @@ -844,6 +844,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, DBUG_ENTER("process_event"); print_event_info->short_form= short_form; Exit_status retval= OK_CONTINUE; + IO_CACHE *const head= &print_event_info->head_cache; /* Format events are not concerned by --offset and such, we always need to @@ -923,6 +924,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, print_skip_replication_statement(print_event_info, ev); ev->print(result_file, print_event_info); } + if (head->error == -1) + goto err; break; } @@ -955,8 +958,9 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, { print_skip_replication_statement(print_event_info, ev); ce->print(result_file, print_event_info, TRUE); + if (head->error == -1) + goto err; } - // If this binlog is not 3.23 ; why this test?? if (glob_description_event->binlog_version >= 3) { @@ -978,6 +982,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, output of Append_block_log_event::print is only a comment. */ ev->print(result_file, print_event_info); + if (head->error == -1) + goto err; if ((retval= load_processor.process((Append_block_log_event*) ev)) != OK_CONTINUE) goto end; @@ -986,6 +992,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, case EXEC_LOAD_EVENT: { ev->print(result_file, print_event_info); + if (head->error == -1) + goto err; Execute_load_log_event *exv= (Execute_load_log_event*)ev; Create_file_log_event *ce= load_processor.grab_event(exv->file_id); /* @@ -1003,6 +1011,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, ce->print(result_file, print_event_info, TRUE); my_free((void*)ce->fname); delete ce; + if (head->error == -1) + goto err; } else warning("Ignoring Execute_load_log_event as there is no " @@ -1015,6 +1025,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, print_event_info->common_header_len= glob_description_event->common_header_len; ev->print(result_file, print_event_info); + if (head->error == -1) + goto err; if (!remote_opt) { ev->free_temp_buf(); // free memory allocated in dump_local_log_entries @@ -1044,6 +1056,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, break; case BEGIN_LOAD_QUERY_EVENT: ev->print(result_file, print_event_info); + if (head->error == -1) + goto err; if ((retval= load_processor.process((Begin_load_query_log_event*) ev)) != OK_CONTINUE) goto end; @@ -1061,6 +1075,12 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, convert_path_to_forward_slashes(fname); print_skip_replication_statement(print_event_info, ev); exlq->print(result_file, print_event_info, fname); + if (head->error == -1) + { + if (fname) + my_free(fname); + goto err; + } } else warning("Ignoring Execute_load_query since there is no " @@ -1191,6 +1211,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, default: print_skip_replication_statement(print_event_info, ev); ev->print(result_file, print_event_info); + if (head->error == -1) + goto err; } } @@ -1354,7 +1376,7 @@ static struct my_option my_options[] = "Stop reading the binlog at position N. Applies to the last binlog " "passed on the command line.", &stop_position, &stop_position, 0, GET_ULL, - REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE, + REQUIRED_ARG, (longlong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE, (ulonglong)(~(my_off_t)0), 0, 0, 0}, {"to-last-log", 't', "Requires -R. Will not stop at the end of the \ requested binlog but rather continue printing until the end of the last \ @@ -2324,7 +2346,13 @@ err: end: if (fd >= 0) my_close(fd, MYF(MY_WME)); - end_io_cache(file); + /* + Since the end_io_cache() writes to the + file errors may happen. + */ + if (end_io_cache(file)) + retval= ERROR_STOP; + return retval; } diff --git a/client/mysqldump.c b/client/mysqldump.c index f91c480bc80..e3572efa9ba 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2610,6 +2610,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (strcmp(field->name, "View") == 0) { char *scv_buff= NULL; + my_ulonglong n_cols; verbose_msg("-- It's a view, create dummy table for view\n"); @@ -2624,8 +2625,8 @@ static uint get_table_structure(char *table, char *db, char *table_type, the same name in order to satisfy views that depend on this view. The table will be removed when the actual view is created. - The properties of each column, aside from the data type, are not - preserved in this temporary table, because they are not necessary. + The properties of each column, are not preserved in this temporary + table, because they are not necessary. This will not be necessary once we can determine dependencies between views and can simply dump them in the appropriate order. @@ -2652,8 +2653,23 @@ static uint get_table_structure(char *table, char *db, char *table_type, else my_free(scv_buff); - if (mysql_num_rows(result)) + n_cols= mysql_num_rows(result); + if (0 != n_cols) { + + /* + The actual formula is based on the column names and how the .FRM + files are stored and is too volatile to be repeated here. + Thus we simply warn the user if the columns exceed a limit we + know works most of the time. + */ + if (n_cols >= 1000) + fprintf(stderr, + "-- Warning: Creating a stand-in table for view %s may" + " fail when replaying the dump file produced because " + "of the number of columns exceeding 1000. Exercise " + "caution when replaying the produced dump file.\n", + table); if (opt_drop) { /* @@ -2680,14 +2696,19 @@ static uint get_table_structure(char *table, char *db, char *table_type, row= mysql_fetch_row(result); - fprintf(sql_file, " %s %s", quote_name(row[0], name_buff, 0), - row[1]); + /* + The actual column type doesn't matter anyway, since the table will + be dropped at run time. + We do tinyint to avoid hitting the row size limit. + */ + fprintf(sql_file, " %s tinyint NOT NULL", + quote_name(row[0], name_buff, 0)); while((row= mysql_fetch_row(result))) { /* col name, col type */ - fprintf(sql_file, ",\n %s %s", - quote_name(row[0], name_buff, 0), row[1]); + fprintf(sql_file, ",\n %s tinyint NOT NULL", + quote_name(row[0], name_buff, 0)); } /* @@ -4159,6 +4180,7 @@ static int dump_all_databases() if (dump_all_tables_in_db(row[0])) result=1; } + mysql_free_result(tableres); if (seen_views) { if (mysql_query(mysql, "SHOW DATABASES") || @@ -4181,6 +4203,7 @@ static int dump_all_databases() if (dump_all_views_in_db(row[0])) result=1; } + mysql_free_result(tableres); } return result; } @@ -4309,8 +4332,6 @@ static int init_dumping(char *database, int init_func(char*)) check_io(md_result_file); } } - if (extended_insert) - init_dynamic_string_checked(&extended_row, "", 1024, 1024); return 0; } /* init_dumping */ @@ -4784,7 +4805,7 @@ static int add_slave_statements(void) static int do_show_slave_status(MYSQL *mysql_con) { - MYSQL_RES *slave; + MYSQL_RES *slave= 0; const char *comment_prefix= (opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : ""; LINT_INIT(slave); @@ -5589,6 +5610,9 @@ int main(int argc, char **argv) if (opt_alltspcs) dump_all_tablespaces(); + if (extended_insert) + init_dynamic_string_checked(&extended_row, "", 1024, 1024); + if (opt_alldbs) { if (!opt_alltspcs && !opt_notspcs) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 3bae2bfbc9d..bb89db4b231 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1,5 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2009-2012 Monty Program Ab. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2009, 2012, Monty Program Ab. 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 @@ -621,6 +621,8 @@ void free_all_replace(){ free_replace_column(); } +void var_set_int(const char* name, int value); + class LogFile { FILE* m_file; @@ -1275,6 +1277,8 @@ void handle_command_error(struct st_command *command, uint error, { DBUG_ENTER("handle_command_error"); DBUG_PRINT("enter", ("error: %d", error)); + var_set_int("$sys_errno",sys_errno); + var_set_int("$errno",error); if (error != 0) { int i; @@ -1285,7 +1289,7 @@ void handle_command_error(struct st_command *command, uint error, "errno: %d", command->first_word_len, command->query, error, my_errno, sys_errno); - return; + DBUG_VOID_RETURN; } i= match_expected_error(command, error, NULL); @@ -5144,7 +5148,7 @@ typedef struct static st_error global_error_names[] = { - { "", (uint) -1, "" }, + { "", -1U, "" }, #include { 0, 0, 0 } }; @@ -5201,15 +5205,32 @@ const char *get_errname_from_code (uint error_code) void do_get_errcodes(struct st_command *command) { struct st_match_err *to= saved_expected_errors.err; - char *p= command->first_argument; - uint count= 0; - char *next; - DBUG_ENTER("do_get_errcodes"); - if (!*p) + if (!*command->first_argument) die("Missing argument(s) to 'error'"); + /* TODO: Potentially, there is a possibility of variables + being expanded twice, e.g. + + let $errcodes = 1,\$a; + let $a = 1051; + error $errcodes; + DROP TABLE unknown_table; + ... + Got one of the listed errors + + But since it requires manual escaping, it does not seem + particularly dangerous or error-prone. + */ + DYNAMIC_STRING ds; + init_dynamic_string(&ds, 0, command->query_len + 64, 256); + do_eval(&ds, command->first_argument, command->end, !is_windows); + char *p= ds.str; + + uint count= 0; + char *next; + do { char *end; @@ -5319,11 +5340,15 @@ void do_get_errcodes(struct st_command *command) } while (*p); - command->last_argument= p; + command->last_argument= command->first_argument; + while (*command->last_argument) + command->last_argument++; + to->type= ERR_EMPTY; /* End of data */ DBUG_PRINT("info", ("Expected errors: %d", count)); saved_expected_errors.count= count; + dynstr_free(&ds); DBUG_VOID_RETURN; } @@ -7685,6 +7710,8 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, */ if ((counter==0) && do_read_query_result(cn)) { + /* we've failed to collect the result set */ + cn->pending= TRUE; handle_error(command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), ds); goto end; diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 8e70af6c5a9..e915e732612 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -65,6 +65,7 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE "${CPACK_RPM_SPEC_MORE_DEFINE} SET(CPACK_RPM_PACKAGE_REQUIRES "MariaDB-common") SET(CPACK_RPM_server_USER_FILELIST "%ignore /etc" "%ignore /etc/init.d") +SET(CPACK_RPM_common_USER_FILELIST "%config(noreplace) /etc/my.cnf") SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MySQL-client MySQL-OurDelta-client") SET(CPACK_RPM_client_PACKAGE_PROVIDES "MariaDB-client MySQL-client mysql-client") diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 8456cd69b0b..b93a1c12a2e 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -364,4 +364,7 @@ SET(HAVE_SOCKADDR_IN_SIN_LEN CACHE INTERNAL "") SET(HAVE_SOCKADDR_IN6_SIN6_LEN CACHE INTERNAL "") SET(HAVE_VALGRIND CACHE INTERNAL "") SET(HAVE_EVENT_H CACHE INTERNAL "") +SET(HAVE_LINUX_UNISTD_H CACHE INTERNAL "") +SET(HAVE_SYS_UTSNAME_H CACHE INTERNAL "") +SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "") ENDIF() diff --git a/cmake/readline.cmake b/cmake/readline.cmake index fd2e690fab9..285b436921e 100644 --- a/cmake/readline.cmake +++ b/cmake/readline.cmake @@ -109,6 +109,8 @@ MACRO (FIND_CURSES) ENDIF() ENDIF() ENDIF() + CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} setupterm "" HAVE_SETUPTERM) + CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} vidattr "" HAVE_VIDATTR) ENDMACRO() MACRO (MYSQL_USE_BUNDLED_READLINE) diff --git a/config.h.cmake b/config.h.cmake index 5f1614993c3..e6ec8b23b58 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -46,6 +46,7 @@ #cmakedefine HAVE_IEEEFP_H 1 #cmakedefine HAVE_INTTYPES_H 1 #cmakedefine HAVE_LIMITS_H 1 +#cmakedefine HAVE_LINUX_UNISTD_H 1 #cmakedefine HAVE_LOCALE_H 1 #cmakedefine HAVE_MALLOC_H 1 #cmakedefine HAVE_MEMORY_H 1 @@ -83,6 +84,7 @@ #cmakedefine HAVE_SYS_SHM_H 1 #cmakedefine HAVE_SYS_SOCKET_H 1 #cmakedefine HAVE_SYS_SOCKIO_H 1 +#cmakedefine HAVE_SYS_UTSNAME_H 1 #cmakedefine HAVE_SYS_STAT_H 1 #cmakedefine HAVE_SYS_STREAM_H 1 #cmakedefine HAVE_SYS_TERMCAP_H 1 @@ -130,6 +132,7 @@ #cmakedefine FIONREAD_IN_SYS_FILIO 1 /* Functions we may want to use. */ +#cmakedefine HAVE_ACCESS 1 #cmakedefine HAVE_AIOWAIT 1 #cmakedefine HAVE_ALARM 1 #cmakedefine HAVE_ALLOCA 1 @@ -151,6 +154,7 @@ #cmakedefine HAVE_FCONVERT 1 #cmakedefine HAVE_FDATASYNC 1 #cmakedefine HAVE_DECL_FDATASYNC 1 +#cmakedefine HAVE_FEDISABLEEXCEPT 1 #cmakedefine HAVE_FESETROUND 1 #cmakedefine HAVE_FINITE 1 #cmakedefine HAVE_FP_EXCEPT 1 @@ -175,6 +179,7 @@ #cmakedefine HAVE_GETWD 1 #cmakedefine HAVE_GMTIME_R 1 #cmakedefine gmtime_r @gmtime_r@ +#cmakedefine HAVE_IN_ADDR_T 1 #cmakedefine HAVE_INITGROUPS 1 #cmakedefine HAVE_ISSETUGID 1 #cmakedefine HAVE_GETUID 1 @@ -215,6 +220,7 @@ #cmakedefine HAVE_RDTSCLL 1 #cmakedefine HAVE_READ_REAL_TIME 1 #cmakedefine HAVE_PTHREAD_ATTR_CREATE 1 +#cmakedefine HAVE_PTHREAD_ATTR_GETGUARDSIZE 1 #cmakedefine HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 #cmakedefine HAVE_PTHREAD_ATTR_SETPRIO 1 #cmakedefine HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1 @@ -247,6 +253,7 @@ #cmakedefine HAVE_SETFD 1 #cmakedefine HAVE_SETENV 1 #cmakedefine HAVE_SETLOCALE 1 +#cmakedefine HAVE_SETUPTERM 1 #cmakedefine HAVE_SIGADDSET 1 #cmakedefine HAVE_SIGEMPTYSET 1 #cmakedefine HAVE_SIGHOLD 1 @@ -284,6 +291,7 @@ #cmakedefine HAVE_TIME 1 #cmakedefine HAVE_TIMES 1 #cmakedefine HAVE_VALLOC 1 +#cmakedefine HAVE_VIDATTR 1 #define HAVE_VIO_READ_BUFF 1 #cmakedefine HAVE_VASPRINTF 1 #cmakedefine HAVE_VPRINTF 1 diff --git a/configure.cmake b/configure.cmake index ff87d632055..5d44e0677d2 100644 --- a/configure.cmake +++ b/configure.cmake @@ -56,10 +56,10 @@ ENDIF() # Always enable -Wall for gnu C/C++ IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_FLAGS MATCHES ".*-Wall.*") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter") + SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter") ENDIF() IF(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_C_FLAGS MATCHES ".*-Wall.*") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + SET(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS} -Wall") ENDIF() @@ -202,6 +202,7 @@ CHECK_INCLUDE_FILES (grp.h HAVE_GRP_H) CHECK_INCLUDE_FILES (ieeefp.h HAVE_IEEEFP_H) CHECK_INCLUDE_FILES (inttypes.h HAVE_INTTYPES_H) CHECK_INCLUDE_FILES (langinfo.h HAVE_LANGINFO_H) +CHECK_INCLUDE_FILES (linux/unistd.h HAVE_LINUX_UNISTD_H) CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H) CHECK_INCLUDE_FILES (locale.h HAVE_LOCALE_H) CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) @@ -261,6 +262,7 @@ CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) CHECK_INCLUDE_FILES (wchar.h HAVE_WCHAR_H) CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H) CHECK_INCLUDE_FILES (sys/sockio.h HAVE_SYS_SOCKIO_H) +CHECK_INCLUDE_FILES (sys/utsname.h HAVE_SYS_UTSNAME_H) IF(BFD_H_EXISTS) IF(NOT_FOR_DISTRIBUTION) @@ -326,6 +328,7 @@ ENDIF() # # Tests for functions # +CHECK_FUNCTION_EXISTS (access HAVE_ACCESS) #CHECK_FUNCTION_EXISTS (aiowait HAVE_AIOWAIT) CHECK_FUNCTION_EXISTS (aio_read HAVE_AIO_READ) CHECK_FUNCTION_EXISTS (alarm HAVE_ALARM) @@ -554,6 +557,10 @@ IF(NOT SIZEOF_MODE_T) SET(mode_t int) ENDIF() +IF(HAVE_NETINET_IN_H) + SET(CMAKE_EXTRA_INCLUDE_FILES netinet/in.h) + MY_CHECK_TYPE_SIZE(in_addr_t IN_ADDR_T) +ENDIF(HAVE_NETINET_IN_H) IF(HAVE_STDINT_H) SET(CMAKE_EXTRA_INCLUDE_FILES stdint.h) diff --git a/dbug/dbug.c b/dbug/dbug.c index af0a937ff07..b285b32fa17 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -284,9 +284,6 @@ static int DoTrace(CODE_STATE *cs); /* Test to see if file is writable */ #if defined(HAVE_ACCESS) static BOOLEAN Writable(const char *pathname); - /* Change file owner and group */ -static void ChangeOwner(CODE_STATE *cs, char *pathname); - /* Allocate memory for runtime support */ #endif static void DoPrefix(CODE_STATE *cs, uint line); diff --git a/dbug/factorial.c b/dbug/factorial.c index 7b190ea8d8e..e1cb77f0e30 100644 --- a/dbug/factorial.c +++ b/dbug/factorial.c @@ -1,14 +1,3 @@ -#ifdef DBUG_OFF /* We are testing dbug */ - -int factorial(register int value) { - if(value > 1) { - value *= factorial(value-1); - } - return value; -} - -#else - #include int factorial ( @@ -22,6 +11,3 @@ register int value) DBUG_PRINT ("result", ("result is %d", value)); DBUG_RETURN (value); } - -#endif - diff --git a/debian/additions/my.cnf b/debian/additions/my.cnf index fd9bcf19977..a27f8543f0b 100644 --- a/debian/additions/my.cnf +++ b/debian/additions/my.cnf @@ -65,7 +65,7 @@ max_heap_table_size = 32M myisam_recover = BACKUP key_buffer_size = 128M #open-files-limit = 2000 -table_cache = 400 +table_open_cache = 400 myisam_sort_buffer_size = 512M concurrent_insert = 2 read_buffer_size = 2M diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index d2288ee8b42..d4a1fa70d8c 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -37,6 +37,11 @@ case "${CODENAME}" in *) LIBREADLINE_DEV=libreadline-gplv2-dev ;; esac +case "${CODENAME}" in + etch|lenny|hardy|intrepid|jaunty|karmic) CMAKE_DEP='' ;; + *) CMAKE_DEP='cmake (>= 2.7), ' ;; +esac + # Clean up build file symlinks that are distro-specific. First remove all, then set # new links. DISTRODIRS="$(ls ./debian/dist)" @@ -53,7 +58,9 @@ echo "Copying distribution specific build files for ${DISTRO}" DISTROFILES="$(ls ./debian/dist/${DISTRO})" for distrofile in ${DISTROFILES}; do rm -f "./debian/${distrofile}" - sed -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" < "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}" + sed -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" \ + -e "s/\\\${CMAKE_DEP}/${CMAKE_DEP}/g" \ + < "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}" chmod --reference="./debian/dist/${DISTRO}/${distrofile}" "./debian/${distrofile}" done; diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index 7a324c93895..95bde727093 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: MariaDB Developers XSBC-Original-Maintainer: Maria Developers Uploaders: MariaDB Developers -Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper +Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev Standards-Version: 3.8.3 Homepage: http://mariadb.org/ Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files diff --git a/debian/dist/Debian/mariadb-server-5.5.postinst b/debian/dist/Debian/mariadb-server-5.5.postinst index e3f2df13b4b..2e15b121db9 100644 --- a/debian/dist/Debian/mariadb-server-5.5.postinst +++ b/debian/dist/Debian/mariadb-server-5.5.postinst @@ -21,7 +21,7 @@ invoke() { fi } -MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --loose-pbxt=OFF --default-storage-engine=myisam" +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam" test_mysql_access() { mysql --no-defaults -u root -h localhost /dev/null 2>&1 diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 8a8a93c37aa..70ef5fd2ecf 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: MariaDB Developers XSBC-Original-Maintainer: Maria Developers Uploaders: MariaDB Developers -Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper +Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libevent-dev, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, ${CMAKE_DEP}libaio-dev Standards-Version: 3.8.2 Homepage: http://mariadb.org/ Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/5.5/files diff --git a/debian/dist/Ubuntu/mariadb-server-5.5.postinst b/debian/dist/Ubuntu/mariadb-server-5.5.postinst index a0c351194bb..1c7aa37f69f 100644 --- a/debian/dist/Ubuntu/mariadb-server-5.5.postinst +++ b/debian/dist/Ubuntu/mariadb-server-5.5.postinst @@ -21,7 +21,7 @@ invoke() { fi } -MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --loose-pbxt=OFF --default-storage-engine=myisam" +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --loose-innodb=OFF --default-storage-engine=myisam" test_mysql_access() { mysql --no-defaults -u root -h localhost /dev/null 2>&1 diff --git a/debian/mariadb-client-5.5.files b/debian/mariadb-client-5.5.files index 9cb949ea53e..335f736d680 100644 --- a/debian/mariadb-client-5.5.files +++ b/debian/mariadb-client-5.5.files @@ -11,6 +11,7 @@ usr/bin/mysqlimport usr/bin/mysqlreport usr/bin/mysqlshow usr/bin/mysqlslap +usr/bin/mytop usr/bin/mysql_waitpid usr/share/lintian/overrides/mariadb-client-5.5 usr/share/man/man1/innotop.1 diff --git a/extra/resolveip.c b/extra/resolveip.c index 871fd31482e..b6840d9d463 100644 --- a/extra/resolveip.c +++ b/extra/resolveip.c @@ -25,9 +25,7 @@ #ifndef WIN32 # include # include -# ifndef HAVE_BROKEN_NETINET_INCLUDES -# include -# endif +# include # include # include #endif diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index a502666d15b..5ec4cac1c44 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -758,6 +758,10 @@ void CertDecoder::GetName(NameType nt) while (source_.get_index() < length) { GetSet(); + if (source_.GetError().What() == SET_E) { + source_.SetError(NO_ERROR_E); // extensions may only have sequence + source_.prev(); + } GetSequence(); byte b = source_.next(); diff --git a/extra/yassl/taocrypt/src/dsa.cpp b/extra/yassl/taocrypt/src/dsa.cpp index a4e9c9503e7..7b882b10cd1 100644 --- a/extra/yassl/taocrypt/src/dsa.cpp +++ b/extra/yassl/taocrypt/src/dsa.cpp @@ -184,7 +184,7 @@ word32 DSA_Signer::Sign(const byte* sha_digest, byte* sig, s_ = (kInv * (H + x*r_)) % q; if (!(!!r_ && !!s_)) - return -1; + return (word32) -1; int rSz = r_.ByteCount(); diff --git a/include/atomic/nolock.h b/include/atomic/nolock.h index 1da184158ab..56f37644f96 100644 --- a/include/atomic/nolock.h +++ b/include/atomic/nolock.h @@ -36,7 +36,7 @@ choose the Solaris implementation on Solaris (mainly for SunStudio compilers). */ -# if defined(_MSV_VER) +# if defined(_MSC_VER) # include "generic-msvc.h" # elif __GNUC__ # if defined(HAVE_SOLARIS_ATOMIC) diff --git a/include/m_string.h b/include/m_string.h index 9fc6cda4764..9efa0376942 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -62,13 +62,9 @@ # define bmove_align(A,B,C) memcpy((A),(B),(C)) -#if !defined(HAVE_BCMP) # define bcmp(A,B,C) memcmp((A),(B),(C)) -#endif -#if !defined(bzero) && (!defined(HAVE_BZERO) || !HAVE_DECL_BZERO || defined(_AIX)) -/* See autoconf doku: "HAVE_DECL_symbol" will be defined after configure, to 0 or 1 */ -/* AIX has bzero() as a function, but the declaration prototype is strangely hidden */ +#if !defined(bzero) # define bzero(A,B) memset((A),0,(B)) #endif diff --git a/include/my_getopt.h b/include/my_getopt.h index 61c4b054615..a56be90f455 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2011, Oracle and/or its affiliates. + Copyright (c) 2002, 2012, Oracle and/or its affiliates. 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 @@ -79,7 +79,7 @@ struct my_option enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */ longlong def_value; /**< Default value */ longlong min_value; /**< Min allowed value (for numbers) */ - longlong max_value; /**< Max allowed value (for numbers) */ + ulonglong max_value; /**< Max allowed value (for numbers) */ longlong sub_size; /**< Unused */ long block_size; /**< Value should be a mult. of this (for numbers) */ void *app_type; /**< To be used by an application */ diff --git a/include/my_global.h b/include/my_global.h index a5fa57dbfe3..09a3a0a6efd 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -229,11 +229,6 @@ #include #endif -#ifdef HAVE_THREADS_WITHOUT_SOCKETS -/* MIT pthreads does not work with unix sockets */ -#undef HAVE_SYS_UN_H -#endif - #define __EXTENSIONS__ 1 /* We want some extension */ #ifndef __STDC_EXT__ #define __STDC_EXT__ 1 /* To get large file support on hpux */ @@ -306,18 +301,6 @@ inline double my_ulonglong2double(unsigned long long A) { return (double A); } C_MODE_END #endif /* _AIX */ -#ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ -#undef HAVE_SNPRINTF -#endif -#ifdef HAVE_BROKEN_PREAD -/* - pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without - installing the kernel patch PHKL_20349 or greater -*/ -#undef HAVE_PREAD -#undef HAVE_PWRITE -#endif - #ifdef UNDEF_HAVE_INITGROUPS /* For AIX 4.3 */ #undef HAVE_INITGROUPS #endif @@ -823,18 +806,7 @@ inline unsigned long long my_double2ulonglong(double d) #endif #ifdef HAVE_ISINF -/* Check if C compiler is affected by GCC bug #39228 */ -#if !defined(__cplusplus) && defined(HAVE_BROKEN_ISINF) -/* Force store/reload of the argument to/from a 64-bit double */ -static inline double my_isinf(double x) -{ - volatile double t= x; - return isinf(t); -} -#else -/* System-provided isinf() is available and safe to use */ #define my_isinf(X) isinf(X) -#endif #else /* !HAVE_ISINF */ #define my_isinf(X) (!finite(X) && !isnan(X)) #endif diff --git a/include/my_net.h b/include/my_net.h index ce2ee6ce8ca..0ad3ebf0f30 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -43,7 +43,7 @@ C_MODE_START #include #endif -#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) +#if !defined(__WIN__) #include #include #include diff --git a/include/my_pthread.h b/include/my_pthread.h index 21c85c633d6..404d5fb5258 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -200,28 +200,13 @@ extern int my_pthread_create_detached; int sigwait(sigset_t *set, int *sig); #endif -#ifndef HAVE_NONPOSIX_SIGWAIT #define my_sigwait(A,B) sigwait((A),(B)) -#else -int my_sigwait(const sigset_t *set,int *sig); -#endif - -#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT -#ifndef SAFE_MUTEX -#define pthread_mutex_init(a,b) my_pthread_mutex_noposix_init((a),(b)) -extern int my_pthread_mutex_noposix_init(pthread_mutex_t *mp, - const pthread_mutexattr_t *attr); -#endif /* SAFE_MUTEX */ -#define pthread_cond_init(a,b) my_pthread_cond_noposix_init((a),(b)) -extern int my_pthread_cond_noposix_init(pthread_cond_t *mp, - const pthread_condattr_t *attr); -#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */ #if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK) #define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C)) #endif -#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) +#if !defined(HAVE_SIGWAIT) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(_AIX) int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ #endif @@ -247,24 +232,12 @@ int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ #define my_sigset(A,B) signal((A),(B)) #endif -#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS) +#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) #define pthread_attr_setscope(A,B) #undef HAVE_GETHOSTBYADDR_R /* No definition */ #endif -#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX) -extern int my_pthread_cond_timedwait(pthread_cond_t *cond, - pthread_mutex_t *mutex, - struct timespec *abstime); -#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C)) -#endif - -#if !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC) #define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B)) -#else -#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B)) -void *my_pthread_getspecific_imp(pthread_key_t key); -#endif #ifndef HAVE_LOCALTIME_R struct tm *localtime_r(const time_t *clock, struct tm *res); @@ -285,34 +258,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res); #define pthread_key_delete(A) pthread_dummy(0) #endif -#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */ -#define pthread_cond_destroy(A) pthread_dummy(0) -#define pthread_mutex_destroy(A) pthread_dummy(0) -#define pthread_attr_delete(A) pthread_dummy(0) -#define pthread_condattr_delete(A) pthread_dummy(0) -#define pthread_attr_setstacksize(A,B) pthread_dummy(0) -#define pthread_equal(A,B) ((A) == (B)) -#define pthread_cond_timedwait(a,b,c) pthread_cond_wait((a),(b)) -#define pthread_attr_init(A) pthread_attr_create(A) -#define pthread_attr_destroy(A) pthread_attr_delete(A) -#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) -#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D)) -#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) -#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) -#undef pthread_detach_this_thread -#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); } -#endif - -#ifdef HAVE_DARWIN5_THREADS -#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) -#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) -#define pthread_condattr_init(A) pthread_dummy(0) -#define pthread_condattr_destroy(A) pthread_dummy(0) -#undef pthread_detach_this_thread -#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); } -#endif - -#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER) +#if defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT) /* This is set on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too) */ #define pthread_key_create(A,B) \ pthread_keycreate(A,(B) ?\ @@ -352,7 +298,7 @@ void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size); int my_pthread_mutex_trylock(pthread_mutex_t *mutex); #endif -#if !defined(HAVE_PTHREAD_YIELD_ONE_ARG) && !defined(HAVE_PTHREAD_YIELD_ZERO_ARG) +#if !defined(HAVE_PTHREAD_YIELD_ZERO_ARG) /* no pthread_yield() available */ #ifdef HAVE_SCHED_YIELD #define pthread_yield() sched_yield() @@ -541,12 +487,6 @@ int my_pthread_fastmutex_lock(my_pthread_fastmutex_t *mp); /* READ-WRITE thread locking */ -#ifdef HAVE_BROKEN_RWLOCK /* For OpenUnix */ -#undef HAVE_PTHREAD_RWLOCK_RDLOCK -#undef HAVE_RWLOCK_INIT -#undef HAVE_RWLOCK_T -#endif - #if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS) /* use these defs for simple mutex locking */ #define rw_lock_t pthread_mutex_t diff --git a/include/my_sys.h b/include/my_sys.h index e10cedfb654..3d600de66fd 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -629,6 +629,7 @@ extern FILE *my_freopen(const char *path, const char *mode, FILE *stream); extern int my_fclose(FILE *fd,myf MyFlags); extern int my_vfprintf(FILE *stream, const char* format, va_list args); extern void my_strerror(char *buf, size_t len, int nr); +extern int my_fprintf(FILE *stream, const char* format, ...); extern File my_fileno(FILE *fd); extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); extern int my_chmod(const char *name, mode_t mode, myf my_flags); @@ -753,6 +754,8 @@ extern size_t my_b_fill(IO_CACHE *info); extern void my_b_seek(IO_CACHE *info,my_off_t pos); extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length); extern my_off_t my_b_filelength(IO_CACHE *info); +extern size_t my_b_write_backtick_quote(IO_CACHE *info, const char *str, + size_t len); extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...); extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap); extern my_bool open_cached_file(IO_CACHE *cache,const char *dir, diff --git a/include/sql_common.h b/include/sql_common.h index cd32a77f86e..a1c9faac82d 100644 --- a/include/sql_common.h +++ b/include/sql_common.h @@ -1,7 +1,7 @@ #ifndef SQL_COMMON_INCLUDED #define SQL_COMMON_INCLUDED -/* Copyright (c) 2003, 2010, Oracle and/or its affiliates. - Copyright (c) 2010, 2011, Monty Program Ab +/* Copyright (c) 2003, 2012, Oracle and/or its affiliates. + Copyright (c) 2010, 2012, Monty Program Ab 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 @@ -80,8 +80,9 @@ typedef struct st_mysql_methods 0, arg, length, 1, stmt) extern CHARSET_INFO *default_client_charset_info; -MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields, - my_bool default_value, uint server_capabilities); +MYSQL_FIELD *unpack_fields(MYSQL *mysql, MYSQL_DATA *data,MEM_ROOT *alloc, + uint fields, my_bool default_value, + uint server_capabilities); void free_rows(MYSQL_DATA *cur); void free_old_query(MYSQL *mysql); void end_server(MYSQL *mysql); diff --git a/libmysql/get_password.c b/libmysql/get_password.c index a10d112ccd0..16f6b25822d 100644 --- a/libmysql/get_password.c +++ b/libmysql/get_password.c @@ -26,10 +26,6 @@ #include #include -#if defined(HAVE_BROKEN_GETPASS) && !defined(HAVE_GETPASSPHRASE) -#undef HAVE_GETPASS -#endif - #ifdef HAVE_GETPASS #ifdef HAVE_PWD_H #include diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 230376bc3b0..f90cc96a90f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1,4 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates + Copyright (c) 2009, 2012, Monty Program Ab 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 @@ -811,7 +812,7 @@ MYSQL_FIELD *cli_list_fields(MYSQL *mysql) return NULL; mysql->field_count= (uint) query->rows; - return unpack_fields(query,&mysql->field_alloc, + return unpack_fields(mysql, query,&mysql->field_alloc, mysql->field_count, 1, mysql->server_capabilities); } @@ -871,7 +872,7 @@ mysql_list_processes(MYSQL *mysql) if (!(fields = (*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*) 0, protocol_41(mysql) ? 7 : 5))) DBUG_RETURN(NULL); - if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc,field_count,0, + if (!(mysql->fields=unpack_fields(mysql, fields,&mysql->field_alloc,field_count,0, mysql->server_capabilities))) DBUG_RETURN(0); mysql->status=MYSQL_STATUS_GET_RESULT; @@ -1456,7 +1457,7 @@ my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt) if (!(fields_data= (*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*)0,7))) DBUG_RETURN(1); - if (!(stmt->fields= unpack_fields(fields_data,&stmt->mem_root, + if (!(stmt->fields= unpack_fields(mysql, fields_data,&stmt->mem_root, field_count,0, mysql->server_capabilities))) DBUG_RETURN(1); diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index 146e51d79c7..559b1d9ae32 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -15,9 +15,9 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/libmysqld/include - ${CMAKE_SOURCE_DIR}/regex + ${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/sql - ${MY_READLINE_INCLUDE_DIR} + ${MY_READLINE_INCLUDE_DIR} ) diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index d7ef1fae0bf..37f454c6d34 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -21,7 +21,7 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1 mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql_zap.1 mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1 mysqlman.1 mysqltest.1 perror.1 replace.1 resolve_stack_dump.1 - resolveip.1) + resolveip.1 mysqlbug.1) SET(MAN8_SERVER mysqld.8 mysqlmanager.8) SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1 mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 diff --git a/mysql-test/include/mysqlbinlog_have_debug.inc b/mysql-test/include/mysqlbinlog_have_debug.inc new file mode 100644 index 00000000000..14da1379ecd --- /dev/null +++ b/mysql-test/include/mysqlbinlog_have_debug.inc @@ -0,0 +1,34 @@ +############################################# +# checks if mysqlbinlog is debug compiled +# this "cannot" be done simply by using +# have_debug.inc +############################################# + +--disable_query_log +--let $temp_out_help_file=$MYSQL_TMP_DIR/mysqlbinlog_help.tmp +--exec $MYSQL_BINLOG --help>$temp_out_help_file +let log_tmp=$temp_out_help_file; +--let $temp_inc=$MYSQL_TMP_DIR/temp.inc +let inc_tmp=$temp_inc; + +--perl +use strict; +my $tmp_file= $ENV{'log_tmp'} or die "log_tmp not set"; +open(FILE, "$tmp_file") or die("Unable to open $tmp_file: $!\n"); +my $count = () = grep(/Output debug log/g,); +close FILE; + +my $temp_inc= $ENV{'inc_tmp'} or die "temp_inc not set"; +open(FILE_INC,">", "$temp_inc") or die("can't open file \"$temp_inc\": $!"); +print FILE_INC '--let $is_debug= '.$count; +close FILE_INC; +EOF +--source $temp_inc + +if (!$is_debug) +{ + --skip mysqlbinlog needs to be debug compiled +} +--remove_file $temp_out_help_file +--remove_file $temp_inc +--enable_query_log diff --git a/mysql-test/include/query_cache_partitions.inc b/mysql-test/include/query_cache_partitions.inc new file mode 100644 index 00000000000..e5bb7406c10 --- /dev/null +++ b/mysql-test/include/query_cache_partitions.inc @@ -0,0 +1,126 @@ +# include/query_cache_partitions.inc +# +# The variables +# $engine_type -- storage engine to be tested +# have to be set before sourcing this script. + +eval SET SESSION STORAGE_ENGINE = $engine_type; + +# Initialise +--disable_warnings +drop table if exists t1; +--enable_warnings + +set @save_query_cache_size = @@global.query_cache_size; + +--echo # Test that partitions works with query cache + +flush query cache; + +SET GLOBAL query_cache_size=1024*1024*512; + CREATE TABLE `t1` ( + `id` int(11) NOT NULL , + `created_at` datetime NOT NULL, + `cool` tinyint default 0 + ); + + ALTER TABLE t1 PARTITION BY RANGE (TO_DAYS(created_at)) ( + PARTITION month_2010_4 VALUES LESS THAN (734258), + PARTITION month_2010_5 VALUES LESS THAN (734289), + PARTITION month_max VALUES LESS THAN MAXVALUE + ); + +show create table t1; + +INSERT INTO t1 VALUES (1, now(), 0); + +flush status; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + + +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; + +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +drop table t1; + +--echo # Test that sub-partitions works with query cache + +flush query cache; + +SET GLOBAL query_cache_size=1024*1024*512; + CREATE TABLE `t1` ( + `id` int(11) NOT NULL , + `created_at` datetime NOT NULL, + `cool` tinyint default 0 + ) + PARTITION BY RANGE (TO_DAYS(created_at)) + subpartition by hash(cool) subpartitions 3 ( + PARTITION month_2010_4 VALUES LESS THAN (734258), + PARTITION month_2010_5 VALUES LESS THAN (734289), + PARTITION month_max VALUES LESS THAN MAXVALUE + ); + +show create table t1; + +INSERT INTO t1 VALUES (1, now(), 0); + +flush status; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; + +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +drop table t1; + +--echo # +--echo # MySQL bug#53775 Query on partitioned table returns cached result +--echo # from previous transaction +--echo # + +flush query cache; +flush status; + +SET GLOBAL query_cache_size=1024*1024*512; + CREATE TABLE `t1` ( + `id` int(11) NOT NULL , + `created_at` datetime NOT NULL, + `cool` tinyint default 0 + ); + + ALTER TABLE t1 PARTITION BY RANGE (TO_DAYS(created_at)) ( + PARTITION month_2010_4 VALUES LESS THAN (734258), + PARTITION month_2010_5 VALUES LESS THAN (734289), + PARTITION month_max VALUES LESS THAN MAXVALUE + ); + +INSERT INTO t1 VALUES (1, now(), 0); + +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +BEGIN; +UPDATE `t1` SET `cool` = 1 WHERE `id` = 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +ROLLBACK; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +BEGIN; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +ROLLBACK; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; + +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; + +drop table t1; + +set @@global.query_cache_size = @save_query_cache_size; diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 160fdcd935b..a8db67f1e67 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -472,11 +472,13 @@ sub process_suite { else { my @combs; - @combs = combinations_from_file($parent, "$suitedir/combinations") - unless $suite->{skip}; + my $from = "$suitedir/combinations"; + @combs = combinations_from_file($parent, $from) unless $suite->{skip}; $suite->{combinations} = [ @combs ]; # in overlays it's a union of parent's and overlay's files. - unshift @{$suite->{combinations}}, @{$parent->{combinations}} if $parent; + unshift @{$suite->{combinations}}, + grep { not $skip_combinations{"$from => $_->{name}"} } + @{$parent->{combinations}} if $parent; } # suite.opt @@ -1039,8 +1041,11 @@ sub get_tags_from_file($$) { $suite = load_suite_for_file($comb_file) if $prefix[0] eq ''; my @comb; unless ($suite->{skip}) { - @comb = combinations_from_file($over, "$prefix[0]$comb_file"); - push @comb, combinations_from_file(undef, "$prefix[1]$comb_file") if $over; + my $from = "$prefix[0]$comb_file"; + @comb = combinations_from_file($over, $from); + push @comb, + grep { not $skip_combinations{"$from => $_->{name}"} } + combinations_from_file(undef, "$prefix[1]$comb_file") if $over; } push @combinations, [ @comb ]; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 35d428a9681..8c4013e1c24 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1147,7 +1147,6 @@ sub command_line_setup { 'start-from=s' => \&collect_option, 'big-test+' => \$opt_big_test, 'combination=s' => \@opt_combinations, - 'skip-combinations' => \&collect_option, 'experimental=s' => \@opt_experimentals, # skip-im is deprecated and silently ignored 'skip-im' => \&ignore_option, @@ -6262,7 +6261,6 @@ Options to control what engine/variation to run all generated configs combination= Use at least twice to run tests with specified options to mysqld - skip-combinations Ignore combination file (or options) Options to control directories to use tmpdir=DIR The directory where temporary files are stored diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index a95975f1097..3852da5d4b0 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -220,6 +220,10 @@ a d 3 11120436154190595086 drop table t1, t2; End of 5.0 tests +CREATE TABLE t1(a YEAR); +SELECT 1 FROM t1 WHERE a=1 AND CASE 1 WHEN a THEN 1 ELSE 1 END; +1 +DROP TABLE t1; create table t1 (f1 time); insert t1 values ('00:00:00'),('00:01:00'); select case t1.f1 when '00:00:00' then 1 end from t1; diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result index 6ee01349022..cdd234f1478 100644 --- a/mysql-test/r/compare.result +++ b/mysql-test/r/compare.result @@ -96,3 +96,7 @@ SELECT * FROM t1 WHERE a > '2008-01-01' AND a = '0000-00-00'; a DROP TABLE t1; End of 5.0 tests +CREATE TABLE t1(a INT ZEROFILL); +SELECT 1 FROM t1 WHERE t1.a IN (1, t1.a) AND t1.a=2; +1 +DROP TABLE t1; diff --git a/mysql-test/r/create-big.result b/mysql-test/r/create-big.result index 34293d7e5cd..4cce5d8618c 100644 --- a/mysql-test/r/create-big.result +++ b/mysql-test/r/create-big.result @@ -53,8 +53,8 @@ set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; set debug_sync='now WAIT_FOR parked'; alter table t3 rename to t1; -ERROR 42S01: Table 't1' already exists set debug_sync='now SIGNAL go'; +ERROR 42S01: Table 't1' already exists show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -65,8 +65,8 @@ set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; set debug_sync='now WAIT_FOR parked'; alter table t3 rename to t1, add k int; -ERROR 42S01: Table 't1' already exists set debug_sync='now SIGNAL go'; +ERROR 42S01: Table 't1' already exists show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result index 1cb4b48ed69..c897108f793 100644 --- a/mysql-test/r/ctype_binary.result +++ b/mysql-test/r/ctype_binary.result @@ -2039,6 +2039,8 @@ hex(concat(a)) a 30303030303030303030303030303031303030302E31 00000000000000010000.1 drop table t1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -2352,6 +2354,8 @@ hex(a) drop table t1; drop view v1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result index 3d695a87701..5323469dff3 100644 --- a/mysql-test/r/ctype_cp1251.result +++ b/mysql-test/r/ctype_cp1251.result @@ -2431,6 +2431,8 @@ hex(concat(a)) a 30303030303030303030303030303031303030302E31 00000000000000010000.1 drop table t1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -2744,6 +2746,8 @@ hex(a) drop table t1; drop view v1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index e2169e4e4e2..ae459fce8eb 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -2458,6 +2458,8 @@ hex(concat(a)) a 30303030303030303030303030303031303030302E31 00000000000000010000.1 drop table t1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -2771,6 +2773,8 @@ hex(a) drop table t1; drop view v1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 501b9cb611b..d463ce87c92 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -3341,6 +3341,8 @@ hex(concat(a)) a 00300030003000300030003000300030003000300030003000300030003000310030003000300030002E0031 00000000000000010000.1 drop table t1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -3654,6 +3656,8 @@ hex(a) drop table t1; drop view v1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 03f60261450..6cf24d768f7 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -1182,5 +1182,11 @@ a 256 Warnings: Warning 1260 Row 1 was cut by GROUP_CONCAT() # +# incorrect charset for val_str_ascii +# +SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second; +'2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second +2010-10-10 10:10:10 +# # End of 5.5 tests # diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 4dd9d787528..69e32977103 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -4197,6 +4197,8 @@ hex(concat(a)) a 30303030303030303030303030303031303030302E31 00000000000000010000.1 drop table t1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -4510,6 +4512,8 @@ hex(a) drop table t1; drop view v1; create table t1 (a year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index e081b56e6ce..919e29f185e 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -287,7 +287,7 @@ WHERE t1.f1 GROUP BY t1.f1)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 2 SUBQUERY a system NULL NULL NULL NULL 1 -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 +2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 WHERE 1 > ALL((SELECT t1.f1 FROM t1 RIGHT OUTER JOIN t1 a @@ -297,12 +297,12 @@ EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 2 SUBQUERY a system NULL NULL NULL NULL 1 -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 +2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 2 SUBQUERY a system NULL NULL NULL NULL 1 -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 +2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where DEALLOCATE PREPARE stmt; PREPARE stmt FROM 'EXPLAIN SELECT 1 FROM t1 @@ -313,12 +313,12 @@ EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 2 SUBQUERY a system NULL NULL NULL NULL 1 -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 +2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 2 SUBQUERY a system NULL NULL NULL NULL 1 -2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 +2 SUBQUERY t1 fulltext f1_2,f1 f1 0 1 Using where DEALLOCATE PREPARE stmt; DROP TABLE t1; End of 5.1 tests. diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index c38201f6d9f..65323257300 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1527,6 +1527,8 @@ DROP TABLE t1; # Bug#43668: Wrong comparison and MIN/MAX for YEAR(2) # create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (98,1998,19980101,"1998-01-01 00:00:00"), (00,2000,20000101,"2000-01-01 00:00:01"), @@ -1838,7 +1840,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 range a a 4 NULL 4 100.00 Using where; Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` where (<(1),(2)>((((1,2)),(select 3,4 having (((1 = 3) or isnull(3)) and ((2 = 4) or isnull(4)) and (3) and (4))))) and (`test`.`t1`.`a` < 10)) +Note 1003 select max(`test`.`t1`.`a`) AS `MAX(a)` from `test`.`t1` where ((((1,2),(select 3,4 having (((1 = 3) or isnull(3)) and ((2 = 4) or isnull(4)) and (3) and (4))))) and (`test`.`t1`.`a` < 10)) SELECT MAX(a) FROM t1 WHERE (1,2) IN (SELECT 3,4) AND a<10; MAX(a) NULL diff --git a/mysql-test/r/func_group_innodb.result b/mysql-test/r/func_group_innodb.result index 6485793d0e1..67ea44f187a 100644 --- a/mysql-test/r/func_group_innodb.result +++ b/mysql-test/r/func_group_innodb.result @@ -146,19 +146,6 @@ count(*) min(7) max(7) 0 NULL NULL drop table t1m, t1i, t2m, t2i; # -# Bug#13723054 CRASH WITH MIN/MAX AFTER QUICK_GROUP_MIN_MAX_SELECT::NEXT_MIN -# -CREATE TABLE t1(a BLOB, b VARCHAR(255) CHARSET LATIN1, c INT, -KEY(b, c, a(765))) ENGINE=INNODB; -INSERT INTO t1(a, b, c) VALUES ('', 'a', 0), ('', 'a', null), ('', 'a', 0); -SELECT MIN(c) FROM t1 GROUP BY b; -MIN(c) -0 -EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL b 263 NULL 4 Using index for group-by -DROP TABLE t1; -# # Bug #57954: BIT_AND function returns incorrect results when # semijoin=on CREATE TABLE c ( @@ -230,4 +217,18 @@ SELECT member_id_to, COUNT(*) FROM t1 WHERE r_date = member_id_to COUNT(*) 518491 2 DROP TABLE t1; +# End of test BUG#12713907 +# +# Bug#13723054 CRASH WITH MIN/MAX AFTER QUICK_GROUP_MIN_MAX_SELECT::NEXT_MIN +# +CREATE TABLE t1(a BLOB, b VARCHAR(255) CHARSET LATIN1, c INT, +KEY(b, c, a(765))) ENGINE=INNODB; +INSERT INTO t1(a, b, c) VALUES ('', 'a', 0), ('', 'a', null), ('', 'a', 0); +SELECT MIN(c) FROM t1 GROUP BY b; +MIN(c) +0 +EXPLAIN SELECT MIN(c) FROM t1 GROUP BY b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL b 263 NULL 4 Using index for group-by +DROP TABLE t1; End of 5.5 tests diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index 95caa6853b8..ce0793b70a6 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -2403,7 +2403,7 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12; 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 SUBQUERY t1 index NULL a 10 NULL 15 Using index +2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2); id select_type table type possible_keys key key_len ref rows Extra @@ -2421,7 +2421,7 @@ AND t1_outer1.b = t1_outer2.b; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index 1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer (flat, BNL join) -2 SUBQUERY t1 index NULL a 10 NULL 15 Using index +2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2; id select_type table type possible_keys key key_len ref rows Extra @@ -2757,7 +2757,7 @@ EXPLAIN SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); id select_type table type possible_keys key key_len ref rows Extra x x x x x x x x x Impossible WHERE noticed after reading const tables -x x x x x x x x x Using index +x x x x x x x x x Using where; Using index SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); MIN( a ) NULL @@ -2829,7 +2829,7 @@ EXPLAIN SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); id select_type table type possible_keys key key_len ref rows Extra x x x x x x x x x Impossible WHERE noticed after reading const tables -x x x x x x x x x Using index +x x x x x x x x x Using where; Using index SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); MIN( a ) NULL @@ -2908,7 +2908,7 @@ EXPLAIN SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); id select_type table type possible_keys key key_len ref rows Extra x x x x x x x x x Impossible WHERE noticed after reading const tables -x x x x x x x x x Using index +x x x x x x x x x Using where; Using index SELECT MIN( a ) FROM t1 WHERE a = (SELECT a FROM t1 WHERE a < 0); MIN( a ) NULL diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result index b8eda092291..92bcb2e88f0 100644 --- a/mysql-test/r/index_merge_innodb.result +++ b/mysql-test/r/index_merge_innodb.result @@ -777,4 +777,19 @@ commit; select * from t1 where t1.zone_id=830 AND modified=9; pk zone_id modified drop table t0, t1; +# +# MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join +# +CREATE TABLE t1 ( +a INT, b CHAR(1), c CHAR(1), KEY(a), KEY(b) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (8,'v','v'),(8,'m','m'),(9,'d','d'); +SELECT ta.* FROM t1 AS ta, t1 AS tb +WHERE ( tb.b != ta.b OR tb.a = ta.a ) +AND ( tb.b = ta.c OR tb.b = ta.b ); +a b c +8 v v +8 m m +9 d d +DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index e215caadb1c..e63afeab126 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -599,7 +599,7 @@ EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12; 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 SUBQUERY t1 index NULL a 10 NULL 15 Using index +2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by SELECT 1 as RES FROM t1 AS t1_outer WHERE (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12; RES diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result index 3a5212818ef..f4242f17a14 100644 --- a/mysql-test/r/limit_rows_examined.result +++ b/mysql-test/r/limit_rows_examined.result @@ -679,7 +679,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 Using temporary 1 PRIMARY t2 ALL NULL NULL NULL NULL 3 Distinct 2 SUBQUERY t3 ALL NULL NULL NULL NULL 3 -2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 +2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) SELECT DISTINCT a AS field1 FROM t1, t2 WHERE EXISTS (SELECT c FROM t3 LEFT JOIN t2 ON b = d) HAVING field1 > 'aaa' LIMIT ROWS EXAMINED 20; diff --git a/mysql-test/r/mdev375.result b/mysql-test/r/mdev375.result new file mode 100644 index 00000000000..32580804686 --- /dev/null +++ b/mysql-test/r/mdev375.result @@ -0,0 +1,14 @@ +SET GLOBAL log_warnings=4; +SET GLOBAL max_connections=2; +SELECT 1; +1 +1 +SELECT 2; +2 +2 +ERROR HY000: Too many connections +SELECT 0; +0 +0 +SET GLOBAL log_warnings=default; +SET GLOBAL max_connections=default; diff --git a/mysql-test/r/mysqlbinlog-innodb.result b/mysql-test/r/mysqlbinlog-innodb.result index fed2c8a8651..41d15bc32d3 100644 --- a/mysql-test/r/mysqlbinlog-innodb.result +++ b/mysql-test/r/mysqlbinlog-innodb.result @@ -34,7 +34,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (1) /*!*/; @@ -65,7 +65,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use foo/*!*/; +use `foo`/*!*/; SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (1) /*!*/; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 774761a0229..33904dfd9bd 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -18,7 +18,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -111,7 +111,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; @@ -202,7 +202,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("Alas") /*!*/; @@ -219,7 +219,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -312,7 +312,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) /*!*/; @@ -403,7 +403,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("Alas") /*!*/; @@ -427,7 +427,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1108844555/*!*/; insert t1 values (1) /*!*/; @@ -445,7 +445,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1108844555/*!*/; insert t1 values (1) /*!*/; @@ -498,7 +498,7 @@ ERROR 42000: PROCEDURE test.p1 does not exist /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -548,7 +548,7 @@ flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -725,7 +725,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1253783037/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -825,7 +825,7 @@ BEGIN SET TIMESTAMP=1266652094/*!*/; SavePoint mixed_cases /*!*/; -use db1/*!*/; +use `db1`/*!*/; SET TIMESTAMP=1266652094/*!*/; INSERT INTO db1.t2 VALUES("in savepoint mixed_cases") /*!*/; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index 52a589ca7c1..806cf74479e 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -19,7 +19,7 @@ insert into t1 values(null, "f"); /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -103,7 +103,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; insert into t1 values(null, "a") /*!*/; @@ -172,7 +172,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -209,7 +209,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -263,7 +263,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -289,7 +289,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -326,7 +326,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -369,7 +369,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -445,7 +445,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -474,7 +474,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; insert into t1 values(null, "a") /*!*/; @@ -535,7 +535,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -564,7 +564,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -605,7 +605,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -622,7 +622,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -720,7 +720,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -761,7 +761,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -778,7 +778,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -820,7 +820,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -904,7 +904,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; insert into t1 values(null, "a") /*!*/; @@ -972,7 +972,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -1009,7 +1009,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -1062,7 +1062,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -1088,7 +1088,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -1125,7 +1125,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -1167,7 +1167,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -1243,7 +1243,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -1272,7 +1272,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=1/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; insert into t1 values(null, "a") /*!*/; @@ -1333,7 +1333,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -1361,7 +1361,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -1402,7 +1402,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -1419,7 +1419,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -1516,7 +1516,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=3/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; @@ -1557,7 +1557,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET INSERT_ID=6/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; insert into t1 values(null, "f") /*!*/; @@ -1574,7 +1574,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -1616,7 +1616,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/r/mysqlbinlog_row.result b/mysql-test/r/mysqlbinlog_row.result index 7ae1ea36899..ce46b7ea898 100644 --- a/mysql-test/r/mysqlbinlog_row.result +++ b/mysql-test/r/mysqlbinlog_row.result @@ -336,7 +336,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/r/mysqlbinlog_row_innodb.result b/mysql-test/r/mysqlbinlog_row_innodb.result index 00a3eb79b64..63b64489a37 100644 --- a/mysql-test/r/mysqlbinlog_row_innodb.result +++ b/mysql-test/r/mysqlbinlog_row_innodb.result @@ -2253,7 +2253,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -3876,7 +3876,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4243,7 +4243,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4804,7 +4804,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/r/mysqlbinlog_row_myisam.result b/mysql-test/r/mysqlbinlog_row_myisam.result index 7b0112d0a91..6e8c7cd64f9 100644 --- a/mysql-test/r/mysqlbinlog_row_myisam.result +++ b/mysql-test/r/mysqlbinlog_row_myisam.result @@ -2253,7 +2253,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -3898,7 +3898,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4271,7 +4271,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -4842,7 +4842,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/r/mysqlbinlog_row_trans.result b/mysql-test/r/mysqlbinlog_row_trans.result index 5c96db7d19b..33c997d76a7 100644 --- a/mysql-test/r/mysqlbinlog_row_trans.result +++ b/mysql-test/r/mysqlbinlog_row_trans.result @@ -132,7 +132,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index ad55bfa3003..63df79160cc 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -697,7 +697,7 @@ The following options may be given as the first argument: partial matching --rpl-recovery-rank=# Unused, will be removed - --safe-mode Skip some optimize stages (for testing). + --safe-mode Skip some optimize stages (for testing). Deprecated. --safe-user-create Don't allow new user creation by the user who has no write privileges to the mysql.user table. --secure-auth Disallow authentication for accounts that have old @@ -737,6 +737,9 @@ The following options may be given as the first argument: --slave-load-tmpdir=name The location where the slave should put its temporary files when replicating a LOAD DATA INFILE command + --slave-max-allowed-packet=# + The maximum packet length to sent successfully from the + master to slave. --slave-net-timeout=# Number of seconds to wait for more data from a master/slave connection before aborting the read @@ -1057,6 +1060,7 @@ skip-show-database FALSE skip-slave-start FALSE slave-compressed-protocol FALSE slave-exec-mode STRICT +slave-max-allowed-packet 1073741824 slave-net-timeout 3600 slave-skip-errors (No default value) slave-sql-verify-checksum TRUE diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index ff591c6cb69..7b650addd3d 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -2073,7 +2073,7 @@ DROP TABLE IF EXISTS `v2`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v2` ( - `a` varchar(30) + `a` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!50001 DROP TABLE IF EXISTS `v2`*/; @@ -2167,7 +2167,7 @@ DROP TABLE IF EXISTS `v1`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v1` ( - `a` int(11) + `a` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!50001 DROP TABLE IF EXISTS `v1`*/; @@ -2241,7 +2241,7 @@ DROP TABLE IF EXISTS `v2`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v2` ( - `a` varchar(30) + `a` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!50001 DROP TABLE IF EXISTS `v2`*/; @@ -2355,9 +2355,9 @@ DROP TABLE IF EXISTS `v1`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v1` ( - `a` int(11), - `b` int(11), - `c` varchar(30) + `a` tinyint NOT NULL, + `b` tinyint NOT NULL, + `c` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; DROP TABLE IF EXISTS `v2`; @@ -2365,7 +2365,7 @@ DROP TABLE IF EXISTS `v2`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v2` ( - `a` int(11) + `a` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; DROP TABLE IF EXISTS `v3`; @@ -2373,9 +2373,9 @@ DROP TABLE IF EXISTS `v3`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v3` ( - `a` int(11), - `b` int(11), - `c` varchar(30) + `a` tinyint NOT NULL, + `b` tinyint NOT NULL, + `c` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!50001 DROP TABLE IF EXISTS `v1`*/; @@ -3112,9 +3112,9 @@ DROP TABLE IF EXISTS `v0`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v0` ( - `a` int(11), - `b` varchar(32), - `c` varchar(32) + `a` tinyint NOT NULL, + `b` tinyint NOT NULL, + `c` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; DROP TABLE IF EXISTS `v1`; @@ -3122,9 +3122,9 @@ DROP TABLE IF EXISTS `v1`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v1` ( - `a` int(11), - `b` varchar(32), - `c` varchar(32) + `a` tinyint NOT NULL, + `b` tinyint NOT NULL, + `c` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; DROP TABLE IF EXISTS `v2`; @@ -3132,9 +3132,9 @@ DROP TABLE IF EXISTS `v2`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v2` ( - `a` int(11), - `b` varchar(32), - `c` varchar(32) + `a` tinyint NOT NULL, + `b` tinyint NOT NULL, + `c` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; @@ -3514,7 +3514,7 @@ DROP TABLE IF EXISTS `v1`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v1` ( - `id` int(11) + `id` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; @@ -3574,7 +3574,7 @@ USE `mysqldump_views`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `nasishnasifu` ( - `id` bigint(20) unsigned + `id` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; @@ -3967,7 +3967,7 @@ DROP TABLE IF EXISTS `v2`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v2` ( - `c` int(11) + `c` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; /*!50001 DROP TABLE IF EXISTS `v2`*/; @@ -4384,7 +4384,7 @@ DROP TABLE IF EXISTS `v1`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v1` ( - `id` int(11) + `id` tinyint NOT NULL ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 25345227d59..fdb3029059f 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -690,6 +690,7 @@ Got one of the listed errors insert into t1 values ("Abcd"); Got one of the listed errors garbage; +SELECT * FROM non_existing_table; drop table t2; create table t1 ( f1 char(10)); insert into t1 values ("Abcd"); diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index d320b5b669f..53fed519a15 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -1813,3 +1813,135 @@ Warnings: Note 1003 select `test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t2`.`a` = `test`.`t1`.`b`) group by `test`.`t2`.`b` order by `test`.`t1`.`b` drop table t1,t2; End of 5.2 tests +# +# Bug mdev-449: ORDER BY with small sort_buffer_size +# +CREATE TABLE t1(f0 int auto_increment primary key, f1 int, f2 varchar(200)); +INSERT INTO t1(f1, f2) VALUES +(0,"0"),(1,"1"),(2,"2"),(3,"3"),(4,"4"),(5,"5"), +(6,"6"),(7,"7"),(8,"8"),(9,"9"),(10,"10"), +(11,"11"),(12,"12"),(13,"13"),(14,"14"),(15,"15"), +(16,"16"),(17,"17"),(18,"18"),(19,"19"),(20,"20"), +(21,"21"),(22,"22"),(23,"23"),(24,"24"),(25,"25"), +(26,"26"),(27,"27"),(28,"28"),(29,"29"),(30,"30"), +(31,"31"),(32,"32"),(33,"33"),(34,"34"),(35,"35"), +(36,"36"),(37,"37"),(38,"38"),(39,"39"),(40,"40"), +(41,"41"),(42,"42"),(43,"43"),(44,"44"),(45,"45"), +(46,"46"),(47,"47"),(48,"48"),(49,"49"),(50,"50"), +(51,"51"),(52,"52"),(53,"53"),(54,"54"),(55,"55"), +(56,"56"),(57,"57"),(58,"58"),(59,"59"),(60,"60"), +(61,"61"),(62,"62"),(63,"63"),(64,"64"),(65,"65"), +(66,"66"),(67,"67"),(68,"68"),(69,"69"),(70,"70"), +(71,"71"),(72,"72"),(73,"73"),(74,"74"),(75,"75"), +(76,"76"),(77,"77"),(78,"78"),(79,"79"),(80,"80"), +(81,"81"),(82,"82"),(83,"83"),(84,"84"),(85,"85"), +(86,"86"),(87,"87"),(88,"88"),(89,"89"),(90,"90"), +(91,"91"),(92,"92"),(93,"93"),(94,"94"),(95,"95"), +(96,"96"),(97,"97"),(98,"98"),(99,"99"); +set @save_sort_buffer_size= @@sort_buffer_size; +set sort_buffer_size= 2000; +SELECT * FROM t1 ORDER BY f1 DESC, f0; +f0 f1 f2 +100 99 99 +99 98 98 +98 97 97 +97 96 96 +96 95 95 +95 94 94 +94 93 93 +93 92 92 +92 91 91 +91 90 90 +90 89 89 +89 88 88 +88 87 87 +87 86 86 +86 85 85 +85 84 84 +84 83 83 +83 82 82 +82 81 81 +81 80 80 +80 79 79 +79 78 78 +78 77 77 +77 76 76 +76 75 75 +75 74 74 +74 73 73 +73 72 72 +72 71 71 +71 70 70 +70 69 69 +69 68 68 +68 67 67 +67 66 66 +66 65 65 +65 64 64 +64 63 63 +63 62 62 +62 61 61 +61 60 60 +60 59 59 +59 58 58 +58 57 57 +57 56 56 +56 55 55 +55 54 54 +54 53 53 +53 52 52 +52 51 51 +51 50 50 +50 49 49 +49 48 48 +48 47 47 +47 46 46 +46 45 45 +45 44 44 +44 43 43 +43 42 42 +42 41 41 +41 40 40 +40 39 39 +39 38 38 +38 37 37 +37 36 36 +36 35 35 +35 34 34 +34 33 33 +33 32 32 +32 31 31 +31 30 30 +30 29 29 +29 28 28 +28 27 27 +27 26 26 +26 25 25 +25 24 24 +24 23 23 +23 22 22 +22 21 21 +21 20 20 +20 19 19 +19 18 18 +18 17 17 +17 16 16 +16 15 15 +15 14 14 +14 13 13 +13 12 12 +12 11 11 +11 10 10 +10 9 9 +9 8 8 +8 7 7 +7 6 6 +6 5 5 +5 4 4 +4 3 3 +3 2 2 +2 1 1 +1 0 0 +set sort_buffer_size= @save_sort_buffer_size; +DROP TABLE t1; +End of 5.3 tests diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 431c5dda116..40586b8d54b 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -2473,3 +2473,17 @@ SELECT * FROM vtmp; 1 DROP VIEW vtmp; DROP TABLE t1; +# +# MDEV-365 "Got assertion when doing alter table on a partition" +# +CREATE TABLE t1 ( i INT ) ENGINE=Aria PARTITION BY HASH(i) PARTITIONS 2; +INSERT INTO t1 VALUES (1),(2),(2),(3),(4); +ALTER TABLE t1 ADD PARTITION PARTITIONS 2; +SELECT * from t1 order by i; +i +1 +2 +2 +3 +4 +DROP TABLE t1; diff --git a/mysql-test/r/partition_cache.result b/mysql-test/r/partition_cache.result index ac2da9bb78a..cd579d00952 100644 --- a/mysql-test/r/partition_cache.result +++ b/mysql-test/r/partition_cache.result @@ -27,7 +27,7 @@ a 3 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 drop table t1; commit; create table t1 (a int not null) PARTITION BY KEY (a) PARTITIONS 3; @@ -50,7 +50,7 @@ a 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 3 show status like "Qcache_hits"; Variable_name Value Qcache_hits 0 @@ -69,7 +69,7 @@ a 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 6 show status like "Qcache_hits"; Variable_name Value Qcache_hits 0 @@ -93,14 +93,14 @@ a 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 2 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 0 +Qcache_hits 1 commit; show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 2 drop table t3,t2,t1; CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) PARTITION BY HASH (id) PARTITIONS 3; select count(*) from t1; @@ -164,7 +164,7 @@ count(*) 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 connection connection1 SELECT sql_cache count(*) FROM t2 WHERE s2 = 'w'; count(*) @@ -197,9 +197,9 @@ count(*) 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 0 +Qcache_hits 1 set @@global.query_cache_size = @save_query_cache_size; drop table t2; diff --git a/mysql-test/r/partition_cache_innodb.result b/mysql-test/r/partition_cache_innodb.result new file mode 100644 index 00000000000..0d0abbb096c --- /dev/null +++ b/mysql-test/r/partition_cache_innodb.result @@ -0,0 +1,151 @@ +SET SESSION STORAGE_ENGINE = innodb; +drop table if exists t1; +set @save_query_cache_size = @@global.query_cache_size; +# Test that partitions works with query cache +flush query cache; +SET GLOBAL query_cache_size=1024*1024*512; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`created_at` datetime NOT NULL, +`cool` tinyint default 0 +); +ALTER TABLE t1 PARTITION BY RANGE (TO_DAYS(created_at)) ( +PARTITION month_2010_4 VALUES LESS THAN (734258), +PARTITION month_2010_5 VALUES LESS THAN (734289), +PARTITION month_max VALUES LESS THAN MAXVALUE +); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `created_at` datetime NOT NULL, + `cool` tinyint(4) DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (TO_DAYS(created_at)) +(PARTITION month_2010_4 VALUES LESS THAN (734258) ENGINE = InnoDB, + PARTITION month_2010_5 VALUES LESS THAN (734289) ENGINE = InnoDB, + PARTITION month_max VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +INSERT INTO t1 VALUES (1, now(), 0); +flush status; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +drop table t1; +# Test that sub-partitions works with query cache +flush query cache; +SET GLOBAL query_cache_size=1024*1024*512; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`created_at` datetime NOT NULL, +`cool` tinyint default 0 +) +PARTITION BY RANGE (TO_DAYS(created_at)) +subpartition by hash(cool) subpartitions 3 ( +PARTITION month_2010_4 VALUES LESS THAN (734258), +PARTITION month_2010_5 VALUES LESS THAN (734289), +PARTITION month_max VALUES LESS THAN MAXVALUE +); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `created_at` datetime NOT NULL, + `cool` tinyint(4) DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (TO_DAYS(created_at)) +SUBPARTITION BY HASH (cool) +SUBPARTITIONS 3 +(PARTITION month_2010_4 VALUES LESS THAN (734258) ENGINE = InnoDB, + PARTITION month_2010_5 VALUES LESS THAN (734289) ENGINE = InnoDB, + PARTITION month_max VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +INSERT INTO t1 VALUES (1, now(), 0); +flush status; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +drop table t1; +# +# MySQL bug#53775 Query on partitioned table returns cached result +# from previous transaction +# +flush query cache; +flush status; +SET GLOBAL query_cache_size=1024*1024*512; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`created_at` datetime NOT NULL, +`cool` tinyint default 0 +); +ALTER TABLE t1 PARTITION BY RANGE (TO_DAYS(created_at)) ( +PARTITION month_2010_4 VALUES LESS THAN (734258), +PARTITION month_2010_5 VALUES LESS THAN (734289), +PARTITION month_max VALUES LESS THAN MAXVALUE +); +INSERT INTO t1 VALUES (1, now(), 0); +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +BEGIN; +UPDATE `t1` SET `cool` = 1 WHERE `id` = 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +1 +ROLLBACK; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +BEGIN; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +ROLLBACK; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +drop table t1; +set @@global.query_cache_size = @save_query_cache_size; diff --git a/mysql-test/r/partition_cache_myisam.result b/mysql-test/r/partition_cache_myisam.result new file mode 100644 index 00000000000..0b617c03590 --- /dev/null +++ b/mysql-test/r/partition_cache_myisam.result @@ -0,0 +1,153 @@ +SET SESSION STORAGE_ENGINE = myisam; +drop table if exists t1; +set @save_query_cache_size = @@global.query_cache_size; +# Test that partitions works with query cache +flush query cache; +SET GLOBAL query_cache_size=1024*1024*512; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`created_at` datetime NOT NULL, +`cool` tinyint default 0 +); +ALTER TABLE t1 PARTITION BY RANGE (TO_DAYS(created_at)) ( +PARTITION month_2010_4 VALUES LESS THAN (734258), +PARTITION month_2010_5 VALUES LESS THAN (734289), +PARTITION month_max VALUES LESS THAN MAXVALUE +); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `created_at` datetime NOT NULL, + `cool` tinyint(4) DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (TO_DAYS(created_at)) +(PARTITION month_2010_4 VALUES LESS THAN (734258) ENGINE = MyISAM, + PARTITION month_2010_5 VALUES LESS THAN (734289) ENGINE = MyISAM, + PARTITION month_max VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +INSERT INTO t1 VALUES (1, now(), 0); +flush status; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +drop table t1; +# Test that sub-partitions works with query cache +flush query cache; +SET GLOBAL query_cache_size=1024*1024*512; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`created_at` datetime NOT NULL, +`cool` tinyint default 0 +) +PARTITION BY RANGE (TO_DAYS(created_at)) +subpartition by hash(cool) subpartitions 3 ( +PARTITION month_2010_4 VALUES LESS THAN (734258), +PARTITION month_2010_5 VALUES LESS THAN (734289), +PARTITION month_max VALUES LESS THAN MAXVALUE +); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) NOT NULL, + `created_at` datetime NOT NULL, + `cool` tinyint(4) DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (TO_DAYS(created_at)) +SUBPARTITION BY HASH (cool) +SUBPARTITIONS 3 +(PARTITION month_2010_4 VALUES LESS THAN (734258) ENGINE = MyISAM, + PARTITION month_2010_5 VALUES LESS THAN (734289) ENGINE = MyISAM, + PARTITION month_max VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +INSERT INTO t1 VALUES (1, now(), 0); +flush status; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +drop table t1; +# +# MySQL bug#53775 Query on partitioned table returns cached result +# from previous transaction +# +flush query cache; +flush status; +SET GLOBAL query_cache_size=1024*1024*512; +CREATE TABLE `t1` ( +`id` int(11) NOT NULL , +`created_at` datetime NOT NULL, +`cool` tinyint default 0 +); +ALTER TABLE t1 PARTITION BY RANGE (TO_DAYS(created_at)) ( +PARTITION month_2010_4 VALUES LESS THAN (734258), +PARTITION month_2010_5 VALUES LESS THAN (734289), +PARTITION month_max VALUES LESS THAN MAXVALUE +); +INSERT INTO t1 VALUES (1, now(), 0); +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +BEGIN; +UPDATE `t1` SET `cool` = 1 WHERE `id` = 1; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +1 +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +1 +BEGIN; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +1 +ROLLBACK; +SELECT cool FROM `t1` WHERE (`t1`.id = 1) LIMIT 1; +cool +1 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +drop table t1; +set @@global.query_cache_size = @save_query_cache_size; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 7629775b892..95217d9716a 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -3056,7 +3056,7 @@ DROP TABLE t1; End of 5.1 tests. # -# LP bug#1001500 Crash on the second execution of the PS for +# lp:1001500 Crash on the second execution of the PS for # a query with degenerated conjunctive condition # (see also mysql bug#12582849) # @@ -3996,108 +3996,4 @@ Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 deallocate prepare st; drop table t1; -# -# LP bug#993459 Execution of PS for a query with GROUP BY -# returns wrong result (see also mysql bug#13805127) -# -PREPARE s1 FROM -" -SELECT c1, t2.c2, count(c3) -FROM - ( - SELECT 3 as c2 FROM dual WHERE @x = 1 - UNION - SELECT 2 FROM dual WHERE @x = 1 OR @x = 2 - ) AS t1, - ( - SELECT '2012-03-01 01:00:00' AS c1, 3 as c2, 1 as c3 FROM dual - UNION - SELECT '2012-03-01 02:00:00', 3, 2 FROM dual - UNION - SELECT '2012-03-01 01:00:00', 2, 1 FROM dual - ) AS t2 -WHERE t2.c2 = t1.c2 -GROUP BY c1, c2 -"; - -SET @x = 1; -SELECT c1, t2.c2, count(c3) -FROM -( -SELECT 3 as c2 FROM dual WHERE @x = 1 -UNION -SELECT 2 FROM dual WHERE @x = 1 OR @x = 2 -) AS t1, -( -SELECT '2012-03-01 01:00:00' AS c1, 3 as c2, 1 as c3 FROM dual -UNION -SELECT '2012-03-01 02:00:00', 3, 2 FROM dual -UNION -SELECT '2012-03-01 01:99345900:00', 2, 1 FROM dual -) AS t2 -WHERE t2.c2 = t1.c2 -GROUP BY c1, c2; -c1 c2 count(c3) -2012-03-01 01:00:00 3 1 -2012-03-01 01:99345900:00 2 1 -2012-03-01 02:00:00 3 1 - -EXECUTE s1; -c1 c2 count(c3) -2012-03-01 01:00:00 2 1 -2012-03-01 01:00:00 3 1 -2012-03-01 02:00:00 3 1 - -SET @x = 2; -SELECT c1, t2.c2, count(c3) -FROM -( -SELECT 3 as c2 FROM dual WHERE @x = 1 -UNION -SELECT 2 FROM dual WHERE @x = 1 OR @x = 2 -) AS t1, -( -SELECT '2012-03-01 01:00:00' AS c1, 3 as c2, 1 as c3 FROM dual -UNION -SELECT '2012-03-01 02:00:00', 3, 2 FROM dual -UNION -SELECT '2012-03-01 01:00:00', 2, 1 FROM dual -) AS t2 -WHERE t2.c2 = t1.c2 -GROUP BY c1, c2; -c1 c2 count(c3) -2012-03-01 01:00:00 2 1 - -EXECUTE s1; -c1 c2 count(c3) -2012-03-01 01:00:00 2 1 - -SET @x = 1; -SELECT c1, t2.c2, count(c3) -FROM -( -SELECT 3 as c2 FROM dual WHERE @x = 1 -UNION -SELECT 2 FROM dual WHERE @x = 1 OR @x = 2 -) AS t1, -( -SELECT '2012-03-01 01:00:00' AS c1, 3 as c2, 1 as c3 FROM dual -UNION -SELECT '2012-03-01 02:00:00', 3, 2 FROM dual -UNION -SELECT '2012-03-01 01:00:00', 2, 1 FROM dual -) AS t2 -WHERE t2.c2 = t1.c2 -GROUP BY c1, c2; -c1 c2 count(c3) -2012-03-01 01:00:00 2 1 -2012-03-01 01:00:00 3 1 -2012-03-01 02:00:00 3 1 - -EXECUTE s1; -c1 c2 count(c3) -2012-03-01 01:00:00 2 1 -2012-03-01 01:00:00 3 1 -2012-03-01 02:00:00 3 1 -DEALLOCATE PREPARE s1; # End of 5.3 tests diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index d49c67a35fd..293400ece2f 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -7811,9 +7811,12 @@ DROP FUNCTION f1; # -- End of 5.1 tests # ------------------------------------------------------------------ # -# LP bug#993459 Execution of PS for a query with GROUP BY +# lp:993459 Execution of PS for a query with GROUP BY # returns wrong result (see also mysql bug#13805127) # + +# Bug#13805127: Stored program cache produces wrong result in same THD + CREATE PROCEDURE p1(x INT UNSIGNED) BEGIN SELECT c1, t2.c2, count(c3) @@ -7850,7 +7853,7 @@ c1 c2 count(c3) 2012-03-01 02:00:00 3 1 DROP PROCEDURE p1; # -# LP bug#1002157 : testing stored function +# lp:1002157 : testing stored function # bug#62125 result for null incorrectly yields 1292 warning. # DROP FUNCTION IF EXISTS f1; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 1863cd09c38..f775336299b 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4196,7 +4196,7 @@ INSERT INTO t1 VALUES (1,1),(2,1); EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref a a 5 const 1 Using where; Using index -2 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id)); INSERT INTO t1 VALUES @@ -5966,7 +5966,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) @@ -6127,7 +6127,7 @@ set optimizer_switch=@tmp_optimizer_switch; EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # @@ -6612,7 +6612,33 @@ SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 U min_a a drop table t1; # -# LP BUG#944706 Query with impossible or constant subquery in WHERE or HAVING is not +# MDEV-367: Different results with and without subquery_cache on +# a query with a constant NOT IN condition +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2),(3); +set @mdev367_optimizer_switch = @@optimizer_switch; +set optimizer_switch = 'subquery_cache=on'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +set optimizer_switch = 'subquery_cache=off'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +DROP TABLE t1; +# +# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not # precomputed and thus not part of optimization # CREATE TABLE t1 ( a VARCHAR(16), KEY (a) ); @@ -6768,5 +6794,68 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); a drop table t1,t2; -# return optimizer switch changed in the beginning of this test -set optimizer_switch=@subselect_tmp; +# +# MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used +# +CREATE TABLE t1 (a VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('USA'); +CREATE TABLE t2 (b INT, c VARCHAR(52), KEY(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3813,'United States'),(3940,'Russia'); +CREATE TABLE t3 (d INT, KEY(d)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (12),(22),(9),(45); +create table t4 like t3; +insert into t4 select * from t3; +# This should not show range access for table t2 +explain +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where +1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @tmp_mdev410=@@global.userstat; +set global userstat=on; +flush table_statistics; +flush index_statistics; +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +MIN(b) +NULL +# The following shows that t2 was indeed scanned with a full scan. +show table_statistics; +Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes +test t1 2 0 0 +test t2 3 0 0 +show index_statistics; +Table_schema Table_name Index_name Rows_read +test t2 b 1 +set global userstat=@tmp_mdev410; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-430: Server crashes in select_describe on EXPLAIN with +# materialization+semijoin, 2 nested subqueries, aggregate functions +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-405: Server crashes in test_if_skip_sort_order on EXPLAIN with GROUP BY and HAVING in EXISTS subquery +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result index 41c445329cb..ed00e4ef684 100644 --- a/mysql-test/r/subselect2.result +++ b/mysql-test/r/subselect2.result @@ -161,18 +161,18 @@ SET optimizer_switch='materialization=on,in_to_exists=on'; EXPLAIN SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 index a a 5 NULL 2 Using index -1 PRIMARY t3 index b b 5 NULL 4 Using where; Using index; Using join buffer (flat, BNL join) -2 MATERIALIZED t1 index PRIMARY,a a 5 NULL 2 Using index +1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index +1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index +2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM t1) OR a = b; pk a b 0 4 4 EXPLAIN SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 index a a 5 NULL 2 Using index -1 PRIMARY t3 index b b 5 NULL 4 Using where; Using index; Using join buffer (flat, BNL join) -2 MATERIALIZED t1 index PRIMARY,a a 5 NULL 2 Using index +1 PRIMARY t2 index a a 5 NULL 2 Using where; Using index +1 PRIMARY t3 ref b b 5 test.t2.a 2 Using index +2 SUBQUERY t1 index_subquery PRIMARY,a a 5 const 0 Using index; Using where SELECT * FROM t2,t3 WHERE (2,9) IN (SELECT DISTINCT a,pk FROM v1) OR a = b; pk a b 0 4 4 diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result index 72b4f34d9de..28441e4019e 100644 --- a/mysql-test/r/subselect4.result +++ b/mysql-test/r/subselect4.result @@ -627,51 +627,51 @@ SET @@optimizer_switch = 'materialization=on,in_to_exists=off,semijoin=off'; EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 MATERIALIZED t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 MATERIALIZED t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 MATERIALIZED t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2); f1 f2 EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, min(f4) FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, min(f4) FROM t2) as not_in; not_in NULL EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 MATERIALIZED t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 MATERIALIZED t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 MATERIALIZED NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2); f1 f2 EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2) as not_in; not_in NULL @@ -679,7 +679,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) > 7) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) > 7) as not_in; not_in 1 @@ -687,7 +687,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) is null) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) is null) as not_in; not_in NULL @@ -695,7 +695,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4) FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4) FROM t2) as not_in; not_in NULL @@ -703,7 +703,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4)+f3 FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4)+f3 FROM t2) as not_in; not_in NULL @@ -718,51 +718,51 @@ SET @@optimizer_switch = 'materialization=off,in_to_exists=on,semijoin=off'; EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2); f1 f2 EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, min(f4) FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, min(f4) FROM t2) as not_in; not_in NULL EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2); f1 f2 EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2) as not_in; not_in NULL @@ -770,7 +770,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) > 7) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) > 7) as not_in; not_in 1 @@ -778,7 +778,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) is null) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 HAVING max(f4) is null) as not_in; not_in NULL @@ -786,7 +786,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4) FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4) FROM t2) as not_in; not_in NULL @@ -794,7 +794,7 @@ EXPLAIN SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4)+f3 FROM t2) as not_in; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used -2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT (2, 0) NOT IN (SELECT max(f3+f3), count(f4)+f3 FROM t2) as not_in; not_in NULL @@ -813,21 +813,21 @@ SET @@optimizer_switch = 'materialization=on,in_to_exists=off,semijoin=off'; EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2 WHERE f3 > 10); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2 WHERE f3 > 10); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2 WHERE f3 > 10); f1 f2 @@ -842,14 +842,14 @@ NULL EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 WHERE f3 > 10); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 MATERIALIZED t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2 WHERE f3 > 10); f1 f2 @@ -904,21 +904,21 @@ SET @@optimizer_switch = 'materialization=off,in_to_exists=on,semijoin=off'; EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4) FROM t2 WHERE f3 > 10); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3+f4, min(f4) FROM t2 WHERE f3 > 10); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, min(f4)+max(f4) FROM t2 WHERE f3 > 10); f1 f2 @@ -933,14 +933,14 @@ NULL EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, count(f4) FROM t2 WHERE f3 > 10); f1 f2 EXPLAIN SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2 WHERE f3 > 10); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 2 SUBQUERY t2 range PRIMARY PRIMARY 4 NULL 1 Using index condition; Rowid-ordered scan SELECT * FROM t1 WHERE (2, 0) NOT IN (SELECT f3, f3 + count(f4) FROM t2 WHERE f3 > 10); f1 f2 diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index a0f05a26a46..a4670872fad 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -333,7 +333,7 @@ WHERE (SELECT DISTINCT b FROM t3) > 0); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using where; Using index 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE -3 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 0 Using temporary +3 SUBQUERY t3 ALL NULL NULL NULL NULL 1 Using temporary SELECT * FROM t1 WHERE t1.a = ( @@ -386,7 +386,7 @@ select 1 from t1 where 1 like (select 1 from t1 where 1 <=> (select 1 from t1 gr id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 1 2 SUBQUERY t1 ALL NULL NULL NULL NULL 1 -3 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +3 SUBQUERY t1 ALL NULL NULL NULL NULL 1 Using temporary; Using filesort select 1 from t1 where 1 like (select 1 from t1 where 1 <=> (select 1 from t1 group by a1)); 1 1 diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 45d0b9ee519..9bb26e8a6e0 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2183,7 +2183,7 @@ NULL EXPLAIN SELECT * FROM t2 WHERE (SELECT f3a, f3b FROM t3) NOT IN (SELECT f1a, f1b FROM t1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE 3 MATERIALIZED t1 ALL NULL NULL NULL NULL 2 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table SELECT * FROM t2 WHERE (SELECT f3a, f3b FROM t3) NOT IN (SELECT f1a, f1b FROM t1); diff --git a/mysql-test/r/subselect_mat_cost_bugs.result b/mysql-test/r/subselect_mat_cost_bugs.result index 5a38fe7ca72..8c95c8637aa 100644 --- a/mysql-test/r/subselect_mat_cost_bugs.result +++ b/mysql-test/r/subselect_mat_cost_bugs.result @@ -148,7 +148,7 @@ FROM t2 GROUP BY f1 id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 SUBQUERY t1 system NULL NULL NULL NULL 1 -3 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +3 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort drop table t1, t2, t3; # # LP BUG#715034 Item_sum_distinct::clear(): Assertion `tree != 0' failed @@ -162,7 +162,7 @@ EXPLAIN SELECT * FROM (SELECT * FROM t2) AS a2 WHERE (SELECT distinct SUM(distinct f3 ) FROM t1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 PRIMARY system NULL NULL NULL NULL 0 const row not found 3 SUBQUERY t1 index NULL f3 5 NULL 2 Using index 2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table insert into t2 values (1),(2); diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index 78ab87dbfd6..e72d25fdafa 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -4200,7 +4200,7 @@ INSERT INTO t1 VALUES (1,1),(2,1); EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref a a 5 const 1 Using where; Using index -2 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id)); INSERT INTO t1 VALUES @@ -5967,7 +5967,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) @@ -6126,7 +6126,7 @@ set optimizer_switch=@tmp_optimizer_switch; EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # @@ -6611,7 +6611,33 @@ SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 U min_a a drop table t1; # -# LP BUG#944706 Query with impossible or constant subquery in WHERE or HAVING is not +# MDEV-367: Different results with and without subquery_cache on +# a query with a constant NOT IN condition +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2),(3); +set @mdev367_optimizer_switch = @@optimizer_switch; +set optimizer_switch = 'subquery_cache=on'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +set optimizer_switch = 'subquery_cache=off'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +DROP TABLE t1; +# +# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not # precomputed and thus not part of optimization # CREATE TABLE t1 ( a VARCHAR(16), KEY (a) ); @@ -6766,8 +6792,71 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); a drop table t1,t2; -# return optimizer switch changed in the beginning of this test -set optimizer_switch=@subselect_tmp; +# +# MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used +# +CREATE TABLE t1 (a VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('USA'); +CREATE TABLE t2 (b INT, c VARCHAR(52), KEY(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3813,'United States'),(3940,'Russia'); +CREATE TABLE t3 (d INT, KEY(d)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (12),(22),(9),(45); +create table t4 like t3; +insert into t4 select * from t3; +# This should not show range access for table t2 +explain +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where +1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @tmp_mdev410=@@global.userstat; +set global userstat=on; +flush table_statistics; +flush index_statistics; +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +MIN(b) +NULL +# The following shows that t2 was indeed scanned with a full scan. +show table_statistics; +Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes +test t1 2 0 0 +test t2 3 0 0 +show index_statistics; +Table_schema Table_name Index_name Rows_read +test t2 b 1 +set global userstat=@tmp_mdev410; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-430: Server crashes in select_describe on EXPLAIN with +# materialization+semijoin, 2 nested subqueries, aggregate functions +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-405: Server crashes in test_if_skip_sort_order on EXPLAIN with GROUP BY and HAVING in EXISTS subquery +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; set optimizer_switch=default; select @@optimizer_switch like '%materialization=on%'; @@optimizer_switch like '%materialization=on%' diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index f822a4500f4..9030265356b 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -4196,7 +4196,7 @@ INSERT INTO t1 VALUES (1,1),(2,1); EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref a a 5 const 1 Using where; Using index -2 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id)); INSERT INTO t1 VALUES @@ -5963,7 +5963,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) @@ -6122,7 +6122,7 @@ set optimizer_switch=@tmp_optimizer_switch; EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # @@ -6607,7 +6607,33 @@ SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 U min_a a drop table t1; # -# LP BUG#944706 Query with impossible or constant subquery in WHERE or HAVING is not +# MDEV-367: Different results with and without subquery_cache on +# a query with a constant NOT IN condition +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2),(3); +set @mdev367_optimizer_switch = @@optimizer_switch; +set optimizer_switch = 'subquery_cache=on'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +set optimizer_switch = 'subquery_cache=off'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +DROP TABLE t1; +# +# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not # precomputed and thus not part of optimization # CREATE TABLE t1 ( a VARCHAR(16), KEY (a) ); @@ -6763,6 +6789,69 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); a drop table t1,t2; -# return optimizer switch changed in the beginning of this test -set optimizer_switch=@subselect_tmp; +# +# MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used +# +CREATE TABLE t1 (a VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('USA'); +CREATE TABLE t2 (b INT, c VARCHAR(52), KEY(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3813,'United States'),(3940,'Russia'); +CREATE TABLE t3 (d INT, KEY(d)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (12),(22),(9),(45); +create table t4 like t3; +insert into t4 select * from t3; +# This should not show range access for table t2 +explain +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where +1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @tmp_mdev410=@@global.userstat; +set global userstat=on; +flush table_statistics; +flush index_statistics; +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +MIN(b) +NULL +# The following shows that t2 was indeed scanned with a full scan. +show table_statistics; +Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes +test t1 2 0 0 +test t2 3 0 0 +show index_statistics; +Table_schema Table_name Index_name Rows_read +test t2 b 1 +set global userstat=@tmp_mdev410; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-430: Server crashes in select_describe on EXPLAIN with +# materialization+semijoin, 2 nested subqueries, aggregate functions +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-405: Server crashes in test_if_skip_sort_order on EXPLAIN with GROUP BY and HAVING in EXISTS subquery +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; set @optimizer_switch_for_subselect_test=null; diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index cdad363313d..e68f5990c08 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -4202,7 +4202,7 @@ INSERT INTO t1 VALUES (1,1),(2,1); EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref a a 5 const 1 Using where; Using index -2 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id)); INSERT INTO t1 VALUES @@ -5972,7 +5972,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) @@ -6133,7 +6133,7 @@ set optimizer_switch=@tmp_optimizer_switch; EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # @@ -6618,7 +6618,33 @@ SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 U min_a a drop table t1; # -# LP BUG#944706 Query with impossible or constant subquery in WHERE or HAVING is not +# MDEV-367: Different results with and without subquery_cache on +# a query with a constant NOT IN condition +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2),(3); +set @mdev367_optimizer_switch = @@optimizer_switch; +set optimizer_switch = 'subquery_cache=on'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +set optimizer_switch = 'subquery_cache=off'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +DROP TABLE t1; +# +# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not # precomputed and thus not part of optimization # CREATE TABLE t1 ( a VARCHAR(16), KEY (a) ); @@ -6774,8 +6800,71 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); a drop table t1,t2; -# return optimizer switch changed in the beginning of this test -set optimizer_switch=@subselect_tmp; +# +# MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used +# +CREATE TABLE t1 (a VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('USA'); +CREATE TABLE t2 (b INT, c VARCHAR(52), KEY(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3813,'United States'),(3940,'Russia'); +CREATE TABLE t3 (d INT, KEY(d)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (12),(22),(9),(45); +create table t4 like t3; +insert into t4 select * from t3; +# This should not show range access for table t2 +explain +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where +1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @tmp_mdev410=@@global.userstat; +set global userstat=on; +flush table_statistics; +flush index_statistics; +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +MIN(b) +NULL +# The following shows that t2 was indeed scanned with a full scan. +show table_statistics; +Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes +test t1 2 0 0 +test t2 3 0 0 +show index_statistics; +Table_schema Table_name Index_name Rows_read +test t2 b 1 +set global userstat=@tmp_mdev410; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-430: Server crashes in select_describe on EXPLAIN with +# materialization+semijoin, 2 nested subqueries, aggregate functions +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-405: Server crashes in test_if_skip_sort_order on EXPLAIN with GROUP BY and HAVING in EXISTS subquery +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; set optimizer_switch=default; select @@optimizer_switch like '%subquery_cache=on%'; @@optimizer_switch like '%subquery_cache=on%' diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index 8e6d4bfccc2..f0ce541294a 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -4196,7 +4196,7 @@ INSERT INTO t1 VALUES (1,1),(2,1); EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT COUNT(*) FROM t1 GROUP BY b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ref a a 5 const 1 Using where; Using index -2 SUBQUERY internal_tmp_table ALL group_key NULL NULL NULL 1 Using temporary; Using filesort +2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL, st CHAR(2), INDEX idx(id)); INSERT INTO t1 VALUES @@ -5963,7 +5963,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) @@ -6122,7 +6122,7 @@ set optimizer_switch=@tmp_optimizer_switch; EXPLAIN SELECT * FROM t1 WHERE EXISTS (SELECT * FROM t1 WHERE a=7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 -2 SUBQUERY t1 ref a a 5 const 1 +2 SUBQUERY t1 ref a a 5 const 1 Using index DROP TABLE t1; # @@ -6607,7 +6607,33 @@ SELECT MIN(a) AS min_a, a FROM t1 WHERE 1=2 HAVING a NOT IN ( SELECT a from t1 U min_a a drop table t1; # -# LP BUG#944706 Query with impossible or constant subquery in WHERE or HAVING is not +# MDEV-367: Different results with and without subquery_cache on +# a query with a constant NOT IN condition +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2),(3); +set @mdev367_optimizer_switch = @@optimizer_switch; +set optimizer_switch = 'subquery_cache=on'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +set optimizer_switch = 'subquery_cache=off'; +SELECT * FROM t1 WHERE ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) OR a > 100; +a +SELECT *, ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) FROM t1; +a ( 3, 3 ) NOT IN ( SELECT NULL, NULL ) +1 NULL +2 NULL +3 NULL +set optimizer_switch=@mdev367_optimizer_switch; +DROP TABLE t1; +# +# lp:944706 Query with impossible or constant subquery in WHERE or HAVING is not # precomputed and thus not part of optimization # CREATE TABLE t1 ( a VARCHAR(16), KEY (a) ); @@ -6763,7 +6789,70 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE 4 IN (SELECT MAX(b) FROM t2 WHERE EXISTS (SELECT * FROM t1)); a drop table t1,t2; -# return optimizer switch changed in the beginning of this test -set optimizer_switch=@subselect_tmp; +# +# MDEV-410: EXPLAIN shows type=range, while SHOW EXPLAIN and userstat show full table scan is used +# +CREATE TABLE t1 (a VARCHAR(3) PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('USA'); +CREATE TABLE t2 (b INT, c VARCHAR(52), KEY(b)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3813,'United States'),(3940,'Russia'); +CREATE TABLE t3 (d INT, KEY(d)) ENGINE=MyISAM; +INSERT INTO t3 VALUES (12),(22),(9),(45); +create table t4 like t3; +insert into t4 select * from t3; +# This should not show range access for table t2 +explain +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where +1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index +3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +set @tmp_mdev410=@@global.userstat; +set global userstat=on; +flush table_statistics; +flush index_statistics; +SELECT MIN(b) FROM ( SELECT * FROM t1, t2, t3 WHERE d = b ) AS alias1 +WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 ); +MIN(b) +NULL +# The following shows that t2 was indeed scanned with a full scan. +show table_statistics; +Table_schema Table_name Rows_read Rows_changed Rows_changed_x_#indexes +test t1 2 0 0 +test t2 3 0 0 +show index_statistics; +Table_schema Table_name Index_name Rows_read +test t2 b 1 +set global userstat=@tmp_mdev410; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-430: Server crashes in select_describe on EXPLAIN with +# materialization+semijoin, 2 nested subqueries, aggregate functions +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; +# +# MDEV-405: Server crashes in test_if_skip_sort_order on EXPLAIN with GROUP BY and HAVING in EXISTS subquery +# +CREATE TABLE t1 (a INT, KEY(a)); +INSERT INTO t1 VALUES (1),(8); +CREATE TABLE t2 (b INT, KEY(b)); +INSERT INTO t2 VALUES (45),(17),(20); +EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ; +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 SUBQUERY t1 index a a 5 NULL 1 Using where; Using index +2 SUBQUERY t2 ref b b 5 test.t1.a 2 Using index +DROP TABLE t1,t2; set @optimizer_switch_for_subselect_test=null; set @join_cache_level_for_subselect_test=NULL; diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index fc2e0854620..723efbdcb23 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -878,6 +878,8 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT CREATE TABLE b15776 (a char(4294967296)); ERROR 42000: Display width out of range for 'a' (max = 4294967295) CREATE TABLE b15776 (a year(4294967295)); +Warnings: +Note 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use YEAR(4) instead INSERT INTO b15776 VALUES (42); SELECT * FROM b15776; a @@ -886,6 +888,8 @@ DROP TABLE b15776; CREATE TABLE b15776 (a year(4294967296)); ERROR 42000: Display width out of range for 'a' (max = 4294967295) CREATE TABLE b15776 (a year(0)); +Warnings: +Note 1287 'YEAR(0)' is deprecated and will be removed in a future release. Please use YEAR(4) instead DROP TABLE b15776; CREATE TABLE b15776 (a year(-2)); 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 '-2))' at line 1 diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 5d89a1ee407..4b9bf6f433f 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -1,5 +1,7 @@ drop table if exists t1; create table t1 (y year,y2 year(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert into t1 values (0,0),(1999,1999),(2000,2000),(2001,2001),(70,70),(69,69); select * from t1; y y2 @@ -50,6 +52,8 @@ End of 5.0 tests # Bug #49480: WHERE using YEAR columns returns unexpected results # CREATE TABLE t2(yy YEAR(2), c2 CHAR(4)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CREATE TABLE t4(yyyy YEAR(4), c4 CHAR(4)); INSERT INTO t2 (c2) VALUES (NULL),(1970),(1999),(2000),(2001),(2069); INSERT INTO t4 (c4) SELECT c2 FROM t2; @@ -358,9 +362,22 @@ total_rows min_value MAX(c1+0) 3 0 2155 DROP TABLE t1; # +# WL#6219: Deprecate and remove YEAR(2) type +# +CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +DROP TABLE t1; +# End of 5.1 tests create function y2k() returns int deterministic return 2000; create table t1 (a year(2), b int); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead insert t1 values (0,2000); select a from t1 where a=2000; a diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 251d0b39098..68d2364986d 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -34,7 +34,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=10000/*!*/; INSERT INTO t1 VALUES(@`a b`) /*!*/; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 008f8f41ada..b50f6b81206 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -4674,6 +4674,19 @@ INSERT INTO t2 VALUES (1); DROP TRIGGER tr; DROP VIEW v1; DROP TABLE t1,t2,t3; +# +# LP bug#1007622 Server crashes in handler::increment_statistics on +# inserting into a view over a view +# +CREATE TABLE t1 (a INT); +CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a1.* FROM t1 AS a1, t1 AS a2; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM v1; +INSERT INTO v2 (a) VALUES (1) ; +select * from t1; +a +1 +drop view v2,v1; +drop table t1; # ----------------------------------------------------------------- # -- End of 5.3 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result index 33feb5c7591..f84995cac3b 100644 --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result @@ -35,7 +35,7 @@ DELIMITER /*!*/; # at 4 <#>ROLLBACK/*!*/; # at 102 -<#>use test/*!*/; +<#>use `test`/*!*/; SET TIMESTAMP=1196959712/*!*/; <#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_drop_if_exists.result b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result index 0c398bed440..f39b682d2de 100644 --- a/mysql-test/suite/binlog/r/binlog_drop_if_exists.result +++ b/mysql-test/suite/binlog/r/binlog_drop_if_exists.result @@ -96,3 +96,21 @@ master-bin.000001 # Query # # use `test`; DROP VIEW IF EXISTS db_bug_13684.v master-bin.000001 # Query # # use `test`; DROP EVENT IF EXISTS db_bug_13684.e master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `db_bug_13684`.`t` /* generated by server */ master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 +CREATE TABLE t1(id int); +DROP TABLE /* comment */ t1; +CREATE TABLE t1(id int); +DROP TABLE IF EXISTS /* comment */ t1; +CREATE TABLE t1(id int); +DROP TABLE /**/ t1; +CREATE TABLE t1(id int); +DROP TABLE IF EXISTS /* */ t1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(id int) +master-bin.000001 # Query # # use `test`; DROP TABLE /* comment */ `t1` /* generated by server */ +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(id int) +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS /* comment */ `t1` /* generated by server */ +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(id int) +master-bin.000001 # Query # # use `test`; DROP TABLE /**/ `t1` /* generated by server */ +master-bin.000001 # Query # # use `test`; CREATE TABLE t1(id int) +master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS /* */ `t1` /* generated by server */ diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index d4a3503b1f2..9c780390ca8 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -35,7 +35,7 @@ DELIMITER /*!*/; #010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # -use new_test1/*!*/; +use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; @@ -72,7 +72,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test2/*!*/; +use `test2`/*!*/; SET TIMESTAMP=1000000000/*!*/; CREATE TABLE t2 (a INT) /*!*/; @@ -115,7 +115,7 @@ SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; # at # -use new_test3/*!*/; +use `new_test3`/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; CREATE TABLE t3 (a INT) @@ -229,7 +229,7 @@ DELIMITER /*!*/; #010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # -use new_test1/*!*/; +use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; @@ -266,7 +266,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 -use test2/*!*/; +use `test2`/*!*/; SET TIMESTAMP=1000000000/*!*/; CREATE TABLE t2 (a INT) /*!*/; @@ -309,7 +309,7 @@ SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; # at # -use new_test3/*!*/; +use `new_test3`/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; CREATE TABLE t3 (a INT) diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index 4bdafb609a7..3207b9c2180 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -26,7 +26,7 @@ SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=10000/*!*/; insert into t2 values (@v) /*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index da2e24506fd..978b045d599 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -698,7 +698,7 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`= @b + bug27417(2) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @`b`) SET `b`= @b + bug27417(2) ;file_id=# master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; drop trigger trg_del_t2; @@ -950,7 +950,7 @@ master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci -master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`= @b + bug27417(2) ;file_id=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @`b`) SET `b`= @b + bug27417(2) ;file_id=# master-bin.000001 # Query # # ROLLBACK drop trigger trg_del_t2; drop table t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/binlog/t/binlog_drop_if_exists.test b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test index 6b2b37ae791..26910432428 100644 --- a/mysql-test/suite/binlog/t/binlog_drop_if_exists.test +++ b/mysql-test/suite/binlog/t/binlog_drop_if_exists.test @@ -113,3 +113,18 @@ if($fixed_bug_25705) --source include/show_binlog_events.inc enable_warnings; + +# Drop comments in binlog +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +CREATE TABLE t1(id int); +DROP TABLE /* comment */ t1; +CREATE TABLE t1(id int); +DROP TABLE IF EXISTS /* comment */ t1; + +CREATE TABLE t1(id int); +DROP TABLE /**/ t1; +CREATE TABLE t1(id int); +DROP TABLE IF EXISTS /* */ t1; + +--source include/show_binlog_events.inc + diff --git a/mysql-test/suite/engines/funcs/r/an_calendar.result b/mysql-test/suite/engines/funcs/r/an_calendar.result index e974a67444e..f057c3b618f 100644 --- a/mysql-test/suite/engines/funcs/r/an_calendar.result +++ b/mysql-test/suite/engines/funcs/r/an_calendar.result @@ -16,7 +16,13 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL); SET TIMESTAMP=1171346973; INSERT INTO t1 VALUES(NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 INSERT INTO t1 VALUES(NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status OK diff --git a/mysql-test/suite/engines/funcs/r/datetime_function.result b/mysql-test/suite/engines/funcs/r/datetime_function.result index 182f61f67f0..583552edc7d 100644 --- a/mysql-test/suite/engines/funcs/r/datetime_function.result +++ b/mysql-test/suite/engines/funcs/r/datetime_function.result @@ -25,7 +25,15 @@ INSERT INTO t3 VALUES('2008-02-29 13:13:13'); DROP TABLE t3; CREATE TABLE t3(c1 TIME NOT NULL); INSERT INTO t3 VALUES('1000-01-01 00:00:00'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t3 VALUES('1999-12-31 23:59:59'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t3 VALUES('2000-01-01 00:00:00'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t3 VALUES('2008-02-29 13:13:13'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 DROP TABLE t3; diff --git a/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result b/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result index 6a9bfae27db..9792236af0a 100644 --- a/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result +++ b/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result @@ -77,6 +77,7 @@ utf8_persian_ci utf8 208 # # utf8_esperanto_ci utf8 209 # # utf8_hungarian_ci utf8 210 # # utf8_sinhala_ci utf8 211 # # +utf8_croatian_ci utf8 213 # # utf8_general_mysql500_ci utf8 223 # # ucs2_general_ci ucs2 35 Yes # # ucs2_bin ucs2 90 # # @@ -100,6 +101,7 @@ ucs2_persian_ci ucs2 144 # # ucs2_esperanto_ci ucs2 145 # # ucs2_hungarian_ci ucs2 146 # # ucs2_sinhala_ci ucs2 147 # # +ucs2_croatian_ci ucs2 149 # # ucs2_general_mysql500_ci ucs2 159 # # cp866_general_ci cp866 36 Yes # # cp866_bin cp866 68 # # @@ -137,6 +139,7 @@ utf8mb4_persian_ci utf8mb4 240 # # utf8mb4_esperanto_ci utf8mb4 241 # # utf8mb4_hungarian_ci utf8mb4 242 # # utf8mb4_sinhala_ci utf8mb4 243 # # +utf8mb4_croatian_ci utf8mb4 245 # # cp1251_bulgarian_ci cp1251 14 # # cp1251_ukrainian_ci cp1251 23 # # cp1251_bin cp1251 50 # # @@ -164,6 +167,7 @@ utf16_persian_ci utf16 117 # # utf16_esperanto_ci utf16 118 # # utf16_hungarian_ci utf16 119 # # utf16_sinhala_ci utf16 120 # # +utf16_croatian_ci utf16 215 # # cp1256_general_ci cp1256 57 Yes # # cp1256_bin cp1256 67 # # cp1257_lithuanian_ci cp1257 29 # # @@ -191,6 +195,7 @@ utf32_persian_ci utf32 176 # # utf32_esperanto_ci utf32 177 # # utf32_hungarian_ci utf32 178 # # utf32_sinhala_ci utf32 179 # # +utf32_croatian_ci utf32 214 # # binary binary 63 Yes # # geostd8_general_ci geostd8 92 Yes # # geostd8_bin geostd8 93 # # diff --git a/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result b/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result index 79d1d4cbac2..9490446e83d 100644 --- a/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result +++ b/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result @@ -77,6 +77,7 @@ utf8_persian_ci utf8 208 # # utf8_esperanto_ci utf8 209 # # utf8_hungarian_ci utf8 210 # # utf8_sinhala_ci utf8 211 # # +utf8_croatian_ci utf8 213 # # utf8_general_mysql500_ci utf8 223 # # ucs2_general_ci ucs2 35 Yes # # ucs2_bin ucs2 90 # # @@ -100,6 +101,7 @@ ucs2_persian_ci ucs2 144 # # ucs2_esperanto_ci ucs2 145 # # ucs2_hungarian_ci ucs2 146 # # ucs2_sinhala_ci ucs2 147 # # +ucs2_croatian_ci ucs2 149 # # ucs2_general_mysql500_ci ucs2 159 # # cp866_general_ci cp866 36 Yes # # cp866_bin cp866 68 # # @@ -137,6 +139,7 @@ utf8mb4_persian_ci utf8mb4 240 # # utf8mb4_esperanto_ci utf8mb4 241 # # utf8mb4_hungarian_ci utf8mb4 242 # # utf8mb4_sinhala_ci utf8mb4 243 # # +utf8mb4_croatian_ci utf8mb4 245 # # cp1251_bulgarian_ci cp1251 14 # # cp1251_ukrainian_ci cp1251 23 # # cp1251_bin cp1251 50 # # @@ -164,6 +167,7 @@ utf16_persian_ci utf16 117 # # utf16_esperanto_ci utf16 118 # # utf16_hungarian_ci utf16 119 # # utf16_sinhala_ci utf16 120 # # +utf16_croatian_ci utf16 215 # # cp1256_general_ci cp1256 57 Yes # # cp1256_bin cp1256 67 # # cp1257_lithuanian_ci cp1257 29 # # @@ -191,6 +195,7 @@ utf32_persian_ci utf32 176 # # utf32_esperanto_ci utf32 177 # # utf32_hungarian_ci utf32 178 # # utf32_sinhala_ci utf32 179 # # +utf32_croatian_ci utf32 214 # # binary binary 63 Yes # # geostd8_general_ci geostd8 92 Yes # # geostd8_bin geostd8 93 # # diff --git a/mysql-test/suite/engines/funcs/r/db_use_error.result b/mysql-test/suite/engines/funcs/r/db_use_error.result index 03c41e927ac..2051b56b19e 100644 --- a/mysql-test/suite/engines/funcs/r/db_use_error.result +++ b/mysql-test/suite/engines/funcs/r/db_use_error.result @@ -9,7 +9,7 @@ mysql performance_schema test USE DATABASE nond6; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATABASE nond6' at line 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 'DATABASE nond6' at line 1 DROP DATABASE d6; SHOW DATABASES; Database diff --git a/mysql-test/suite/engines/funcs/r/de_calendar_range.result b/mysql-test/suite/engines/funcs/r/de_calendar_range.result index 07543e0c8c4..ab39556e6ce 100644 --- a/mysql-test/suite/engines/funcs/r/de_calendar_range.result +++ b/mysql-test/suite/engines/funcs/r/de_calendar_range.result @@ -33,10 +33,20 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'2 02:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'3 03:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'4 04:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 SELECT * FROM t1 ORDER BY c1; c1 09:09:33 @@ -47,8 +57,6 @@ c1 DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01'); SELECT * FROM t1 ORDER BY c1; c1 -12:10:34 -13:10:34 DROP TABLE t1; CREATE TABLE t1(c1 DATETIME NOT NULL PRIMARY KEY); SET TIMESTAMP=1171346973; diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_2_unique_constraints_duplicate_update.result b/mysql-test/suite/engines/funcs/r/in_calendar_2_unique_constraints_duplicate_update.result index 9c56e23574d..c68baf685e2 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_2_unique_constraints_duplicate_update.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_2_unique_constraints_duplicate_update.result @@ -66,12 +66,42 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 TIME NULL, PRIMARY KEY(c1), UNIQUE(c2)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),ADDTIME(NOW(),'3 03:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'2 02:01:01'),ADDTIME(NOW(),'2 02:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'3 03:01:01'),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'4 04:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'2 02:01:01'),ADDTIME(NOW(),'2 02:01:01'),NOW()) ON DUPLICATE KEY UPDATE c3=ADDTIME(NOW(),'6 06:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()) ON DUPLICATE KEY UPDATE c3=ADDTIME(NOW(),'6 06:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 SELECT * FROM t1; c1 c2 c3 09:09:33 13:10:34 15:10:34 diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_duplicate_update.result b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_duplicate_update.result index 47355681eae..6e3f717e93d 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_duplicate_update.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_duplicate_update.result @@ -29,8 +29,15 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(NOW()) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 SELECT * FROM t1; c1 10:10:34 diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result index f8bff355901..4644894beec 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_error.result @@ -28,7 +28,11 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(NOW()); ERROR 23000: Duplicate entry '09:09:33' for key 'PRIMARY' SELECT * FROM t1; diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_ignore.result b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_ignore.result index f8bff355901..4644894beec 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_ignore.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_pk_constraint_ignore.result @@ -28,7 +28,11 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL PRIMARY KEY); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(NOW()); ERROR 23000: Duplicate entry '09:09:33' for key 'PRIMARY' SELECT * FROM t1; diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_duplicate_update.result b/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_duplicate_update.result index 5c4307158fa..8af6ff6af13 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_duplicate_update.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_duplicate_update.result @@ -29,8 +29,15 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL UNIQUE); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(NOW()) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 SELECT * FROM t1; c1 10:10:34 diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_error.result b/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_error.result index 9f6a205530c..c96cd4ba8a8 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_error.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_error.result @@ -28,7 +28,11 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL UNIQUE); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(NOW()); ERROR 23000: Duplicate entry '09:09:33' for key 'c1' SELECT * FROM t1; diff --git a/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_ignore.result b/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_ignore.result index 5469527b762..210460d33f1 100644 --- a/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_ignore.result +++ b/mysql-test/suite/engines/funcs/r/in_calendar_unique_constraint_ignore.result @@ -28,8 +28,14 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL UNIQUE); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT IGNORE INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 SELECT * FROM t1; c1 09:09:33 diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_duplicate_update.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_duplicate_update.result index d7dfc9d794c..209f61440cd 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_duplicate_update.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_duplicate_update.result @@ -61,11 +61,40 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL, c3 TIME NOT NULL, PRIMARY KEY(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'),c2=ADDTIME(NOW(),'2 02:01:01'),c3=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'),c2=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 SELECT * FROM t1; c1 c2 c3 09:09:33 10:10:34 09:09:33 diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_error.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_error.result index d71af8d6375..9c310d3d457 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_error.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_error.result @@ -52,9 +52,25 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL, c3 TIME NOT NULL, PRIMARY KEY(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); ERROR 23000: Duplicate entry '09:09:33-09:09:33-09:09:33' for key 'PRIMARY' INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_ignore.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_ignore.result index d71af8d6375..9c310d3d457 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_ignore.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_pk_constraint_ignore.result @@ -52,9 +52,25 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL, c3 TIME NOT NULL, PRIMARY KEY(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); ERROR 23000: Duplicate entry '09:09:33-09:09:33-09:09:33' for key 'PRIMARY' INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_duplicate_update.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_duplicate_update.result index edad4bb218d..fe509a0615c 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_duplicate_update.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_duplicate_update.result @@ -61,11 +61,40 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL, c3 TIME NULL, UNIQUE(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'),c2=ADDTIME(NOW(),'2 02:01:01'),c3=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'),c2=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 SELECT * FROM t1; c1 c2 c3 09:09:33 10:10:34 09:09:33 diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_error.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_error.result index 4d7cadac70c..78b0e81cd56 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_error.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_error.result @@ -52,9 +52,25 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL, c3 TIME NULL, UNIQUE(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); ERROR 23000: Duplicate entry '09:09:33-09:09:33-09:09:33' for key 'c1' INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_ignore.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_ignore.result index 31f7db1dc9a..a884345be84 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_ignore.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_calendar_unique_constraint_ignore.result @@ -56,11 +56,35 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NULL, c2 TIME NULL, c3 TIME NULL, UNIQUE(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 SELECT * FROM t1; c1 c2 c3 09:09:33 09:09:33 09:09:33 diff --git a/mysql-test/suite/engines/funcs/r/in_multicolumn_number_pk_constraint_duplicate_update.result b/mysql-test/suite/engines/funcs/r/in_multicolumn_number_pk_constraint_duplicate_update.result index d7dfc9d794c..209f61440cd 100644 --- a/mysql-test/suite/engines/funcs/r/in_multicolumn_number_pk_constraint_duplicate_update.result +++ b/mysql-test/suite/engines/funcs/r/in_multicolumn_number_pk_constraint_duplicate_update.result @@ -61,11 +61,40 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NOT NULL, c3 TIME NOT NULL, PRIMARY KEY(c1,c2,c3)); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'1 01:01:01'),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(ADDTIME(NOW(),'1 01:01:01'),NOW(),NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW()) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'),c2=ADDTIME(NOW(),'2 02:01:01'),c3=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),ADDTIME(NOW(),'1 01:01:01')) ON DUPLICATE KEY UPDATE c1=ADDTIME(NOW(),'2 02:01:01'),c2=ADDTIME(NOW(),'2 02:01:01'); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 SELECT * FROM t1; c1 c2 c3 09:09:33 10:10:34 09:09:33 diff --git a/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result b/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result index 556b5a05764..53964697506 100644 --- a/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result +++ b/mysql-test/suite/engines/funcs/r/in_number_boundary_error.result @@ -7,7 +7,7 @@ INSERT INTO t4 (c1) VALUES(0); INSERT INTO t4 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('x'); -ERROR HY000: Incorrect integer value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('9'); SELECT COUNT(c1) AS total_rows FROM t4; total_rows @@ -26,7 +26,7 @@ INSERT INTO t4 (c1) VALUES(0); INSERT INTO t4 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('x'); -ERROR HY000: Incorrect integer value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('9'); SELECT COUNT(c1) AS total_rows FROM t4; total_rows @@ -45,7 +45,7 @@ INSERT INTO t4 (c1) VALUES(0); INSERT INTO t4 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('x'); -ERROR HY000: Incorrect integer value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('9'); SELECT COUNT(c1) AS total_rows FROM t4; total_rows @@ -64,7 +64,7 @@ INSERT INTO t4 (c1) VALUES(0); INSERT INTO t4 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('x'); -ERROR HY000: Incorrect integer value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('9'); SELECT COUNT(c1) AS total_rows FROM t4; total_rows @@ -83,7 +83,7 @@ INSERT INTO t4 (c1) VALUES(0); INSERT INTO t4 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('x'); -ERROR HY000: Incorrect integer value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('9'); SELECT COUNT(c1) AS total_rows FROM t4; total_rows @@ -102,7 +102,7 @@ INSERT INTO t4 (c1) VALUES(0); INSERT INTO t4 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('x'); -ERROR HY000: Incorrect integer value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect integer value: 'x' for column 'c1' at row 1 INSERT INTO t4 (c1) VALUES('9'); SELECT COUNT(c1) AS total_rows FROM t4; total_rows diff --git a/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result b/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result index fe7fc0e38d7..62ad9a568f9 100644 --- a/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result +++ b/mysql-test/suite/engines/funcs/r/in_number_decimal_boundary_error.result @@ -7,7 +7,7 @@ INSERT INTO t5 (c1) VALUES(0); INSERT INTO t5 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES('x'); -ERROR HY000: Incorrect decimal value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES(999999); ERROR 22003: Out of range value for column 'c1' at row 1 SELECT COUNT(c1) AS total_rows FROM t5; @@ -27,7 +27,7 @@ INSERT INTO t5 (c1) VALUES(0); INSERT INTO t5 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES('x'); -ERROR HY000: Incorrect decimal value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES(999999); ERROR 22003: Out of range value for column 'c1' at row 1 SELECT COUNT(c1) AS total_rows FROM t5; @@ -47,7 +47,7 @@ INSERT INTO t5 (c1) VALUES(0); INSERT INTO t5 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES('x'); -ERROR HY000: Incorrect decimal value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES(999999); ERROR 22003: Out of range value for column 'c1' at row 1 SELECT COUNT(c1) AS total_rows FROM t5; @@ -67,7 +67,7 @@ INSERT INTO t5 (c1) VALUES(0); INSERT INTO t5 (c1) VALUES(-1); ERROR 22003: Out of range value for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES('x'); -ERROR HY000: Incorrect decimal value: 'x' for column 'c1' at row 1 +ERROR 22007: Incorrect decimal value: 'x' for column 'c1' at row 1 INSERT INTO t5 (c1) VALUES(999999); ERROR 22003: Out of range value for column 'c1' at row 1 SELECT COUNT(c1) AS total_rows FROM t5; diff --git a/mysql-test/suite/engines/funcs/r/ld_all_number_string_calendar_types.result b/mysql-test/suite/engines/funcs/r/ld_all_number_string_calendar_types.result index 63d36edd3aa..4776a3ac748 100644 --- a/mysql-test/suite/engines/funcs/r/ld_all_number_string_calendar_types.result +++ b/mysql-test/suite/engines/funcs/r/ld_all_number_string_calendar_types.result @@ -61,6 +61,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -77,6 +81,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -93,6 +101,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -325,6 +337,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -341,6 +357,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -357,6 +377,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -589,6 +613,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -605,6 +633,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -621,6 +653,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -853,6 +889,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -869,6 +909,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -885,6 +929,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1117,6 +1165,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1133,6 +1185,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1149,6 +1205,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1381,6 +1441,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1397,6 +1461,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1413,6 +1481,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1645,6 +1717,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1661,6 +1737,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1677,6 +1757,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1909,6 +1993,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1925,6 +2013,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -1941,6 +2033,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2173,6 +2269,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2189,6 +2289,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2205,6 +2309,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2437,6 +2545,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2453,6 +2565,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2469,6 +2585,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2701,6 +2821,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2717,6 +2841,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2733,6 +2861,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2965,6 +3097,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2981,6 +3117,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -2997,6 +3137,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3229,6 +3373,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3245,6 +3393,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3261,6 +3413,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3493,6 +3649,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3509,6 +3669,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3525,6 +3689,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3757,6 +3925,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3773,6 +3945,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -3789,6 +3965,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4021,6 +4201,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4037,6 +4221,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4053,6 +4241,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4285,6 +4477,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4301,6 +4497,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4317,6 +4517,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4549,6 +4753,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4565,6 +4773,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4581,6 +4793,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4813,6 +5029,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4829,6 +5049,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -4845,6 +5069,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5077,6 +5305,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5093,6 +5325,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5109,6 +5345,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5341,6 +5581,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5357,6 +5601,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5373,6 +5621,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5605,6 +5857,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5621,6 +5877,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5637,6 +5897,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5869,6 +6133,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5885,6 +6153,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -5901,6 +6173,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6133,6 +6409,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6149,6 +6429,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6165,6 +6449,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6397,6 +6685,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6413,6 +6705,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6429,6 +6725,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6661,6 +6961,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6677,6 +6981,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6693,6 +7001,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6925,6 +7237,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6941,6 +7257,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -6957,6 +7277,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7189,6 +7513,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7205,6 +7533,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7221,6 +7553,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 VARCHAR(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7453,6 +7789,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7469,6 +7809,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7485,6 +7829,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7717,6 +8065,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7733,6 +8085,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7749,6 +8105,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7981,6 +8341,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -7997,6 +8361,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8013,6 +8381,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8245,6 +8617,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8261,6 +8637,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8277,6 +8657,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8509,6 +8893,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8525,6 +8913,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8541,6 +8933,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8773,6 +9169,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8789,6 +9189,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -8805,6 +9209,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9037,6 +9445,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9053,6 +9465,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9069,6 +9485,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9301,6 +9721,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9317,6 +9741,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9333,6 +9761,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9565,6 +9997,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9581,6 +10017,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9597,6 +10037,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9829,6 +10273,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9845,6 +10293,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -9861,6 +10313,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10093,6 +10549,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10109,6 +10569,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10125,6 +10589,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10357,6 +10825,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10373,6 +10845,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10389,6 +10865,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10621,6 +11101,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10637,6 +11121,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10653,6 +11141,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10885,6 +11377,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10901,6 +11397,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -10917,6 +11417,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 BINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11149,6 +11653,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11165,6 +11673,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11181,6 +11693,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11413,6 +11929,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11429,6 +11949,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11445,6 +11969,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11677,6 +12205,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11693,6 +12225,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11709,6 +12245,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11941,6 +12481,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11957,6 +12501,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -11973,6 +12521,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12205,6 +12757,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12221,6 +12777,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12237,6 +12797,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12469,6 +13033,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12485,6 +13053,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12501,6 +13073,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12733,6 +13309,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12749,6 +13329,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12765,6 +13349,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DECIMAL NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -12997,6 +13585,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13013,6 +13605,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13029,6 +13625,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DEC NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13261,6 +13861,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13277,6 +13881,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13293,6 +13901,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FIXED NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13525,6 +14137,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13541,6 +14157,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13557,6 +14177,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 NUMERIC NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13789,6 +14413,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13805,6 +14433,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -13821,6 +14453,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14053,6 +14689,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14069,6 +14709,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14085,6 +14729,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 REAL NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14317,6 +14965,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14333,6 +14985,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14349,6 +15005,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 DOUBLE PRECISION NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14581,6 +15241,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14597,6 +15261,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 @@ -14613,6 +15281,10 @@ c1 c2 c3 DROP TABLE t1; CREATE TABLE t1 (c1 FLOAT NOT NULL PRIMARY KEY, c2 VARBINARY(10), c3 TIME); LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; +Warnings: +Note 1265 Data truncated for column 'c3' at row 1 +Note 1265 Data truncated for column 'c3' at row 2 +Note 1265 Data truncated for column 'c3' at row 3 SELECT * INTO OUTFILE '../../tmp/t1.dat' FIELDS ENCLOSED BY '"' OPTIONALLY ENCLOSED BY ':' LINES TERMINATED BY '\r\n' FROM t1; SELECT * FROM t1 ORDER BY c1; c1 c2 c3 diff --git a/mysql-test/suite/engines/funcs/r/sq_all.result b/mysql-test/suite/engines/funcs/r/sq_all.result index ac1908b7b1b..24e62a3f3ba 100644 --- a/mysql-test/suite/engines/funcs/r/sq_all.result +++ b/mysql-test/suite/engines/funcs/r/sq_all.result @@ -13,13 +13,10 @@ SELECT c1 FROM t1 WHERE c1 > ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 >= ALL (SELECT c1 FROM t2); c1 -100 SELECT c1 FROM t1 WHERE c1 = ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 <= ALL (SELECT c1 FROM t2); c1 -1 -2 SELECT c1 FROM t1 WHERE c1 <> ALL (SELECT c1 FROM t2); c1 DROP TABLE t1; @@ -37,13 +34,10 @@ SELECT c1 FROM t1 WHERE c1 > ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 >= ALL (SELECT c1 FROM t2); c1 -100 SELECT c1 FROM t1 WHERE c1 = ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 <= ALL (SELECT c1 FROM t2); c1 -1 -2 SELECT c1 FROM t1 WHERE c1 <> ALL (SELECT c1 FROM t2); c1 DROP TABLE t1; @@ -61,13 +55,10 @@ SELECT c1 FROM t1 WHERE c1 > ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 >= ALL (SELECT c1 FROM t2); c1 -100 SELECT c1 FROM t1 WHERE c1 = ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 <= ALL (SELECT c1 FROM t2); c1 -1 -2 SELECT c1 FROM t1 WHERE c1 <> ALL (SELECT c1 FROM t2); c1 DROP TABLE t1; @@ -85,13 +76,10 @@ SELECT c1 FROM t1 WHERE c1 > ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 >= ALL (SELECT c1 FROM t2); c1 -100 SELECT c1 FROM t1 WHERE c1 = ALL (SELECT c1 FROM t2); c1 SELECT c1 FROM t1 WHERE c1 <= ALL (SELECT c1 FROM t2); c1 -1 -2 SELECT c1 FROM t1 WHERE c1 <> ALL (SELECT c1 FROM t2); c1 DROP TABLE t1; diff --git a/mysql-test/suite/engines/funcs/r/sq_error.result b/mysql-test/suite/engines/funcs/r/sq_error.result index 5ce36f50e49..c983ff73d12 100644 --- a/mysql-test/suite/engines/funcs/r/sq_error.result +++ b/mysql-test/suite/engines/funcs/r/sq_error.result @@ -11,7 +11,7 @@ INSERT INTO t2 VALUES (2,'abcde'); SELECT * FROM t1 WHERE c2 IN (SELECT c2 FROM t2 ORDER BY c1 LIMIT 1) --error 1241 SELECT (SELECT c1, c2 FROM t2) FROM t1; -ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); @@ -30,7 +30,7 @@ INSERT INTO t2 VALUES (2,'abcde'); SELECT * FROM t1 WHERE c2 IN (SELECT c2 FROM t2 ORDER BY c1 LIMIT 1) --error 1241 SELECT (SELECT c1, c2 FROM t2) FROM t1; -ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); @@ -49,7 +49,7 @@ INSERT INTO t2 VALUES (2,'abcde'); SELECT * FROM t1 WHERE c2 IN (SELECT c2 FROM t2 ORDER BY c1 LIMIT 1) --error 1241 SELECT (SELECT c1, c2 FROM t2) FROM t1; -ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); @@ -68,7 +68,7 @@ INSERT INTO t2 VALUES (2,'abcde'); SELECT * FROM t1 WHERE c2 IN (SELECT c2 FROM t2 ORDER BY c1 LIMIT 1) --error 1241 SELECT (SELECT c1, c2 FROM t2) FROM t1; -ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' +ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2); ERROR 21000: Subquery returns more than 1 row UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); diff --git a/mysql-test/suite/engines/funcs/r/up_calendar_range.result b/mysql-test/suite/engines/funcs/r/up_calendar_range.result index dbd6e2cf8a6..10bef827a88 100644 --- a/mysql-test/suite/engines/funcs/r/up_calendar_range.result +++ b/mysql-test/suite/engines/funcs/r/up_calendar_range.result @@ -39,10 +39,20 @@ DROP TABLE t1; CREATE TABLE t1(c1 TIME NOT NULL); SET TIMESTAMP=1171346973; INSERT INTO t1 (c1) VALUES(NOW()); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'1 01:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'2 02:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'3 03:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 INSERT INTO t1 (c1) VALUES(ADDTIME(NOW(),'4 04:01:01')); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 SELECT * FROM t1 ORDER BY c1; c1 09:09:33 @@ -54,10 +64,10 @@ UPDATE t1 SET c1 = NOW() WHERE c1 >= ADDTIME(NOW(),'2 02:01:01'); SELECT * FROM t1 ORDER BY c1; c1 09:09:33 -09:09:33 -09:09:33 -09:09:33 10:10:34 +11:10:34 +12:10:34 +13:10:34 DROP TABLE t1; CREATE TABLE t1(c1 DATETIME NOT NULL); SET TIMESTAMP=1171346973; diff --git a/mysql-test/suite/engines/funcs/t/se_join_left.test b/mysql-test/suite/engines/funcs/t/se_join_left.test index 005936acb3b..792f2cdd699 100644 --- a/mysql-test/suite/engines/funcs/t/se_join_left.test +++ b/mysql-test/suite/engines/funcs/t/se_join_left.test @@ -12,8 +12,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -27,8 +30,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -42,8 +48,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -57,8 +66,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -72,8 +84,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -87,8 +102,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -102,8 +120,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -117,8 +138,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -132,8 +156,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -147,8 +174,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -162,8 +192,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -177,8 +210,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -192,8 +228,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -207,8 +246,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -222,8 +264,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -237,8 +282,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -252,8 +300,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -267,8 +318,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -282,8 +336,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -297,8 +354,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -312,8 +372,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -327,8 +390,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -342,8 +408,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -357,8 +426,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -372,8 +444,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -387,8 +462,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -402,8 +480,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -417,8 +498,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -432,8 +516,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -447,8 +534,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -462,8 +552,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -477,8 +570,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -492,8 +588,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -507,8 +606,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -522,8 +624,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -537,8 +642,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -552,8 +660,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -567,8 +678,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -582,8 +696,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -597,8 +714,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -612,8 +732,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -627,8 +750,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -642,8 +768,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -657,8 +786,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -672,8 +804,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -687,8 +822,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -702,8 +840,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -717,8 +858,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -732,8 +876,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -747,8 +894,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -762,8 +912,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -777,8 +930,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -792,8 +948,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -807,8 +966,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -822,8 +984,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -837,8 +1002,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -852,8 +1020,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -867,8 +1038,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -882,8 +1056,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -897,8 +1074,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -912,8 +1092,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -927,8 +1110,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -942,8 +1128,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -957,8 +1146,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -972,8 +1164,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -987,8 +1182,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1002,8 +1200,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1017,8 +1218,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1032,8 +1236,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1047,8 +1254,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1062,8 +1272,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1077,8 +1290,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1092,8 +1308,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1107,8 +1326,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1122,8 +1344,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1137,8 +1362,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1152,8 +1380,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1167,8 +1398,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1182,8 +1416,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1197,8 +1434,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1212,8 +1452,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1227,8 +1470,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1242,8 +1488,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1257,8 +1506,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1272,8 +1524,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1287,8 +1542,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1302,8 +1560,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1317,8 +1578,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1332,8 +1596,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1347,8 +1614,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1362,8 +1632,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1377,8 +1650,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1392,8 +1668,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1407,8 +1686,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1422,8 +1704,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1437,8 +1722,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1452,8 +1740,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1467,8 +1758,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1482,8 +1776,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1497,8 +1794,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1512,8 +1812,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1527,8 +1830,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1542,8 +1848,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1557,8 +1866,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1572,8 +1884,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1587,8 +1902,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1602,8 +1920,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1617,8 +1938,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1632,8 +1956,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1647,8 +1974,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1662,8 +1992,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1677,8 +2010,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1692,8 +2028,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1707,8 +2046,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1722,8 +2064,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1737,8 +2082,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1752,8 +2100,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1767,8 +2118,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1782,8 +2136,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1797,8 +2154,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1812,8 +2172,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1827,8 +2190,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1842,8 +2208,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1857,8 +2226,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1872,8 +2244,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1887,8 +2262,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1902,8 +2280,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1917,8 +2298,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1932,8 +2316,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1947,8 +2334,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1962,8 +2352,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1977,8 +2370,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1992,8 +2388,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2007,8 +2406,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2022,8 +2424,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2037,8 +2442,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2052,8 +2460,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2067,8 +2478,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2082,8 +2496,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2097,8 +2514,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2112,8 +2532,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2127,8 +2550,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2142,8 +2568,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2157,8 +2586,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2172,8 +2604,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2187,8 +2622,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2202,8 +2640,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2217,8 +2658,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2232,8 +2676,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2247,8 +2694,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2262,8 +2712,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2277,8 +2730,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2292,8 +2748,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2307,8 +2766,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2322,8 +2784,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2337,8 +2802,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2352,8 +2820,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2367,8 +2838,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2382,8 +2856,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2397,8 +2874,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2412,8 +2892,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2427,8 +2910,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2442,8 +2928,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2457,8 +2946,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2472,8 +2964,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2487,8 +2982,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2502,8 +3000,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2517,8 +3018,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2532,8 +3036,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2547,8 +3054,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2562,8 +3072,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2577,8 +3090,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2592,8 +3108,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2607,8 +3126,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2622,8 +3144,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2637,8 +3162,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2652,8 +3180,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2667,8 +3198,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2682,8 +3216,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2697,8 +3234,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2712,8 +3252,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2727,8 +3270,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2742,8 +3288,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2757,8 +3306,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2772,8 +3324,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2787,8 +3342,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 USING (c1); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2802,8 +3360,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2817,8 +3378,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2832,8 +3396,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2847,8 +3414,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2862,8 +3432,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2877,8 +3450,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 USING (c1); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2892,8 +3468,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2907,8 +3486,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2922,8 +3504,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2937,8 +3522,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2952,8 +3540,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2967,8 +3558,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 USING (c1); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2982,8 +3576,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2997,8 +3594,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -3012,8 +3612,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -3027,8 +3630,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -3042,8 +3648,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -3057,8 +3666,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 USING (c1); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -3072,8 +3684,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -3087,8 +3702,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -3102,8 +3720,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -3117,8 +3738,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -3132,8 +3756,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -3147,8 +3774,11 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 USING (c1); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; diff --git a/mysql-test/suite/engines/funcs/t/se_join_left_outer.test b/mysql-test/suite/engines/funcs/t/se_join_left_outer.test index d986159078b..5e6b8af633b 100644 --- a/mysql-test/suite/engines/funcs/t/se_join_left_outer.test +++ b/mysql-test/suite/engines/funcs/t/se_join_left_outer.test @@ -12,7 +12,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -26,7 +28,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -40,7 +44,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -54,7 +60,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -68,7 +76,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -82,7 +92,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -96,7 +108,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -110,7 +124,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -124,7 +140,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -138,7 +156,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -152,7 +172,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -166,7 +188,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -180,7 +204,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -194,7 +220,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -208,7 +236,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -222,7 +252,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -236,7 +268,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -250,7 +284,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -264,7 +300,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -278,7 +316,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -292,7 +332,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -306,7 +348,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -320,7 +364,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -334,7 +380,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -348,7 +396,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -362,7 +412,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -376,7 +428,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -390,7 +444,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -404,7 +460,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -418,7 +476,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -432,7 +492,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -446,7 +508,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -460,7 +524,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -474,7 +540,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -488,7 +556,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -502,7 +572,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -516,7 +588,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -530,7 +604,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -544,7 +620,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -558,7 +636,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -572,7 +652,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -586,7 +668,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -600,7 +684,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -614,7 +700,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -628,7 +716,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -642,7 +732,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -656,7 +748,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -670,7 +764,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -684,7 +780,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -698,7 +796,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -712,7 +812,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -726,7 +828,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -740,7 +844,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -754,7 +860,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -768,7 +876,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -782,7 +892,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -796,7 +908,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -810,7 +924,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -824,7 +940,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -838,7 +956,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -852,7 +972,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -866,7 +988,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -880,7 +1004,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -894,7 +1020,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -908,7 +1036,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -922,7 +1052,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -936,7 +1068,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -950,7 +1084,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -964,7 +1100,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -978,7 +1116,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -992,7 +1132,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1006,7 +1148,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1020,7 +1164,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1034,7 +1180,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1048,7 +1196,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1062,7 +1212,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1076,7 +1228,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1090,7 +1244,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1104,7 +1260,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1118,7 +1276,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1132,7 +1292,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1146,7 +1308,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1160,7 +1324,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1174,7 +1340,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1188,7 +1356,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1202,7 +1372,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1216,7 +1388,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1230,7 +1404,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1244,7 +1420,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1258,7 +1436,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1272,7 +1452,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1286,7 +1468,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1300,7 +1484,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1314,7 +1500,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1328,7 +1516,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1342,7 +1532,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1356,7 +1548,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1370,7 +1564,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1384,7 +1580,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1398,7 +1596,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1412,7 +1612,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1426,7 +1628,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1440,7 +1644,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1454,7 +1660,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1468,7 +1676,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1482,7 +1692,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1496,7 +1708,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1510,7 +1724,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1524,7 +1740,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1538,7 +1756,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1552,7 +1772,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1566,7 +1788,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1580,7 +1804,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1594,7 +1820,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1608,7 +1836,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1622,7 +1852,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1636,7 +1868,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1650,7 +1884,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1664,7 +1900,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1678,7 +1916,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1692,7 +1932,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1706,7 +1948,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1720,7 +1964,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1734,7 +1980,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1748,7 +1996,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1762,7 +2012,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1776,7 +2028,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1790,7 +2044,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1804,7 +2060,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1818,7 +2076,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1832,7 +2092,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1846,7 +2108,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1860,7 +2124,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1874,7 +2140,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1888,7 +2156,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1902,7 +2172,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1916,7 +2188,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1930,7 +2204,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1944,7 +2220,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1958,7 +2236,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1972,7 +2252,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1986,7 +2268,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2000,7 +2284,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2014,7 +2300,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2028,7 +2316,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2042,7 +2332,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2056,7 +2348,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2070,7 +2364,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2084,7 +2380,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2098,7 +2396,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2112,7 +2412,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2126,7 +2428,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2140,7 +2444,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2154,7 +2460,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2168,7 +2476,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2182,7 +2492,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2196,7 +2508,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2210,7 +2524,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2224,7 +2540,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2238,7 +2556,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2252,7 +2572,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2266,7 +2588,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2280,7 +2604,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2294,7 +2620,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2308,7 +2636,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2322,7 +2652,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2336,7 +2668,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2350,7 +2684,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2364,7 +2700,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2378,7 +2716,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2392,7 +2732,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2406,7 +2748,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2420,7 +2764,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2434,7 +2780,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2448,7 +2796,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2462,7 +2812,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2476,7 +2828,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2490,7 +2844,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2504,7 +2860,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2518,7 +2876,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2532,7 +2892,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2546,7 +2908,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2560,7 +2924,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2574,7 +2940,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2588,7 +2956,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2602,7 +2972,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 LEFT OUTER JOIN t2 ON t1.c1 = t2.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2616,7 +2988,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2630,7 +3004,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2644,7 +3020,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2658,7 +3036,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2672,7 +3052,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2686,7 +3068,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 LEFT OUTER JOIN t3 ON t1.c1 = t3.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2700,7 +3084,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2714,7 +3100,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2728,7 +3116,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2742,7 +3132,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2756,7 +3148,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2770,7 +3164,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 LEFT OUTER JOIN t4 ON t1.c1 = t4.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2784,7 +3180,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2798,7 +3196,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2812,7 +3212,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2826,7 +3228,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2840,7 +3244,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2854,7 +3260,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 LEFT OUTER JOIN t5 ON t1.c1 = t5.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2868,7 +3276,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2882,7 +3292,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2896,7 +3308,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2910,7 +3324,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2924,7 +3340,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2938,7 +3356,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 LEFT OUTER JOIN t6 ON t1.c1 = t6.c1 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; diff --git a/mysql-test/suite/engines/funcs/t/se_join_natural_left.test b/mysql-test/suite/engines/funcs/t/se_join_natural_left.test index 2ff6276cfa5..7b9deea3cb6 100644 --- a/mysql-test/suite/engines/funcs/t/se_join_natural_left.test +++ b/mysql-test/suite/engines/funcs/t/se_join_natural_left.test @@ -12,7 +12,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -26,7 +28,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -40,7 +44,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -54,7 +60,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -68,7 +76,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -82,7 +92,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -96,7 +108,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -110,7 +124,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -124,7 +140,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -138,7 +156,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -152,7 +172,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -166,7 +188,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -180,7 +204,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -194,7 +220,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -208,7 +236,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -222,7 +252,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -236,7 +268,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -250,7 +284,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -264,7 +300,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -278,7 +316,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -292,7 +332,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -306,7 +348,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -320,7 +364,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -334,7 +380,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -348,7 +396,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -362,7 +412,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -376,7 +428,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -390,7 +444,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -404,7 +460,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -418,7 +476,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -432,7 +492,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -446,7 +508,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -460,7 +524,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -474,7 +540,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -488,7 +556,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -502,7 +572,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -516,7 +588,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -530,7 +604,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -544,7 +620,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -558,7 +636,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -572,7 +652,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -586,7 +668,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -600,7 +684,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -614,7 +700,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -628,7 +716,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -642,7 +732,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -656,7 +748,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -670,7 +764,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -684,7 +780,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -698,7 +796,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -712,7 +812,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -726,7 +828,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -740,7 +844,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -754,7 +860,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -768,7 +876,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -782,7 +892,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -796,7 +908,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -810,7 +924,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -824,7 +940,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -838,7 +956,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -852,7 +972,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -866,7 +988,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -880,7 +1004,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -894,7 +1020,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -908,7 +1036,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -922,7 +1052,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -936,7 +1068,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -950,7 +1084,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -964,7 +1100,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -978,7 +1116,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -992,7 +1132,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1006,7 +1148,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1020,7 +1164,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1034,7 +1180,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1048,7 +1196,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1062,7 +1212,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1076,7 +1228,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1090,7 +1244,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1104,7 +1260,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1118,7 +1276,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1132,7 +1292,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1146,7 +1308,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1160,7 +1324,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1174,7 +1340,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1188,7 +1356,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1202,7 +1372,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1216,7 +1388,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1230,7 +1404,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1244,7 +1420,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1258,7 +1436,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1272,7 +1452,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1286,7 +1468,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1300,7 +1484,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1314,7 +1500,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1328,7 +1516,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1342,7 +1532,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1356,7 +1548,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1370,7 +1564,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1384,7 +1580,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1398,7 +1596,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1412,7 +1612,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1426,7 +1628,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1440,7 +1644,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1454,7 +1660,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1468,7 +1676,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1482,7 +1692,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1496,7 +1708,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1510,7 +1724,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1524,7 +1740,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1538,7 +1756,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1552,7 +1772,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1566,7 +1788,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1580,7 +1804,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1594,7 +1820,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1608,7 +1836,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1622,7 +1852,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1636,7 +1868,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1650,7 +1884,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1664,7 +1900,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1678,7 +1916,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1692,7 +1932,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1706,7 +1948,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1720,7 +1964,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1734,7 +1980,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1748,7 +1996,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1762,7 +2012,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1776,7 +2028,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1790,7 +2044,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1804,7 +2060,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1818,7 +2076,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1832,7 +2092,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1846,7 +2108,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1860,7 +2124,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1874,7 +2140,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1888,7 +2156,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1902,7 +2172,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1916,7 +2188,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1930,7 +2204,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1944,7 +2220,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1958,7 +2236,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1972,7 +2252,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1986,7 +2268,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2000,7 +2284,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2014,7 +2300,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2028,7 +2316,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2042,7 +2332,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2056,7 +2348,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2070,7 +2364,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2084,7 +2380,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2098,7 +2396,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2112,7 +2412,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2126,7 +2428,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2140,7 +2444,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2154,7 +2460,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2168,7 +2476,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2182,7 +2492,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2196,7 +2508,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2210,7 +2524,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2224,7 +2540,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2238,7 +2556,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2252,7 +2572,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2266,7 +2588,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2280,7 +2604,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2294,7 +2620,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2308,7 +2636,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2322,7 +2652,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2336,7 +2668,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2350,7 +2684,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2364,7 +2700,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2378,7 +2716,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2392,7 +2732,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2406,7 +2748,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2420,7 +2764,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2434,7 +2780,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2448,7 +2796,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2462,7 +2812,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2476,7 +2828,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2490,7 +2844,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2504,7 +2860,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2518,7 +2876,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2532,7 +2892,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2546,7 +2908,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2560,7 +2924,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2574,7 +2940,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2588,7 +2956,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2602,7 +2972,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2616,7 +2988,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2630,7 +3004,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2644,7 +3020,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2658,7 +3036,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2672,7 +3052,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2686,7 +3068,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2700,7 +3084,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2714,7 +3100,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2728,7 +3116,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2742,7 +3132,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2756,7 +3148,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2770,7 +3164,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2784,7 +3180,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2798,7 +3196,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2812,7 +3212,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2826,7 +3228,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2840,7 +3244,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2854,7 +3260,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2868,7 +3276,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2882,7 +3292,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2896,7 +3308,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2910,7 +3324,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2924,7 +3340,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2938,7 +3356,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; diff --git a/mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test b/mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test index 93384418d80..d484cbe5216 100644 --- a/mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test +++ b/mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test @@ -12,7 +12,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -26,7 +28,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -40,7 +44,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -54,7 +60,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -68,7 +76,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -82,7 +92,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -96,7 +108,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -110,7 +124,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -124,7 +140,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -138,7 +156,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -152,7 +172,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -166,7 +188,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -180,7 +204,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -194,7 +220,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -208,7 +236,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -222,7 +252,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -236,7 +268,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -250,7 +284,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -264,7 +300,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -278,7 +316,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -292,7 +332,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -306,7 +348,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -320,7 +364,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -334,7 +380,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -348,7 +396,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -362,7 +412,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -376,7 +428,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -390,7 +444,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -404,7 +460,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -418,7 +476,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 < 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -432,7 +492,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -446,7 +508,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -460,7 +524,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -474,7 +540,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -488,7 +556,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -502,7 +572,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -516,7 +588,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -530,7 +604,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -544,7 +620,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -558,7 +636,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -572,7 +652,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -586,7 +668,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -600,7 +684,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -614,7 +700,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -628,7 +716,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -642,7 +732,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -656,7 +748,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -670,7 +764,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -684,7 +780,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -698,7 +796,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -712,7 +812,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -726,7 +828,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -740,7 +844,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -754,7 +860,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -768,7 +876,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -782,7 +892,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -796,7 +908,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -810,7 +924,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -824,7 +940,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -838,7 +956,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -852,7 +972,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -866,7 +988,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -880,7 +1004,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -894,7 +1020,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -908,7 +1036,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -922,7 +1052,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -936,7 +1068,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -950,7 +1084,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -964,7 +1100,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -978,7 +1116,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -992,7 +1132,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1006,7 +1148,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1020,7 +1164,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1034,7 +1180,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1048,7 +1196,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1062,7 +1212,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1076,7 +1228,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1090,7 +1244,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1104,7 +1260,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1118,7 +1276,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1132,7 +1292,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1146,7 +1308,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1160,7 +1324,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1174,7 +1340,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1188,7 +1356,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1202,7 +1372,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1216,7 +1388,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1230,7 +1404,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1244,7 +1420,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1258,7 +1436,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 = 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1272,7 +1452,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1286,7 +1468,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1300,7 +1484,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1314,7 +1500,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1328,7 +1516,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1342,7 +1532,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1356,7 +1548,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1370,7 +1564,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1384,7 +1580,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1398,7 +1596,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1412,7 +1612,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1426,7 +1628,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1440,7 +1644,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1454,7 +1660,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1468,7 +1676,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1482,7 +1692,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1496,7 +1708,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1510,7 +1724,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1524,7 +1740,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1538,7 +1756,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1552,7 +1772,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1566,7 +1788,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1580,7 +1804,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1594,7 +1820,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1608,7 +1836,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1622,7 +1852,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1636,7 +1868,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1650,7 +1884,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1664,7 +1900,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1678,7 +1916,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 >= 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1692,7 +1932,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1706,7 +1948,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1720,7 +1964,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1734,7 +1980,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1748,7 +1996,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1762,7 +2012,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1776,7 +2028,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1790,7 +2044,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1804,7 +2060,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1818,7 +2076,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1832,7 +2092,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1846,7 +2108,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1860,7 +2124,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1874,7 +2140,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1888,7 +2156,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1902,7 +2172,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -1916,7 +2188,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -1930,7 +2204,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -1944,7 +2220,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -1958,7 +2236,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -1972,7 +2252,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -1986,7 +2268,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2000,7 +2284,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2014,7 +2300,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2028,7 +2316,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2042,7 +2332,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2056,7 +2348,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2070,7 +2364,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2084,7 +2380,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2098,7 +2396,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 != 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2112,7 +2412,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2126,7 +2428,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2140,7 +2444,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2154,7 +2460,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2168,7 +2476,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2182,7 +2492,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2196,7 +2508,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2210,7 +2524,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2224,7 +2540,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2238,7 +2556,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2252,7 +2572,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2266,7 +2588,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2280,7 +2604,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2294,7 +2620,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2308,7 +2636,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2322,7 +2652,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2336,7 +2668,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2350,7 +2684,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2364,7 +2700,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2378,7 +2716,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2392,7 +2732,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2406,7 +2748,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2420,7 +2764,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2434,7 +2780,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2448,7 +2796,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2462,7 +2812,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2476,7 +2828,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2490,7 +2844,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2504,7 +2860,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2518,7 +2876,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2532,7 +2892,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2546,7 +2908,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2560,7 +2924,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2574,7 +2940,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2588,7 +2956,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2602,7 +2972,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2; +--sorted_result SELECT t1.c1,t2.c1 FROM t1 NATURAL LEFT OUTER JOIN t2 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2616,7 +2988,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2630,7 +3004,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2644,7 +3020,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2658,7 +3036,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2672,7 +3052,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2686,7 +3068,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3; +--sorted_result SELECT t1.c1,t3.c1 FROM t1 NATURAL LEFT OUTER JOIN t3 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2700,7 +3084,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2714,7 +3100,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2728,7 +3116,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2742,7 +3132,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2756,7 +3148,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2770,7 +3164,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4; +--sorted_result SELECT t1.c1,t4.c1 FROM t1 NATURAL LEFT OUTER JOIN t4 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2784,7 +3180,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2798,7 +3196,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2812,7 +3212,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2826,7 +3228,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2840,7 +3244,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2854,7 +3260,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5; +--sorted_result SELECT t1.c1,t5.c1 FROM t1 NATURAL LEFT OUTER JOIN t5 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 TINYINT NOT NULL); @@ -2868,7 +3276,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 SMALLINT NOT NULL); @@ -2882,7 +3292,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 MEDIUMINT NOT NULL); @@ -2896,7 +3308,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT NOT NULL); @@ -2910,7 +3324,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INTEGER NOT NULL); @@ -2924,7 +3340,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 BIGINT NOT NULL); @@ -2938,7 +3356,9 @@ INSERT INTO t2 (c1) VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9); INSERT INTO t3 (c1) VALUES(1),(3),(5),(7),(9); INSERT INTO t4 (c1) VALUES(10); INSERT INTO t5 (c1) VALUES(10),(11),(12),(13),(14); +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6; +--sorted_result SELECT t1.c1,t6.c1 FROM t1 NATURAL LEFT OUTER JOIN t6 WHERE t1.c1 <=> 5; DROP TABLE t1,t2,t3,t4,t5,t6; diff --git a/mysql-test/suite/engines/iuds/r/delete_time.result b/mysql-test/suite/engines/iuds/r/delete_time.result index 619b31bf4ce..00b2262e07b 100644 --- a/mysql-test/suite/engines/iuds/r/delete_time.result +++ b/mysql-test/suite/engines/iuds/r/delete_time.result @@ -497,10 +497,10 @@ c2 00:13:13 00:51:51 01:01:01 -02:02:02 03:03:00 08:08:08 100:04:04 +11:11:11 11:11:27 125:00:00 125:05:00 @@ -644,7 +644,7 @@ c1 c2 -838:59:59 -838:59:59 00:04:00 00:04:00 00:54:54 00:54:54 -11:11:11 11:11:11 +02:02:02 02:02:02 12:34:56 NULL SELECT * FROM t2; c1 c2 diff --git a/mysql-test/suite/engines/iuds/r/delete_year.result b/mysql-test/suite/engines/iuds/r/delete_year.result index 02cbe24ecc9..c82f0dae7d9 100644 --- a/mysql-test/suite/engines/iuds/r/delete_year.result +++ b/mysql-test/suite/engines/iuds/r/delete_year.result @@ -2,7 +2,13 @@ DROP TABLE IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1)); CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2)); CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t3 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); diff --git a/mysql-test/suite/engines/iuds/r/insert_decimal.result b/mysql-test/suite/engines/iuds/r/insert_decimal.result index 6aa7f5aab01..50fde80d81d 100644 --- a/mysql-test/suite/engines/iuds/r/insert_decimal.result +++ b/mysql-test/suite/engines/iuds/r/insert_decimal.result @@ -1013,7 +1013,7 @@ ROUND(c1,c2) TRUNCATE(c1,c2) 1.133000 1.132000 DROP TABLE t5; CREATE TABLE t7(c1 DECIMAL(66,0)); -ERROR 42000: Too big precision 66 specified for column 'c1'. Maximum is 65. +ERROR 42000: Too big precision 66 specified for 'c1'. Maximum is 65. CREATE TABLE t7(c1 DECIMAL(5,10)); ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'c1'). DROP TABLE t1,t2; diff --git a/mysql-test/suite/engines/iuds/r/insert_number.result b/mysql-test/suite/engines/iuds/r/insert_number.result index fed2e0f683b..ce6a2af6d5f 100644 --- a/mysql-test/suite/engines/iuds/r/insert_number.result +++ b/mysql-test/suite/engines/iuds/r/insert_number.result @@ -5316,12 +5316,20 @@ c1 c2 c3 c4 c5 c6 c7 0 -128 26 27 28 29 30 SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 <> 128 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -128 1 2 3 4 5 @@ -11010,12 +11018,20 @@ c1 c2 c3 c4 c5 c6 c7 0 -32768 26 27 28 29 30 SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 <> 32768 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -32768 1 2 3 4 5 @@ -16809,12 +16825,20 @@ c1 c2 c3 c4 c5 c6 c7 0 -8388608 26 27 28 29 30 SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 <> 8388608 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -8388608 1 2 3 4 5 @@ -22713,12 +22737,20 @@ c1 c2 c3 c4 c5 c6 c7 0 -2147483648 26 27 28 29 30 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -2147483648 1 2 3 4 5 @@ -28627,12 +28659,20 @@ c1 c2 c3 c4 c5 c6 c7 0 -2147483648 26 27 28 29 30 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -2147483648 1 2 3 4 5 @@ -32275,8 +32315,6 @@ total_rows min_value max(c1) 23 0 18446744073709551615 SELECT * FROM t2 WHERE c2 = -9223372036854775809; c1 c2 c3 c4 c5 c6 c7 -Warning 1292 Truncated incorrect DECIMAL value: '' -Warnings: SELECT c1,c6 FROM t2; c1 c6 0 0 @@ -34112,20 +34150,12 @@ c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34149,14 +34179,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 27 28 29 30 31 18446744073709551615 9223372036854775807 26 27 28 29 30 18446744073709551615 9223372036854775807 36 37 38 39 40 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34180,14 +34206,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 27 28 29 30 31 18446744073709551615 9223372036854775807 26 27 28 29 30 18446744073709551615 9223372036854775807 36 37 38 39 40 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34211,38 +34233,22 @@ c1 c2 c3 c4 c5 c6 c7 0 124 27 28 29 30 31 18446744073709551615 9223372036854775807 26 27 28 29 30 18446744073709551615 9223372036854775807 36 37 38 39 40 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34266,14 +34272,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 27 28 29 30 31 18446744073709551615 9223372036854775807 26 27 28 29 30 18446744073709551615 9223372036854775807 36 37 38 39 40 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34285,13 +34287,9 @@ c1 c2 c3 c4 c5 c6 c7 SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 105 NULL 102 103 104 105 106 @@ -34348,14 +34346,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 22 23 24 25 26 18446744073709551615 9223372036854775807 36 37 38 39 40 18446744073709551615 9223372036854775807 26 27 28 29 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 0 -9223372036854775808 1 2 3 4 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 @@ -34379,14 +34373,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 22 23 24 25 26 18446744073709551615 9223372036854775807 36 37 38 39 40 18446744073709551615 9223372036854775807 26 27 28 29 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 0 -9223372036854775808 1 2 3 4 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 @@ -34410,38 +34400,22 @@ c1 c2 c3 c4 c5 c6 c7 0 124 22 23 24 25 26 18446744073709551615 9223372036854775807 36 37 38 39 40 18446744073709551615 9223372036854775807 26 27 28 29 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 0 -9223372036854775808 1 2 3 4 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 @@ -34465,14 +34439,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 22 23 24 25 26 18446744073709551615 9223372036854775807 36 37 38 39 40 18446744073709551615 9223372036854775807 26 27 28 29 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 0 -9223372036854775808 1 2 3 4 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 @@ -34484,13 +34454,9 @@ c1 c2 c3 c4 c5 c6 c7 SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 105 NULL 102 103 104 105 106 @@ -34611,12 +34577,20 @@ c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t3 WHERE c2 <> 9223372036854775808 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34733,14 +34707,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 27 28 29 30 31 18446744073709551615 9223372036854775807 26 27 28 29 30 18446744073709551615 9223372036854775807 36 37 38 39 40 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 1 2 3 4 5 @@ -34752,13 +34722,9 @@ c1 c2 c3 c4 c5 c6 c7 SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7; c1 c2 c3 c4 c5 c6 c7 105 NULL 102 103 104 105 106 @@ -34908,14 +34874,10 @@ c1 c2 c3 c4 c5 c6 c7 0 124 22 23 24 25 26 18446744073709551615 9223372036854775807 36 37 38 39 40 18446744073709551615 9223372036854775807 26 27 28 29 30 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 0 -9223372036854775808 1 2 3 4 5 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 @@ -34927,13 +34889,9 @@ c1 c2 c3 c4 c5 c6 c7 SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC LIMIT 2; c1 c2 c3 c4 c5 c6 c7 0 -9223372036854775808 31 32 33 34 35 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC; c1 c2 c3 c4 c5 c6 c7 105 NULL 102 103 104 105 106 diff --git a/mysql-test/suite/engines/iuds/r/insert_time.result b/mysql-test/suite/engines/iuds/r/insert_time.result index bb7ad5d7c0b..39bbb0f179d 100644 --- a/mysql-test/suite/engines/iuds/r/insert_time.result +++ b/mysql-test/suite/engines/iuds/r/insert_time.result @@ -40,12 +40,12 @@ INSERT INTO t4 VALUES('10.22.22','10.22.22','2009-01-26'),(1234567,1234567,'2009 Warnings: Warning 1265 Data truncated for column 'c1' at row 1 Warning 1265 Data truncated for column 'c2' at row 1 -Warning 1264 Out of range value for column 'c1' at row 2 -Warning 1264 Out of range value for column 'c2' at row 2 -Warning 1264 Out of range value for column 'c1' at row 3 -Warning 1264 Out of range value for column 'c2' at row 3 -Warning 1264 Out of range value for column 'c1' at row 4 -Warning 1264 Out of range value for column 'c2' at row 4 +Warning 1265 Data truncated for column 'c1' at row 2 +Warning 1265 Data truncated for column 'c2' at row 2 +Warning 1265 Data truncated for column 'c1' at row 3 +Warning 1265 Data truncated for column 'c2' at row 3 +Warning 1265 Data truncated for column 'c1' at row 4 +Warning 1265 Data truncated for column 'c2' at row 4 Warning 1265 Data truncated for column 'c1' at row 6 Warning 1265 Data truncated for column 'c2' at row 6 INSERT INTO t1 VALUES('8:29:45',NULL,'2009-02-01'); @@ -135,6 +135,8 @@ c1 c2 c3 -838:59:59 -838:59:59 2009-01-08 00:00:00 00:00:00 2009-01-09 00:00:00 00:00:00 2009-01-27 +00:00:00 00:00:00 2009-01-28 +00:00:00 00:00:00 2009-01-29 00:00:10 00:00:10 2009-01-26 00:00:11 00:00:11 2009-01-20 00:00:12 00:00:12 2009-01-13 @@ -160,8 +162,6 @@ c1 c2 c3 491:22:33 491:22:33 2009-01-04 825:23:00 825:23:00 2009-01-05 838:59:59 838:59:59 2009-01-10 -838:59:59 838:59:59 2009-01-28 -838:59:59 838:59:59 2009-01-29 SELECT * FROM t1; c1 c2 c3 -838:59:59 -838:59:59 2009-01-21 @@ -1650,8 +1650,10 @@ SELECT * FROM t1 WHERE c2 BETWEEN NULL AND '10:22:33' ORDER BY c2 LIMIT 2; c1 c2 c3 SELECT * FROM t1 WHERE c2 IN (NULL,'10:22:33') ORDER BY c2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t1 WHERE c2 IN (NULL,'10:22:33') ORDER BY c2 LIMIT 2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t1 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c2; c1 c2 c3 SELECT * FROM t1 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c2 LIMIT 2; @@ -1723,8 +1725,10 @@ SELECT * FROM t1 WHERE c2 BETWEEN NULL AND '10:22:33' ORDER BY c2 DESC LIMIT 2; c1 c2 c3 SELECT * FROM t1 WHERE c2 IN (NULL,'10:22:33') ORDER BY c2 DESC; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t1 WHERE c2 IN (NULL,'10:22:33') ORDER BY c2 DESC LIMIT 2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t1 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c2 DESC; c1 c2 c3 SELECT * FROM t1 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c2 DESC LIMIT 2; @@ -3218,8 +3222,10 @@ SELECT * FROM t2 WHERE c2 BETWEEN NULL AND '10:22:33' ORDER BY c1,c2 LIMIT 2; c1 c2 c3 SELECT * FROM t2 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t2 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2 LIMIT 2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t2 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2; c1 c2 c3 SELECT * FROM t2 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2 LIMIT 2; @@ -3287,8 +3293,10 @@ SELECT * FROM t2 WHERE c2 BETWEEN NULL AND '10:22:33' ORDER BY c1,c2 DESC LIMIT c1 c2 c3 SELECT * FROM t2 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2 DESC; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t2 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2 DESC LIMIT 2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t2 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2 DESC; c1 c2 c3 SELECT * FROM t2 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2 DESC LIMIT 2; @@ -4814,8 +4822,10 @@ SELECT * FROM t3 WHERE c2 BETWEEN NULL AND '10:22:33' ORDER BY c1,c2 LIMIT 2; c1 c2 c3 SELECT * FROM t3 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t3 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2 LIMIT 2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t3 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2; c1 c2 c3 SELECT * FROM t3 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2 LIMIT 2; @@ -4887,8 +4897,10 @@ SELECT * FROM t3 WHERE c2 BETWEEN NULL AND '10:22:33' ORDER BY c1,c2 DESC LIMIT c1 c2 c3 SELECT * FROM t3 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2 DESC; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t3 WHERE c2 IN (NULL,'10:22:33') ORDER BY c1,c2 DESC LIMIT 2; c1 c2 c3 +10:22:33 10:22:33 2009-01-02 SELECT * FROM t3 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2 DESC; c1 c2 c3 SELECT * FROM t3 WHERE c2 >= NULL AND c2 < '10:22:33' AND c1 = '491:22:33' ORDER BY c1,c2 DESC LIMIT 2; @@ -5008,28 +5020,24 @@ c1 MIN(c2) 838:59:59 838:59:59 SELECT CAST(235959.123456 AS TIME); CAST(235959.123456 AS TIME) -23:59:59.123456 +23:59:59 SELECT CAST(0.235959123456e+6 AS TIME); CAST(0.235959123456e+6 AS TIME) -23:59:59.123456 +23:59:59 SELECT CAST(235959123456e-6 AS TIME); CAST(235959123456e-6 AS TIME) -23:59:59.123456 +23:59:59 SELECT CAST(235959.1234567 AS TIME); CAST(235959.1234567 AS TIME) -23:59:59.123456 -Warnings: -Warning 1292 Truncated incorrect time value: '235959.1234567' +23:59:59 SELECT CAST(0.2359591234567e6 AS TIME); CAST(0.2359591234567e6 AS TIME) -23:59:59.123456 -Warnings: -Warning 1292 Truncated incorrect time value: '235959.1234567' +23:59:59 SELECT CAST(0.2359591234567e+30 AS TIME); CAST(0.2359591234567e+30 AS TIME) NULL Warnings: -Warning 1292 Truncated incorrect time value: '2.359591234567e29' +Warning 1292 Incorrect datetime value: '2.359591234567e29' select cast('100:55:50' as time) < cast('24:00:00' as time); cast('100:55:50' as time) < cast('24:00:00' as time) 0 @@ -5077,7 +5085,6 @@ c1 c2 c3 INSERT INTO t2(c1,c2) VALUES('12:34:56.78','12:34:56.78') ON DUPLICATE KEY UPDATE c1='12:34:56.79',c2='12:34:57.78'; SELECT * FROM t2 WHERE c1='12:34:56.79' AND c2='12:34:57.78' /* 1 row */; c1 c2 c3 -12:34:56 12:34:57 2009-01-01 SELECT * FROM t1 WHERE c1='10:22:35' AND c2='33 9:23' /* no rows */; c1 c2 c3 INSERT INTO t1(c1,c2) VALUES('10:22:34','34 9:23') ON DUPLICATE KEY UPDATE c1='10:22:35',c2='33 9:23'; @@ -5137,8 +5144,8 @@ c1 c2 c3 09:36:00 09:36:00 2009-01-25 00:00:10 00:00:10 2009-01-26 00:00:00 00:00:00 2009-01-27 -838:59:59 838:59:59 2009-01-28 -838:59:59 838:59:59 2009-01-29 +00:00:00 00:00:00 2009-01-28 +00:00:00 00:00:00 2009-01-29 262:22:00 262:22:00 2009-01-30 00:00:12 00:00:12 2009-01-31 08:29:45 NULL 2009-02-01 @@ -5146,15 +5153,39 @@ c1 c2 c3 TRUNCATE TABLE t5; INSERT INTO t5 SELECT * FROM t4 WHERE c1 >='12colon34colon56'; Warnings: -Warning 1292 Incorrect time value: '12colon34colon56' for column 'c1' at row 1 +Warning 1292 Truncated incorrect time value: '12colon34colon56' SELECT * FROM t5; c1 c2 c3 +12:34:56 12:34:56 2009-01-01 +10:22:33 10:22:33 2009-01-02 +01:23:00 01:23:00 2009-01-03 491:22:33 491:22:33 2009-01-04 825:23:00 825:23:00 2009-01-05 +10:00:00 10:00:00 2009-01-06 +00:00:45 00:00:45 2009-01-07 +00:00:00 00:00:00 2009-01-09 838:59:59 838:59:59 2009-01-10 -838:59:59 838:59:59 2009-01-28 -838:59:59 838:59:59 2009-01-29 +10:11:12 10:11:12 2009-01-11 +11:11:12 11:11:12 2009-01-12 +00:00:12 00:00:12 2009-01-13 +00:12:34 00:12:34 2009-01-14 +12:34:58 12:34:58 2009-01-15 +12:35:56 12:35:56 2009-01-16 +11:11:27 11:11:27 2009-01-17 +08:03:02 08:03:02 2009-01-18 +00:11:12 00:11:12 2009-01-19 +00:00:11 00:00:11 2009-01-20 +00:12:30 00:12:30 2009-01-23 +09:00:45 09:00:45 2009-01-24 +09:36:00 09:36:00 2009-01-25 +00:00:10 00:00:10 2009-01-26 +00:00:00 00:00:00 2009-01-27 +00:00:00 00:00:00 2009-01-28 +00:00:00 00:00:00 2009-01-29 262:22:00 262:22:00 2009-01-30 +00:00:12 00:00:12 2009-01-31 +08:29:45 NULL 2009-02-01 +00:00:00 07:23:55 NULL TRUNCATE TABLE t5; DROP TABLE t5; DROP TABLE t1,t2,t3,t4; diff --git a/mysql-test/suite/engines/iuds/r/insert_year.result b/mysql-test/suite/engines/iuds/r/insert_year.result index 386c8090434..b9618ba4e2d 100644 --- a/mysql-test/suite/engines/iuds/r/insert_year.result +++ b/mysql-test/suite/engines/iuds/r/insert_year.result @@ -3235,9 +3235,21 @@ c1 c2 c3 c4 1999 1999 1998-12-30 1998-12-30 11:30:45 DROP TABLE t1,t2,t3,t4; CREATE TABLE t1(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CREATE TABLE t2(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CREATE TABLE t3(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CREATE TABLE t4(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead INSERT INTO t1 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45'); INSERT INTO t2 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45'); INSERT INTO t3 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45'); diff --git a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result index 47e5234f795..e01c7d78680 100644 --- a/mysql-test/suite/engines/iuds/r/type_bit_iuds.result +++ b/mysql-test/suite/engines/iuds/r/type_bit_iuds.result @@ -55941,7 +55941,7 @@ SELECT 0 + (101010101010101010101010101010<<0); 0 + (101010101010101010101010101010<<0) 9223372036854775807 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); INSERT INTO t1 VALUES (b'101010101010101010101010101010'); @@ -56712,7 +56712,7 @@ SELECT 0 + (101010101010101010101010101010<<1); 0 + (101010101010101010101010101010<<1) 18446744073709551614 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(1)); CREATE TABLE t2(c1 BIT(1), c2 BIT(1), c3 BIT(1)); set @v1=1; @@ -57532,7 +57532,7 @@ SELECT 0 + (101010101010101010101010101010<<2); 0 + (101010101010101010101010101010<<2) 18446744073709551612 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(2)); CREATE TABLE t2(c1 BIT(2), c2 BIT(2), c3 BIT(2)); set @v1=2; @@ -58375,7 +58375,7 @@ SELECT 0 + (101010101010101010101010101010<<4); 0 + (101010101010101010101010101010<<4) 18446744073709551600 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(4)); CREATE TABLE t2(c1 BIT(4), c2 BIT(4), c3 BIT(4)); set @v1=4; @@ -59296,7 +59296,7 @@ SELECT 0 + (101010101010101010101010101010<<8); 0 + (101010101010101010101010101010<<8) 18446744073709551360 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(8)); CREATE TABLE t2(c1 BIT(8), c2 BIT(8), c3 BIT(8)); set @v1=8; @@ -60503,7 +60503,7 @@ SELECT 0 + (101010101010101010101010101010<<16); 0 + (101010101010101010101010101010<<16) 18446744073709486080 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(16)); CREATE TABLE t2(c1 BIT(16), c2 BIT(16), c3 BIT(16)); set @v1=16; @@ -61915,7 +61915,7 @@ SELECT 0 + (101010101010101010101010101010<<32); 0 + (101010101010101010101010101010<<32) 18446744069414584320 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(32)); CREATE TABLE t2(c1 BIT(32), c2 BIT(32), c3 BIT(32)); set @v1=32; @@ -63988,7 +63988,7 @@ SELECT 0 + (101010101010101010101010101010<<64); 0 + (101010101010101010101010101010<<64) 0 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(64)); CREATE TABLE t2(c1 BIT(64), c2 BIT(64), c3 BIT(64)); set @v1=64; @@ -67165,7 +67165,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0) 9223372036854775807 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); INSERT INTO t1 VALUES (b'1010101010101010101010101010101010101010101010101010101010101010'); @@ -67933,7 +67933,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1) 18446744073709551614 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(1)); CREATE TABLE t2(c1 BIT(1), c2 BIT(1), c3 BIT(1)); set @v1=1; @@ -68750,7 +68750,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2) 18446744073709551612 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(2)); CREATE TABLE t2(c1 BIT(2), c2 BIT(2), c3 BIT(2)); set @v1=2; @@ -69590,7 +69590,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4) 18446744073709551600 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(4)); CREATE TABLE t2(c1 BIT(4), c2 BIT(4), c3 BIT(4)); set @v1=4; @@ -70508,7 +70508,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8) 18446744073709551360 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(8)); CREATE TABLE t2(c1 BIT(8), c2 BIT(8), c3 BIT(8)); set @v1=8; @@ -71712,7 +71712,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16) 18446744073709486080 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(16)); CREATE TABLE t2(c1 BIT(16), c2 BIT(16), c3 BIT(16)); set @v1=16; @@ -73121,7 +73121,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32) 18446744069414584320 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(32)); CREATE TABLE t2(c1 BIT(32), c2 BIT(32), c3 BIT(32)); set @v1=32; @@ -75197,7 +75197,7 @@ SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64) 0 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '1010101010101010101010101010101010101010101010101010101010101010' to INT. Value truncated. CREATE TABLE t1(c1 BIT(64)); CREATE TABLE t2(c1 BIT(64), c2 BIT(64), c3 BIT(64)); set @v1=64; @@ -78374,7 +78374,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0) 9223372036854775807 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(0)); CREATE TABLE t2(c1 BIT(0), c2 BIT(0), c3 BIT(0)); INSERT INTO t1 VALUES (b'10101010101010101010101010101010101010101010101010101010101010101'); @@ -79142,7 +79142,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1) 18446744073709551614 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(1)); CREATE TABLE t2(c1 BIT(1), c2 BIT(1), c3 BIT(1)); set @v1=1; @@ -79959,7 +79959,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2) 18446744073709551612 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(2)); CREATE TABLE t2(c1 BIT(2), c2 BIT(2), c3 BIT(2)); set @v1=2; @@ -80799,7 +80799,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4) 18446744073709551600 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(4)); CREATE TABLE t2(c1 BIT(4), c2 BIT(4), c3 BIT(4)); set @v1=4; @@ -81717,7 +81717,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8) 18446744073709551360 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(8)); CREATE TABLE t2(c1 BIT(8), c2 BIT(8), c3 BIT(8)); set @v1=8; @@ -82921,7 +82921,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1 0 + (10101010101010101010101010101010101010101010101010101010101010101<<16) 18446744073709486080 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(16)); CREATE TABLE t2(c1 BIT(16), c2 BIT(16), c3 BIT(16)); set @v1=16; @@ -84330,7 +84330,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<3 0 + (10101010101010101010101010101010101010101010101010101010101010101<<32) 18446744069414584320 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(32)); CREATE TABLE t2(c1 BIT(32), c2 BIT(32), c3 BIT(32)); set @v1=32; @@ -86406,7 +86406,7 @@ SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<6 0 + (10101010101010101010101010101010101010101010101010101010101010101<<64) 0 Warnings: -Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1916 Got overflow when converting '10101010101010101010101010101010101010101010101010101010101010101' to INT. Value truncated. CREATE TABLE t1(c1 BIT(64)); CREATE TABLE t2(c1 BIT(64), c2 BIT(64), c3 BIT(64)); set @v1=64; diff --git a/mysql-test/suite/engines/iuds/r/update_delete_calendar.result b/mysql-test/suite/engines/iuds/r/update_delete_calendar.result index a04585dfd72..e8324c8b368 100644 --- a/mysql-test/suite/engines/iuds/r/update_delete_calendar.result +++ b/mysql-test/suite/engines/iuds/r/update_delete_calendar.result @@ -71,13 +71,6 @@ Warning 1265 Data truncated for column 'c2' at row 1 SELECT count(*) FROM t1 WHERE c2='10:45:15' OR c2='2009-01-32' OR c2='2009-02-30' OR c2='2009-04-31' OR c2='2009-06-31' OR c2='2009-09-31' /* returns 0 */; count(*) 0 -Warnings: -Warning 1292 Incorrect date value: '10:45:15' for column 'c2' at row 1 -Warning 1292 Incorrect date value: '2009-01-32' for column 'c2' at row 1 -Warning 1292 Incorrect date value: '10:45:15' for column 'c2' at row 1 -Warning 1292 Incorrect date value: '2009-01-32' for column 'c2' at row 1 -Warning 1292 Incorrect date value: '10:45:15' for column 'c2' at row 1 -Warning 1292 Incorrect date value: '2009-01-32' for column 'c2' at row 1 UPDATE t1 SET c2='2009-11-31' WHERE c2='2001-01-16'; Warnings: Warning 1265 Data truncated for column 'c2' at row 1 @@ -108,8 +101,7 @@ c1 c2 c3 2001-01-16 0000-00-00 12 2001-01-17 0000-00-00 13 Warnings: -Warning 1292 Incorrect date value: '0000-00-00' for column 'c2' at row 1 -Warning 1292 Incorrect date value: '0000-00-00' for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 UPDATE t1 SET c2='0000-00-00' WHERE c2='2001-01-18'; ERROR 22007: Incorrect date value: '0000-00-00' for column 'c2' at row 1 SET SQL_MODE=DEFAULT; @@ -774,20 +766,17 @@ c1 c2 c3 INSERT INTO t1 VALUES('2001-01-09','2001-01-10',6),('2001-01-11','2001-01-12',7); UPDATE t1 SET c1='2001-01-09 24:59:59',c2='2009-01-10 23:60:59' WHERE c1='2001-01-09'; Warnings: -Warning 1264 Out of range value for column 'c1' at row 1 -Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1265 Data truncated for column 'c1' at row 1 +Warning 1265 Data truncated for column 'c2' at row 1 UPDATE t1 SET c2='2001-01-11 23:59:60' WHERE c1='2001-01-11'; Warnings: -Warning 1264 Out of range value for column 'c2' at row 1 +Warning 1265 Data truncated for column 'c2' at row 1 SELECT count(*) FROM t1 WHERE c1='2001-01-09 24:59:59' AND c2='2009-01-10 23:60:59'; count(*) 1 Warnings: -Warning 1292 Incorrect datetime value: '2001-01-09 24:59:59' for column 'c1' at row 1 -Warning 1292 Incorrect datetime value: '2009-01-10 23:60:59' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '2001-01-09 24:59:59' for column 'c1' at row 1 -Warning 1292 Truncated incorrect datetime value: '2001-01-09 24:59:59' -Warning 1292 Truncated incorrect datetime value: '2009-01-10 23:60:59' +Warning 1292 Incorrect datetime value: '2001-01-09 24:59:59' +Warning 1292 Incorrect datetime value: '2009-01-10 23:60:59' SELECT count(*) FROM t1 WHERE c2='2001-01-11 23:59:60' /* returns 0 */; count(*) 0 @@ -806,8 +795,7 @@ c1 c2 c3 2001-01-11 00:00:00 0000-00-00 00:00:00 7 2001-01-17 00:00:00 0000-00-00 00:00:00 8 Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'c2' at row 1 +Warning 1264 Out of range value for column 'c2' at row 1 UPDATE t1 SET c2='0000-00-00 00:00:00' WHERE c2='2001-01-18 07:35'; ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'c2' at row 1 SET SQL_MODE=DEFAULT; @@ -949,15 +937,13 @@ c1 c2 c3 2003-01-01 01:02:03 2002-01-09 01:30:30 10 UPDATE t1 SET c1='2003-01-01 1:2:3' WHERE c2 BETWEEN '20020109 01:30:40' AND '20020109 01:30:50' ORDER BY c2 LIMIT 2; Warnings: -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:50' for column 'c2' at row 1 +Warning 1292 Incorrect datetime value: '20020109 01:30:40' +Warning 1292 Incorrect datetime value: '20020109 01:30:50' SELECT * FROM t1 WHERE c2 BETWEEN '20020109 01:30:40' AND '20020109 01:30:50' ORDER BY c2; c1 c2 c3 Warnings: -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:50' for column 'c2' at row 1 +Warning 1292 Incorrect datetime value: '20020109 01:30:40' +Warning 1292 Incorrect datetime value: '20020109 01:30:50' UPDATE t1 SET c1='2003-01-01 1:2:3' WHERE c2 IN('2002-01-09 1:30:55','2002-01-09 2:00') ORDER BY c2 DESC LIMIT 2; SELECT * FROM t1 WHERE c2 IN('2002-01-09 1:30:55','2002-01-09 2:00') ORDER BY c2 DESC; c1 c2 c3 @@ -1389,17 +1375,13 @@ SELECT count(*) FROM t1 WHERE c1='2001-01-09 24:59:59' AND c2='2009-01-10 23:60: count(*) 1 Warnings: -Warning 1292 Incorrect datetime value: '2001-01-09 24:59:59' for column 'c1' at row 1 -Warning 1292 Incorrect datetime value: '2009-01-10 23:60:59' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '2001-01-09 24:59:59' for column 'c1' at row 1 -Warning 1292 Truncated incorrect datetime value: '2001-01-09 24:59:59' -Warning 1292 Truncated incorrect datetime value: '2009-01-10 23:60:59' +Warning 1292 Incorrect datetime value: '2001-01-09 24:59:59' +Warning 1292 Incorrect datetime value: '2009-01-10 23:60:59' SELECT count(*) FROM t1 WHERE c1='2001-01-11 23:59:59' AND c2='2001-01-11 23:59:60'; count(*) 1 Warnings: -Warning 1292 Incorrect datetime value: '2001-01-11 23:59:60' for column 'c2' at row 1 -Warning 1292 Truncated incorrect datetime value: '2001-01-11 23:59:60' +Warning 1292 Incorrect datetime value: '2001-01-11 23:59:60' SELECT * FROM t1 WHERE c1='0000-00-00 00:00:00' OR c2='0000-00-00 00:00:00'; c1 c2 c3 0000-00-00 00:00:00 0000-00-00 00:00:00 6 @@ -1412,8 +1394,7 @@ c1 c2 c3 2001-01-11 23:59:59 0000-00-00 00:00:00 7 2001-01-17 00:00:00 0000-00-00 00:00:00 8 Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'c2' at row 1 +Warning 1265 Data truncated for column 'c2' at row 1 UPDATE t1 SET c1='1972-01-01 07:35',c2='0000-00-00 00:00:00' WHERE c2='2001-01-18 07:35'; ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'c2' at row 1 SET SQL_MODE=DEFAULT; @@ -1552,15 +1533,13 @@ c1 c2 c3 2003-01-01 01:02:03 2002-01-09 01:30:30 10 UPDATE t1 SET c1='2003-01-01 1:2:3' WHERE c2 BETWEEN '20020109 01:30:40' AND '20020109 01:30:50' ORDER BY c2 LIMIT 2; Warnings: -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:50' for column 'c2' at row 1 +Warning 1292 Incorrect datetime value: '20020109 01:30:40' +Warning 1292 Incorrect datetime value: '20020109 01:30:50' SELECT * FROM t1 WHERE c2 BETWEEN '20020109 01:30:40' AND '20020109 01:30:50' ORDER BY c2; c1 c2 c3 Warnings: -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:40' for column 'c2' at row 1 -Warning 1292 Incorrect datetime value: '20020109 01:30:50' for column 'c2' at row 1 +Warning 1292 Incorrect datetime value: '20020109 01:30:40' +Warning 1292 Incorrect datetime value: '20020109 01:30:50' UPDATE t1 SET c1='2003-01-01 1:2:3' WHERE c2 IN('2002-01-09 1:30:55','2002-01-09 2:00') ORDER BY c2 DESC LIMIT 2; SELECT * FROM t1 WHERE c2 IN('2002-01-09 1:30:55','2002-01-09 2:00') ORDER BY c2 DESC; c1 c2 c3 diff --git a/mysql-test/suite/engines/iuds/r/update_delete_number.result b/mysql-test/suite/engines/iuds/r/update_delete_number.result index 8e190870092..7c183068724 100644 --- a/mysql-test/suite/engines/iuds/r/update_delete_number.result +++ b/mysql-test/suite/engines/iuds/r/update_delete_number.result @@ -56,6 +56,8 @@ Warning 1264 Out of range value for column 'c2' at row 3 SELECT COUNT(*) FROM t1 WHERE c1=4294967296 AND c2=2147483648 /* no rows */; COUNT(*) 0 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1 WHERE c1=4294967295 AND c2=2147483647; c1 c2 c3 4294967295 2147483647 10 @@ -1150,6 +1152,8 @@ Warning 1264 Out of range value for column 'c2' at row 3 SELECT COUNT(*) FROM t1 WHERE c1=256 AND c2=128 /* no rows */; COUNT(*) 0 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1 WHERE c1=255 AND c2=127; c1 c2 c3 255 127 10 @@ -1922,6 +1926,8 @@ Warning 1264 Out of range value for column 'c2' at row 3 SELECT COUNT(*) FROM t1 WHERE c1=65536 AND c2=32768 /* no rows */; COUNT(*) 0 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1 WHERE c1=65535 AND c2=32767; c1 c2 c3 65535 32767 10 @@ -2669,6 +2675,8 @@ Warning 1264 Out of range value for column 'c2' at row 3 SELECT COUNT(*) FROM t1 WHERE c1=16777216 AND c2=8388608 /* no rows */; COUNT(*) 0 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1 WHERE c1=16777215 AND c2=8388607; c1 c2 c3 16777215 8388607 10 @@ -3416,6 +3424,8 @@ Warning 1264 Out of range value for column 'c2' at row 3 SELECT COUNT(*) FROM t1 WHERE c1=18446744073709551616 AND c2=9223372036854775808 /* no rows */; COUNT(*) 0 +Warnings: +Warning 1264 Out of range value for column 'c2' at row 1 SELECT * FROM t1 WHERE c1=18446744073709551615 AND c2=9223372036854775807; c1 c2 c3 18446744073709551615 9223372036854775807 10 diff --git a/mysql-test/suite/engines/iuds/r/update_time.result b/mysql-test/suite/engines/iuds/r/update_time.result index 3073f3c985f..09a7cbf0c7f 100644 --- a/mysql-test/suite/engines/iuds/r/update_time.result +++ b/mysql-test/suite/engines/iuds/r/update_time.result @@ -793,10 +793,10 @@ c2 00:09:09 00:11:11 00:11:11 +00:11:11 00:13:13 00:51:51 01:01:01 -02:02:02 03:03:00 08:08:08 100:04:04 @@ -1122,7 +1122,7 @@ c2 838:59:59 NULL UPDATE t4 SET c1=11:11:11 WHERE c2=NULL; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':11:11 WHERE c2=NULL' at line 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 ':11:11 WHERE c2=NULL' at line 1 SELECT c1 FROM t4; c1 00:00:01 @@ -1262,7 +1262,7 @@ c1 c2 838:59:59 838:59:59 UPDATE t1 SET c1=c1+1,c2=c2-1 WHERE c1 IN (222222,8385955,1500000) ORDER BY c1; Warnings: -Warning 1264 Out of range value for column 'c2' at row 2 +Warning 1265 Data truncated for column 'c2' at row 2 SELECT * FROM t1; c1 c2 -12:12:12 12:12:12 @@ -1332,7 +1332,7 @@ c1 c2 00:51:51 02:22:22 00:54:54 00:54:54 01:01:01 02:22:22 -02:02:02 02:22:22 +02:02:02 02:02:02 03:03:00 02:22:22 08:08:08 00:00:00 100:04:04 100:04:04 @@ -1374,7 +1374,7 @@ c1 c2 00:51:51 00:51:51 00:54:54 00:11:11 01:01:01 01:01:01 -02:02:02 02:02:02 +02:02:02 00:11:11 03:03:00 03:03:00 08:08:08 08:08:08 11:11:11 00:11:11 diff --git a/mysql-test/suite/engines/iuds/r/update_year.result b/mysql-test/suite/engines/iuds/r/update_year.result index 1b0ead45314..c762d70a276 100644 --- a/mysql-test/suite/engines/iuds/r/update_year.result +++ b/mysql-test/suite/engines/iuds/r/update_year.result @@ -2,7 +2,13 @@ DROP TABLE IF EXISTS t1,t2,t3,t4; CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1)); CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2)); CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t3 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index d9cd0f1e7f8..b50f5640520 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -53,6 +53,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = innodb; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/innodb_tb2.txt' into table tb2; DROP DATABASE IF EXISTS test1; @@ -112,6 +114,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = innodb; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/innodb_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index f3d3c6b7bad..085017fb529 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -132,6 +132,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = innodb; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/innodb_tb2.txt' into table tb2; drop table if exists tb3 ; @@ -262,6 +264,8 @@ f239 varchar(20000) binary, f240 varchar(2000), f241 char(100) ) engine = innodb; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/innodb_tb4.txt' into table tb4; USE test1; @@ -319,6 +323,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = innodb; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/innodb_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result index 39a5dcd0b0c..7521a9857a6 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_memory.result +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -128,6 +128,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = memory; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/memory_tb2.txt' into table tb2 ; drop table if exists tb3; @@ -251,6 +253,8 @@ f238 varchar(25000) binary, f239 varbinary(0), f240 varchar(1200) ) engine = memory; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/memory_tb4.txt' into table tb4; USE test1; @@ -308,6 +312,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = memory; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/memory_tb2.txt' into table tb2 ; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result index 03af4ebb89f..6c2586cc3c1 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -144,6 +144,8 @@ f115 VARBINARY(27) null , f116 VARBINARY(64) null, f117 VARBINARY(192) null ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb2.txt' into table tb2; drop table if exists tb3 ; @@ -283,6 +285,8 @@ f240 varchar(120), f241 char(100), f242 bit(30) ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb4.txt' into table tb4; USE test1; @@ -348,6 +352,8 @@ f115 VARBINARY(27) null , f116 VARBINARY(64) null, f117 VARBINARY(192) null ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result index dd8e508e821..150469a4a2f 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result @@ -144,6 +144,8 @@ f115 VARBINARY(27) null , f116 VARBINARY(64) null, f117 VARBINARY(192) null ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb2.txt' into table tb2; drop table if exists tb3 ; @@ -283,6 +285,8 @@ f240 varchar(120), f241 char(100), f242 bit(30) ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb4.txt' into table tb4; USE test1; @@ -348,6 +352,8 @@ f115 VARBINARY(27) null , f116 VARBINARY(64) null, f117 VARBINARY(192) null ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 864cbb93b29..a718f986648 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -54,6 +54,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = memory; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/memory_tb2.txt' into table tb2 ; DROP DATABASE IF EXISTS test1; @@ -113,6 +115,8 @@ f107 year(4) not null default 2000, f108 enum("1enum","2enum") not null default "1enum", f109 set("1set","2set") not null default "1set" ) engine = memory; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/memory_tb2.txt' into table tb2 ; USE test; diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result index f4025dfef2a..1ee9c6e0cd6 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views-big.result +++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result @@ -62,6 +62,8 @@ f115 VARBINARY(27) null , f116 VARBINARY(64) null, f117 VARBINARY(192) null ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb2.txt' into table tb2; DROP DATABASE IF EXISTS test1; @@ -129,6 +131,8 @@ f115 VARBINARY(27) null , f116 VARBINARY(64) null, f117 VARBINARY(192) null ) engine = myisam; +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead load data infile '/std_data/funcs_1/myisam_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 7b45ec4c9e1..179d0cd814e 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -7499,9 +7499,13 @@ BEGIN declare x, y, z year(3) default 2005; SELECT x, y, z; END// +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead CALL sp1(); x y z 2005 2005 2005 +Warnings: +Note 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result index f058c9f9c72..ae562a0dda1 100644 --- a/mysql-test/suite/heap/heap.result +++ b/mysql-test/suite/heap/heap.result @@ -738,3 +738,55 @@ SELECT c2 FROM t1; c2 0 DROP TABLE t1; +CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=100; +insert into t1 values(1); +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +1600 2400 +drop table t1; +CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=10000; +insert into t1 values(1); +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +16000 24000 +drop table t1; +CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=3000 max_rows=3000; +insert into t1 values(1); +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +48000 72000 +drop table t1; +CREATE TABLE t1 (a int, index(a)) engine=heap max_rows=15000; +insert into t1 values(1); +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +24000 36000 +drop table t1; +create table t1 (c1 int, index(c1)) engine=heap max_rows=10000; +insert into t1 select rand(100000000); +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1 limit 488; +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +16000 24000 +insert into t1 select rand(100000000) from t1 limit 1; +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +33024 49024 +insert into t1 select rand(100000000) from t1 limit 1000; +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +49024 73024 +insert into t1 select rand(100000000) from t1; +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +data_length index_length +81024 121024 +drop table t1; diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test index 7d56425799a..6f5046af139 100644 --- a/mysql-test/suite/heap/heap.test +++ b/mysql-test/suite/heap/heap.test @@ -485,3 +485,55 @@ INSERT INTO t1 VALUES('', 0); ALTER TABLE t1 MODIFY c1 VARCHAR(101); SELECT c2 FROM t1; DROP TABLE t1; + +# +# Show that MIN_ROWS and MAX_ROWS have an effect on how data_length +# and index_length are allocated. +# Result is different for 32 / 64 bit machines as pointer lengths are different +# + +CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=100; +insert into t1 values(1); +--replace_result 800 1600 1200 2400 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +drop table t1; +CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=10 max_rows=10000; +insert into t1 values(1); +--replace_result 8000 16000 12000 24000 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +drop table t1; +CREATE TABLE t1 (a int, index(a)) engine=heap min_rows=3000 max_rows=3000; +insert into t1 values(1); +--replace_result 24000 48000 36000 72000 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +drop table t1; +CREATE TABLE t1 (a int, index(a)) engine=heap max_rows=15000; +insert into t1 values(1); +--replace_result 12000 24000 18000 36000 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +drop table t1; + +create table t1 (c1 int, index(c1)) engine=heap max_rows=10000; +insert into t1 select rand(100000000); +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1; +insert into t1 select rand(100000000) from t1 limit 488; +--replace_result 8000 16000 12000 24000 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +insert into t1 select rand(100000000) from t1 limit 1; +--replace_result 16512 33024 24512 49024 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +insert into t1 select rand(100000000) from t1 limit 1000; +--replace_result 24512 49024 36512 73024 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +insert into t1 select rand(100000000) from t1; +--replace_result 40512 81024 60512 121024 +select data_length,index_length from information_schema.tables where table_schema="test" and table_name="t1"; +drop table t1; diff --git a/mysql-test/suite/innodb/r/innodb_bug52745.result b/mysql-test/suite/innodb/r/innodb_bug52745.result index 74db8b0c20a..927ba0e0e53 100644 --- a/mysql-test/suite/innodb/r/innodb_bug52745.result +++ b/mysql-test/suite/innodb/r/innodb_bug52745.result @@ -58,6 +58,7 @@ col89 float unsigned zerofill DEFAULT NULL, col90 tinyblob ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead Note 1291 Column 'col82' has duplicated value '' in ENUM Note 1291 Column 'col82' has duplicated value '' in ENUM INSERT INTO bug52745 SET diff --git a/mysql-test/suite/innodb/t/innodb_bug14007649.test b/mysql-test/suite/innodb/t/innodb_bug14007649.test index 5f613cad6f1..da413e0ce59 100644 --- a/mysql-test/suite/innodb/t/innodb_bug14007649.test +++ b/mysql-test/suite/innodb/t/innodb_bug14007649.test @@ -1,9 +1,9 @@ --source include/have_innodb.inc --source include/have_debug.inc -if (`select plugin_auth_version <= "1.1.8-26.0" from information_schema.plugins where plugin_name='innodb'`) +if (`select plugin_auth_version <= "1.0.17-13.01" from information_schema.plugins where plugin_name='innodb'`) { - --skip Not fixed in XtraDB 1.1.8-26.0 or earlier + --skip Not fixed in XtraDB 1.0.17-13.01 or earlier } create table t1 ( diff --git a/mysql-test/suite/maria/lock.result b/mysql-test/suite/maria/lock.result index 101347c7d4c..b67d1ab7b0d 100644 --- a/mysql-test/suite/maria/lock.result +++ b/mysql-test/suite/maria/lock.result @@ -27,3 +27,6 @@ i drop table t2; unlock tables; drop table t1; +CREATE TABLE t1 (i INT) ENGINE=Aria; +LOCK TABLES t1 WRITE, t1 AS t1a WRITE; +DROP TABLE t1; diff --git a/mysql-test/suite/maria/lock.test b/mysql-test/suite/maria/lock.test index 6116f0b5f08..5b6d17069e7 100644 --- a/mysql-test/suite/maria/lock.test +++ b/mysql-test/suite/maria/lock.test @@ -42,3 +42,11 @@ select * from t1; drop table t2; unlock tables; drop table t1; + +# +# MDEV-366: lock table twice with LOCK TABLES and then drop it +# + +CREATE TABLE t1 (i INT) ENGINE=Aria; +LOCK TABLES t1 WRITE, t1 AS t1a WRITE; +DROP TABLE t1; diff --git a/mysql-test/suite/mtr2/combinations b/mysql-test/suite/mtr2/combinations new file mode 100644 index 00000000000..b26eab8ce1d --- /dev/null +++ b/mysql-test/suite/mtr2/combinations @@ -0,0 +1,5 @@ +[1st] +lock-wait-timeout=5 + +[2nd] +lock-wait-timeout=3 diff --git a/mysql-test/suite/perfschema/disabled.def b/mysql-test/suite/perfschema/disabled.def index 8cae44a3607..8a843692d2a 100644 --- a/mysql-test/suite/perfschema/disabled.def +++ b/mysql-test/suite/perfschema/disabled.def @@ -9,4 +9,4 @@ # Do not use any TAB characters for whitespace. # ############################################################################## - +misc : bug#14113704 24/04/2012 Mayank issue reported causing failure. diff --git a/mysql-test/suite/perfschema/r/func_file_io.result b/mysql-test/suite/perfschema/r/func_file_io.result index d99e77dcd8c..c95fae94803 100644 --- a/mysql-test/suite/perfschema/r/func_file_io.result +++ b/mysql-test/suite/perfschema/r/func_file_io.result @@ -15,6 +15,9 @@ SET @before_count = (SELECT SUM(TIMER_WAIT) FROM performance_schema.events_waits_history_long WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD')); +SELECT (@before_count >= 0) as have_before_count; +have_before_count +1 SELECT IF(@before_count > 0, 'Success', 'Failure') has_instrumentation; has_instrumentation Success @@ -27,6 +30,9 @@ SET @after_count = (SELECT SUM(TIMER_WAIT) FROM performance_schema.events_waits_history_long WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD') AND (1 = 1)); +SELECT (@after_count >= 0) as have_after_count; +have_after_count +1 SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_ff1_timed; test_ff1_timed Success @@ -35,6 +41,9 @@ SET @before_count = (SELECT SUM(TIMER_WAIT) FROM performance_schema.events_waits_history_long WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD') AND (2 = 2)); +SELECT (@before_count >= 0) as have_before_count; +have_before_count +1 SELECT * FROM t1 WHERE id < 6; id b 1 initial value @@ -46,6 +55,9 @@ SET @after_count = (SELECT SUM(TIMER_WAIT) FROM performance_schema.events_waits_history_long WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD') AND (3 = 3)); +SELECT (@after_count >= 0) as have_after_count; +have_after_count +1 SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_ff2_timed; test_ff2_timed Success diff --git a/mysql-test/suite/perfschema/r/query_cache.result b/mysql-test/suite/perfschema/r/query_cache.result index c49cb7b718e..8786cd055ca 100644 --- a/mysql-test/suite/perfschema/r/query_cache.result +++ b/mysql-test/suite/perfschema/r/query_cache.result @@ -36,9 +36,9 @@ Qcache_hits 1 select spins from performance_schema.events_waits_current order by event_name limit 1; spins NULL -select name from performance_schema.setup_instruments order by name limit 1; -name -wait/io/file/aria/control +select * from performance_schema.setup_timers where name='wait'; +NAME TIMER_NAME +wait CYCLE show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 @@ -51,9 +51,9 @@ Qcache_hits 1 select spins from performance_schema.events_waits_current order by event_name limit 1; spins NULL -select name from performance_schema.setup_instruments order by name limit 1; -name -wait/io/file/aria/control +select * from performance_schema.setup_timers where name='wait'; +NAME TIMER_NAME +wait CYCLE show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 diff --git a/mysql-test/suite/perfschema/t/func_file_io.test b/mysql-test/suite/perfschema/t/func_file_io.test index bcf29a7daa2..e8b01a10bd1 100644 --- a/mysql-test/suite/perfschema/t/func_file_io.test +++ b/mysql-test/suite/perfschema/t/func_file_io.test @@ -41,6 +41,7 @@ SET @before_count = (SELECT SUM(TIMER_WAIT) WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD')); +SELECT (@before_count >= 0) as have_before_count; SELECT IF(@before_count > 0, 'Success', 'Failure') has_instrumentation; SELECT * FROM t1 WHERE id < 4; @@ -50,6 +51,7 @@ SET @after_count = (SELECT SUM(TIMER_WAIT) WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD') AND (1 = 1)); +SELECT (@after_count >= 0) as have_after_count; SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_ff1_timed; UPDATE performance_schema.setup_instruments SET enabled='NO'; @@ -59,6 +61,7 @@ SET @before_count = (SELECT SUM(TIMER_WAIT) WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD') AND (2 = 2)); +SELECT (@before_count >= 0) as have_before_count; SELECT * FROM t1 WHERE id < 6; SET @after_count = (SELECT SUM(TIMER_WAIT) @@ -66,6 +69,7 @@ SET @after_count = (SELECT SUM(TIMER_WAIT) WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile') AND (OBJECT_NAME LIKE '%t1.MYD') AND (3 = 3)); +SELECT (@after_count >= 0) as have_after_count; SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success', 'Failure') test_ff2_timed; # diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test index 8c9e5fcd0ed..60d4a648222 100644 --- a/mysql-test/suite/perfschema/t/query_cache.test +++ b/mysql-test/suite/perfschema/t/query_cache.test @@ -34,7 +34,7 @@ show status like "Qcache_hits"; select spins from performance_schema.events_waits_current order by event_name limit 1; -select name from performance_schema.setup_instruments order by name limit 1; +select * from performance_schema.setup_timers where name='wait'; show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; @@ -42,7 +42,7 @@ show status like "Qcache_hits"; select spins from performance_schema.events_waits_current order by event_name limit 1; -select name from performance_schema.setup_instruments order by name limit 1; +select * from performance_schema.setup_timers where name='wait'; show status like "Qcache_queries_in_cache"; show status like "Qcache_inserts"; diff --git a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result index fcd03ea74b8..baf0cf81cec 100644 --- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result +++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result @@ -114,22 +114,23 @@ id c 3 3 [on master] drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT); +CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT); CREATE TABLE test.t1 (a INT); INSERT INTO test.t1 VALUES(1); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT); +CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT); CREATE TRIGGER t1_update AFTER UPDATE ON test.t1 FOR EACH ROW -INSERT INTO test.t_slave VALUES(NULL, ROUND(RAND() * 1000), @c); +INSERT INTO test.t_slave VALUES(NULL, RAND(), @c); SET INSERT_ID=2; SET @c=2; SET @@rand_seed1=10000000, @@rand_seed2=1000000; -INSERT INTO t5 VALUES (NULL, ROUND(RAND() * 1000), @c); +INSERT INTO t5 VALUES (NULL, RAND(), @c); SELECT b into @b FROM test.t5; UPDATE test.t1 SET a=2; SELECT a AS 'ONE' into @a FROM test.t_slave; SELECT c AS 'NULL' into @c FROM test.t_slave; SELECT b into @b FROM test.t_slave; +include/assert.inc [Random values from master and slave must be different] drop table test.t5; drop table test.t1; drop table test.t_slave; diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result index e4a825591bf..fbe4ba28409 100644 --- a/mysql-test/suite/rpl/r/rpl_hrtime.result +++ b/mysql-test/suite/rpl/r/rpl_hrtime.result @@ -30,7 +30,7 @@ include/rpl_end.inc /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1293832861/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index 8910f7c8f74..610d18a88c6 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -11,7 +11,7 @@ include/stop_slave.inc change master to master_log_pos=MASTER_LOG_POS; start slave; include/wait_for_slave_io_error.inc [errno=1236] -Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.'' +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.'' include/stop_slave_sql.inc show master status; File Position Binlog_Do_DB Binlog_Ignore_DB diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result new file mode 100644 index 00000000000..50da7e67bba --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -0,0 +1,369 @@ +include/master-slave.inc +[connection master] +create table t1 (a int primary key) engine=innodb; +create table t2 (a int primary key) engine=myisam; +begin; +insert into t1 values (1); +SET sql_mode = 'ANSI_QUOTES'; +savepoint `a``; create database couldbebadthingshere; savepoint ``dummy`; +insert into t1 values (2); +insert into t2 values (1); +SET sql_mode = ''; +rollback to savepoint `a``; create database couldbebadthingshere; savepoint ``dummy`; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +insert into t1 values (3); +commit; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; create table t1 (a int primary key) engine=innodb +master-bin.000001 # Query # # use `test`; create table t2 (a int primary key) engine=myisam +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; insert into t2 values (1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values (1) +master-bin.000001 # Query # # SAVEPOINT "a`; create database couldbebadthingshere; savepoint `dummy" +master-bin.000001 # Query # # use `test`; insert into t1 values (2) +master-bin.000001 # Query # # ROLLBACK TO `a``; create database couldbebadthingshere; savepoint ``dummy` +master-bin.000001 # Query # # use `test`; insert into t1 values (3) +master-bin.000001 # Xid # # COMMIT /* XID */ +BEGIN; +insert into t1 values(10); +set sql_mode = 'ANSI_QUOTES'; +set sql_quote_show_create = 1; +savepoint a; +insert into t1 values(11); +savepoint "a""a"; +insert into t1 values(12); +set sql_quote_show_create = 0; +savepoint b; +insert into t1 values(13); +savepoint "b""b"; +insert into t1 values(14); +set sql_mode = ''; +set sql_quote_show_create = 1; +savepoint c; +insert into t1 values(15); +savepoint `c``c`; +insert into t1 values(16); +set sql_quote_show_create = 0; +savepoint d; +insert into t1 values(17); +savepoint `d``d`; +insert into t1 values(18); +COMMIT; +set sql_quote_show_create = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(10) +master-bin.000001 # Query # # SAVEPOINT "a" +master-bin.000001 # Query # # use `test`; insert into t1 values(11) +master-bin.000001 # Query # # SAVEPOINT "a""a" +master-bin.000001 # Query # # use `test`; insert into t1 values(12) +master-bin.000001 # Query # # SAVEPOINT b +master-bin.000001 # Query # # use `test`; insert into t1 values(13) +master-bin.000001 # Query # # SAVEPOINT "b""b" +master-bin.000001 # Query # # use `test`; insert into t1 values(14) +master-bin.000001 # Query # # SAVEPOINT `c` +master-bin.000001 # Query # # use `test`; insert into t1 values(15) +master-bin.000001 # Query # # SAVEPOINT `c``c` +master-bin.000001 # Query # # use `test`; insert into t1 values(16) +master-bin.000001 # Query # # SAVEPOINT d +master-bin.000001 # Query # # use `test`; insert into t1 values(17) +master-bin.000001 # Query # # SAVEPOINT `d``d` +master-bin.000001 # Query # # use `test`; insert into t1 values(18) +master-bin.000001 # Xid # # COMMIT /* XID */ +*** Test correct USE statement in SHOW BINLOG EVENTS *** +set sql_mode = 'ANSI_QUOTES'; +CREATE DATABASE "db1`; SELECT 'oops!'"; +use "db1`; SELECT 'oops!'"; +CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM; +INSERT INTO t1 VALUES (1); +set sql_mode = ''; +INSERT INTO t1 VALUES (2); +set sql_mode = 'ANSI_QUOTES'; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'" +master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use "db1`; SELECT 'oops!'"; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # COMMIT +set sql_mode = ''; +set sql_quote_show_create = 0; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'" +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # COMMIT +set sql_quote_show_create = 1; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # CREATE DATABASE "db1`; SELECT 'oops!'" +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (1) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (2) +master-bin.000001 # Query # # COMMIT +DROP TABLE t1; +use test; +***Test LOAD DATA INFILE with various identifiers that need correct quoting *** +use `db1``; SELECT 'oops!'`; +set timestamp=1000000000; +CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3), +`c``3` VARCHAR(7)); +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f''le.txt' INTO TABLE `t``1` + FIELDS TERMINATED BY ',' ESCAPED BY '\\' ENCLOSED BY '''' + LINES TERMINATED BY '\n' + (`a``1`, @`b```) SET `b``2` = @`b```, `c``3` = concat('|', "b""a'z", "!"); +SELECT * FROM `t``1`; +a`1 b`2 c`3 +fo\o bar |b"a'z! +truncate `t``1`; +use test; +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f''le.txt' + INTO TABLE `db1``; SELECT 'oops!'`.`t``1` + FIELDS TERMINATED BY ',' ESCAPED BY '\\' ENCLOSED BY '''' + LINES TERMINATED BY '\n' + (`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!"); +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; +a`1 b`2 c`3 +fo\o bar |b"a'z! +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3), +`c``3` VARCHAR(7)) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# +master-bin.000001 # Execute_load_query # # use `db1``; SELECT 'oops!'`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f\'le.txt' INTO TABLE `t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, @`b```) SET `b``2`= @`b```, `c``3`= concat('|', "b""a'z", "!") ;file_id=# +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; truncate `t``1` +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/f\'le.txt' INTO TABLE `db1``; SELECT 'oops!'`.`t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, `b``2`) SET `c``3`= concat('|', "b""a'z", "!") ;file_id=# +master-bin.000001 # Query # # COMMIT +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use `db1``; SELECT 'oops!'`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3), +`c``3` VARCHAR(7)) +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +LOAD DATA LOCAL INFILE '' INTO TABLE `t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, @`b```) SET `b``2`= @`b```, `c``3`= concat('|', "b""a'z", "!") +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +COMMIT +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +truncate `t``1` +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +use `test`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +LOAD DATA LOCAL INFILE '' INTO TABLE `db1``; SELECT 'oops!'`.`t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, `b``2`) SET `c``3`= concat('|', "b""a'z", "!") +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +COMMIT +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; +a`1 b`2 c`3 +fo\o bar |b"a'z! +DROP TABLE `db1``; SELECT 'oops!'`.`t``1`; +drop table t1,t2; +*** Test truncation of long SET expression in LOAD DATA *** +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1000)); +LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/file.txt' INTO TABLE t1 +FIELDS TERMINATED BY ',' + (a, @b) SET b = CONCAT(@b, '| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|', @b); +SELECT * FROM t1 ORDER BY a; +a b +1 X| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|X +2 A| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|A +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=# +master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/file.txt' INTO TABLE `t1` FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @`b`) SET `b`= CONCAT(@b, '| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|', @b) ;file_id=# +master-bin.000001 # Query # # COMMIT +SELECT * FROM t1 ORDER BY a; +a b +1 X| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|X +2 A| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|A +DROP TABLE t1; +*** Test user variables whose names require correct quoting *** +use `db1``; SELECT 'oops!'`; +CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100)); +INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100)); +SELECT @`a``1`:=a1, @`a``2`:=a2, @`a``3`:=a3, @`a``4`:=a4, @`b```:=b, @```c`:=c, @```d```:=d FROM t1; +@`a``1`:=a1 @`a``2`:=a2 @`a``3`:=a3 @`a``4`:=a4 @`b```:=b @```c`:=c @```d```:=d +-9223372036854775808 42 9223372036854775807 18446744073709551615 -1.234560123456789e125 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98)); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100)) +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100)) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # User var # # @`a``1`=-9223372036854775808 +master-bin.000001 # User var # # @`a``2`=42 +master-bin.000001 # User var # # @`a``3`=9223372036854775807 +master-bin.000001 # User var # # @`a``4`=18446744073709551615 +master-bin.000001 # User var # # @`b```=-1.234560123456789e125 +master-bin.000001 # User var # # @```c`=-1234501234567890123456789012345678901234567890123456789.0123456789 +master-bin.000001 # User var # # @```d```=_latin1 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 COLLATE latin1_swedish_ci +master-bin.000001 # Query # # use `db1``; SELECT 'oops!'`; INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98)) +master-bin.000001 # Query # # COMMIT +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +use `db1``; SELECT 'oops!'`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100)) +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100)) +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +COMMIT +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +SET @`a``1`:=-9223372036854775808/*!*/; +SET @`a``2`:=42/*!*/; +SET @`a``3`:=9223372036854775807/*!*/; +SET @`a``4`:=18446744073709551615/*!*/; +SET @`b```:=-1.2345601234568e+125/*!*/; +SET @```c`:=-1234501234567890123456789012345678901234567890123456789.0123456789/*!*/; +SET @```d```:=_latin1 0x78787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 COLLATE `latin1_swedish_ci`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98)) +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +COMMIT +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +SELECT * FROM `db1``; SELECT 'oops!'`.t1 ORDER BY a1; +a1 a2 a3 a4 b c d +-9223372036854775808 42 9223372036854775807 18446744073709551615 -1.234560123456789e125 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +-9223372036854775807 4200 9223372036854775806 18446744073709551614 -6.172800617283945e124 -1234501234567890123456789012345678901234567890123456789.0123456789 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +DROP TABLE t1; +*** Test correct quoting in foreign key error message *** +use `db1``; SELECT 'oops!'`; +CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL, +FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb; +TRUNCATE `t``1`; +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`db1``; SELECT 'oops!'`.`t``2`, CONSTRAINT `INNODB_FOREIGN_KEY_NAME` FOREIGN KEY (`c```) REFERENCES `db1``; SELECT 'oops!'`.`t``1` (`a```)) +DROP TABLE `t``2`; +DROP TABLE `t``1`; +*** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart +include/stop_slave.inc +CREATE TABLE `db1``; SELECT 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap; +INSERT INTO `db1``; SELECT 'oops!'`.`t``1` VALUES (1), (2), (5); +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1` ORDER BY 1; +a` +1 +2 +5 +set timestamp=1000000000; +# The table should be empty on the master. +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; +a` +# The DELETE statement should be correctly quoted +show binlog events in 'master-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query # # BEGIN +master-bin.000002 # Query # # use `test`; DELETE FROM `db1``; SELECT 'oops!'`.`t``1` +master-bin.000002 # Query # # COMMIT +include/start_slave.inc +# The table should be empty on the slave also. +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; +a` +DROP TABLE `db1``; SELECT 'oops!'`.`t``1`; +use test; +DROP DATABASE `db1``; SELECT 'oops!'`; +*** Test correct quoting of mysqlbinlog --rewrite-db option *** +CREATE TABLE t1 (a INT PRIMARY KEY); +INSERT INTO t1 VALUES(1); +show binlog events in 'master-bin.000002' from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query # # BEGIN +master-bin.000002 # Query # # use `test`; INSERT INTO t1 VALUES(1) +master-bin.000002 # Query # # COMMIT +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +DELIMITER /*!*/; +ROLLBACK/*!*/; +SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; +BEGIN +/*!*/; +use `ts``et`/*!*/; +SET TIMESTAMP=1000000000/*!*/; +INSERT INTO t1 VALUES(1) +/*!*/; +SET TIMESTAMP=1000000000/*!*/; +COMMIT +/*!*/; +DELIMITER ; +# End of log file +ROLLBACK /* added by mysqlbinlog */; +/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result index 4d5ffae2d63..65fd2800e7d 100644 --- a/mysql-test/suite/rpl/r/rpl_packet.result +++ b/mysql-test/suite/rpl/r/rpl_packet.result @@ -1,7 +1,7 @@ include/master-slave.inc [connection master] -call mtr.add_suppression("Slave I/O: Got a packet bigger than 'max_allowed_packet' bytes, Error_code: 1153"); -call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log:"); +call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, Error_code: 1153"); +call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet"); drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; SET @@global.max_allowed_packet=1024; @@ -30,14 +30,14 @@ include/start_slave.inc CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); include/wait_for_slave_io_error.inc [errno=1153] -Last_IO_Error = 'Got a packet bigger than 'max_allowed_packet' bytes' +Last_IO_Error = 'Got a packet bigger than 'slave_max_allowed_packet' bytes' include/stop_slave_sql.inc include/rpl_reset.inc DROP TABLE t1; CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM; INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet)); -include/wait_for_slave_io_error.inc [errno=1236] -Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '.' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.'' +include/wait_for_slave_io_error.inc [errno=1153] +Last_IO_Error = 'Got a packet bigger than 'slave_max_allowed_packet' bytes' STOP SLAVE; RESET SLAVE; RESET MASTER; @@ -52,6 +52,7 @@ SET @@global.max_allowed_packet= 1024; Warnings: Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length' SET @@global.net_buffer_length= 1024; +SET @@global.slave_max_allowed_packet= 1073741824; DROP TABLE t1; RESET SLAVE; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 9e3577e1d5c..1a4d5c7574d 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -154,7 +154,7 @@ c1 c3 c4 c5 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -176,7 +176,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -287,7 +287,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; @@ -318,7 +318,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 4b9e768861d..8a2a88a8c90 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -670,7 +670,7 @@ drop database if exists mysqltest1 SET TIMESTAMP=t/*!*/; create database mysqltest1 /*!*/; -use mysqltest1/*!*/; +use `mysqltest1`/*!*/; SET TIMESTAMP=t/*!*/; create table t1 (a varchar(100)) /*!*/; @@ -1015,7 +1015,7 @@ drop database mysqltest1 SET TIMESTAMP=t/*!*/; drop user "zedjzlcsjhd"@127.0.0.1 /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=t/*!*/; drop function if exists f1 /*!*/; @@ -1112,7 +1112,7 @@ create database mysqltest SET TIMESTAMP=t/*!*/; create database mysqltest2 /*!*/; -use mysqltest2/*!*/; +use `mysqltest2`/*!*/; SET TIMESTAMP=t/*!*/; create table t ( t integer ) /*!*/; @@ -1139,7 +1139,7 @@ end SET TIMESTAMP=t/*!*/; BEGIN /*!*/; -use mysqltest/*!*/; +use `mysqltest`/*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest2`.`f1`() /*!*/; @@ -1152,14 +1152,14 @@ drop database mysqltest SET TIMESTAMP=t/*!*/; drop database mysqltest2 /*!*/; -use test/*!*/; +use `test`/*!*/; SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqltestbug36570_p1`() begin select 1; end /*!*/; -use mysql/*!*/; +use `mysql`/*!*/; SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `test`.` mysqltestbug36570_p2`( a int) `label`: diff --git a/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result b/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result new file mode 100644 index 00000000000..f69a323f980 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_start_slave_deadlock_sys_vars.result @@ -0,0 +1,31 @@ +include/master-slave.inc +[connection master] +# connection: slave +SET @save_slave_net_timeout = @@GLOBAL.slave_net_timeout; +STOP SLAVE; +include/wait_for_slave_to_stop.inc +# open an extra connection to the slave +# connection: slave2 +# set debug synchronization point +SET DEBUG_SYNC='fix_slave_net_timeout SIGNAL parked WAIT_FOR go'; +# attempt to set slave_net_timeout, will wait on sync point +SET @@GLOBAL.slave_net_timeout = 100; +# connection: slave +SET DEBUG_SYNC='now WAIT_FOR parked'; +# connection: slave1 +# attempt to start the SQL thread +START SLAVE SQL_THREAD; +# connection: slave +# wait until SQL thread has been started +# sleep a bit so that the SQL thread THD handle is initialized +# signal the set slave_net_timeout to continue +SET DEBUG_SYNC='now SIGNAL go'; +# connection: slave2 +# reap result of set slave_net_timeout +# connection: slave1 +# reap result of starting the SQL thread +# disconnect: slave2 +# connection: slave +# cleanup +SET @@GLOBAL.slave_net_timeout = @save_slave_net_timeout; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index 784cd1bcdff..ac6d9155f4b 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -4,7 +4,7 @@ DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t3; create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); -create table t2 (a int auto_increment, primary key (a), b int); +create table t2 (a int auto_increment, primary key (a), b int) engine=innodb; create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); create trigger t1 before insert on t1 for each row begin @@ -29,7 +29,7 @@ a b 1 2 3 0 4 0 -5 0 +6 0 500 0 select a,name, old_a, old_b, truncate(rand_value,4) from t3; a name old_a old_b truncate(rand_value,4) @@ -39,7 +39,7 @@ a name old_a old_b truncate(rand_value,4) 103 t2 1 2 0.9164 104 t2 3 0 0.8826 105 t2 4 0 0.6635 -106 t2 5 0 0.6699 +106 t2 6 0 0.6699 107 t2 500 0 0.3593 --- On slave -- @@ -52,7 +52,7 @@ a b 1 2 3 0 4 0 -5 0 +6 0 500 0 select a,name, old_a, old_b, truncate(rand_value,4) from t3; a name old_a old_b truncate(rand_value,4) @@ -62,7 +62,7 @@ a name old_a old_b truncate(rand_value,4) 103 t2 1 2 0.9164 104 t2 3 0 0.8826 105 t2 4 0 0.6635 -106 t2 5 0 0.6699 +106 t2 6 0 0.6699 107 t2 500 0 0.3593 drop table t1,t2,t3; select get_lock("bug12480",2); diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test index b62a6e96437..3572dd53ea7 100644 --- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test +++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test @@ -215,21 +215,23 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; # be filtered as well. # connection master; -CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT); # ignored on slave +# Although RAND() is from 0 to 1.0, DECIMAL(M,D), requires that M must be >= D. +CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT); # ignored on slave CREATE TABLE test.t1 (a INT); # accepted on slave INSERT INTO test.t1 VALUES(1); --sync_slave_with_master call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT); +# Although RAND() is from 0 to 1.0, DECIMAL(M,D), requires that M must be >= D. +CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT); CREATE TRIGGER t1_update AFTER UPDATE ON test.t1 FOR EACH ROW - INSERT INTO test.t_slave VALUES(NULL, ROUND(RAND() * 1000), @c); + INSERT INTO test.t_slave VALUES(NULL, RAND(), @c); connection master; SET INSERT_ID=2; SET @c=2; SET @@rand_seed1=10000000, @@rand_seed2=1000000; -INSERT INTO t5 VALUES (NULL, ROUND(RAND() * 1000), @c); # to be ignored +INSERT INTO t5 VALUES (NULL, RAND(), @c); # to be ignored SELECT b into @b FROM test.t5; --let $b_master=`select @b` UPDATE test.t1 SET a=2; # to run trigger on slave @@ -253,10 +255,9 @@ if (`SELECT @a != 2 and @c != NULL`) SELECT b into @b FROM test.t_slave; --let $b_slave=`select @b` -if (`SELECT $b_slave = $b_master`) -{ - --echo Might be pure coincidence of two randoms from master and slave table. Don not panic yet. -} +--let $assert_text= Random values from master and slave must be different +--let $assert_cond= $b_master != $b_slave +--source include/assert.inc # cleanup BUG#11754117 connection master; diff --git a/mysql-test/suite/rpl/t/rpl_mdev382.test b/mysql-test/suite/rpl/t/rpl_mdev382.test new file mode 100644 index 00000000000..e84a29137bc --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_mdev382.test @@ -0,0 +1,265 @@ +--source include/have_innodb.inc +--source include/have_binlog_format_statement.inc +--source include/master-slave.inc + +# MDEV-382: multiple SQL injections in replication code. + +# Test previous SQL injection attack against binlog for SAVEPOINT statement. +# The test would cause syntax error on slave due to improper quoting of +# the savepoint name. +connection master; +create table t1 (a int primary key) engine=innodb; +create table t2 (a int primary key) engine=myisam; + +begin; +insert into t1 values (1); +SET sql_mode = 'ANSI_QUOTES'; +savepoint `a``; create database couldbebadthingshere; savepoint ``dummy`; +insert into t1 values (2); +insert into t2 values (1); +SET sql_mode = ''; +rollback to savepoint `a``; create database couldbebadthingshere; savepoint ``dummy`; +insert into t1 values (3); +commit; + +--source include/show_binlog_events.inc + +# This failed due to syntax error in query when the bug was not fixed. +sync_slave_with_master; +connection slave; + +# Test some more combinations of ANSI_QUOTES and sql_quote_show_create +connection master; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +BEGIN; +insert into t1 values(10); +set sql_mode = 'ANSI_QUOTES'; +set sql_quote_show_create = 1; +savepoint a; +insert into t1 values(11); +savepoint "a""a"; +insert into t1 values(12); +set sql_quote_show_create = 0; +savepoint b; +insert into t1 values(13); +savepoint "b""b"; +insert into t1 values(14); +set sql_mode = ''; +set sql_quote_show_create = 1; +savepoint c; +insert into t1 values(15); +savepoint `c``c`; +insert into t1 values(16); +set sql_quote_show_create = 0; +savepoint d; +insert into t1 values(17); +savepoint `d``d`; +insert into t1 values(18); +COMMIT; +set sql_quote_show_create = 1; + +--source include/show_binlog_events.inc + +--echo *** Test correct USE statement in SHOW BINLOG EVENTS *** +connection master; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +set sql_mode = 'ANSI_QUOTES'; +CREATE DATABASE "db1`; SELECT 'oops!'"; +use "db1`; SELECT 'oops!'"; +CREATE TABLE t1 (a INT PRIMARY KEY) engine=MyISAM; +INSERT INTO t1 VALUES (1); +set sql_mode = ''; +INSERT INTO t1 VALUES (2); +set sql_mode = 'ANSI_QUOTES'; +--source include/show_binlog_events.inc +set sql_mode = ''; +set sql_quote_show_create = 0; +--source include/show_binlog_events.inc +set sql_quote_show_create = 1; +--source include/show_binlog_events.inc +DROP TABLE t1; + +use test; + +--echo ***Test LOAD DATA INFILE with various identifiers that need correct quoting *** + +--let $load_file= $MYSQLTEST_VARDIR/tmp/f'le.txt +--write_file $load_file +'fo\\o','bar' +EOF + +use `db1``; SELECT 'oops!'`; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +set timestamp=1000000000; +CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3), + `c``3` VARCHAR(7)); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/f''le.txt' INTO TABLE `t``1` + FIELDS TERMINATED BY ',' ESCAPED BY '\\\\' ENCLOSED BY '''' + LINES TERMINATED BY '\\n' + (`a``1`, @`b```) SET `b``2` = @`b```, `c``3` = concat('|', "b""a'z", "!"); + +SELECT * FROM `t``1`; +# Also test when code prefixes table name with database. +truncate `t``1`; +use test; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/f''le.txt' + INTO TABLE `db1``; SELECT 'oops!'`.`t``1` + FIELDS TERMINATED BY ',' ESCAPED BY '\\\\' ENCLOSED BY '''' + LINES TERMINATED BY '\\n' + (`a``1`, `b``2`) SET `c``3` = concat('|', "b""a'z", "!"); +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; +let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1); + +--source include/show_binlog_events.inc +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_regex /LOCAL INFILE '.*SQL_LOAD.*' INTO/LOCAL INFILE '' INTO/ +--exec $MYSQL_BINLOG --short-form --start-position=$binlog_start --stop-position=$pos2 $MYSQLD_DATADIR/master-bin.000001 + +sync_slave_with_master; +connection slave; +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; +connection master; + +DROP TABLE `db1``; SELECT 'oops!'`.`t``1`; +--remove_file $load_file + +connection master; +drop table t1,t2; + + +--echo *** Test truncation of long SET expression in LOAD DATA *** +CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(1000)); +--let $load_file= $MYSQLTEST_VARDIR/tmp/file.txt +--write_file $load_file +1,X +2,A +EOF + +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +# The bug was that the SET expression was truncated to 256 bytes, so test with +# an expression longer than that. +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval LOAD DATA INFILE '$load_file' INTO TABLE t1 + FIELDS TERMINATED BY ',' + (a, @b) SET b = CONCAT(@b, '| 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789123456789T123456789U123456789V123456789W123456789X123456789Y123456789Z123456789|', @b); + +SELECT * FROM t1 ORDER BY a; +--source include/show_binlog_events.inc + +sync_slave_with_master; +connection slave; +SELECT * FROM t1 ORDER BY a; + +connection master; +--remove_file $load_file +DROP TABLE t1; + + +--echo *** Test user variables whose names require correct quoting *** +use `db1``; SELECT 'oops!'`; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100)); +INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100)); +SELECT @`a``1`:=a1, @`a``2`:=a2, @`a``3`:=a3, @`a``4`:=a4, @`b```:=b, @```c`:=c, @```d```:=d FROM t1; +INSERT INTO t1 VALUES (@`a``1`+1, @`a``2`*100, @`a``3`-1, @`a``4`-1, @`b```/2, @```c`, substr(@```d```, 2, 98)); +let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1); + +--source include/show_binlog_events.inc + +--exec $MYSQL_BINLOG --short-form --start-position=$binlog_start --stop-position=$pos2 $MYSQLD_DATADIR/master-bin.000001 + +sync_slave_with_master; +connection slave; +SELECT * FROM `db1``; SELECT 'oops!'`.t1 ORDER BY a1; + +connection master; +DROP TABLE t1; + +--echo *** Test correct quoting in foreign key error message *** +use `db1``; SELECT 'oops!'`; +CREATE TABLE `t``1` ( `a``` INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE `t``2` ( `b``` INT PRIMARY KEY, `c``` INT NOT NULL, + FOREIGN KEY fk (`c```) REFERENCES `t``1`(`a```)) ENGINE=innodb; +--replace_regex /t@[0-9]+_ibfk_[0-9]+/INNODB_FOREIGN_KEY_NAME/ +--error ER_TRUNCATE_ILLEGAL_FK +TRUNCATE `t``1`; +DROP TABLE `t``2`; +DROP TABLE `t``1`; + + +--echo *** Test correct quoting of DELETE FROM statement binlogged for HEAP table that is emptied due to server restart + +# Let's keep the slave stopped during master restart, to avoid any potential +# races between slave reconnect and master restart. +connection slave; +--source include/stop_slave.inc + +connection master; +CREATE TABLE `db1``; SELECT 'oops!'`.`t``1` (`a``` INT PRIMARY KEY) ENGINE=heap; +INSERT INTO `db1``; SELECT 'oops!'`.`t``1` VALUES (1), (2), (5); +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1` ORDER BY 1; + +# Restart the master mysqld. +# This will cause an implicit truncation of the memory-based table, which will +# cause logging of an explicit DELETE FROM to binlog. +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait-rpl_mdev382.test +EOF + +--shutdown_server 30 + +--remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart-rpl_mdev382.test +EOF + +connection default; +--enable_reconnect +--source include/wait_until_connected_again.inc +# rpl_end.inc needs to use the connection server_1 +connection server_1; +--enable_reconnect +--source include/wait_until_connected_again.inc +connection master; +--enable_reconnect +--source include/wait_until_connected_again.inc +set timestamp=1000000000; + +--echo # The table should be empty on the master. +let $binlog_file= master-bin.000002; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; + +--echo # The DELETE statement should be correctly quoted +--source include/show_binlog_events.inc + +connection slave; +--source include/start_slave.inc + +connection master; +sync_slave_with_master; +connection slave; +--echo # The table should be empty on the slave also. +SELECT * FROM `db1``; SELECT 'oops!'`.`t``1`; + +connection master; +DROP TABLE `db1``; SELECT 'oops!'`.`t``1`; +sync_slave_with_master; + + +connection master; +use test; +DROP DATABASE `db1``; SELECT 'oops!'`; + +--echo *** Test correct quoting of mysqlbinlog --rewrite-db option *** +CREATE TABLE t1 (a INT PRIMARY KEY); +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +INSERT INTO t1 VALUES(1); +--source include/show_binlog_events.inc +let $pos2= query_get_value(SHOW MASTER STATUS, Position, 1); +--exec $MYSQL_BINLOG --short-form --start-position=$binlog_start --stop-position=$pos2 --rewrite-db='test->ts`et' $MYSQLD_DATADIR/master-bin.000002 +DROP TABLE t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_packet-slave.opt b/mysql-test/suite/rpl/t/rpl_packet-slave.opt index 412bc079caa..1aed7d07572 100644 --- a/mysql-test/suite/rpl/t/rpl_packet-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_packet-slave.opt @@ -1 +1 @@ ---max_allowed_packet=1024 --net_buffer_length=1024 +--max_allowed_packet=1024 --net_buffer_length=1024 --slave_max_allowed_packet=1024 diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test index 4f296fed68e..c49d9490bd9 100644 --- a/mysql-test/suite/rpl/t/rpl_packet.test +++ b/mysql-test/suite/rpl/t/rpl_packet.test @@ -11,9 +11,8 @@ # max-out size db name source include/master-slave.inc; source include/have_binlog_format_row.inc; -call mtr.add_suppression("Slave I/O: Got a packet bigger than 'max_allowed_packet' bytes, Error_code: 1153"); -call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log:"); - +call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, Error_code: 1153"); +call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet"); let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; disable_warnings; eval drop database if exists $db; @@ -23,6 +22,7 @@ eval create database $db; connection master; let $old_max_allowed_packet= `SELECT @@global.max_allowed_packet`; let $old_net_buffer_length= `SELECT @@global.net_buffer_length`; +let $old_slave_max_allowed_packet= `SELECT @@global.slave_max_allowed_packet`; SET @@global.max_allowed_packet=1024; SET @@global.net_buffer_length=1024; @@ -123,11 +123,9 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), R connection slave; # The slave I/O thread must stop after receiving -# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master. ---let $slave_io_errno= 1236 - -# Mask line numbers ---let $slave_io_error_replace= / at [0-9]*/ at XXX/ +# 1153 = ER_NET_PACKET_TOO_LARGE +--let $slave_io_errno= 1153 +--let $show_slave_io_error= 1 --source include/wait_for_slave_io_error.inc # Remove the bad binlog and clear error status on slave. @@ -167,6 +165,7 @@ connection master; DROP TABLE t1; eval SET @@global.max_allowed_packet= $old_max_allowed_packet; eval SET @@global.net_buffer_length= $old_net_buffer_length; +eval SET @@global.slave_max_allowed_packet= $old_slave_max_allowed_packet; # slave is stopped connection slave; DROP TABLE t1; diff --git a/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test b/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test new file mode 100644 index 00000000000..3eaff761108 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test @@ -0,0 +1,57 @@ +source include/have_debug_sync.inc; +source include/master-slave.inc; + +--echo # connection: slave +connection slave; +SET @save_slave_net_timeout = @@GLOBAL.slave_net_timeout; +STOP SLAVE; +source include/wait_for_slave_to_stop.inc; + +--echo # open an extra connection to the slave +connect(slave2,127.0.0.1,root,,test,$SLAVE_MYPORT,); +--echo # connection: slave2 +--echo # set debug synchronization point +SET DEBUG_SYNC='fix_slave_net_timeout SIGNAL parked WAIT_FOR go'; +--echo # attempt to set slave_net_timeout, will wait on sync point +--send SET @@GLOBAL.slave_net_timeout = 100 + +--echo # connection: slave +connection slave; +SET DEBUG_SYNC='now WAIT_FOR parked'; + +--echo # connection: slave1 +connection slave1; +--echo # attempt to start the SQL thread +--send START SLAVE SQL_THREAD + +--echo # connection: slave +connection slave; +--echo # wait until SQL thread has been started +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for slave thread to start" and info = "START SLAVE SQL_THREAD"; +--source include/wait_condition.inc +--echo # sleep a bit so that the SQL thread THD handle is initialized +sleep 2; +--echo # signal the set slave_net_timeout to continue +SET DEBUG_SYNC='now SIGNAL go'; + +--echo # connection: slave2 +connection slave2; +--echo # reap result of set slave_net_timeout +--reap + +--echo # connection: slave1 +connection slave1; +--echo # reap result of starting the SQL thread +--reap + +--echo # disconnect: slave2 +disconnect slave2; + +--echo # connection: slave +connection slave; +--echo # cleanup +SET @@GLOBAL.slave_net_timeout = @save_slave_net_timeout; + +source include/rpl_end.inc; diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index e2974a21bf7..723fa3e44e2 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -3,13 +3,10 @@ # Adding statement include due to Bug 12574 # TODO: Remove statement include once 12574 is patched --source include/have_binlog_format_mixed_or_statement.inc +--source include/have_innodb.inc --source include/master-slave.inc ---source include/have_innodb.inc -connection slave; ---source include/have_innodb.inc connection master; - disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); enable_query_log; @@ -26,7 +23,7 @@ DROP TABLE IF EXISTS t3; # create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null); -create table t2 (a int auto_increment, primary key (a), b int); +create table t2 (a int auto_increment, primary key (a), b int) engine=innodb; create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null); delimiter |; diff --git a/mysql-test/suite/storage_engine/1st.result b/mysql-test/suite/storage_engine/1st.result new file mode 100644 index 00000000000..6b686c2b2b4 --- /dev/null +++ b/mysql-test/suite/storage_engine/1st.result @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a , b ) ENGINE= ; +SHOW CREATE TABLE t1; +SHOW COLUMNS IN t1; +INSERT INTO t1 VALUES (1,'a'); +INSERT INTO t1 (a,b) VALUES (2,'b'); +SELECT * FROM t1; +a b +1 a +2 b +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/1st.test b/mysql-test/suite/storage_engine/1st.test new file mode 100644 index 00000000000..af7a4503948 --- /dev/null +++ b/mysql-test/suite/storage_engine/1st.test @@ -0,0 +1,81 @@ +# +# This test checks some very basic capabilities +# which will be used in almost every other test, +# and will not be checked through support* variables. +# If this test does not pass, there is no point +# at executing other ones. +# +# Minimal requirements: +# - supported column types: INT, CHAR (default CHAR(8), INT(11)); +# - column attributes as declared in define_engine.inc ($default_col_opts) +# (by default empty, which means no additional attributes apart from the type); +# - table attributes as declared in define_engine.inc ($default_tbl_opts) +# (by default empty, which means no additional attributes apart from ENGINE); +# - CREATE TABLE .. (column1 , column2 ) ENGINE=; +# - INSERT INTO TABLE .. VALUES (val1,val2); +# - DROP TABLE .. +# - SELECT * FROM .. +# - SHOW CREATE TABLE .. +# - SHOW COLUMNS IN ... +# + +--source have_engine.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = CREATE TABLE + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --disable_result_log + SHOW CREATE TABLE t1; + if ($mysql_errname) + { + --let $functionality = SHOW CREATE TABLE + --source unexpected_result.inc + } + SHOW COLUMNS IN t1; + if ($mysql_errname) + { + --let $functionality = SHOW COLUMNS + --source unexpected_result.inc + } + --enable_result_log + + INSERT INTO t1 VALUES (1,'a'); + if ($mysql_errname) + { + --let $functionality = INSERT INTO .. VALUES + --source unexpected_result.inc + } + + INSERT INTO t1 (a,b) VALUES (2,'b'); + if ($mysql_errname) + { + --let $functionality = INSERT INTO .. (column_list) VALUES + --source unexpected_result.inc + } + + SELECT * FROM t1; + if ($mysql_errname) + { + --let $functionality = SELECT * FROM .. + --source unexpected_result.inc + } + + DROP TABLE t1; + if ($mysql_errname) + { + --let $functionality = DROP TABLE + --source unexpected_result.inc + } + +} +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/alter_table.inc b/mysql-test/suite/storage_engine/alter_table.inc new file mode 100644 index 00000000000..0f78c597455 --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_table.inc @@ -0,0 +1,91 @@ +################################## +# +# This include file will be used for all ALTER TABLE statements in the suite. +# If you need to add additional steps or change the logic, copy the file +# to storage//mysql-test/storage_engine/ folder and modify it there. +# +################## +# +# Parameters: +# +# --let $alter_definition = # mandatory, everything that goes after the table name in ALTER statement +# --let $table_name = # optional, default t1 +# --let $error_codes = # optional, default 0 +# --let $online = [0|1] # optional, default 0 (1 adds ONLINE) +# --let $rename_to = # optional, default empty. +# # If set, means we are running RENAME TO, then alter definition is ignored +# +# Usage examples: +# +# --let $alter_definition = ADD COLUMN b $char_col DEFAULT '' +# + +if ($rename_to) +{ + --let $alter_definition = RENAME TO $rename_to +} + +if (!$alter_definition) +{ + --die # The ALTER statement is empty +} + +--let $alter_statement = ALTER + +if ($online) +{ + --let $alter_statement = $alter_statement ONLINE +} + +if (!$table_name) +{ + --let $table_name = t1 +} + +--let $alter_statement = $alter_statement TABLE $table_name $alter_definition + + +# We now have the complete ALTER statement in $alter_statement. +# If your ALTER statement should be composed differently, +# modify the logic above. + +##################### +# Here you can add logic needed BEFORE the main statement +# (e.g. base tables need to be altered, etc.). +# Surround it by --disable_query_log/--enable_query_log +# if you don't want it to appear in the result output. +##################### + +--source obfuscate.inc + +eval $alter_statement; +--source check_errors.inc + +# Make sure you don't add any statements between the main ALTER (above) +# and saving mysql_errno and mysql_errname (below) +# They are saved in case you want to add more logic after the main ALTER, +# because we need the result code of the statement. +# Also, do not change $alter_statement after it is executed! + +--let $my_errno = $mysql_errno +--let $my_errname = $mysql_errname + +##################### +# Here you can add logic needed AFTER the main statement. +# Surround it by --disable_query_log/--enable_query_log +# if you don't want it to appear in the result output. +##################### + +# Unset the parameters, we don't want them to be accidentally reused later +--let $alter_definition = +--let $table_name = +--let $error_codes = +--let $online = 0 +--let $rename_to = + +# Restore the error codes of the main statement +--let $mysql_errno = $my_errno +--let $mysql_errname = $my_errname +# Make sure you don't add any SQL statements after restoring +# mysql_errno and mysql_errname (above) + diff --git a/mysql-test/suite/storage_engine/alter_table.result b/mysql-test/suite/storage_engine/alter_table.result new file mode 100644 index 00000000000..6d868a27a36 --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_table.result @@ -0,0 +1,147 @@ +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a , c ) ENGINE= ; +INSERT INTO t1 (a,c) VALUES (1,'a'),(5,'z'); +ALTER TABLE t1 ADD COLUMN b ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 ALTER COLUMN a SET DEFAULT '0'; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '0', + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 ALTER a DROP DEFAULT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 CHANGE COLUMN b b1 FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b1` char(8) DEFAULT NULL, + `a` int(11), + `c` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 CHANGE b1 b AFTER c; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 CHANGE b b ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY COLUMN b ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11), + `c` char(8) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY COLUMN b FIRST; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `b` char(8) DEFAULT NULL, + `a` int(11), + `c` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY COLUMN b AFTER a; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11), + `b` int(11) DEFAULT NULL, + `c` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 DROP COLUMN b; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11), + `c` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 RENAME TO t2; +SHOW CREATE TABLE t1; +ERROR 42S02: Table 'test.t1' doesn't exist +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11), + `c` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +DROP TABLE t2; +CREATE TABLE t1 (a , b ) ENGINE= ; +INSERT INTO t1 (a,b) VALUES (1,5),(2,2),(4,3); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +ALTER TABLE t1 ORDER BY b ASC, a DESC; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 +SELECT * FROM t1; +a b +2 2 +4 3 +1 5 +DROP TABLE t1; +CREATE TABLE t1 (a , b , c ) ENGINE= CHARACTER SET latin1 COLLATE latin1_general_cs; +INSERT INTO t1 (a,b,c) VALUES (5,'z','t'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` char(8) COLLATE latin1_general_cs DEFAULT NULL, + `c` char(8) COLLATE latin1_general_cs DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs +ALTER TABLE t1 CONVERT TO CHARACTER SET utf8; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` char(8) DEFAULT NULL, + `c` char(8) DEFAULT NULL +) ENGINE= DEFAULT CHARSET=utf8 +ALTER TABLE t1 DEFAULT CHARACTER SET = latin1 COLLATE latin1_general_ci; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` char(8) CHARACTER SET utf8 DEFAULT NULL, + `c` char(8) CHARACTER SET utf8 DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci +ALTER TABLE t1 FORCE; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` char(8) CHARACTER SET utf8 DEFAULT NULL, + `c` char(8) CHARACTER SET utf8 DEFAULT NULL +) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/alter_table.test b/mysql-test/suite/storage_engine/alter_table.test new file mode 100644 index 00000000000..023d8927e16 --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_table.test @@ -0,0 +1,148 @@ +# +# Basic ALTER TABLE statements. +# +# USAGE of table options in ALTER statements +# is covered in tbl_standard_opts and tbl_opt*.tests. +# +# Index operations are covered in index* tests. +# +# ALTER ONLINE syntax is covered in alter_online_table.test +# ALTER OFFLINE is not covered as it is not supported, as of 5.5.23 +# +# ALTER TABLE ... DISCARD|IMPORT TABLESPACE is covered in alter_tablespace.test +# + +--source have_engine.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +--let $create_definition = a $int_col, c $char_col +--source create_table.inc +INSERT INTO t1 (a,c) VALUES (1,'a'),(5,'z'); + +# Column operations + +--let $alter_definition = ADD COLUMN b $int_col +--source alter_table.inc +if ($mysql_errname) +{ + --source unexpected_result.inc +} + +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = ALTER COLUMN a SET DEFAULT '0' +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = ALTER a DROP DEFAULT +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = CHANGE COLUMN b b1 $char_col FIRST +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = CHANGE b1 b $int_col AFTER c +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = CHANGE b b $char_col +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = MODIFY COLUMN b $int_col +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = MODIFY COLUMN b $char_col FIRST +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = MODIFY COLUMN b $int_col AFTER a +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = DROP COLUMN b +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + + +# Rename table + +--let $rename_to = t2 +--source alter_table.inc +--let $error_codes = ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; +--source check_errors.inc +if ($mysql_errname != 'ER_NO_SUCH_TABLE') +{ + --let $functionality = ALTER TABLE + --source unexpected_result.inc + DROP TABLE t1; +} +if ($mysql_errname == ER_NO_SUCH_TABLE) +{ + --source mask_engine.inc + SHOW CREATE TABLE t2; + DROP TABLE t2; +} + +# ORDER BY +--let $create_definition = a $int_col, b $int_col +--source create_table.inc +INSERT INTO t1 (a,b) VALUES (1,5),(2,2),(4,3); +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = ORDER BY b ASC, a DESC +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +# Character set, collate + +--let $table_options = CHARACTER SET latin1 COLLATE latin1_general_cs +--let $create_definition = a $int_col, b $char_col, c $char_col +--source create_table.inc +INSERT INTO t1 (a,b,c) VALUES (5,'z','t'); + +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = CONVERT TO CHARACTER SET utf8 +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +--let $alter_definition = DEFAULT CHARACTER SET = latin1 COLLATE latin1_general_ci +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +# A 'null' ALTER operation + +--let $alter_definition = FORCE +--source alter_table.inc +--source mask_engine.inc +SHOW CREATE TABLE t1; + +# Cleanup +DROP TABLE t1; + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/alter_table_online.result b/mysql-test/suite/storage_engine/alter_table_online.result new file mode 100644 index 00000000000..0e606bf1f7e --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_table_online.result @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS t1,t2,t3; +CREATE TABLE t1 (a , b , c ) ENGINE= ; +INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); +ALTER ONLINE TABLE t1 MODIFY b DEFAULT 5; +ALTER ONLINE TABLE t1 CHANGE b new_name ; +ALTER ONLINE TABLE t1 COMMENT 'new comment'; +ALTER ONLINE TABLE t1 RENAME TO t2; +DROP TABLE IF EXISTS t2; +CREATE TEMPORARY TABLE t1 (a , b ) ENGINE= ; +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); +ALTER ONLINE TABLE t1 MODIFY b DEFAULT 5; +ERROR HY000: Can't execute the given 'ALTER' command as online +ALTER ONLINE TABLE t1 CHANGE b new_name ; +ERROR HY000: Can't execute the given 'ALTER' command as online +ALTER ONLINE TABLE t1 COMMENT 'new comment'; +ERROR HY000: Can't execute the given 'ALTER' command as online +ALTER ONLINE TABLE t1 RENAME TO t2; +ERROR HY000: Can't execute the given 'ALTER' command as online +DROP TABLE t1; +CREATE TABLE t1 (a , b , c ) ENGINE= ; +INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); +ALTER ONLINE TABLE t1 DROP COLUMN b, ADD b ; +ERROR HY000: Can't execute the given 'ALTER' command as online +ALTER ONLINE TABLE t1 MODIFY b BIGINT ; +ERROR HY000: Can't execute the given 'ALTER' command as online +ALTER ONLINE TABLE t1 ENGINE=MEMORY; +ERROR HY000: Can't execute the given 'ALTER' command as online +DROP TABLE t1; +CREATE TABLE t1 (a , b , c ) ENGINE= ; +ALTER ONLINE TABLE t1 ADD INDEX (b); +ERROR HY000: Can't execute the given 'ALTER' command as online +ALTER TABLE t1 ADD INDEX (b); +ALTER ONLINE TABLE t1 DROP INDEX b; +ERROR HY000: Can't execute the given 'ALTER' command as online +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/alter_table_online.test b/mysql-test/suite/storage_engine/alter_table_online.test new file mode 100644 index 00000000000..94dec2a72bb --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_table_online.test @@ -0,0 +1,160 @@ +# +# ALTER ONLINE TABLE +# + +--source have_engine.inc + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3; +--enable_warnings + +# +# Test of things that can be done online +# We are repeating notification here, because for some engines +# only a part of these ALTER ONLINE statements might be supported. +# + +let $create_definition = a $int_col, b $int_col, c $char_col; +--source create_table.inc + +INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); + +--let $online = 1 +--let $alter_definition = MODIFY b $int_col DEFAULT 5 +--source alter_table.inc +if ($mysql_errname) +{ + --source unexpected_result.inc +} + +--let $online = 1 +--let $alter_definition = CHANGE b new_name $int_col +--source alter_table.inc +if ($mysql_errname) +{ + --source unexpected_result.inc +} + +--let $online = 1 +--let $alter_definition = COMMENT 'new comment' +--source alter_table.inc +if ($mysql_errname) +{ + --source unexpected_result.inc +} + +--let $online = 1 +--let $rename_to = t2 +--source alter_table.inc +if ($mysql_errname) +{ + --source unexpected_result.inc + DROP TABLE t1; +} +DROP TABLE IF EXISTS t2; + +# +# temporary tables always require a copy +# + +--let $temporary = 1 +--source create_table.inc + +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'),(3,'c'); + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $alter_definition = MODIFY b $int_col DEFAULT 5 +--source alter_table.inc +if ($mysql_errname != ER_CANT_DO_ONLINE) +{ + --source unexpected_result.inc +} + + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $alter_definition = CHANGE b new_name $int_col +--source alter_table.inc + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $alter_definition = COMMENT 'new comment' +--source alter_table.inc + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $rename_to = t2 +--source alter_table.inc + +DROP TABLE t1; + +# +# Test of things that is not possible to do online +# + +--let $create_definition = a $int_col, b $int_col, c $char_col +--source create_table.inc + +INSERT INTO t1 (a,b,c) VALUES (1,100,'a'),(2,200,'b'),(3,300,'c'); + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $alter_definition = DROP COLUMN b, ADD b $int_col +--source alter_table.inc +if ($mysql_errname!=ER_CANT_DO_ONLINE) +{ + --source unexpected_result.inc +} + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $alter_definition = MODIFY b BIGINT $default_col_opts +--source alter_table.inc + +--let $alternative_engine = `SELECT engine FROM information_schema.engines WHERE engine != '$storage_engine' AND support IN ('YES','DEFAULT')` + +--let $error_codes = ER_CANT_DO_ONLINE +--let $online = 1 +--let $alter_definition = ENGINE=$alternative_engine +--source alter_table.inc + +DROP TABLE t1; + +--let $create_definition = a $int_col, b $int_indexed_col, c $char_col +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Column options + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --let $error_codes = ER_CANT_DO_ONLINE + --let $online = 1 + --let $alter_definition = ADD INDEX (b) + --source alter_table.inc + if ($mysql_errname!=ER_CANT_DO_ONLINE) + { + --let $functionality = Adding an index or ALTER ONLINE + --source unexpected_result.inc + } + + --let $alter_definition = ADD INDEX (b) + --source alter_table.inc + if ($mysql_errname) + { + --let $functionality = Adding an index or ALTER TABLE + --source unexpected_result.inc + } + if (!$mysql_errname) + { + --let $error_codes = ER_CANT_DO_ONLINE + --let $online = 1 + --let $alter_definition = DROP INDEX b + --source alter_table.inc + } + DROP TABLE t1; +} + +--source cleanup_engine.inc diff --git a/mysql-test/suite/storage_engine/alter_tablespace.result b/mysql-test/suite/storage_engine/alter_tablespace.result new file mode 100644 index 00000000000..5d8709b2357 --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_tablespace.result @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a ) ENGINE= ; +ALTER TABLE t1 DISCARD TABLESPACE; +DROP TABLE t1; +CREATE TABLE t1 (a ) ENGINE= ; +INSERT INTO t1 (a) VALUES (1),(2); +SELECT * FROM t1; +a +1 +2 +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Got error -1 from storage engine +ALTER TABLE t1 IMPORT TABLESPACE; +SELECT * FROM t1; +a +1 +2 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/alter_tablespace.test b/mysql-test/suite/storage_engine/alter_tablespace.test new file mode 100644 index 00000000000..6c429bb98ea --- /dev/null +++ b/mysql-test/suite/storage_engine/alter_tablespace.test @@ -0,0 +1,91 @@ +# +# IMPORT / DISCARD TABLESPACE +# +# The test might require additional engine options, +# e.g. for InnoDB it is --innodb-file-per-table + +--source have_engine.inc + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +--let $create_definition = a $int_col +--source create_table.inc + +--let $alter_definition = DISCARD TABLESPACE + +--source alter_table.inc +if ($mysql_errname) +{ + --let $my_last_stmt = $alter_statement + --let $functionality = Tablespace operations + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + DROP TABLE t1; + + --let $create_definition = a $int_col + --source create_table.inc + INSERT INTO t1 (a) VALUES (1),(2); + --sorted_result + SELECT * FROM t1; + +# http://dev.mysql.com/doc/mysql-enterprise-backup/3.5/en/partial.restoring.single.html +# To get a "clean" backup we need to either use innobackup, or to monitor show engine innodb status, +# and the documented conditions do not look exactly feasible. So, we will go a simple way: +# just restart the server, and take the backup while the server is down. +# (And we need to have a really clean backup, see MySQL:65429 / LP:1004910) + + --let $datadir = `SELECT @@datadir` + + --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +wait +EOF + + --enable_reconnect + --shutdown_server 60 + + --source include/wait_until_disconnected.inc + + --replace_result $datadir + --copy_file $datadir/test/t1.ibd $datadir/test/t1.ibd.save + + --remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect + --write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF + + --source include/wait_until_connected_again.inc + + --let $alter_definition = DISCARD TABLESPACE + --source alter_table.inc + + --let $error_codes = ER_GET_ERRNO + SELECT * FROM t1; + --source check_errors.inc + if ($mysql_errname != ER_GET_ERRNO) + { + --let $functionality = Tablespace operations + --source unexpected_result.inc + } + + --move_file $datadir/test/t1.ibd.save $datadir/test/t1.ibd + --let $alter_definition = IMPORT TABLESPACE + --source alter_table.inc + --sorted_result + SELECT * FROM t1; + + # Adding a warning suppression based on what InnoDB currently does + # when it attempts to access a table without an *.ibd file + --disable_query_log + eval CALL mtr.add_suppression('$storage_engine: Error:.*'); + --enable_query_log +} + +DROP TABLE t1; + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/analyze_table.inc b/mysql-test/suite/storage_engine/analyze_table.inc new file mode 100644 index 00000000000..2cbfc17aaa9 --- /dev/null +++ b/mysql-test/suite/storage_engine/analyze_table.inc @@ -0,0 +1,43 @@ +# +# ANALYZE TABLE statements +# +# Note: the output is likely to be different for the engine under test, +# in which case rdiff will be needed. Or, the output might say that +# the storage engine does not support ANALYZE. +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + +--let $create_definition = a $int_col, b $char_col +--source create_table.inc +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +--let $create_definition = a $int_col, b $char_col +--let $table_name = t2 +--source create_table.inc + +INSERT INTO t1 (a,b) VALUES (3,'c'); +ANALYZE TABLE t1; +INSERT INTO t2 (a,b) VALUES (4,'d'); +ANALYZE NO_WRITE_TO_BINLOG TABLE t2; +INSERT INTO t1 (a,b) VALUES (5,'e'); +INSERT INTO t2 (a,b) VALUES (6,'f'); +ANALYZE LOCAL TABLE t1, t2; + +DROP TABLE t1, t2; + +--let $continue = 1 +--source have_default_index.inc + +if ($have_default_index) +{ + --let $create_definition = a $int_indexed_col, $default_index(a) + --source create_table.inc + INSERT INTO t1 (a) VALUES (1),(2),(4),(7); + ANALYZE TABLE t1; + INSERT INTO t1 (a) VALUES (8),(10),(11),(12); + ANALYZE TABLE t1; + DROP TABLE t1; +} + diff --git a/mysql-test/suite/storage_engine/analyze_table.result b/mysql-test/suite/storage_engine/analyze_table.result new file mode 100644 index 00000000000..42904ed334d --- /dev/null +++ b/mysql-test/suite/storage_engine/analyze_table.result @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (a , b ) ENGINE= ; +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +CREATE TABLE t2 (a , b ) ENGINE= ; +INSERT INTO t1 (a,b) VALUES (3,'c'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +INSERT INTO t2 (a,b) VALUES (4,'d'); +ANALYZE NO_WRITE_TO_BINLOG TABLE t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +INSERT INTO t1 (a,b) VALUES (5,'e'); +INSERT INTO t2 (a,b) VALUES (6,'f'); +ANALYZE LOCAL TABLE t1, t2; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +DROP TABLE t1, t2; +CREATE TABLE t1 (a , (a)) ENGINE= ; +INSERT INTO t1 (a) VALUES (1),(2),(4),(7); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +INSERT INTO t1 (a) VALUES (8),(10),(11),(12); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/analyze_table.test b/mysql-test/suite/storage_engine/analyze_table.test new file mode 100644 index 00000000000..5222ec8af54 --- /dev/null +++ b/mysql-test/suite/storage_engine/analyze_table.test @@ -0,0 +1,14 @@ +# +# ANALYZE TABLE statements +# +# Note: the output is likely to be different for the engine under test, +# in which case rdiff will be needed. Or, the output might say that +# the storage engine does not support ANALYZE. +# + +--source have_engine.inc + +--source analyze_table.inc + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/autoinc_secondary.result b/mysql-test/suite/storage_engine/autoinc_secondary.result new file mode 100644 index 00000000000..ad2b43bc6fe --- /dev/null +++ b/mysql-test/suite/storage_engine/autoinc_secondary.result @@ -0,0 +1,40 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a AUTO_INCREMENT, b , PRIMARY KEY (a,b)) ENGINE= ; +INSERT INTO t1 (b) VALUES ('a'),('b'),('b'),('c'),('a'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +1 +SELECT * FROM t1; +a b +1 a +2 b +3 b +4 c +5 a +DROP TABLE t1; +CREATE TABLE t1 (a , b AUTO_INCREMENT, PRIMARY KEY (a,b)) ENGINE= ; +INSERT INTO t1 (a) VALUES ('a'),('b'),('b'),('c'),('a'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +1 +SELECT * FROM t1; +a b +a 1 +a 2 +b 1 +b 2 +c 1 +DROP TABLE t1; +CREATE TABLE t1 (a , b AUTO_INCREMENT, PRIMARY KEY (a,b), (b)) ENGINE= ; +INSERT INTO t1 (a) VALUES ('a'),('b'),('b'),('c'),('a'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +1 +SELECT * FROM t1; +a b +a 1 +a 5 +b 2 +b 3 +c 4 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/autoinc_secondary.test b/mysql-test/suite/storage_engine/autoinc_secondary.test new file mode 100644 index 00000000000..8b95f1d859e --- /dev/null +++ b/mysql-test/suite/storage_engine/autoinc_secondary.test @@ -0,0 +1,73 @@ +# +# AUTO_INCREMENT on a secondary column in a multi-part key +# + +--source have_engine.inc +--source have_default_index.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# AUTO_INCREMENT is the primary column in a multiple-column index +# + +--let $create_definition = a $int_col AUTO_INCREMENT, b $char_col, PRIMARY KEY (a,b) +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Multi-part keys or PK or AUTO_INCREMENT (on a primary column) + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + INSERT INTO t1 (b) VALUES ('a'),('b'),('b'),('c'),('a'); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +# +# AUTO_INCREMENT is the secondary column in a multiple-column index +# + +--let $create_definition = a $char_col, b $int_col AUTO_INCREMENT, PRIMARY KEY (a,b) +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Multi-part keys or PK or AUTO_INCREMENT (on a secondary column) + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + INSERT INTO t1 (a) VALUES ('a'),('b'),('b'),('c'),('a'); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +# AUTO_INCREMENT is the secondary column in a multiple-column index, +# and primary in another index +# + +--let $create_definition = a $char_col, b $int_indexed_col AUTO_INCREMENT, PRIMARY KEY (a,b), $default_index(b) +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Multi-part keys or AUTO_INCREMENT (on the secondary column) or multiple keys + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + INSERT INTO t1 (a) VALUES ('a'),('b'),('b'),('c'),('a'); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/autoinc_vars.result b/mysql-test/suite/storage_engine/autoinc_vars.result new file mode 100644 index 00000000000..60e7d74a22a --- /dev/null +++ b/mysql-test/suite/storage_engine/autoinc_vars.result @@ -0,0 +1,55 @@ +DROP TABLE IF EXISTS t1; +SET auto_increment_offset = 200; +CREATE TABLE t1 (a AUTO_INCREMENT, b , (a)) ENGINE= ; +INSERT INTO t1 (a,b) VALUES (NULL,'a'),(NULL,'b'),(NULL,'c'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +1 +SELECT * FROM t1; +a b +1 a +2 b +3 c +SET auto_increment_increment = 300; +INSERT INTO t1 (a,b) VALUES (NULL,'d'),(NULL,'e'),(NULL,'f'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +200 +SELECT * FROM t1; +a b +1 a +2 b +200 d +3 c +500 e +800 f +SET auto_increment_increment = 50; +INSERT INTO t1 (a,b) VALUES (NULL,'g'),(NULL,'h'),(NULL,'i'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +850 +SELECT * FROM t1; +a b +1 a +2 b +200 d +3 c +500 e +800 f +850 g +900 h +950 i +DROP TABLE t1; +SET auto_increment_increment = 500; +SET auto_increment_offset = 300; +CREATE TABLE t1 (a TINYINT AUTO_INCREMENT, (a)) ENGINE= ; +INSERT INTO t1 (a) VALUES (NULL); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +127 +SELECT * FROM t1; +a +127 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/autoinc_vars.test b/mysql-test/suite/storage_engine/autoinc_vars.test new file mode 100644 index 00000000000..ceafcd7138f --- /dev/null +++ b/mysql-test/suite/storage_engine/autoinc_vars.test @@ -0,0 +1,68 @@ +# +# auto-increment-offset and auto-increment-increment +# + +--source have_engine.inc +--source have_default_index.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# auto_increment_offset +SET auto_increment_offset = 200; +--let $create_definition = a $int_indexed_col AUTO_INCREMENT, b $char_col, $default_index(a) +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = AUTO_INCREMENT + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + # If auto_increment_offset is greater than auto_increment_increment, + # the offset is ignored + INSERT INTO t1 (a,b) VALUES (NULL,'a'),(NULL,'b'),(NULL,'c'); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + + # auto_increment_increment + + SET auto_increment_increment = 300; + # offset should not be ignored anymore + INSERT INTO t1 (a,b) VALUES (NULL,'d'),(NULL,'e'),(NULL,'f'); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + + SET auto_increment_increment = 50; + INSERT INTO t1 (a,b) VALUES (NULL,'g'),(NULL,'h'),(NULL,'i'); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +# offset is greater than the max value + +SET auto_increment_increment = 500; +SET auto_increment_offset = 300; +--let $create_definition = a TINYINT $default_col_indexed_opts AUTO_INCREMENT, $default_index(a) +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = AUTO_INCREMENT + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + INSERT INTO t1 (a) VALUES (NULL); + SELECT LAST_INSERT_ID(); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/autoincrement.result b/mysql-test/suite/storage_engine/autoincrement.result new file mode 100644 index 00000000000..bc51a2a82af --- /dev/null +++ b/mysql-test/suite/storage_engine/autoincrement.result @@ -0,0 +1,133 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a AUTO_INCREMENT, b , (a)) ENGINE= ; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL AUTO_INCREMENT, + `b` char(8) DEFAULT NULL, + KEY `a` (`a`) +) ENGINE= DEFAULT CHARSET=latin1 +INSERT INTO t1 (b) VALUES ('a'),('b'); +SELECT * FROM t1 ORDER BY a; +a b +1 a +2 b +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +1 +INSERT INTO t1 (a,b) VALUES (NULL,'c'),(0,'d'); +SELECT * FROM t1 ORDER BY a; +a b +1 a +2 b +3 c +4 d +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +3 +SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; +INSERT INTO t1 (a,b) VALUES (NULL,'e'); +SELECT * FROM t1 ORDER BY a; +a b +1 a +2 b +3 c +4 d +5 e +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +5 +INSERT INTO t1 (a,b) VALUES (0,'f'); +SELECT * FROM t1 ORDER BY a; +a b +0 f +1 a +2 b +3 c +4 d +5 e +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +5 +SET sql_mode = ''; +SHOW TABLE STATUS FROM test LIKE 't1'; +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 +t1 # # # # # # # # 6 # # # # # # # +INSERT INTO t1 (a,b) VALUES (6,'g'),(7,'h'); +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +5 +SHOW TABLE STATUS FROM test LIKE 't1'; +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 +t1 # # # # # # # # # 8 # # # # # # # +INSERT INTO t1 (a,b) VALUES (NULL,'i'),(9,'j'); +SELECT * FROM t1 ORDER BY a; +a b +0 f +1 a +2 b +3 c +4 d +5 e +6 g +7 h +8 i +9 j +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +8 +SHOW TABLE STATUS FROM test LIKE 't1'; +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 +t1 # # # # # # # # # 10 # # # # # # # +INSERT INTO t1 (a,b) VALUES (20,'k'); +SHOW TABLE STATUS FROM test LIKE 't1'; +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 +t1 # # # # # # # # # 21 # # # # # # # +INSERT INTO t1 (a,b) VALUES (NULL,'l'); +SELECT * FROM t1 ORDER BY a; +a b +0 f +1 a +2 b +3 c +4 d +5 e +6 g +7 h +8 i +9 j +20 k +21 l +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +21 +SHOW TABLE STATUS FROM test LIKE 't1'; +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 +t1 # # # # # # # # # 22 # # # # # # # +INSERT INTO t1 (a,b) VALUES (-5,'m'); +SELECT * FROM t1 ORDER BY a; +a b +-5 m +0 f +1 a +2 b +3 c +4 d +5 e +6 g +7 h +8 i +9 j +20 k +21 l +DROP TABLE t1; +CREATE TABLE t1 (a AUTO_INCREMENT, b , (a)) ENGINE= AUTO_INCREMENT = 100; +INSERT INTO t1 (a,b) VALUES (NULL,'a'),(NULL,'b'); +SELECT * FROM t1; +a b +100 a +101 b +SELECT LAST_INSERT_ID(); +LAST_INSERT_ID() +100 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/autoincrement.test b/mysql-test/suite/storage_engine/autoincrement.test new file mode 100644 index 00000000000..fb07ea55c57 --- /dev/null +++ b/mysql-test/suite/storage_engine/autoincrement.test @@ -0,0 +1,114 @@ +# +# Basic AUTO_INCREMENT capabilities +# + +--source have_engine.inc + +--let $skip = 1 +--source have_default_index.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--let $create_definition = a $int_indexed_col AUTO_INCREMENT, b $char_col, $default_index(a) +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = AUTO_INCREMENT + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --source mask_engine.inc + SHOW CREATE TABLE t1; + + # Automatic values + + INSERT INTO t1 (b) VALUES ('a'),('b'); + SELECT * FROM t1 ORDER BY a; + SELECT LAST_INSERT_ID(); + + INSERT INTO t1 (a,b) VALUES (NULL,'c'),(0,'d'); + SELECT * FROM t1 ORDER BY a; + SELECT LAST_INSERT_ID(); + + let $sql_mode = `SELECT @@sql_mode`; + SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; + + INSERT INTO t1 (a,b) VALUES (NULL,'e'); + SELECT * FROM t1 ORDER BY a; + SELECT LAST_INSERT_ID(); + + INSERT INTO t1 (a,b) VALUES (0,'f'); + SELECT * FROM t1 ORDER BY a; + SELECT LAST_INSERT_ID(); + + --replace_result $sql_mode + eval SET sql_mode = '$sql_mode'; + + # SHOW TABLE STATUS shows the auto-increment value in column 11, + # that's all we need here and further + --source mask_engine.inc + --replace_column 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # + SHOW TABLE STATUS FROM test LIKE 't1'; + + # Mix of automatic and explicit values + + INSERT INTO t1 (a,b) VALUES (6,'g'),(7,'h'); + SELECT LAST_INSERT_ID(); + + --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # + SHOW TABLE STATUS FROM test LIKE 't1'; + + + INSERT INTO t1 (a,b) VALUES (NULL,'i'),(9,'j'); + SELECT * FROM t1 ORDER BY a; + SELECT LAST_INSERT_ID(); + + --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # + SHOW TABLE STATUS FROM test LIKE 't1'; + + # Creating a gap in the sequence + + INSERT INTO t1 (a,b) VALUES (20,'k'); + + --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # + SHOW TABLE STATUS FROM test LIKE 't1'; + + INSERT INTO t1 (a,b) VALUES (NULL,'l'); + SELECT * FROM t1 ORDER BY a; + SELECT LAST_INSERT_ID(); + + --replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # + SHOW TABLE STATUS FROM test LIKE 't1'; + + # Negative values: we will try to insert one just to check that it does not cause a crash, + # but won't check what happens to the sequence after that, since the behavior is undefined + + INSERT INTO t1 (a,b) VALUES (-5,'m'); + SELECT * FROM t1 ORDER BY a; + + DROP TABLE t1; +} + +# Autoincrement with table option AUTO_INCREMENT + +--let $create_definition = a $int_indexed_col AUTO_INCREMENT, b $char_col, $default_index(a) +--let $table_options = AUTO_INCREMENT = 100 +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = AUTO_INCREMENT column or table option + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + INSERT INTO t1 (a,b) VALUES (NULL,'a'),(NULL,'b'); + --sorted_result + SELECT * FROM t1; + SELECT LAST_INSERT_ID(); + DROP TABLE t1; +} +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/cache_index.result b/mysql-test/suite/storage_engine/cache_index.result new file mode 100644 index 00000000000..c8cf0ce2090 --- /dev/null +++ b/mysql-test/suite/storage_engine/cache_index.result @@ -0,0 +1,69 @@ +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a , +b , + (a) +) ENGINE= ; +CREATE TABLE t2 (a , +b , + (b) +) ENGINE= ; +CACHE INDEX t1 INDEX (a), t2 IN ; +ERROR HY000: Unknown key cache '' +SET GLOBAL .key_buffer_size=128*1024; +CACHE INDEX t1 INDEX (a), t2 IN ; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +test.t2 assign_to_keycache status OK +LOAD INDEX INTO CACHE t1, t2; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +test.t2 preload_keys status OK +INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d'); +SET GLOBAL .key_buffer_size=8*1024; +LOAD INDEX INTO CACHE t1, t2 IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +test.t2 preload_keys status OK +SET GLOBAL .key_cache_age_threshold = 100, .key_cache_block_size = 512, .key_cache_division_limit = 1, .key_cache_segments=2; +INSERT INTO t1 (a,b) VALUES (5,'e'),(6,'f'); +LOAD INDEX INTO CACHE t1; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +SET GLOBAL new_.key_buffer_size=128*1024; +CACHE INDEX t1 IN new_; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h'); +LOAD INDEX INTO CACHE t1 IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +INSERT INTO t1 (a,b) VALUES (9,'i'); +DROP TABLE t2; +DROP TABLE t1; +CREATE TABLE t1 (a , +b , + (a), + (b) +) ENGINE= ; +CACHE INDEX t1 IN ; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +LOAD INDEX INTO CACHE t1; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +DROP TABLE t1; +CREATE TABLE t1 (a , +b , + a_b (a,b) +) ENGINE= ; +CACHE INDEX t1 IN ; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +LOAD INDEX INTO CACHE t1; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +DROP TABLE t1; +SET GLOBAL .key_buffer_size=0; +SET GLOBAL new_.key_buffer_size=0; diff --git a/mysql-test/suite/storage_engine/cache_index.test b/mysql-test/suite/storage_engine/cache_index.test new file mode 100644 index 00000000000..42ba9615a40 --- /dev/null +++ b/mysql-test/suite/storage_engine/cache_index.test @@ -0,0 +1,142 @@ +# +# CACHE INDEX and LOAD INDEX INTO CACHE +# + +--source have_engine.inc +--source have_default_index.inc + + +# Due to ancient MySQL bug#16111 we need to generate a unique cache name +--let $cache_name = `SELECT CONNECTION_ID()` +--let $cache_name = my_cache_$cache_name + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +let $create_definition = + a $int_indexed_col, + b $char_col, + $default_index (a) +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Indexes on INT columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + let $create_definition = + a $int_col, + b $char_indexed_col, + $default_index (b) + ; + let $table_name = t2; + --source create_table.inc + if ($mysql_errname) + { + --let $functionality = Indexes on CHAR columns + --source unexpected_result.inc + } + if (!$mysql_errname) + { + --replace_result $cache_name + --let $error_codes = ER_UNKNOWN_KEY_CACHE + eval CACHE INDEX t1 INDEX (a), t2 IN $cache_name; + --source check_errors.inc + if ($mysql_errname != ER_UNKNOWN_KEY_CACHE) + { + --let $functionality = Key cache or indexes + --source unexpected_result.inc + } + + --replace_result $cache_name + eval SET GLOBAL $cache_name.key_buffer_size=128*1024; + --replace_result $cache_name + eval CACHE INDEX t1 INDEX (a), t2 IN $cache_name; + if ($mysql_errname) + { + --let $functionality = Indexes + --source unexpected_result.inc + } + + LOAD INDEX INTO CACHE t1, t2; + if ($mysql_errname) + { + --let $functionality = Indexes + --source unexpected_result.inc + } + + INSERT INTO t1 (a,b) VALUES (3,'c'),(4,'d'); + --replace_result $cache_name + eval SET GLOBAL $cache_name.key_buffer_size=8*1024; + LOAD INDEX INTO CACHE t1, t2 IGNORE LEAVES; + + --replace_result $cache_name + eval SET GLOBAL $cache_name.key_cache_age_threshold = 100, $cache_name.key_cache_block_size = 512, $cache_name.key_cache_division_limit = 1, $cache_name.key_cache_segments=2; + INSERT INTO t1 (a,b) VALUES (5,'e'),(6,'f'); + LOAD INDEX INTO CACHE t1; + + --replace_result $cache_name + eval SET GLOBAL new_$cache_name.key_buffer_size=128*1024; + --replace_result $cache_name + eval CACHE INDEX t1 IN new_$cache_name; + INSERT INTO t1 (a,b) VALUES (7,'g'),(8,'h'); + LOAD INDEX INTO CACHE t1 IGNORE LEAVES; + INSERT INTO t1 (a,b) VALUES (9,'i'); + DROP TABLE t2; + } + DROP TABLE t1; +} + +let $create_definition = + a $int_indexed_col, + b $char_indexed_col, + $default_index (a), + $default_index (b) +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Multiple keys or indexes on INT or CHAR columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_result $cache_name + eval CACHE INDEX t1 IN $cache_name; + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + LOAD INDEX INTO CACHE t1; + + DROP TABLE t1; + let $create_definition = + a $int_indexed_col, + b $char_indexed_col, + $default_index a_b (a,b) + ; + --source create_table.inc + if ($mysql_errname) + { + --let $functionality = Multi-part keys + --source unexpected_result.inc + } + + --replace_result $cache_name + eval CACHE INDEX t1 IN $cache_name; + INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + LOAD INDEX INTO CACHE t1; + + DROP TABLE t1; +} + +# Cleanup + +--replace_result $cache_name +eval SET GLOBAL $cache_name.key_buffer_size=0; +--replace_result $cache_name +eval SET GLOBAL new_$cache_name.key_buffer_size=0; + + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/check_errors.inc b/mysql-test/suite/storage_engine/check_errors.inc new file mode 100644 index 00000000000..e38ff2962f1 --- /dev/null +++ b/mysql-test/suite/storage_engine/check_errors.inc @@ -0,0 +1,80 @@ +# +# Since we run tests in disable_abort_on_error mode, we cannot use --error command, +# and need to check the result manually. +# Usage in a test: +# --let $error_codes = # optional, default '' +# --let $mysql_errname = # optional, default current $mysql_errname (from the last SQL command) +# --let $mysql_errno = # optional, default current $mysql_errno (from the last SQL command) +# + +if ($error_codes == '0') +{ + --let $error_codes = +} +if ($error_codes == '') +{ + if ($mysql_errname) + { + --echo # ERROR: Statement ended with errno $mysql_errno, errname $mysql_errname (expected to succeed) + } + + # If both error_codes and mysql_errname are false, all is good, no logic needed +} + +if ($error_codes != '') +{ + # If mysql_errname or mysql_errno is equal to $error_codes, it's good too, nothing to do + + if ($mysql_errname != $error_codes) + { + if ($mysql_errno != $error_codes) + { + --let $save_errno = $mysql_errno + --let $save_errname = $mysql_errname + + --let $codeline = `SELECT CONCAT('\'',REPLACE('$error_codes',',','\',\''),'\'')` + --let $result = `SELECT '$save_errname' IN($codeline) or '$save_errno' IN ($codeline)` + + --let $mysql_errno = $save_errno + --let $mysql_errname = $save_errname + + if (!$result) + { + if ($mysql_errname) + { + --echo # ERROR: Statement ended with errno $mysql_errno, errname $mysql_errname (expected results: $error_codes) + } + if (!$mysql_errname) + { + --echo # ERROR: Statement succeeded (expected results: $error_codes) + } + } + # If a list contained more than one error, it could be on one of two reasons: + # first, we do not care which code it is, as long as it is one of the listed errors. + # In this case we will suggest to add an rdiff file if the message differs. + # Second, check_errors might be called from a generalized include file or test, + # which runs with different parameters and thus might produce different results for the same statement. + # Then, the message will be stricter, as the difference with the result file is actually a problem + # which needs to be checked at least. + if ($result) + { + if (!$strict_check) + { + --echo # Statement ended with one of expected results ($error_codes). + --echo # If you got a difference in error message, just add it to rdiff file + } + if ($strict_check) + { + --echo # WARNING: Statement ended with errno $mysql_errno, errname '$mysql_errname'. + --echo # If it differs from the result file, it might indicate a problem. + } + + } + } + } +} + +# Don't want the variables to be accidentally reused later +--let $error_codes = +--let $strict_check = + diff --git a/mysql-test/suite/storage_engine/check_table.inc b/mysql-test/suite/storage_engine/check_table.inc new file mode 100644 index 00000000000..54bdf511cb8 --- /dev/null +++ b/mysql-test/suite/storage_engine/check_table.inc @@ -0,0 +1,62 @@ +# +# CHECK TABLE statements +# +# Note: the output is likely to be different for the engine under test, +# in which case rdiff will be needed. Or, the output might say that +# the storage engine does not support CHECK. +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + +--let $create_definition = a $int_col, b $char_col +--source create_table.inc +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + +--let $table_name = t2 +--let $create_definition = a $int_col, b $char_col +--source create_table.inc + +CHECK TABLE t1; +INSERT INTO t1 (a,b) VALUES (3,'c'); +INSERT INTO t2 (a,b) VALUES (4,'d'); +CHECK TABLE t1, t2 FOR UPGRADE; +INSERT INTO t2 (a,b) VALUES (5,'e'); +CHECK TABLE t2 QUICK; +INSERT INTO t1 (a,b) VALUES (6,'f'); +CHECK TABLE t1 FAST; +INSERT INTO t1 (a,b) VALUES (7,'g'); +INSERT INTO t2 (a,b) VALUES (8,'h'); +CHECK TABLE t2, t1 MEDIUM; +INSERT INTO t1 (a,b) VALUES (9,'i'); +INSERT INTO t2 (a,b) VALUES (10,'j'); +CHECK TABLE t1, t2 EXTENDED; +INSERT INTO t1 (a,b) VALUES (11,'k'); +CHECK TABLE t1 CHANGED; + +DROP TABLE t1, t2; + +--let $continue = 1 +--source have_default_index.inc +if ($have_default_index) +{ + --let $create_definition = a $int_indexed_col, $default_index(a) + --source create_table.inc + INSERT INTO t1 (a) VALUES (1),(2),(5); + CHECK TABLE t1; + INSERT INTO t1 (a) VALUES (6),(8),(12); + CHECK TABLE t1 FOR UPGRADE; + INSERT INTO t1 (a) VALUES (13),(15),(16); + CHECK TABLE t1 QUICK; + INSERT INTO t1 (a) VALUES (17),(120),(132); + CHECK TABLE t1 FAST; + INSERT INTO t1 (a) VALUES (801),(900),(7714); + CHECK TABLE t1 MEDIUM; + INSERT INTO t1 (a) VALUES (8760),(10023),(12000); + CHECK TABLE t1 EXTENDED; + INSERT INTO t1 (a) VALUES (13345),(24456),(78302),(143028); + CHECK TABLE t1 CHANGED; + DROP TABLE t1; +} + diff --git a/mysql-test/suite/storage_engine/check_table.result b/mysql-test/suite/storage_engine/check_table.result new file mode 100644 index 00000000000..83c32778959 --- /dev/null +++ b/mysql-test/suite/storage_engine/check_table.result @@ -0,0 +1,68 @@ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (a , b ) ENGINE= ; +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +CREATE TABLE t2 (a , b ) ENGINE= ; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a,b) VALUES (3,'c'); +INSERT INTO t2 (a,b) VALUES (4,'d'); +CHECK TABLE t1, t2 FOR UPGRADE; +Table Op Msg_type Msg_text +test.t1 check status OK +test.t2 check status OK +INSERT INTO t2 (a,b) VALUES (5,'e'); +CHECK TABLE t2 QUICK; +Table Op Msg_type Msg_text +test.t2 check status OK +INSERT INTO t1 (a,b) VALUES (6,'f'); +CHECK TABLE t1 FAST; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a,b) VALUES (7,'g'); +INSERT INTO t2 (a,b) VALUES (8,'h'); +CHECK TABLE t2, t1 MEDIUM; +Table Op Msg_type Msg_text +test.t2 check status OK +test.t1 check status OK +INSERT INTO t1 (a,b) VALUES (9,'i'); +INSERT INTO t2 (a,b) VALUES (10,'j'); +CHECK TABLE t1, t2 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +test.t2 check status OK +INSERT INTO t1 (a,b) VALUES (11,'k'); +CHECK TABLE t1 CHANGED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1, t2; +CREATE TABLE t1 (a , (a)) ENGINE= ; +INSERT INTO t1 (a) VALUES (1),(2),(5); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a) VALUES (6),(8),(12); +CHECK TABLE t1 FOR UPGRADE; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a) VALUES (13),(15),(16); +CHECK TABLE t1 QUICK; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a) VALUES (17),(120),(132); +CHECK TABLE t1 FAST; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a) VALUES (801),(900),(7714); +CHECK TABLE t1 MEDIUM; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a) VALUES (8760),(10023),(12000); +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +INSERT INTO t1 (a) VALUES (13345),(24456),(78302),(143028); +CHECK TABLE t1 CHANGED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/check_table.test b/mysql-test/suite/storage_engine/check_table.test new file mode 100644 index 00000000000..243c8e07161 --- /dev/null +++ b/mysql-test/suite/storage_engine/check_table.test @@ -0,0 +1,14 @@ +# +# CHECK TABLE statements +# +# Note: the output is likely to be different for the engine under test, +# in which case rdiff will be needed. Or, the output might say that +# the storage engine does not support CHECK. +# + +--source have_engine.inc + +--source check_table.inc + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/checksum_table.inc b/mysql-test/suite/storage_engine/checksum_table.inc new file mode 100644 index 00000000000..d4bacce93b7 --- /dev/null +++ b/mysql-test/suite/storage_engine/checksum_table.inc @@ -0,0 +1,31 @@ +# +# CHECKSUM TABLE statements for standard CHECKSUM properties. +# Live checksums are covered in checksum_table_live.test +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + +# For most engines CHECKSUM=0 option will be ignored, +# but we are setting it here for those which have it 1 by default +# (there will be another test for live checksum) + +--let $table_options = CHECKSUM=0 +--let $create_definition = a $int_col, b $char_col +--source create_table.inc +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); + +--let $table_name = t2 +--let $table_options = CHECKSUM=0 +--let $create_definition = a $int_col, b $char_col +--source create_table.inc + +CHECKSUM TABLE t1; +CHECKSUM TABLE t2, t1; +CHECKSUM TABLE t1, t2 QUICK; +CHECKSUM TABLE t1, t2 EXTENDED; + +DROP TABLE t1, t2; + + diff --git a/mysql-test/suite/storage_engine/checksum_table.result b/mysql-test/suite/storage_engine/checksum_table.result new file mode 100644 index 00000000000..02d70491fa9 --- /dev/null +++ b/mysql-test/suite/storage_engine/checksum_table.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (a , b ) ENGINE= CHECKSUM=0; +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +CREATE TABLE t2 (a , b ) ENGINE= CHECKSUM=0; +CHECKSUM TABLE t1; +Table Checksum +test.t1 4272806499 +CHECKSUM TABLE t2, t1; +Table Checksum +test.t2 0 +test.t1 4272806499 +CHECKSUM TABLE t1, t2 QUICK; +Table Checksum +test.t1 NULL +test.t2 NULL +CHECKSUM TABLE t1, t2 EXTENDED; +Table Checksum +test.t1 4272806499 +test.t2 0 +DROP TABLE t1, t2; diff --git a/mysql-test/suite/storage_engine/checksum_table.test b/mysql-test/suite/storage_engine/checksum_table.test new file mode 100644 index 00000000000..5693e9a1ad3 --- /dev/null +++ b/mysql-test/suite/storage_engine/checksum_table.test @@ -0,0 +1,11 @@ +# +# CHECKSUM TABLE statements for standard CHECKSUM properties. +# Live checksums are covered in checksum_table_live.test +# + +--source have_engine.inc + +--source checksum_table.inc + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/checksum_table_live.inc b/mysql-test/suite/storage_engine/checksum_table_live.inc new file mode 100644 index 00000000000..9614494e620 --- /dev/null +++ b/mysql-test/suite/storage_engine/checksum_table_live.inc @@ -0,0 +1,30 @@ +# +# CHECKSUM TABLE statements for live CHECKSUM. +# +# Note: the feature is likely to be unsupported, in which case +# instead of numeric values some CHECKSUMs will produce NULL +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2; +--enable_warnings + +# For most engines CHECKSUM=1 option will be ignored, +# and the results will be different + +--let $table_options = CHECKSUM=1 +--let $create_definition = a $int_col, b $char_col +--source create_table.inc +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +--let $table_name = t2 +--let $table_options = CHECKSUM=1 +--let $create_definition = a $int_col, b $char_col +--source create_table.inc + +CHECKSUM TABLE t1; +CHECKSUM TABLE t2, t1; +CHECKSUM TABLE t1, t2 QUICK; +CHECKSUM TABLE t1, t2 EXTENDED; + +DROP TABLE t1, t2; + diff --git a/mysql-test/suite/storage_engine/checksum_table_live.result b/mysql-test/suite/storage_engine/checksum_table_live.result new file mode 100644 index 00000000000..59ab8f1688a --- /dev/null +++ b/mysql-test/suite/storage_engine/checksum_table_live.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (a , b ) ENGINE= CHECKSUM=1; +INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b'); +CREATE TABLE t2 (a , b ) ENGINE= CHECKSUM=1; +CHECKSUM TABLE t1; +Table Checksum +test.t1 4272806499 +CHECKSUM TABLE t2, t1; +Table Checksum +test.t2 0 +test.t1 4272806499 +CHECKSUM TABLE t1, t2 QUICK; +Table Checksum +test.t1 4272806499 +test.t2 0 +CHECKSUM TABLE t1, t2 EXTENDED; +Table Checksum +test.t1 4272806499 +test.t2 0 +DROP TABLE t1, t2; diff --git a/mysql-test/suite/storage_engine/checksum_table_live.test b/mysql-test/suite/storage_engine/checksum_table_live.test new file mode 100644 index 00000000000..347755f24df --- /dev/null +++ b/mysql-test/suite/storage_engine/checksum_table_live.test @@ -0,0 +1,13 @@ +# +# CHECKSUM TABLE statements for live CHECKSUM. +# +# Note: the feature is likely to be unsupported, in which case +# instead of numeric values some CHECKSUMs will produce NULL +# + +--source have_engine.inc + +--source checksum_table_live.inc + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/cleanup_engine.inc b/mysql-test/suite/storage_engine/cleanup_engine.inc new file mode 100644 index 00000000000..de3d57eeaeb --- /dev/null +++ b/mysql-test/suite/storage_engine/cleanup_engine.inc @@ -0,0 +1,11 @@ +########################################### +# +# This is a stub of the include file cleanup_engine.inc which +# should be placed in storage//mysql-test/storage_engine folder. +# +################################ +# +# Here you can add whatever is needed to cleanup +# in case your define_engine.inc created any artefacts, +# e.g. an additional schema and/or tables. + diff --git a/mysql-test/suite/storage_engine/col_not_null.inc b/mysql-test/suite/storage_engine/col_not_null.inc new file mode 100644 index 00000000000..5f980b0a915 --- /dev/null +++ b/mysql-test/suite/storage_engine/col_not_null.inc @@ -0,0 +1,92 @@ +# +# NOT NULL attribute in columns +# +# Usage: +# let $col_definition = ; +# let $col_default = ; +# --source col_not_null.inc +# +# We will add NOT NULL at the end of $col; +# +# Also, if $col_default is defined, +# we will create a table with 2 columns +# (one with DEFAULT $col_default, and one without any default), +# and will also attempt to add a column with DEFAULT NULL. +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--let $create_definition = c $col_definition NOT NULL +--source create_table.inc +if ($mysql_errname) +{ + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + SHOW COLUMNS IN t1; + + --let $error_codes = ER_BAD_NULL_ERROR + INSERT INTO t1 (c) VALUES (NULL); + --source check_errors.inc + + DROP TABLE t1; +} + +if ($col_default != '') +{ + let $create_definition = + c $col_definition NOT NULL, + c2 $col_definition NOT NULL DEFAULT $col_default + ; + --source create_table.inc + if ($mysql_errname) + { + --source unexpected_result.inc + } + if (!$mysql_errname) + { + SHOW COLUMNS IN t1; + + --let $error_codes = ER_INVALID_DEFAULT + --let $alter_definition = ADD COLUMN err $col_definition NOT NULL DEFAULT NULL + --source alter_table.inc + if ($mysql_errname != ER_INVALID_DEFAULT) + { + --let $functionality = ALTER or DEFAULT + --source unexpected_result.inc + } + + --let $error_codes = ER_BAD_NULL_ERROR + INSERT INTO t1 (c) VALUES (NULL); + --source check_errors.inc + if ($mysql_errname != ER_BAD_NULL_ERROR) + { + --let $functionality = NOT NULL columns + --source unexpected_result.inc + } + + # HEX should be universal for all column types + SELECT HEX(c), HEX(c2) FROM t1; + + --let $error_codes = ER_BAD_NULL_ERROR + INSERT INTO t1 (c2) VALUES (NULL); + --source check_errors.inc + + --eval INSERT INTO t1 (c) VALUES ($col_default) + if ($mysql_errname) + { + --let $functionality = DEFAULT + --source unexpected_result.inc + } + SELECT COUNT(c), COUNT(c2) FROM t1; + + DROP TABLE t1; + } +} + +# We don't want to preserve it +let $col_default = ; + diff --git a/mysql-test/suite/storage_engine/col_null.inc b/mysql-test/suite/storage_engine/col_null.inc new file mode 100644 index 00000000000..6f74609869f --- /dev/null +++ b/mysql-test/suite/storage_engine/col_null.inc @@ -0,0 +1,65 @@ +# +# NULL attribute and DEFAULT NULL in columns +# +# Usage: +# let $col_definition = ; +# let $col_default = ; +# --source col_null.inc +# +# We will add NULL at the end of $col; +# +# Also, if $col_default is defined, +# we will create a table with 3 columns (one with DEFAULT NULL, +# one with DEFAULT $col_default, and one without any default) +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--let $create_definition = c $col_definition NULL +--source create_table.inc +SHOW COLUMNS IN t1; +if ($mysql_errname) +{ + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + INSERT INTO t1 (c) VALUES (NULL); + if ($mysql_errname) + { + --let $functionality = NULLable columns + --source unexpected_result.inc + } + SELECT COUNT(c), COUNT(*) FROM t1; + + DROP TABLE t1; +} + +if ($col_default != '') +{ + let $create_definition = + c $col_definition NULL, + c1 $col_definition NULL DEFAULT NULL, + c2 $col_definition NULL DEFAULT $col_default + ; + --source create_table.inc + if ($mysql_errname) + { + --source unexpected_result.inc + } + if (!$mysql_errname) + { + SHOW COLUMNS IN t1; + + INSERT INTO t1 (c) VALUES (NULL); + SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; + + DROP TABLE t1; + } +} + +# We don't want to preserve it +let $col_default = ; + diff --git a/mysql-test/suite/storage_engine/col_opt_default.result b/mysql-test/suite/storage_engine/col_opt_default.result new file mode 100644 index 00000000000..2d0a8508b99 --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_default.result @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a DEFAULT '0') ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a int(11) # 0 +INSERT INTO t1 (a) VALUES (1); +SELECT * FROM t1; +a +1 +ALTER TABLE t1 ADD COLUMN b DEFAULT ''; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a int(11) # 0 +b char(8) # +INSERT INTO t1 (b) VALUES ('a'); +SELECT * FROM t1; +a b +0 a +1 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/col_opt_default.test b/mysql-test/suite/storage_engine/col_opt_default.test new file mode 100644 index 00000000000..f59daef37fc --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_default.test @@ -0,0 +1,49 @@ +# +# Check whether DEFAULT column attribute +# is supported in CREATE and ALTER TABLE. +# If the attribute is supported at all, it will be covered +# in more details in col_option_null and col_option_not_null tests. +# + +--source have_engine.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--let $create_definition = a $int_col DEFAULT '0' +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = DEFAULT values + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (a) VALUES (1); + --sorted_result + SELECT * FROM t1; + + --let $alter_definition = ADD COLUMN b $char_col DEFAULT '' + --source alter_table.inc + if ($mysql_errname) + { + --let $functionality = ALTER or DEFAULT + --source unexpected_result.inc + } + if (!$mysql_errname) + { + --replace_column 3 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (b) VALUES ('a'); + --sorted_result + SELECT * FROM t1; + } + DROP TABLE t1; +} +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/col_opt_not_null.result b/mysql-test/suite/storage_engine/col_opt_not_null.result new file mode 100644 index 00000000000..00a863fccce --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_not_null.result @@ -0,0 +1,2062 @@ +# +# BINARY columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (b BINARY NOT NULL, +b0 BINARY(0) NOT NULL, +b1 BINARY(1) NOT NULL, +b20 BINARY(20) NOT NULL, +b255 BINARY(255) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b binary(1) # # # # +b0 binary(0) # # # # +b1 binary(1) # # # # +b20 binary(20) # # # # +b255 binary(255) # # # # +INSERT INTO t1 VALUES ('','','','',''); +INSERT INTO t1 VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.'); +SELECT HEX(b), HEX(b0), HEX(b1), HEX(b20), HEX(b255) FROM t1; +HEX(b) HEX(b0) HEX(b1) HEX(b20) HEX(b255) +00 00 0000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +61 62 616263646566676869206B6C6D6E6F7071727374 4372656174696E6720616E2061727469636C6520666F7220746865204B6E6F776C65646765626173652069732073696D696C617220746F2061736B696E67207175657374696F6E732E2046697273742C206E6176696761746520746F207468652063617465676F727920776865726520796F75206665656C207468652061727469636C652073686F756C642062652E204F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C726561647920657869737420776869636820776F756C6420776F726B2E00000000000000000000000000000000000000000000000000000000000000 +INSERT INTO t1 VALUES ('abc', 'a', 'abc', REPEAT('a',21), REPEAT('x',256)); +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b0' at row 1 +Warning 1265 Data truncated for column 'b1' at row 1 +Warning 1265 Data truncated for column 'b20' at row 1 +Warning 1265 Data truncated for column 'b255' at row 1 +INSERT INTO t1 SELECT b255, b255, b255, b255, CONCAT(b255,b255) FROM t1; +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b0' at row 1 +Warning 1265 Data truncated for column 'b1' at row 1 +Warning 1265 Data truncated for column 'b20' at row 1 +Warning 1265 Data truncated for column 'b255' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'b0' at row 2 +Warning 1265 Data truncated for column 'b1' at row 2 +Warning 1265 Data truncated for column 'b20' at row 2 +Warning 1265 Data truncated for column 'b255' at row 2 +Warning 1265 Data truncated for column 'b' at row 3 +Warning 1265 Data truncated for column 'b0' at row 3 +Warning 1265 Data truncated for column 'b1' at row 3 +Warning 1265 Data truncated for column 'b20' at row 3 +Warning 1265 Data truncated for column 'b255' at row 3 +SELECT HEX(b), HEX(b0), HEX(b1), HEX(b20), HEX(b255) FROM t1; +HEX(b) HEX(b0) HEX(b1) HEX(b20) HEX(b255) +00 00 0000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00 00 0000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +43 43 4372656174696E6720616E2061727469636C6520 4372656174696E6720616E2061727469636C6520666F7220746865204B6E6F776C65646765626173652069732073696D696C617220746F2061736B696E67207175657374696F6E732E2046697273742C206E6176696761746520746F207468652063617465676F727920776865726520796F75206665656C207468652061727469636C652073686F756C642062652E204F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C726561647920657869737420776869636820776F756C6420776F726B2E00000000000000000000000000000000000000000000000000000000000000 +61 61 6161616161616161616161616161616161616161 787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 +61 62 616263646566676869206B6C6D6E6F7071727374 4372656174696E6720616E2061727469636C6520666F7220746865204B6E6F776C65646765626173652069732073696D696C617220746F2061736B696E67207175657374696F6E732E2046697273742C206E6176696761746520746F207468652063617465676F727920776865726520796F75206665656C207468652061727469636C652073686F756C642062652E204F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C726561647920657869737420776869636820776F756C6420776F726B2E00000000000000000000000000000000000000000000000000000000000000 +78 78 7878787878787878787878787878787878787878 787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 +ALTER TABLE t1 ADD COLUMN b257 BINARY(257) NOT NULL; +ERROR 42000: Column length too big for column 'b257' (max = 255); use BLOB or TEXT instead +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b binary(1) # # # # +b0 binary(0) # # # # +b1 binary(1) # # # # +b20 binary(20) # # # # +b255 binary(255) # # # # +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BINARY NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c binary(1) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c BINARY NOT NULL, +c2 BINARY NOT NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c binary(1) NO NULL +c2 binary(1) NO 0 +ALTER TABLE t1 ADD COLUMN err BINARY NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (0); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# VARBINARY columns +# +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (v0 VARBINARY(0) NOT NULL, +v1 VARBINARY(1) NOT NULL, +v64 VARBINARY(64) NOT NULL, +v65000 VARBINARY(65000) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varbinary(0) # # # +v1 varbinary(1) # # # +v64 varbinary(64) # # # +v65000 varbinary(65000) # # # +CREATE TABLE t2 (v VARBINARY(65532) NOT NULL) ENGINE= ; +SHOW COLUMNS IN t2; +Field Type Null Key Default Extra +v varbinary(65532) # # # +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','',''); +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off. + + If you want to have your favorite MySQL / MariaDB book listed here, please leave a comment. + For developers who want to code on MariaDB or MySQL + + * Understanding MySQL Internals by Sasha Pachev, former MySQL developer at MySQL AB. + o This is the only book we know about that describes the internals of MariaDB / MySQL. A must have for anyone who wants to understand and develop on MariaDB! + o Not all topics are covered and some parts are slightly outdated, but still the best book on this topic. + * MySQL 5.1 Plugin Development by Sergei Golubchik and Andrew Hutchings + o A must read for anyone wanting to write a plugin for MariaDB, written by the Sergei who designed the plugin interface for MySQL and MariaDB! + + For MariaDB / MySQL end users + + * MariaDB Crash Course by Ben Forta + o First MariaDB book! + o For people who want to learn SQL and the basics of MariaDB. + o Now shipping. Purchase at Amazon.com or your favorite bookseller. + + * SQL-99 Complete, Really by Peter Gulutzan & Trudy Pelzer. + o Everything you wanted to know about the SQL 99 standard. Excellent reference book! + o Free to read in the Knowledgebase! + + * MySQL (4th Edition) by Paul DuBois + o The \'default\' book to read if you wont to learn to use MySQL / MariaDB. + + * MySQL Cookbook by Paul DuBois + o A lot of examples of how to use MySQL. As with all of Paul\'s books, it\'s worth its weight in gold and even enjoyable reading for such a \'dry\' subject. + + * High Performance MySQL, Second Edition, By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek J. Balling, et al. + o \"High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity. Learn advanced techniques in depth so you can bring out MySQL\'s full power.\" (From the book description at O\'Reilly) + + * MySQL Admin Cookbook + o A quick step-by-step guide for MySQL users and database administrators to tackle real-world challenges with MySQL configuration and administration + + * MySQL 5.0 Certification Study Guide, By Paul DuBois, Stefan Hinz, Carsten Pedersen + o This is the official guide to cover the passing of the two MySQL Certification examinations. It is valid till version 5.0 of the server, so while it misses all the features available in MySQL 5.1 and greater (including MariaDB 5.1 and greater), it provides a good basic understanding of MySQL for the end-user. '); +SELECT HEX(v0), HEX(v1), HEX(v64), HEX(v65000) FROM t1; +HEX(v0) HEX(v1) HEX(v64) HEX(v65000) + + 79 4F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C7265616479206578697374 486572652069732061206C697374206F66207265636F6D6D656E64656420626F6F6B73206F6E204D61726961444220616E64204D7953514C2E2057652776652070726F7669646564206C696E6B7320746F20416D617A6F6E2E636F6D206865726520666F7220636F6E76656E69656E63652C2062757420746865792063616E20626520666F756E64206174206D616E79206F7468657220626F6F6B73746F7265732C20626F7468206F6E6C696E6520616E64206F66662E0A0A2020496620796F752077616E7420746F206861766520796F7572206661766F72697465204D7953514C202F204D61726961444220626F6F6B206C697374656420686572652C20706C65617365206C65617665206120636F6D6D656E742E0A2020466F7220646576656C6F706572732077686F2077616E7420746F20636F6465206F6E204D617269614442206F72204D7953514C0A0A2020202020202A20556E6465727374616E64696E67204D7953514C20496E7465726E616C73206279205361736861205061636865762C20666F726D6572204D7953514C20646576656C6F706572206174204D7953514C2041422E0A2020202020202020202020206F205468697320697320746865206F6E6C7920626F6F6B207765206B6E6F772061626F75742074686174206465736372696265732074686520696E7465726E616C73206F66204D617269614442202F204D7953514C2E2041206D757374206861766520666F7220616E796F6E652077686F2077616E747320746F20756E6465727374616E6420616E6420646576656C6F70206F6E204D617269614442210A2020202020202020202020206F204E6F7420616C6C20746F706963732061726520636F766572656420616E6420736F6D652070617274732061726520736C696768746C79206F757464617465642C20627574207374696C6C20746865206265737420626F6F6B206F6E207468697320746F7069632E200A2020202020202A204D7953514C20352E3120506C7567696E20446576656C6F706D656E742062792053657267656920476F6C75626368696B20616E6420416E64726577204875746368696E67730A2020202020202020202020206F2041206D757374207265616420666F7220616E796F6E652077616E74696E6720746F207772697465206120706C7567696E20666F72204D6172696144422C207772697474656E20627920746865205365726765692077686F2064657369676E65642074686520706C7567696E20696E7465726661636520666F72204D7953514C20616E64204D61726961444221200A0A2020466F72204D617269614442202F204D7953514C20656E642075736572730A0A2020202020202A204D61726961444220437261736820436F757273652062792042656E20466F7274610A2020202020202020202020206F204669727374204D61726961444220626F6F6B210A2020202020202020202020206F20466F722070656F706C652077686F2077616E7420746F206C6561726E2053514C20616E642074686520626173696373206F66204D6172696144422E0A2020202020202020202020206F204E6F77207368697070696E672E20507572636861736520617420416D617A6F6E2E636F6D206F7220796F7572206661766F7269746520626F6F6B73656C6C65722E200A0A2020202020202A2053514C2D393920436F6D706C6574652C205265616C6C792062792050657465722047756C75747A616E20262054727564792050656C7A65722E0A2020202020202020202020206F2045766572797468696E6720796F752077616E74656420746F206B6E6F772061626F7574207468652053514C203939207374616E646172642E20457863656C6C656E74207265666572656E636520626F6F6B210A2020202020202020202020206F204672656520746F207265616420696E20746865204B6E6F776C656467656261736521200A0A2020202020202A204D7953514C20283474682045646974696F6E29206279205061756C204475426F69730A2020202020202020202020206F20546865202764656661756C742720626F6F6B20746F207265616420696620796F7520776F6E7420746F206C6561726E20746F20757365204D7953514C202F204D6172696144422E200A0A2020202020202A204D7953514C20436F6F6B626F6F6B206279205061756C204475426F69730A2020202020202020202020206F2041206C6F74206F66206578616D706C6573206F6620686F7720746F20757365204D7953514C2E204173207769746820616C6C206F66205061756C277320626F6F6B732C206974277320776F727468206974732077656967687420696E20676F6C6420616E64206576656E20656E6A6F7961626C652072656164696E6720666F7220737563682061202764727927207375626A6563742E200A0A2020202020202A204869676820506572666F726D616E6365204D7953514C2C205365636F6E642045646974696F6E2C204279204261726F6E20536368776172747A2C205065746572205A6169747365762C20566164696D20546B616368656E6B6F2C204A6572656D7920442E205A61776F646E792C2041726A656E204C656E747A2C20446572656B204A2E2042616C6C696E672C20657420616C2E0A2020202020202020202020206F20224869676820506572666F726D616E6365204D7953514C2069732074686520646566696E697469766520677569646520746F206275696C64696E6720666173742C2072656C6961626C652073797374656D732077697468204D7953514C2E205772697474656E206279206E6F74656420657870657274732077697468207965617273206F66207265616C2D776F726C6420657870657269656E6365206275696C64696E672076657279206C617267652073797374656D732C207468697320626F6F6B20636F7665727320657665727920617370656374206F66204D7953514C20706572666F726D616E636520696E2064657461696C2C20616E6420666F6375736573206F6E20726F627573746E6573732C2073656375726974792C20616E64206461746120696E746567726974792E204C6561726E20616476616E63656420746563686E697175657320696E20646570746820736F20796F752063616E206272696E67206F7574204D7953514C27732066756C6C20706F7765722E22202846726F6D2074686520626F6F6B206465736372697074696F6E206174204F275265696C6C7929200A0A2020202020202A204D7953514C2041646D696E20436F6F6B626F6F6B0A2020202020202020202020206F204120717569636B20737465702D62792D7374657020677569646520666F72204D7953514C20757365727320616E642064617461626173652061646D696E6973747261746F727320746F207461636B6C65207265616C2D776F726C64206368616C6C656E6765732077697468204D7953514C20636F6E66696775726174696F6E20616E642061646D696E697374726174696F6E200A0A2020202020202A204D7953514C20352E302043657274696669636174696F6E2053747564792047756964652C204279205061756C204475426F69732C2053746566616E2048696E7A2C204361727374656E20506564657273656E0A2020202020202020202020206F205468697320697320746865206F6666696369616C20677569646520746F20636F766572207468652070617373696E67206F66207468652074776F204D7953514C2043657274696669636174696F6E206578616D696E6174696F6E732E2049742069732076616C69642074696C6C2076657273696F6E20352E30206F6620746865207365727665722C20736F207768696C65206974206D697373657320616C6C2074686520666561747572657320617661696C61626C6520696E204D7953514C20352E3120616E6420677265617465722028696E636C7564696E67204D61726961444220352E3120616E642067726561746572292C2069742070726F7669646573206120676F6F6420626173696320756E6465727374616E64696E67206F66204D7953514C20666F722074686520656E642D757365722E20 +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('y', 'yy', REPEAT('c',65), REPEAT('abcdefghi ',6501)); +Warnings: +Warning 1265 Data truncated for column 'v0' at row 1 +Warning 1265 Data truncated for column 'v1' at row 1 +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, v65000, CONCAT(v65000,v1) FROM t1; +Warnings: +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 + 0 + 48 486572652069732061206C697374206F66207265636F6D6D656E64656420626F6F6B73206F6E204D61726961444220616E64204D7953514C2E20576527766520 5932 + 61 61626364656667686920616263646566676869206162636465666768692061626364656667686920616263646566676869206162636465666768692061626364 130000 + 79 4F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C7265616479206578697374 5930 + 79 63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 130000 +ALTER TABLE t1 ADD COLUMN v65536 VARBINARY(65536) NOT NULL; +Warnings: +Note 1246 Converting column 'v65536' from VARBINARY to BLOB +Note 1246 Converting column 'v65536' from VARBINARY to BLOB +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varbinary(0) # # # +v1 varbinary(1) # # # +v64 varbinary(64) # # # +v65000 varbinary(65000) # # # +v65536 mediumblob # # # +DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c VARBINARY(64) NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varbinary(64) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c VARBINARY(64) NOT NULL, +c2 VARBINARY(64) NOT NULL DEFAULT 'test' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varbinary(64) NO NULL +c2 varbinary(64) NO test +ALTER TABLE t1 ADD COLUMN err VARBINARY(64) NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('test'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# BIT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a BIT NOT NULL, +b BIT(20) NOT NULL, +c BIT(64) NOT NULL, +d BIT(1) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a bit(1) # # # +b bit(20) # # # +c bit(64) # # # +d bit(1) # # # +ALTER TABLE t1 DROP COLUMN d; +ALTER TABLE t1 ADD COLUMN d BIT(0) NOT NULL; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a bit(1) # # # +b bit(20) # # # +c bit(64) # # # +d bit(1) # # # +INSERT INTO t1 VALUES (0,POW(2,20)-1,b'1111111111111111111111111111111111111111111111111111111111111111',1); +SELECT BIN(a), HEX(b), c+0 FROM t1 WHERE d>0; +BIN(a) HEX(b) c+0 +0 FFFFF 18446744073709551615 +INSERT INTO t1 VALUES (1,0,-1,0); +SELECT a+0, b+0, c+0 FROM t1 WHERE d<100; +a+0 b+0 c+0 +0 1048575 18446744073709551615 +1 0 18446744073709551615 +INSERT INTO t1 VALUES (b'1', 'f', 0xFF, 0x0); +SELECT a+0, b+0, c+0 FROM t1 WHERE d IN (0, 2); +a+0 b+0 c+0 +1 0 18446744073709551615 +1 102 255 +INSERT INTO t1 VALUES (0x10,0,0,1); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t1; +a b c d +INSERT INTO t1 VALUES (0x01,0,0x10000000000000000,0); +Warnings: +Warning 1264 Out of range value for column 'c' at row 1 +SELECT * FROM t1; +a b c d +DROP TABLE t1; +CREATE TABLE t1 (a BIT(65) NOT NULL) ENGINE= ; +ERROR 42000: Display width out of range for 'a' (max = 64) +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BIT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bit(1) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c BIT NOT NULL, +c2 BIT NOT NULL DEFAULT 1 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bit(1) NO NULL +c2 bit(1) NO b'1' +ALTER TABLE t1 ADD COLUMN err BIT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (1); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# BLOB columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (b BLOB NOT NULL, +b0 BLOB(0) NOT NULL, +b1 BLOB(1) NOT NULL, +b300 BLOB(300) NOT NULL, +bm BLOB(65535) NOT NULL, +b70k BLOB(70000) NOT NULL, +b17m BLOB(17000000) NOT NULL, +t TINYBLOB NOT NULL, +m MEDIUMBLOB NOT NULL, +l LONGBLOB NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b blob # # # +b0 blob # # # +b1 tinyblob # # # +b300 blob # # # +bm blob # # # +b70k mediumblob # # # +b17m longblob # # # +t tinyblob # # # +m mediumblob # # # +l longblob # # # +INSERT INTO t1 VALUES +('','','','','','','','','',''), +('a','b','c','d','e','f','g','h','i','j'), +('test1','test2','test3','test4','test5','test6','test7','test8','test9','test10'), +( REPEAT('a',65535), REPEAT('b',65535), REPEAT('c',255), REPEAT('d',65535), REPEAT('e',65535), REPEAT('f',1048576), HEX(REPEAT('g',1048576)), REPEAT('h',255), REPEAT('i',1048576), HEX(REPEAT('j',1048576)) ); +SELECT LENGTH(b), LENGTH(b0), LENGTH(b1), LENGTH(b300), LENGTH(bm), LENGTH(b70k), LENGTH(b17m), LENGTH(t), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(b) LENGTH(b0) LENGTH(b1) LENGTH(b300) LENGTH(bm) LENGTH(b70k) LENGTH(b17m) LENGTH(t) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 2097152 255 1048576 2097152 +INSERT INTO t1 VALUES +( REPEAT('a',65536), REPEAT('b',65536), REPEAT('c',256), REPEAT('d',65536), REPEAT('e',65536), REPEAT('f',1048576), REPEAT('g',1048576), REPEAT('h',256), REPEAT('i',1048576), REPEAT('j',1048576) ); +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b0' at row 1 +Warning 1265 Data truncated for column 'b1' at row 1 +Warning 1265 Data truncated for column 'b300' at row 1 +Warning 1265 Data truncated for column 'bm' at row 1 +Warning 1265 Data truncated for column 't' at row 1 +SELECT LENGTH(b), LENGTH(b0), LENGTH(b1), LENGTH(b300), LENGTH(bm), LENGTH(b70k), LENGTH(b17m), LENGTH(t), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(b) LENGTH(b0) LENGTH(b1) LENGTH(b300) LENGTH(bm) LENGTH(b70k) LENGTH(b17m) LENGTH(t) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +65535 65535 255 65535 65535 1048576 2097152 255 1048576 2097152 +ALTER TABLE t1 ADD COLUMN bbb BLOB(4294967296); +ERROR 42000: Display width out of range for 'bbb' (max = 4294967295) +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BLOB NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c blob NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TINYBLOB NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyblob NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c MEDIUMBLOB NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumblob NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c LONGBLOB NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c longblob NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +# +# BOOL columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (b1 BOOL NOT NULL, +b2 BOOLEAN NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b1 tinyint(1) # # # +b2 tinyint(1) # # # +INSERT INTO t1 VALUES (1,TRUE); +SELECT * FROM t1; +b1 b2 +1 1 +INSERT INTO t1 VALUES (FALSE,0); +SELECT * FROM t1; +b1 b2 +0 0 +1 1 +INSERT INTO t1 VALUES (2,3); +SELECT * FROM t1; +b1 b2 +0 0 +1 1 +2 3 +INSERT INTO t1 VALUES (-1,-2); +SELECT * FROM t1; +b1 b2 +-1 -2 +0 0 +1 1 +2 3 +SELECT IF(b1,'true','false') AS a, IF(b2,'true','false') AS b FROM t1; +a b +false false +true true +true true +true true +SELECT * FROM t1 WHERE b1 = TRUE; +b1 b2 +1 1 +SELECT * FROM t1 WHERE b2 = FALSE; +b1 b2 +0 0 +INSERT INTO t1 VALUES ('a','b'); +Warnings: +Warning 1366 Incorrect integer value: 'a' for column 'b1' at row 1 +Warning 1366 Incorrect integer value: 'b' for column 'b2' at row 1 +SELECT * FROM t1; +b1 b2 +-1 -2 +0 0 +0 0 +1 1 +2 3 +INSERT INTO t1 VALUES (128,-129); +Warnings: +Warning 1264 Out of range value for column 'b1' at row 1 +Warning 1264 Out of range value for column 'b2' at row 1 +SELECT * FROM t1; +b1 b2 +-1 -2 +0 0 +0 0 +1 1 +127 -128 +2 3 +ALTER TABLE t1 ADD COLUMN b3 BOOLEAN UNSIGNED; +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 'UNSIGNED' at line 1 +ALTER TABLE t1 ADD COLUMN b3 BOOL ZEROFILL; +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 'ZEROFILL' at line 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BOOL NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(1) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c BOOL NOT NULL, +c2 BOOL NOT NULL DEFAULT '0' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(1) NO NULL +c2 tinyint(1) NO 0 +ALTER TABLE t1 ADD COLUMN err BOOL NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('0'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# CHAR columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c CHAR NOT NULL, +c0 CHAR(0) NOT NULL, +c1 CHAR(1) NOT NULL, +c20 CHAR(20) NOT NULL, +c255 CHAR(255) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c char(1) # # # +c0 char(0) # # # +c1 char(1) # # # +c20 char(20) # # # +c255 char(255) # # # +INSERT INTO t1 VALUES ('','','','',''); +INSERT INTO t1 VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.'); +SELECT * FROM t1; +c c0 c1 c20 c255 + +a b abcdefghi klmnopqrst Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work. +INSERT INTO t1 VALUES ('abc', 'a', 'abc', REPEAT('a',21), REPEAT('x',256)); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'c0' at row 1 +Warning 1265 Data truncated for column 'c1' at row 1 +Warning 1265 Data truncated for column 'c20' at row 1 +Warning 1265 Data truncated for column 'c255' at row 1 +INSERT INTO t1 SELECT c255, c255, c255, c255, CONCAT(c255,c1) FROM t1; +Warnings: +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 * FROM t1; +c c0 c1 c20 c255 + + +C C Creating an article Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work.b +a a aaaaaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +a b abcdefghi klmnopqrst Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work. +x x xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +SELECT DISTINCT c20, REPEAT('a',LENGTH(c20)), COUNT(*) FROM t1 GROUP BY c1, c20; +c20 REPEAT('a',LENGTH(c20)) COUNT(*) + 2 +Creating an article aaaaaaaaaaaaaaaaaaa 1 +aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaa 1 +abcdefghi klmnopqrst aaaaaaaaaaaaaaaaaaaa 1 +xxxxxxxxxxxxxxxxxxxx aaaaaaaaaaaaaaaaaaaa 1 +ALTER TABLE t1 ADD COLUMN c257 CHAR(257) NOT NULL; +ERROR 42000: Column length too big for column 'c257' (max = 255); use BLOB or TEXT instead +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c CHAR NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c char(1) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c CHAR NOT NULL, +c2 CHAR NOT NULL DEFAULT '_' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c char(1) NO NULL +c2 char(1) NO _ +ALTER TABLE t1 ADD COLUMN err CHAR NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('_'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# VARCHAR columns +# +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (v0 VARCHAR(0) NOT NULL, +v1 VARCHAR(1) NOT NULL, +v64 VARCHAR(64) NOT NULL, +v65000 VARCHAR(65000) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varchar(0) # # # +v1 varchar(1) # # # +v64 varchar(64) # # # +v65000 varchar(65000) # # # +CREATE TABLE t2 (v VARCHAR(65532) NOT NULL) ENGINE= ; +SHOW COLUMNS IN t2; +Field Type Null Key Default Extra +v varchar(65532) # # # +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','',''); +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off. + + If you want to have your favorite MySQL / MariaDB book listed here, please leave a comment. + For developers who want to code on MariaDB or MySQL + + * Understanding MySQL Internals by Sasha Pachev, former MySQL developer at MySQL AB. + o This is the only book we know about that describes the internals of MariaDB / MySQL. A must have for anyone who wants to understand and develop on MariaDB! + o Not all topics are covered and some parts are slightly outdated, but still the best book on this topic. + * MySQL 5.1 Plugin Development by Sergei Golubchik and Andrew Hutchings + o A must read for anyone wanting to write a plugin for MariaDB, written by the Sergei who designed the plugin interface for MySQL and MariaDB! + + For MariaDB / MySQL end users + + * MariaDB Crash Course by Ben Forta + o First MariaDB book! + o For people who want to learn SQL and the basics of MariaDB. + o Now shipping. Purchase at Amazon.com or your favorite bookseller. + + * SQL-99 Complete, Really by Peter Gulutzan & Trudy Pelzer. + o Everything you wanted to know about the SQL 99 standard. Excellent reference book! + o Free to read in the Knowledgebase! + + * MySQL (4th Edition) by Paul DuBois + o The \'default\' book to read if you wont to learn to use MySQL / MariaDB. + + * MySQL Cookbook by Paul DuBois + o A lot of examples of how to use MySQL. As with all of Paul\'s books, it\'s worth its weight in gold and even enjoyable reading for such a \'dry\' subject. + + * High Performance MySQL, Second Edition, By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek J. Balling, et al. + o \"High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity. Learn advanced techniques in depth so you can bring out MySQL\'s full power.\" (From the book description at O\'Reilly) + + * MySQL Admin Cookbook + o A quick step-by-step guide for MySQL users and database administrators to tackle real-world challenges with MySQL configuration and administration + + * MySQL 5.0 Certification Study Guide, By Paul DuBois, Stefan Hinz, Carsten Pedersen + o This is the official guide to cover the passing of the two MySQL Certification examinations. It is valid till version 5.0 of the server, so while it misses all the features available in MySQL 5.1 and greater (including MariaDB 5.1 and greater), it provides a good basic understanding of MySQL for the end-user. '); +SELECT * FROM t1; +v0 v1 v64 v65000 + + + + + + + + + + + + y Once there, double check that an article doesn't already exist Here is a list of recommended books on MariaDB and MySQL. We've provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off. + o "High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity. Learn advanced techniques in depth so you can bring out MySQL's full power." (From the book description at O'Reilly) + o A lot of examples of how to use MySQL. As with all of Paul's books, it's worth its weight in gold and even enjoyable reading for such a 'dry' subject. + o A must read for anyone wanting to write a plugin for MariaDB, written by the Sergei who designed the plugin interface for MySQL and MariaDB! + o A quick step-by-step guide for MySQL users and database administrators to tackle real-world challenges with MySQL configuration and administration + o Everything you wanted to know about the SQL 99 standard. Excellent reference book! + o First MariaDB book! + o For people who want to learn SQL and the basics of MariaDB. + o Free to read in the Knowledgebase! + o Not all topics are covered and some parts are slightly outdated, but still the best book on this topic. + o Now shipping. Purchase at Amazon.com or your favorite bookseller. + o The 'default' book to read if you wont to learn to use MySQL / MariaDB. + o This is the official guide to cover the passing of the two MySQL Certification examinations. It is valid till version 5.0 of the server, so while it misses all the features available in MySQL 5.1 and greater (including MariaDB 5.1 and greater), it provides a good basic understanding of MySQL for the end-user. + o This is the only book we know about that describes the internals of MariaDB / MySQL. A must have for anyone who wants to understand and develop on MariaDB! + * High Performance MySQL, Second Edition, By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek J. Balling, et al. + * MariaDB Crash Course by Ben Forta + * MySQL (4th Edition) by Paul DuBois + * MySQL 5.0 Certification Study Guide, By Paul DuBois, Stefan Hinz, Carsten Pedersen + * MySQL 5.1 Plugin Development by Sergei Golubchik and Andrew Hutchings + * MySQL Admin Cookbook + * MySQL Cookbook by Paul DuBois + * SQL-99 Complete, Really by Peter Gulutzan & Trudy Pelzer. + * Understanding MySQL Internals by Sasha Pachev, former MySQL developer at MySQL AB. + For MariaDB / MySQL end users + For developers who want to code on MariaDB or MySQL + If you want to have your favorite MySQL / MariaDB book listed here, please leave a comment. +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('y', 'yy', REPEAT('c',65), REPEAT('abcdefghi ',6501)); +Warnings: +Warning 1265 Data truncated for column 'v0' at row 1 +Warning 1265 Data truncated for column 'v1' at row 1 +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, v65000, CONCAT(v65000,v1) FROM t1; +Warnings: +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 v0, v1, v64, LENGTH(v65000) FROM t1; +v0 v1 v64 LENGTH(v65000) + 0 + 0 + H Here is a list of recommended books on MariaDB and MySQL. We've 2966 + a abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcd 65000 + y Once there, double check that an article doesn't already exist 2965 + y cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 65000 +ALTER TABLE t1 ADD COLUMN v65536 VARCHAR(65536) NOT NULL; +Warnings: +Note 1246 Converting column 'v65536' from VARCHAR to TEXT +Note 1246 Converting column 'v65536' from VARCHAR to TEXT +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varchar(0) # # # +v1 varchar(1) # # # +v64 varchar(64) # # # +v65000 varchar(65000) # # # +v65536 mediumtext # # # +DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c VARCHAR(64) NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varchar(64) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c VARCHAR(64) NOT NULL, +c2 VARCHAR(64) NOT NULL DEFAULT 'test default' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varchar(64) NO NULL +c2 varchar(64) NO test default +ALTER TABLE t1 ADD COLUMN err VARCHAR(64) NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('test default'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# date and time columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (d DATE NOT NULL, +dt DATETIME NOT NULL, +ts TIMESTAMP NOT NULL, +t TIME NOT NULL, +y YEAR NOT NULL, +y4 YEAR(4) NOT NULL, +y2 YEAR(2) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +d date # # # +dt datetime # # # +ts timestamp # # # on update CURRENT_TIMESTAMP +t time # # # +y year(4) # # # +y4 year(4) # # # +y2 year(2) # # # +SET @tm = '2012-04-09 05:27:00'; +INSERT INTO t1 VALUES +('1000-01-01', '1000-01-01 00:00:00', FROM_UNIXTIME(1), '-838:59:59', '1901', '1901', '00'), +('9999-12-31', '9999-12-31 23:59:59', FROM_UNIXTIME(2147483647), '838:59:59', '2155', '2155', '99'), +('0000-00-00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '00:00:00', '0', '0', '0'), +(DATE(@tm),@tm,TIMESTAMP(@tm),TIME(@tm),YEAR(@tm),YEAR(@tm),YEAR(@tm)); +SELECT * FROM t1; +d dt ts t y y4 y2 +0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00 +1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 00 +2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12 +9999-12-31 9999-12-31 23:59:59 2038-01-19 07:14:07 838:59:59 2155 2155 99 +INSERT INTO t1 VALUES +('999-13-32', '999-11-31 00:00:00', '0', '-839:00:00', '1900', '1900', '-1' ); +Warnings: +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'dt' at row 1 +Warning 1265 Data truncated for column 'ts' at row 1 +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'y4' at row 1 +Warning 1264 Out of range value for column 'y2' at row 1 +SELECT * FROM t1; +d dt ts t y y4 y2 +0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 -838:59:59 0000 0000 00 +0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00 +1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 00 +2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12 +9999-12-31 9999-12-31 23:59:59 2038-01-19 07:14:07 838:59:59 2155 2155 99 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DATE NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c date NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c DATE NOT NULL, +c2 DATE NOT NULL DEFAULT '2012-12-21' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c date NO NULL +c2 date NO 2012-12-21 +ALTER TABLE t1 ADD COLUMN err DATE NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('2012-12-21'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DATETIME NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c datetime NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c DATETIME NOT NULL, +c2 DATETIME NOT NULL DEFAULT '2012-12-21 12:21:12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c datetime NO NULL +c2 datetime NO 2012-12-21 12:21:12 +ALTER TABLE t1 ADD COLUMN err DATETIME NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('2012-12-21 12:21:12'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +CREATE TABLE t1 (c TIMESTAMP NOT NULL, +c2 TIMESTAMP NOT NULL DEFAULT '2012-02-21 12:21:12' +) ENGINE= ; +ALTER TABLE t1 ADD COLUMN err TIMESTAMP NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +INSERT INTO t1 (c2) VALUES (NULL); +SELECT c, c2 FROM t1; +c c2 + + +DROP TABLE t1; +CREATE TABLE t1 (c TIMESTAMP NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +INSERT INTO t1 (c) VALUES (NULL); +SELECT * FROM t1; +c + +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TIME NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c time NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c TIME NOT NULL, +c2 TIME NOT NULL DEFAULT '12:21:12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c time NO NULL +c2 time NO 12:21:12 +ALTER TABLE t1 ADD COLUMN err TIME NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('12:21:12'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c YEAR NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(4) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c YEAR NOT NULL, +c2 YEAR NOT NULL DEFAULT '2012' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(4) NO NULL +c2 year(4) NO 2012 +ALTER TABLE t1 ADD COLUMN err YEAR NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('2012'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c YEAR(2) NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(2) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c YEAR(2) NOT NULL, +c2 YEAR(2) NOT NULL DEFAULT '12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(2) NO NULL +c2 year(2) NO 12 +ALTER TABLE t1 ADD COLUMN err YEAR(2) NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('12'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# ENUM columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a ENUM('') NOT NULL, +b ENUM('test1','test2','test3','test4','test5') NOT NULL, +c ENUM('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a enum('') # # # +b enum('test1','test2','test3','test4','test5') # # # +c enum('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') # # # +INSERT INTO t1 VALUES ('','test2','4'),('',5,2); +SELECT * FROM t1; +a b c + test2 4 + test5 2 +INSERT INTO t1 VALUES (0,'test6',-1); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1; +a b c + + test2 4 + test5 2 +ALTER TABLE t1 ADD COLUMN e ENUM('a','A') NOT NULL; +Warnings: +Note 1291 Column 'e' has duplicated value 'a' in ENUM +Note 1291 Column 'e' has duplicated value 'a' in ENUM +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a enum('') # # # +b enum('test1','test2','test3','test4','test5') # # # +c enum('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') # # # +e enum('a','A') # # # +INSERT INTO t1 VALUES ('','test3','75','A'); +SELECT * FROM t1; +a b c e + a + test2 4 a + test3 75 a + test5 2 a +SELECT * FROM t1 WHERE b='test2' OR a != ''; +a b c e + test2 4 a +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c ENUM('test1','test2','test3') NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c enum('test1','test2','test3') NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c ENUM('test1','test2','test3') NOT NULL, +c2 ENUM('test1','test2','test3') NOT NULL DEFAULT 'test2' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c enum('test1','test2','test3') NO NULL +c2 enum('test1','test2','test3') NO test2 +ALTER TABLE t1 ADD COLUMN err ENUM('test1','test2','test3') NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('test2'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# Fixed point columns (NUMERIC, DECIMAL) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (d DECIMAL NOT NULL, +d0 DECIMAL(0) NOT NULL, +d1_1 DECIMAL(1,1) NOT NULL, +d10_2 DECIMAL(10,2) NOT NULL, +d60_10 DECIMAL(60,10) NOT NULL, +n NUMERIC NOT NULL, +n0_0 NUMERIC(0,0) NOT NULL, +n1 NUMERIC(1) NOT NULL, +n20_4 NUMERIC(20,4) NOT NULL, +n65_4 NUMERIC(65,4) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +d decimal(10,0) # # # +d0 decimal(10,0) # # # +d1_1 decimal(1,1) # # # +d10_2 decimal(10,2) # # # +d60_10 decimal(60,10) # # # +n decimal(10,0) # # # +n0_0 decimal(10,0) # # # +n1 decimal(1,0) # # # +n20_4 decimal(20,4) # # # +n65_4 decimal(65,4) # # # +INSERT INTO t1 VALUES (100,123456,0.3,40000.25,123456789123456789.10001,1024,7000.0,8.0,999999.9,9223372036854775807); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (9999999999.0,9999999999.0,0.9,99999999.99,99999999999999999999999999999999999999999999999999.9999999999,9999999999.0,9999999999.0,9.0,9999999999999999.9999,9999999999999999999999999999999999999999999999999999999999999.9999); +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (-100,-123456,-0.3,-40000.25,-123456789123456789.10001,-1024,-7000.0,-8.0,-999999.9,-9223372036854775807); +INSERT INTO t1 VALUES (-9999999999.0,-9999999999.0,-0.9,-99999999.99,-99999999999999999999999999999999999999999999999999.9999999999,-9999999999.0,-9999999999.0,-9.0,-9999999999999999.9999,-9999999999999999999999999999999999999999999999999999999999999.9999); +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +SELECT * FROM t1 WHERE n20_4 = 9999999999999999.9999 OR d < 100; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 SELECT n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4 FROM t1 WHERE n65_4 = ( SELECT MAX(n65_4) FROM t1 ); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (10000000000.0,10000000000.0,1.1,100000000.99,100000000000000000000000000000000000000000000000000.0,10000000000.0,10000000000.0,10.0,10000000000000000.9999,10000000000000000000000000000000000000000000000000000000000000.9999); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (9999999999.1,9999999999.1,1.9,99999999.001,99999999999999999999999999999999999999999999999999.99999999991,9999999999.1,9999999999.1,9.1,9999999999999999.00001,9999999999999999999999999999999999999999999999999999999999999.11111); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +Note 1265 Data truncated for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Note 1265 Data truncated for column 'd10_2' at row 1 +Note 1265 Data truncated for column 'd60_10' at row 1 +Note 1265 Data truncated for column 'n' at row 1 +Note 1265 Data truncated for column 'n0_0' at row 1 +Note 1265 Data truncated for column 'n1' at row 1 +Note 1265 Data truncated for column 'n20_4' at row 1 +Note 1265 Data truncated for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.00 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.0000 9999999999999999999999999999999999999999999999999999999999999.1111 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66); +ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6); +ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66); +ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DECIMAL NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c DECIMAL NOT NULL, +c2 DECIMAL NOT NULL DEFAULT 1.1 +) ENGINE= ; +Warnings: +Note 1265 Data truncated for column 'c2' at row 1 +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) NO NULL +c2 decimal(10,0) NO 1 +ALTER TABLE t1 ADD COLUMN err DECIMAL NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (1.1); +Warnings: +Note 1265 Data truncated for column 'c' at row 1 +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c NUMERIC NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c NUMERIC NOT NULL, +c2 NUMERIC NOT NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) NO NULL +c2 decimal(10,0) NO 0 +ALTER TABLE t1 ADD COLUMN err NUMERIC NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (0); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# Floating point columns (FLOAT, DOUBLE) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f FLOAT NOT NULL, +f0 FLOAT(0) NOT NULL, +r1_1 REAL(1,1) NOT NULL, +f23_0 FLOAT(23) NOT NULL, +f20_3 FLOAT(20,3) NOT NULL, +d DOUBLE NOT NULL, +d1_0 DOUBLE(1,0) NOT NULL, +d10_10 DOUBLE PRECISION (10,10) NOT NULL, +d53 DOUBLE(53,0) NOT NULL, +d53_10 DOUBLE(53,10) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +f float # # # +f0 float # # # +r1_1 double(1,1) # # # +f23_0 float # # # +f20_3 float(20,3) # # # +d double # # # +d1_0 double(1,0) # # # +d10_10 double(10,10) # # # +d53 double(53,0) # # # +d53_10 double(53,10) # # # +INSERT INTO t1 VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999); +SELECT * FROM t1; +f 12345.1 +d 11111111.111 +d10_10 0.0123456789 +d1_0 8 +d53 1234566789123456800 +d53_10 100000000000000000.0000000000 +f0 12345.1 +f20_3 56789.988 +f23_0 123457000 +r1_1 0.9 +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES ( +99999999999999999999999999999999999999, +99999999999999999999999999999999999999.9999999999999999, +0.9, +99999999999999999999999999999999999999.9, +99999999999999999.999, +999999999999999999999999999999999999999999999999999999999999999999999999999999999, +9, +0.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d 0 +d 11111111.111 +d 1e81 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 0 +d1_0 8 +d1_0 9 +d53 0 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 0 +f 1e38 +f0 0 +f0 12345.1 +f0 1e38 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999); +SELECT * FROM t1; +f 12345.1 +d -1e60 +d 0 +d 11111111.111 +d 1e81 +d10_10 -0.9999999999 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 -9 +d1_0 0 +d1_0 8 +d1_0 9 +d53 -1000000000000000000000000000000 +d53 0 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 -10000000000000000000000000000000000000000000.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f -1e24 +f 0 +f 1e38 +f0 -100000000000 +f0 0 +f0 12345.1 +f0 1e38 +f20_3 -99999998430674940.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f23_0 -1000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +r1_1 -0.9 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +SELECT MAX(f), MAX(f0), MAX(r1_1), MAX(f23_0), MAX(f20_3), MAX(d), MAX(d1_0), MAX(d10_10), MAX(d53), MAX(d53_10) FROM t1; +MAX(f) 9.999999680285692e37 +MAX(d) 1e81 +MAX(d10_10) 0.9999999999 +MAX(d1_0) 9 +MAX(d53) 100000000000000000000000000000000000000000000000000000 +MAX(d53_10) 10000000000000000000000000000000000000000000.0000000000 +MAX(f0) 9.999999680285692e37 +MAX(f20_3) 99999998430674940.000 +MAX(f23_0) 9.999999680285692e37 +MAX(r1_1) 0.9 +INSERT INTO t1 SELECT d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10 FROM t1 ORDER BY d53_10 DESC LIMIT 1; +Warnings: +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +SELECT * FROM t1; +f 12345.1 +d -1e60 +d 0 +d 11111111.111 +d 1e43 +d 1e81 +d10_10 -0.9999999999 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 -9 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d53 -1000000000000000000000000000000 +d53 0 +d53 10000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 -10000000000000000000000000000000000000000000.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f -1e24 +f 0 +f 1e38 +f 3.40282e38 +f0 -100000000000 +f0 0 +f0 12345.1 +f0 1e38 +f0 3.40282e38 +f20_3 -99999998430674940.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 -1000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +f23_0 3.40282e38 +r1_1 -0.9 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES ( +999999999999999999999999999999999999999, +999999999999999999999999999999999999999.9999999999999999, +1.9, +999999999999999999999999999999999999999.9, +999999999999999999.999, +9999999999999999999999999999999999999999999999999999999999999999999999999999999999, +99, +1.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated. +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +Warning 1264 Out of range value for column 'd10_10' at row 1 +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d -1e60 +d 0 +d 11111111.111 +d 1e43 +d 1e65 +d 1e81 +d10_10 -0.9999999999 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 -9 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d1_0 9 +d53 -1000000000000000000000000000000 +d53 0 +d53 10000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 -10000000000000000000000000000000000000000000.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f -1e24 +f 0 +f 1e38 +f 3.40282e38 +f 3.40282e38 +f0 -100000000000 +f0 0 +f0 12345.1 +f0 1e38 +f0 3.40282e38 +f0 3.40282e38 +f20_3 -99999998430674940.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 -1000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +f23_0 3.40282e38 +f23_0 3.40282e38 +r1_1 -0.9 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0); +ERROR 42000: Display width out of range for 'd0_0' (max = 255) +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1); +ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35); +ERROR 42000: Too big scale 35 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c FLOAT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c float NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c FLOAT NOT NULL, +c2 FLOAT NOT NULL DEFAULT 1.1 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c float NO NULL +c2 float NO 1.1 +ALTER TABLE t1 ADD COLUMN err FLOAT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (1.1 ); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DOUBLE NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c double NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c DOUBLE NOT NULL, +c2 DOUBLE NOT NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c double NO NULL +c2 double NO 0 +ALTER TABLE t1 ADD COLUMN err DOUBLE NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (0); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# INT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (i INT NOT NULL, +i0 INT(0) NOT NULL, +i1 INT(1) NOT NULL, +i20 INT(20) NOT NULL, +t TINYINT NOT NULL, +t0 TINYINT(0) NOT NULL, +t1 TINYINT(1) NOT NULL, +t20 TINYINT(20) NOT NULL, +s SMALLINT NOT NULL, +s0 SMALLINT(0) NOT NULL, +s1 SMALLINT(1) NOT NULL, +s20 SMALLINT(20) NOT NULL, +m MEDIUMINT NOT NULL, +m0 MEDIUMINT(0) NOT NULL, +m1 MEDIUMINT(1) NOT NULL, +m20 MEDIUMINT(20) NOT NULL, +b BIGINT NOT NULL, +b0 BIGINT(0) NOT NULL, +b1 BIGINT(1) NOT NULL, +b20 BIGINT(20) NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +i int(11) # # # +i0 int(11) # # # +i1 int(1) # # # +i20 int(20) # # # +t tinyint(4) # # # +t0 tinyint(4) # # # +t1 tinyint(1) # # # +t20 tinyint(20) # # # +s smallint(6) # # # +s0 smallint(6) # # # +s1 smallint(1) # # # +s20 smallint(20) # # # +m mediumint(9) # # # +m0 mediumint(9) # # # +m1 mediumint(1) # # # +m20 mediumint(20) # # # +b bigint(20) # # # +b0 bigint(20) # # # +b1 bigint(1) # # # +b20 bigint(20) # # # +INSERT INTO t1 VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (2147483647,2147483647,2147483647,2147483647,127,127,127,127,32767,32767,32767,32767,8388607,8388607,8388607,8388607,9223372036854775807,9223372036854775807,9223372036854775807,9223372036854775807); +SELECT * 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 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +INSERT INTO t1 VALUES (-2147483648,-2147483648,-2147483648,-2147483648,-128,-128,-128,-128,-32768,-32768,-32768,-32768,-8388608,-8388608,-8388608,-8388608,-9223372036854775808,-9223372036854775808,-9223372036854775808,-9223372036854775808); +INSERT INTO t1 VALUES (4294967295,4294967295,4294967295,4294967295,255,255,255,255,65535,65535,65535,65535,16777215,16777215,16777215,16777215,18446744073709551615,18446744073709551615,18446744073709551615,18446744073709551615); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +Warning 1264 Out of range value for column 'b1' at row 1 +Warning 1264 Out of range value for column 'b20' at row 1 +SELECT * 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 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +INSERT INTO t1 VALUES (-2147483649,-2147483649,-2147483649,-2147483649,-129,-129,-129,-129,-32769,-32769,-32769,-32769,-8388609,-8388609,-8388609,-8388609,-9223372036854775809,-9223372036854775809,-9223372036854775809,-9223372036854775809); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 VALUES (4294967296,4294967296,4294967296,4294967296,256,256,256,256,65536,65536,65536,65536,16777216,16777216,16777216,16777216,18446744073709551616,18446744073709551616,18446744073709551616,18446744073709551616); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 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 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 * 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 +-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 +-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 +-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +ALTER TABLE t1 ADD COLUMN i257 INT(257); +ERROR 42000: Display width out of range for 'i257' (max = 255) +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c INT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c int(11) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c INT NOT NULL, +c2 INT NOT NULL DEFAULT 2147483647 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c int(11) NO NULL +c2 int(11) NO 2147483647 +ALTER TABLE t1 ADD COLUMN err INT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (2147483647); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TINYINT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(4) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c TINYINT NOT NULL, +c2 TINYINT NOT NULL DEFAULT 127 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(4) NO NULL +c2 tinyint(4) NO 127 +ALTER TABLE t1 ADD COLUMN err TINYINT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (127 ); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c SMALLINT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c smallint(6) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c SMALLINT NOT NULL, +c2 SMALLINT NOT NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c smallint(6) NO NULL +c2 smallint(6) NO 0 +ALTER TABLE t1 ADD COLUMN err SMALLINT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (0); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c MEDIUMINT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumint(9) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c MEDIUMINT NOT NULL, +c2 MEDIUMINT NOT NULL DEFAULT 1 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumint(9) NO NULL +c2 mediumint(9) NO 1 +ALTER TABLE t1 ADD COLUMN err MEDIUMINT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (1); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BIGINT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bigint(20) NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c BIGINT NOT NULL, +c2 BIGINT NOT NULL DEFAULT 9223372036854775807 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bigint(20) NO NULL +c2 bigint(20) NO 9223372036854775807 +ALTER TABLE t1 ADD COLUMN err BIGINT NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES (9223372036854775807); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# SET columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a SET('') NOT NULL, +b SET('test1','test2','test3','test4','test5') NOT NULL, +c SET('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a set('') # # # +b set('test1','test2','test3','test4','test5') # # # +c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') # # # +INSERT INTO t1 VALUES +('','test2,test3','01,34,44,,23'), +('',5,2), +(',','test4,test2',''); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1; +a b c + test1,test3 02 + test2,test3 01,23,34,44 + test2,test4 +INSERT INTO t1 VALUES (0,'test6',-1); +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1; +a b c + 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50'51,52,53,54,55,56,57,58,59,60,61,62,63,64 + test1,test3 02 + test2,test3 01,23,34,44 + test2,test4 +ALTER TABLE t1 ADD COLUMN e SET('a','A') NOT NULL; +Warnings: +Note 1291 Column 'e' has duplicated value 'a' in SET +Note 1291 Column 'e' has duplicated value 'a' in SET +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a set('') # # # +b set('test1','test2','test3','test4','test5') # # # +c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') # # # +e set('a','A') # # # +ALTER TABLE t1 ADD COLUMN f SET('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i') NOT NULL; +ERROR HY000: Too many strings for column f and SET +SELECT * FROM t1 WHERE FIND_IN_SET('test2',b)>0 OR a != ''; +a b c e + test2,test3 01,23,34,44 + test2,test4 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c SET('test1','test2','test3') NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c set('test1','test2','test3') NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +CREATE TABLE t1 (c SET('test1','test2','test3') NOT NULL, +c2 SET('test1','test2','test3') NOT NULL DEFAULT 'test2,test3' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c set('test1','test2','test3') NO NULL +c2 set('test1','test2','test3') NO test2,test3 +ALTER TABLE t1 ADD COLUMN err SET('test1','test2','test3') NOT NULL DEFAULT NULL; +ERROR 42000: Invalid default value for 'err' +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +SELECT HEX(c), HEX(c2) FROM t1; +HEX(c) HEX(c2) +INSERT INTO t1 (c2) VALUES (NULL); +ERROR 23000: Column 'c2' cannot be null +INSERT INTO t1 (c) VALUES ('test2,test3'); +SELECT COUNT(c), COUNT(c2) FROM t1; +COUNT(c) COUNT(c2) +1 1 +DROP TABLE t1; +# +# TEXT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (t TEXT NOT NULL, +t0 TEXT(0) NOT NULL, +t1 TEXT(1) NOT NULL, +t300 TEXT(300) NOT NULL, +tm TEXT(65535) NOT NULL, +t70k TEXT(70000) NOT NULL, +t17m TEXT(17000000) NOT NULL, +tt TINYTEXT NOT NULL, +m MEDIUMTEXT NOT NULL, +l LONGTEXT NOT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +t text # # # +t0 text # # # +t1 tinytext # # # +t300 text # # # +tm text # # # +t70k mediumtext # # # +t17m longtext # # # +tt tinytext # # # +m mediumtext # # # +l longtext # # # +INSERT INTO t1 VALUES +('','','','','','','','','',''), +('a','b','c','d','e','f','g','h','i','j'), +('test1','test2','test3','test4','test5','test6','test7','test8','test9','test10'), +( REPEAT('a',65535), REPEAT('b',65535), REPEAT('c',255), REPEAT('d',65535), REPEAT('e',65535), REPEAT('f',1048576), REPEAT('g',1048576), REPEAT('h',255), REPEAT('i',1048576), REPEAT('j',1048576) ); +SELECT LENGTH(t), LENGTH(t0), LENGTH(t1), LENGTH(t300), LENGTH(tm), LENGTH(t70k), LENGTH(t17m), LENGTH(tt), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m) LENGTH(tt) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +INSERT INTO t1 VALUES +( REPEAT('a',65536), REPEAT('b',65536), REPEAT('c',256), REPEAT('d',65536), REPEAT('e',65536), REPEAT('f',1048576), REPEAT('g',1048576), REPEAT('h',256), REPEAT('i',1048576), REPEAT('j',1048576) ); +Warnings: +Warning 1265 Data truncated for column 't' at row 1 +Warning 1265 Data truncated for column 't0' at row 1 +Warning 1265 Data truncated for column 't1' at row 1 +Warning 1265 Data truncated for column 't300' at row 1 +Warning 1265 Data truncated for column 'tm' at row 1 +Warning 1265 Data truncated for column 'tt' at row 1 +SELECT LENGTH(t), LENGTH(t0), LENGTH(t1), LENGTH(t300), LENGTH(tm), LENGTH(t70k), LENGTH(t17m), LENGTH(tt), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m) LENGTH(tt) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +ALTER TABLE t1 ADD COLUMN ttt TEXT(4294967296); +ERROR 42000: Display width out of range for 'ttt' (max = 4294967295) +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TEXT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c text NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TINYTEXT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinytext NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c MEDIUMTEXT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumtext NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c LONGTEXT NOT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c longtext NO NULL +INSERT INTO t1 (c) VALUES (NULL); +ERROR 23000: Column 'c' cannot be null +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/col_opt_not_null.test b/mysql-test/suite/storage_engine/col_opt_not_null.test new file mode 100644 index 00000000000..2cd0e909536 --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_not_null.test @@ -0,0 +1,260 @@ +# +# NOT NULL column attribute +# + +let $extra_col_opts = NOT NULL; + +--source have_engine.inc + +--echo # +--echo # BINARY columns +--echo # + +--source type_binary.inc +--let $col_definition = BINARY $default_col_opts +--let $col_default = 0 +--source col_not_null.inc + +--echo # +--echo # VARBINARY columns +--echo # + +--source type_varbinary.inc +--let $col_definition = VARBINARY(64) $default_col_opts +--let $col_default = 'test' +--source col_not_null.inc + +--echo # +--echo # BIT columns +--echo # + +--source type_bit.inc +--let $col_definition = BIT $default_col_opts +--let $col_default = 1 +--source col_not_null.inc + +--echo # +--echo # BLOB columns +--echo # + +--source type_blob.inc + +--let $col_definition = BLOB $default_col_opts +--source col_not_null.inc + +--let $col_definition = TINYBLOB $default_col_opts +--source col_not_null.inc + +--let $col_definition = MEDIUMBLOB $default_col_opts +--source col_not_null.inc + +--let $col_definition = LONGBLOB $default_col_opts +--source col_not_null.inc + +--echo # +--echo # BOOL columns +--echo # + +--source type_bool.inc +--let $col_definition = BOOL $default_col_opts +--let $col_default = '0' +--source col_not_null.inc + +--echo # +--echo # CHAR columns +--echo # + +--source type_char.inc +--let $col_definition = CHAR $default_col_opts +--let $col_default = '_' +--source col_not_null.inc + +--echo # +--echo # VARCHAR columns +--echo # + +--source type_varchar.inc +--let $col_definition = VARCHAR(64) $default_col_opts +--let $col_default = 'test default' +--source col_not_null.inc + +--echo # +--echo # date and time columns +--echo # + +--source type_date_time.inc + +--let $col_definition = DATE $default_col_opts +--let $col_default = '2012-12-21' +--source col_not_null.inc + +--let $col_definition = DATETIME $default_col_opts +--let $col_default = '2012-12-21 12:21:12' +--source col_not_null.inc + +# For TIMESTAMP the behavior is non-standard + +# $col_opts already contains NOT NULL part (it's set in have_engine.inc) + +let $create_definition = + c TIMESTAMP $col_opts, + c2 TIMESTAMP $col_opts DEFAULT '2012-02-21 12:21:12' +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = TIMESTAMP type or NOT NULL columns or DEFAULT + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --let $error_codes = ER_INVALID_DEFAULT + --let $alter_definition = ADD COLUMN err TIMESTAMP $col_opts DEFAULT NULL + --source alter_table.inc + if ($mysql_errname!=ER_INVALID_DEFAULT) + { + --let $functionality = ALTER or DEFAULT + --source unexpected_result.inc + } + + INSERT INTO t1 (c) VALUES (NULL); + INSERT INTO t1 (c2) VALUES (NULL); + --replace_regex /2012-02-21 12:21:12// /[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}// + SELECT c, c2 FROM t1; + + DROP TABLE t1; +} + +--let $create_definition = c TIMESTAMP $col_opts +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = TIMESTAMP type + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + SHOW COLUMNS IN t1; + + INSERT INTO t1 (c) VALUES (NULL); + if ($mysql_errname) + { + --let $functionality = TIMESTAMP + --source unexpected_result.inc + } + + --replace_regex /[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}// + SELECT * FROM t1; + DROP TABLE t1; +} + +# End of TIMESTAMP exception + + +--let $col_definition = TIME $default_col_opts +--let $col_default = '12:21:12' +--source col_not_null.inc + +--let $col_definition = YEAR $default_col_opts +--let $col_default = '2012' +--source col_not_null.inc + +--let $col_definition = YEAR(2) $default_col_opts +--let $col_default = '12' +--source col_not_null.inc + + +--echo # +--echo # ENUM columns +--echo # + +--source type_enum.inc + +--let $col_definition = ENUM('test1','test2','test3') $default_col_opts +--let $col_default = 'test2' +--source col_not_null.inc + + +--echo # +--echo # Fixed point columns (NUMERIC, DECIMAL) +--echo # + +--source type_fixed.inc + +--let $col_definition = DECIMAL $default_col_opts +--let $col_default = 1.1 +--source col_not_null.inc + +--let $col_definition = NUMERIC $default_col_opts +--let $col_default = 0 +--source col_not_null.inc + +--echo # +--echo # Floating point columns (FLOAT, DOUBLE) +--echo # + +--source type_float.inc + +--let $col_definition = FLOAT $default_col_opts +--let $col_default = 1.1 +--source col_not_null.inc + +--let $col_definition = DOUBLE $default_col_opts +--let $col_default = 0 +--source col_not_null.inc + +--echo # +--echo # INT columns +--echo # + +--source type_int.inc + +--let $col_definition = INT $default_col_opts +--let $col_default = 2147483647 +--source col_not_null.inc + +--let $col_definition = TINYINT $default_col_opts +--let $col_default = 127 +--source col_not_null.inc + +--let $col_definition = SMALLINT $default_col_opts +--let $col_default = 0 +--source col_not_null.inc + +--let $col_definition = MEDIUMINT $default_col_opts +--let $col_default = 1 +--source col_not_null.inc + +--let $col_definition = BIGINT $default_col_opts +--let $col_default = 9223372036854775807 +--source col_not_null.inc + +--echo # +--echo # SET columns +--echo # + +--source type_set.inc +--let $col_definition = SET('test1','test2','test3') $default_col_opts +--let $col_default = 'test2,test3' +--source col_not_null.inc + +--echo # +--echo # TEXT columns +--echo # + +--source type_text.inc + +--let $col_definition = TEXT $default_col_opts +--source col_not_null.inc + +--let $col_definition = TINYTEXT $default_col_opts +--source col_not_null.inc + +--let $col_definition = MEDIUMTEXT $default_col_opts +--source col_not_null.inc + +--let $col_definition = LONGTEXT $default_col_opts +--source col_not_null.inc + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/col_opt_null.result b/mysql-test/suite/storage_engine/col_opt_null.result new file mode 100644 index 00000000000..c6a46f8c18f --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_null.result @@ -0,0 +1,1991 @@ +# +# BINARY columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (b BINARY NULL, +b0 BINARY(0) NULL, +b1 BINARY(1) NULL, +b20 BINARY(20) NULL, +b255 BINARY(255) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b binary(1) # # # # +b0 binary(0) # # # # +b1 binary(1) # # # # +b20 binary(20) # # # # +b255 binary(255) # # # # +INSERT INTO t1 VALUES ('','','','',''); +INSERT INTO t1 VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.'); +SELECT HEX(b), HEX(b0), HEX(b1), HEX(b20), HEX(b255) FROM t1; +HEX(b) HEX(b0) HEX(b1) HEX(b20) HEX(b255) +00 00 0000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +61 62 616263646566676869206B6C6D6E6F7071727374 4372656174696E6720616E2061727469636C6520666F7220746865204B6E6F776C65646765626173652069732073696D696C617220746F2061736B696E67207175657374696F6E732E2046697273742C206E6176696761746520746F207468652063617465676F727920776865726520796F75206665656C207468652061727469636C652073686F756C642062652E204F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C726561647920657869737420776869636820776F756C6420776F726B2E00000000000000000000000000000000000000000000000000000000000000 +INSERT INTO t1 VALUES ('abc', 'a', 'abc', REPEAT('a',21), REPEAT('x',256)); +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b0' at row 1 +Warning 1265 Data truncated for column 'b1' at row 1 +Warning 1265 Data truncated for column 'b20' at row 1 +Warning 1265 Data truncated for column 'b255' at row 1 +INSERT INTO t1 SELECT b255, b255, b255, b255, CONCAT(b255,b255) FROM t1; +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b0' at row 1 +Warning 1265 Data truncated for column 'b1' at row 1 +Warning 1265 Data truncated for column 'b20' at row 1 +Warning 1265 Data truncated for column 'b255' at row 1 +Warning 1265 Data truncated for column 'b' at row 2 +Warning 1265 Data truncated for column 'b0' at row 2 +Warning 1265 Data truncated for column 'b1' at row 2 +Warning 1265 Data truncated for column 'b20' at row 2 +Warning 1265 Data truncated for column 'b255' at row 2 +Warning 1265 Data truncated for column 'b' at row 3 +Warning 1265 Data truncated for column 'b0' at row 3 +Warning 1265 Data truncated for column 'b1' at row 3 +Warning 1265 Data truncated for column 'b20' at row 3 +Warning 1265 Data truncated for column 'b255' at row 3 +SELECT HEX(b), HEX(b0), HEX(b1), HEX(b20), HEX(b255) FROM t1; +HEX(b) HEX(b0) HEX(b1) HEX(b20) HEX(b255) +00 00 0000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00 00 0000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +43 43 4372656174696E6720616E2061727469636C6520 4372656174696E6720616E2061727469636C6520666F7220746865204B6E6F776C65646765626173652069732073696D696C617220746F2061736B696E67207175657374696F6E732E2046697273742C206E6176696761746520746F207468652063617465676F727920776865726520796F75206665656C207468652061727469636C652073686F756C642062652E204F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C726561647920657869737420776869636820776F756C6420776F726B2E00000000000000000000000000000000000000000000000000000000000000 +61 61 6161616161616161616161616161616161616161 787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 +61 62 616263646566676869206B6C6D6E6F7071727374 4372656174696E6720616E2061727469636C6520666F7220746865204B6E6F776C65646765626173652069732073696D696C617220746F2061736B696E67207175657374696F6E732E2046697273742C206E6176696761746520746F207468652063617465676F727920776865726520796F75206665656C207468652061727469636C652073686F756C642062652E204F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C726561647920657869737420776869636820776F756C6420776F726B2E00000000000000000000000000000000000000000000000000000000000000 +78 78 7878787878787878787878787878787878787878 787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878 +ALTER TABLE t1 ADD COLUMN b257 BINARY(257) NULL; +ERROR 42000: Column length too big for column 'b257' (max = 255); use BLOB or TEXT instead +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b binary(1) # # # # +b0 binary(0) # # # # +b1 binary(1) # # # # +b20 binary(20) # # # # +b255 binary(255) # # # # +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BINARY NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c binary(1) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c BINARY NULL, +c1 BINARY NULL DEFAULT NULL, +c2 BINARY NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c binary(1) YES NULL +c1 binary(1) YES NULL +c2 binary(1) YES 0 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# VARBINARY columns +# +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (v0 VARBINARY(0) NULL, +v1 VARBINARY(1) NULL, +v64 VARBINARY(64) NULL, +v65000 VARBINARY(65000) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varbinary(0) # # # +v1 varbinary(1) # # # +v64 varbinary(64) # # # +v65000 varbinary(65000) # # # +CREATE TABLE t2 (v VARBINARY(65532) NULL) ENGINE= ; +SHOW COLUMNS IN t2; +Field Type Null Key Default Extra +v varbinary(65532) # # # +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','',''); +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off. + + If you want to have your favorite MySQL / MariaDB book listed here, please leave a comment. + For developers who want to code on MariaDB or MySQL + + * Understanding MySQL Internals by Sasha Pachev, former MySQL developer at MySQL AB. + o This is the only book we know about that describes the internals of MariaDB / MySQL. A must have for anyone who wants to understand and develop on MariaDB! + o Not all topics are covered and some parts are slightly outdated, but still the best book on this topic. + * MySQL 5.1 Plugin Development by Sergei Golubchik and Andrew Hutchings + o A must read for anyone wanting to write a plugin for MariaDB, written by the Sergei who designed the plugin interface for MySQL and MariaDB! + + For MariaDB / MySQL end users + + * MariaDB Crash Course by Ben Forta + o First MariaDB book! + o For people who want to learn SQL and the basics of MariaDB. + o Now shipping. Purchase at Amazon.com or your favorite bookseller. + + * SQL-99 Complete, Really by Peter Gulutzan & Trudy Pelzer. + o Everything you wanted to know about the SQL 99 standard. Excellent reference book! + o Free to read in the Knowledgebase! + + * MySQL (4th Edition) by Paul DuBois + o The \'default\' book to read if you wont to learn to use MySQL / MariaDB. + + * MySQL Cookbook by Paul DuBois + o A lot of examples of how to use MySQL. As with all of Paul\'s books, it\'s worth its weight in gold and even enjoyable reading for such a \'dry\' subject. + + * High Performance MySQL, Second Edition, By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek J. Balling, et al. + o \"High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity. Learn advanced techniques in depth so you can bring out MySQL\'s full power.\" (From the book description at O\'Reilly) + + * MySQL Admin Cookbook + o A quick step-by-step guide for MySQL users and database administrators to tackle real-world challenges with MySQL configuration and administration + + * MySQL 5.0 Certification Study Guide, By Paul DuBois, Stefan Hinz, Carsten Pedersen + o This is the official guide to cover the passing of the two MySQL Certification examinations. It is valid till version 5.0 of the server, so while it misses all the features available in MySQL 5.1 and greater (including MariaDB 5.1 and greater), it provides a good basic understanding of MySQL for the end-user. '); +SELECT HEX(v0), HEX(v1), HEX(v64), HEX(v65000) FROM t1; +HEX(v0) HEX(v1) HEX(v64) HEX(v65000) + + 79 4F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C7265616479206578697374 486572652069732061206C697374206F66207265636F6D6D656E64656420626F6F6B73206F6E204D61726961444220616E64204D7953514C2E2057652776652070726F7669646564206C696E6B7320746F20416D617A6F6E2E636F6D206865726520666F7220636F6E76656E69656E63652C2062757420746865792063616E20626520666F756E64206174206D616E79206F7468657220626F6F6B73746F7265732C20626F7468206F6E6C696E6520616E64206F66662E0A0A2020496620796F752077616E7420746F206861766520796F7572206661766F72697465204D7953514C202F204D61726961444220626F6F6B206C697374656420686572652C20706C65617365206C65617665206120636F6D6D656E742E0A2020466F7220646576656C6F706572732077686F2077616E7420746F20636F6465206F6E204D617269614442206F72204D7953514C0A0A2020202020202A20556E6465727374616E64696E67204D7953514C20496E7465726E616C73206279205361736861205061636865762C20666F726D6572204D7953514C20646576656C6F706572206174204D7953514C2041422E0A2020202020202020202020206F205468697320697320746865206F6E6C7920626F6F6B207765206B6E6F772061626F75742074686174206465736372696265732074686520696E7465726E616C73206F66204D617269614442202F204D7953514C2E2041206D757374206861766520666F7220616E796F6E652077686F2077616E747320746F20756E6465727374616E6420616E6420646576656C6F70206F6E204D617269614442210A2020202020202020202020206F204E6F7420616C6C20746F706963732061726520636F766572656420616E6420736F6D652070617274732061726520736C696768746C79206F757464617465642C20627574207374696C6C20746865206265737420626F6F6B206F6E207468697320746F7069632E200A2020202020202A204D7953514C20352E3120506C7567696E20446576656C6F706D656E742062792053657267656920476F6C75626368696B20616E6420416E64726577204875746368696E67730A2020202020202020202020206F2041206D757374207265616420666F7220616E796F6E652077616E74696E6720746F207772697465206120706C7567696E20666F72204D6172696144422C207772697474656E20627920746865205365726765692077686F2064657369676E65642074686520706C7567696E20696E7465726661636520666F72204D7953514C20616E64204D61726961444221200A0A2020466F72204D617269614442202F204D7953514C20656E642075736572730A0A2020202020202A204D61726961444220437261736820436F757273652062792042656E20466F7274610A2020202020202020202020206F204669727374204D61726961444220626F6F6B210A2020202020202020202020206F20466F722070656F706C652077686F2077616E7420746F206C6561726E2053514C20616E642074686520626173696373206F66204D6172696144422E0A2020202020202020202020206F204E6F77207368697070696E672E20507572636861736520617420416D617A6F6E2E636F6D206F7220796F7572206661766F7269746520626F6F6B73656C6C65722E200A0A2020202020202A2053514C2D393920436F6D706C6574652C205265616C6C792062792050657465722047756C75747A616E20262054727564792050656C7A65722E0A2020202020202020202020206F2045766572797468696E6720796F752077616E74656420746F206B6E6F772061626F7574207468652053514C203939207374616E646172642E20457863656C6C656E74207265666572656E636520626F6F6B210A2020202020202020202020206F204672656520746F207265616420696E20746865204B6E6F776C656467656261736521200A0A2020202020202A204D7953514C20283474682045646974696F6E29206279205061756C204475426F69730A2020202020202020202020206F20546865202764656661756C742720626F6F6B20746F207265616420696620796F7520776F6E7420746F206C6561726E20746F20757365204D7953514C202F204D6172696144422E200A0A2020202020202A204D7953514C20436F6F6B626F6F6B206279205061756C204475426F69730A2020202020202020202020206F2041206C6F74206F66206578616D706C6573206F6620686F7720746F20757365204D7953514C2E204173207769746820616C6C206F66205061756C277320626F6F6B732C206974277320776F727468206974732077656967687420696E20676F6C6420616E64206576656E20656E6A6F7961626C652072656164696E6720666F7220737563682061202764727927207375626A6563742E200A0A2020202020202A204869676820506572666F726D616E6365204D7953514C2C205365636F6E642045646974696F6E2C204279204261726F6E20536368776172747A2C205065746572205A6169747365762C20566164696D20546B616368656E6B6F2C204A6572656D7920442E205A61776F646E792C2041726A656E204C656E747A2C20446572656B204A2E2042616C6C696E672C20657420616C2E0A2020202020202020202020206F20224869676820506572666F726D616E6365204D7953514C2069732074686520646566696E697469766520677569646520746F206275696C64696E6720666173742C2072656C6961626C652073797374656D732077697468204D7953514C2E205772697474656E206279206E6F74656420657870657274732077697468207965617273206F66207265616C2D776F726C6420657870657269656E6365206275696C64696E672076657279206C617267652073797374656D732C207468697320626F6F6B20636F7665727320657665727920617370656374206F66204D7953514C20706572666F726D616E636520696E2064657461696C2C20616E6420666F6375736573206F6E20726F627573746E6573732C2073656375726974792C20616E64206461746120696E746567726974792E204C6561726E20616476616E63656420746563686E697175657320696E20646570746820736F20796F752063616E206272696E67206F7574204D7953514C27732066756C6C20706F7765722E22202846726F6D2074686520626F6F6B206465736372697074696F6E206174204F275265696C6C7929200A0A2020202020202A204D7953514C2041646D696E20436F6F6B626F6F6B0A2020202020202020202020206F204120717569636B20737465702D62792D7374657020677569646520666F72204D7953514C20757365727320616E642064617461626173652061646D696E6973747261746F727320746F207461636B6C65207265616C2D776F726C64206368616C6C656E6765732077697468204D7953514C20636F6E66696775726174696F6E20616E642061646D696E697374726174696F6E200A0A2020202020202A204D7953514C20352E302043657274696669636174696F6E2053747564792047756964652C204279205061756C204475426F69732C2053746566616E2048696E7A2C204361727374656E20506564657273656E0A2020202020202020202020206F205468697320697320746865206F6666696369616C20677569646520746F20636F766572207468652070617373696E67206F66207468652074776F204D7953514C2043657274696669636174696F6E206578616D696E6174696F6E732E2049742069732076616C69642074696C6C2076657273696F6E20352E30206F6620746865207365727665722C20736F207768696C65206974206D697373657320616C6C2074686520666561747572657320617661696C61626C6520696E204D7953514C20352E3120616E6420677265617465722028696E636C7564696E67204D61726961444220352E3120616E642067726561746572292C2069742070726F7669646573206120676F6F6420626173696320756E6465727374616E64696E67206F66204D7953514C20666F722074686520656E642D757365722E20 +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('y', 'yy', REPEAT('c',65), REPEAT('abcdefghi ',6501)); +Warnings: +Warning 1265 Data truncated for column 'v0' at row 1 +Warning 1265 Data truncated for column 'v1' at row 1 +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, v65000, CONCAT(v65000,v1) FROM t1; +Warnings: +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 + 0 + 48 486572652069732061206C697374206F66207265636F6D6D656E64656420626F6F6B73206F6E204D61726961444220616E64204D7953514C2E20576527766520 5932 + 61 61626364656667686920616263646566676869206162636465666768692061626364656667686920616263646566676869206162636465666768692061626364 130000 + 79 4F6E63652074686572652C20646F75626C6520636865636B207468617420616E2061727469636C6520646F65736E277420616C7265616479206578697374 5930 + 79 63636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363 130000 +ALTER TABLE t1 ADD COLUMN v65536 VARBINARY(65536) NULL; +Warnings: +Note 1246 Converting column 'v65536' from VARBINARY to BLOB +Note 1246 Converting column 'v65536' from VARBINARY to BLOB +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varbinary(0) # # # +v1 varbinary(1) # # # +v64 varbinary(64) # # # +v65000 varbinary(65000) # # # +v65536 mediumblob # # # +DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c VARBINARY(64) NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varbinary(64) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c VARBINARY(64) NULL, +c1 VARBINARY(64) NULL DEFAULT NULL, +c2 VARBINARY(64) NULL DEFAULT 'test' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varbinary(64) YES NULL +c1 varbinary(64) YES NULL +c2 varbinary(64) YES test +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# BIT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a BIT NULL, +b BIT(20) NULL, +c BIT(64) NULL, +d BIT(1) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a bit(1) # # # +b bit(20) # # # +c bit(64) # # # +d bit(1) # # # +ALTER TABLE t1 DROP COLUMN d; +ALTER TABLE t1 ADD COLUMN d BIT(0) NULL; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a bit(1) # # # +b bit(20) # # # +c bit(64) # # # +d bit(1) # # # +INSERT INTO t1 VALUES (0,POW(2,20)-1,b'1111111111111111111111111111111111111111111111111111111111111111',1); +SELECT BIN(a), HEX(b), c+0 FROM t1 WHERE d>0; +BIN(a) HEX(b) c+0 +0 FFFFF 18446744073709551615 +INSERT INTO t1 VALUES (1,0,-1,0); +SELECT a+0, b+0, c+0 FROM t1 WHERE d<100; +a+0 b+0 c+0 +0 1048575 18446744073709551615 +1 0 18446744073709551615 +INSERT INTO t1 VALUES (b'1', 'f', 0xFF, 0x0); +SELECT a+0, b+0, c+0 FROM t1 WHERE d IN (0, 2); +a+0 b+0 c+0 +1 0 18446744073709551615 +1 102 255 +INSERT INTO t1 VALUES (0x10,0,0,1); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t1; +a b c d +INSERT INTO t1 VALUES (0x01,0,0x10000000000000000,0); +Warnings: +Warning 1264 Out of range value for column 'c' at row 1 +SELECT * FROM t1; +a b c d +DROP TABLE t1; +CREATE TABLE t1 (a BIT(65) NULL) ENGINE= ; +ERROR 42000: Display width out of range for 'a' (max = 64) +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BIT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bit(1) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c BIT NULL, +c1 BIT NULL DEFAULT NULL, +c2 BIT NULL DEFAULT 1 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bit(1) YES NULL +c1 bit(1) YES NULL +c2 bit(1) YES b'1' +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# BLOB columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (b BLOB NULL, +b0 BLOB(0) NULL, +b1 BLOB(1) NULL, +b300 BLOB(300) NULL, +bm BLOB(65535) NULL, +b70k BLOB(70000) NULL, +b17m BLOB(17000000) NULL, +t TINYBLOB NULL, +m MEDIUMBLOB NULL, +l LONGBLOB NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b blob # # # +b0 blob # # # +b1 tinyblob # # # +b300 blob # # # +bm blob # # # +b70k mediumblob # # # +b17m longblob # # # +t tinyblob # # # +m mediumblob # # # +l longblob # # # +INSERT INTO t1 VALUES +('','','','','','','','','',''), +('a','b','c','d','e','f','g','h','i','j'), +('test1','test2','test3','test4','test5','test6','test7','test8','test9','test10'), +( REPEAT('a',65535), REPEAT('b',65535), REPEAT('c',255), REPEAT('d',65535), REPEAT('e',65535), REPEAT('f',1048576), HEX(REPEAT('g',1048576)), REPEAT('h',255), REPEAT('i',1048576), HEX(REPEAT('j',1048576)) ); +SELECT LENGTH(b), LENGTH(b0), LENGTH(b1), LENGTH(b300), LENGTH(bm), LENGTH(b70k), LENGTH(b17m), LENGTH(t), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(b) LENGTH(b0) LENGTH(b1) LENGTH(b300) LENGTH(bm) LENGTH(b70k) LENGTH(b17m) LENGTH(t) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 2097152 255 1048576 2097152 +INSERT INTO t1 VALUES +( REPEAT('a',65536), REPEAT('b',65536), REPEAT('c',256), REPEAT('d',65536), REPEAT('e',65536), REPEAT('f',1048576), REPEAT('g',1048576), REPEAT('h',256), REPEAT('i',1048576), REPEAT('j',1048576) ); +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'b0' at row 1 +Warning 1265 Data truncated for column 'b1' at row 1 +Warning 1265 Data truncated for column 'b300' at row 1 +Warning 1265 Data truncated for column 'bm' at row 1 +Warning 1265 Data truncated for column 't' at row 1 +SELECT LENGTH(b), LENGTH(b0), LENGTH(b1), LENGTH(b300), LENGTH(bm), LENGTH(b70k), LENGTH(b17m), LENGTH(t), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(b) LENGTH(b0) LENGTH(b1) LENGTH(b300) LENGTH(bm) LENGTH(b70k) LENGTH(b17m) LENGTH(t) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +65535 65535 255 65535 65535 1048576 2097152 255 1048576 2097152 +ALTER TABLE t1 ADD COLUMN bbb BLOB(4294967296); +ERROR 42000: Display width out of range for 'bbb' (max = 4294967295) +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BLOB NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c blob YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TINYBLOB NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyblob YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c MEDIUMBLOB NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumblob YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c LONGBLOB NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c longblob YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +# +# BOOL columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (b1 BOOL NULL, +b2 BOOLEAN NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +b1 tinyint(1) # # # +b2 tinyint(1) # # # +INSERT INTO t1 VALUES (1,TRUE); +SELECT * FROM t1; +b1 b2 +1 1 +INSERT INTO t1 VALUES (FALSE,0); +SELECT * FROM t1; +b1 b2 +0 0 +1 1 +INSERT INTO t1 VALUES (2,3); +SELECT * FROM t1; +b1 b2 +0 0 +1 1 +2 3 +INSERT INTO t1 VALUES (-1,-2); +SELECT * FROM t1; +b1 b2 +-1 -2 +0 0 +1 1 +2 3 +SELECT IF(b1,'true','false') AS a, IF(b2,'true','false') AS b FROM t1; +a b +false false +true true +true true +true true +SELECT * FROM t1 WHERE b1 = TRUE; +b1 b2 +1 1 +SELECT * FROM t1 WHERE b2 = FALSE; +b1 b2 +0 0 +INSERT INTO t1 VALUES ('a','b'); +Warnings: +Warning 1366 Incorrect integer value: 'a' for column 'b1' at row 1 +Warning 1366 Incorrect integer value: 'b' for column 'b2' at row 1 +SELECT * FROM t1; +b1 b2 +-1 -2 +0 0 +0 0 +1 1 +2 3 +INSERT INTO t1 VALUES (128,-129); +Warnings: +Warning 1264 Out of range value for column 'b1' at row 1 +Warning 1264 Out of range value for column 'b2' at row 1 +SELECT * FROM t1; +b1 b2 +-1 -2 +0 0 +0 0 +1 1 +127 -128 +2 3 +ALTER TABLE t1 ADD COLUMN b3 BOOLEAN UNSIGNED; +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 'UNSIGNED' at line 1 +ALTER TABLE t1 ADD COLUMN b3 BOOL ZEROFILL; +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 'ZEROFILL' at line 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BOOL NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(1) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c BOOL NULL, +c1 BOOL NULL DEFAULT NULL, +c2 BOOL NULL DEFAULT '0' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(1) YES NULL +c1 tinyint(1) YES NULL +c2 tinyint(1) YES 0 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# CHAR columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c CHAR NULL, +c0 CHAR(0) NULL, +c1 CHAR(1) NULL, +c20 CHAR(20) NULL, +c255 CHAR(255) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c char(1) # # # +c0 char(0) # # # +c1 char(1) # # # +c20 char(20) # # # +c255 char(255) # # # +INSERT INTO t1 VALUES ('','','','',''); +INSERT INTO t1 VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.'); +SELECT * FROM t1; +c c0 c1 c20 c255 + +a b abcdefghi klmnopqrst Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work. +INSERT INTO t1 VALUES ('abc', 'a', 'abc', REPEAT('a',21), REPEAT('x',256)); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +Warning 1265 Data truncated for column 'c0' at row 1 +Warning 1265 Data truncated for column 'c1' at row 1 +Warning 1265 Data truncated for column 'c20' at row 1 +Warning 1265 Data truncated for column 'c255' at row 1 +INSERT INTO t1 SELECT c255, c255, c255, c255, CONCAT(c255,c1) FROM t1; +Warnings: +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 * FROM t1; +c c0 c1 c20 c255 + + +C C Creating an article Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work.b +a a aaaaaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +a b abcdefghi klmnopqrst Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work. +x x xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +SELECT DISTINCT c20, REPEAT('a',LENGTH(c20)), COUNT(*) FROM t1 GROUP BY c1, c20; +c20 REPEAT('a',LENGTH(c20)) COUNT(*) + 2 +Creating an article aaaaaaaaaaaaaaaaaaa 1 +aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaa 1 +abcdefghi klmnopqrst aaaaaaaaaaaaaaaaaaaa 1 +xxxxxxxxxxxxxxxxxxxx aaaaaaaaaaaaaaaaaaaa 1 +ALTER TABLE t1 ADD COLUMN c257 CHAR(257) NULL; +ERROR 42000: Column length too big for column 'c257' (max = 255); use BLOB or TEXT instead +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c CHAR NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c char(1) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c CHAR NULL, +c1 CHAR NULL DEFAULT NULL, +c2 CHAR NULL DEFAULT '_' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c char(1) YES NULL +c1 char(1) YES NULL +c2 char(1) YES _ +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# VARCHAR columns +# +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (v0 VARCHAR(0) NULL, +v1 VARCHAR(1) NULL, +v64 VARCHAR(64) NULL, +v65000 VARCHAR(65000) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varchar(0) # # # +v1 varchar(1) # # # +v64 varchar(64) # # # +v65000 varchar(65000) # # # +CREATE TABLE t2 (v VARCHAR(65532) NULL) ENGINE= ; +SHOW COLUMNS IN t2; +Field Type Null Key Default Extra +v varchar(65532) # # # +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','','',''); +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('','y','Once there, double check that an article doesn\'t already exist','Here is a list of recommended books on MariaDB and MySQL. We\'ve provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off. + + If you want to have your favorite MySQL / MariaDB book listed here, please leave a comment. + For developers who want to code on MariaDB or MySQL + + * Understanding MySQL Internals by Sasha Pachev, former MySQL developer at MySQL AB. + o This is the only book we know about that describes the internals of MariaDB / MySQL. A must have for anyone who wants to understand and develop on MariaDB! + o Not all topics are covered and some parts are slightly outdated, but still the best book on this topic. + * MySQL 5.1 Plugin Development by Sergei Golubchik and Andrew Hutchings + o A must read for anyone wanting to write a plugin for MariaDB, written by the Sergei who designed the plugin interface for MySQL and MariaDB! + + For MariaDB / MySQL end users + + * MariaDB Crash Course by Ben Forta + o First MariaDB book! + o For people who want to learn SQL and the basics of MariaDB. + o Now shipping. Purchase at Amazon.com or your favorite bookseller. + + * SQL-99 Complete, Really by Peter Gulutzan & Trudy Pelzer. + o Everything you wanted to know about the SQL 99 standard. Excellent reference book! + o Free to read in the Knowledgebase! + + * MySQL (4th Edition) by Paul DuBois + o The \'default\' book to read if you wont to learn to use MySQL / MariaDB. + + * MySQL Cookbook by Paul DuBois + o A lot of examples of how to use MySQL. As with all of Paul\'s books, it\'s worth its weight in gold and even enjoyable reading for such a \'dry\' subject. + + * High Performance MySQL, Second Edition, By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek J. Balling, et al. + o \"High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity. Learn advanced techniques in depth so you can bring out MySQL\'s full power.\" (From the book description at O\'Reilly) + + * MySQL Admin Cookbook + o A quick step-by-step guide for MySQL users and database administrators to tackle real-world challenges with MySQL configuration and administration + + * MySQL 5.0 Certification Study Guide, By Paul DuBois, Stefan Hinz, Carsten Pedersen + o This is the official guide to cover the passing of the two MySQL Certification examinations. It is valid till version 5.0 of the server, so while it misses all the features available in MySQL 5.1 and greater (including MariaDB 5.1 and greater), it provides a good basic understanding of MySQL for the end-user. '); +SELECT * FROM t1; +v0 v1 v64 v65000 + + + + + + + + + + + + y Once there, double check that an article doesn't already exist Here is a list of recommended books on MariaDB and MySQL. We've provided links to Amazon.com here for convenience, but they can be found at many other bookstores, both online and off. + o "High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity. Learn advanced techniques in depth so you can bring out MySQL's full power." (From the book description at O'Reilly) + o A lot of examples of how to use MySQL. As with all of Paul's books, it's worth its weight in gold and even enjoyable reading for such a 'dry' subject. + o A must read for anyone wanting to write a plugin for MariaDB, written by the Sergei who designed the plugin interface for MySQL and MariaDB! + o A quick step-by-step guide for MySQL users and database administrators to tackle real-world challenges with MySQL configuration and administration + o Everything you wanted to know about the SQL 99 standard. Excellent reference book! + o First MariaDB book! + o For people who want to learn SQL and the basics of MariaDB. + o Free to read in the Knowledgebase! + o Not all topics are covered and some parts are slightly outdated, but still the best book on this topic. + o Now shipping. Purchase at Amazon.com or your favorite bookseller. + o The 'default' book to read if you wont to learn to use MySQL / MariaDB. + o This is the official guide to cover the passing of the two MySQL Certification examinations. It is valid till version 5.0 of the server, so while it misses all the features available in MySQL 5.1 and greater (including MariaDB 5.1 and greater), it provides a good basic understanding of MySQL for the end-user. + o This is the only book we know about that describes the internals of MariaDB / MySQL. A must have for anyone who wants to understand and develop on MariaDB! + * High Performance MySQL, Second Edition, By Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, Jeremy D. Zawodny, Arjen Lentz, Derek J. Balling, et al. + * MariaDB Crash Course by Ben Forta + * MySQL (4th Edition) by Paul DuBois + * MySQL 5.0 Certification Study Guide, By Paul DuBois, Stefan Hinz, Carsten Pedersen + * MySQL 5.1 Plugin Development by Sergei Golubchik and Andrew Hutchings + * MySQL Admin Cookbook + * MySQL Cookbook by Paul DuBois + * SQL-99 Complete, Really by Peter Gulutzan & Trudy Pelzer. + * Understanding MySQL Internals by Sasha Pachev, former MySQL developer at MySQL AB. + For MariaDB / MySQL end users + For developers who want to code on MariaDB or MySQL + If you want to have your favorite MySQL / MariaDB book listed here, please leave a comment. +INSERT INTO t1 (v0,v1,v64,v65000) VALUES ('y', 'yy', REPEAT('c',65), REPEAT('abcdefghi ',6501)); +Warnings: +Warning 1265 Data truncated for column 'v0' at row 1 +Warning 1265 Data truncated for column 'v1' at row 1 +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, v65000, CONCAT(v65000,v1) FROM t1; +Warnings: +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 v0, v1, v64, LENGTH(v65000) FROM t1; +v0 v1 v64 LENGTH(v65000) + 0 + 0 + H Here is a list of recommended books on MariaDB and MySQL. We've 2966 + a abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcdefghi abcd 65000 + y Once there, double check that an article doesn't already exist 2965 + y cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 65000 +ALTER TABLE t1 ADD COLUMN v65536 VARCHAR(65536) NULL; +Warnings: +Note 1246 Converting column 'v65536' from VARCHAR to TEXT +Note 1246 Converting column 'v65536' from VARCHAR to TEXT +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +v0 varchar(0) # # # +v1 varchar(1) # # # +v64 varchar(64) # # # +v65000 varchar(65000) # # # +v65536 mediumtext # # # +DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c VARCHAR(64) NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varchar(64) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c VARCHAR(64) NULL, +c1 VARCHAR(64) NULL DEFAULT NULL, +c2 VARCHAR(64) NULL DEFAULT 'test default' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c varchar(64) YES NULL +c1 varchar(64) YES NULL +c2 varchar(64) YES test default +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# date and time columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (d DATE NULL, +dt DATETIME NULL, +ts TIMESTAMP NULL, +t TIME NULL, +y YEAR NULL, +y4 YEAR(4) NULL, +y2 YEAR(2) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +d date # # # +dt datetime # # # +ts timestamp # # # +t time # # # +y year(4) # # # +y4 year(4) # # # +y2 year(2) # # # +SET @tm = '2012-04-09 05:27:00'; +INSERT INTO t1 VALUES +('1000-01-01', '1000-01-01 00:00:00', FROM_UNIXTIME(1), '-838:59:59', '1901', '1901', '00'), +('9999-12-31', '9999-12-31 23:59:59', FROM_UNIXTIME(2147483647), '838:59:59', '2155', '2155', '99'), +('0000-00-00', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '00:00:00', '0', '0', '0'), +(DATE(@tm),@tm,TIMESTAMP(@tm),TIME(@tm),YEAR(@tm),YEAR(@tm),YEAR(@tm)); +SELECT * FROM t1; +d dt ts t y y4 y2 +0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00 +1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 00 +2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12 +9999-12-31 9999-12-31 23:59:59 2038-01-19 07:14:07 838:59:59 2155 2155 99 +INSERT INTO t1 VALUES +('999-13-32', '999-11-31 00:00:00', '0', '-839:00:00', '1900', '1900', '-1' ); +Warnings: +Warning 1265 Data truncated for column 'd' at row 1 +Warning 1265 Data truncated for column 'dt' at row 1 +Warning 1265 Data truncated for column 'ts' at row 1 +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'y4' at row 1 +Warning 1264 Out of range value for column 'y2' at row 1 +SELECT * FROM t1; +d dt ts t y y4 y2 +0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 -838:59:59 0000 0000 00 +0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 00:00:00 2000 2000 00 +1000-01-01 1000-01-01 00:00:00 1970-01-01 03:00:01 -838:59:59 1901 1901 00 +2012-04-09 2012-04-09 05:27:00 2012-04-09 05:27:00 05:27:00 2012 2012 12 +9999-12-31 9999-12-31 23:59:59 2038-01-19 07:14:07 838:59:59 2155 2155 99 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DATE NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c date YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c DATE NULL, +c1 DATE NULL DEFAULT NULL, +c2 DATE NULL DEFAULT '2012-12-21' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c date YES NULL +c1 date YES NULL +c2 date YES 2012-12-21 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DATETIME NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c datetime YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c DATETIME NULL, +c1 DATETIME NULL DEFAULT NULL, +c2 DATETIME NULL DEFAULT '2012-12-21 12:21:12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c datetime YES NULL +c1 datetime YES NULL +c2 datetime YES 2012-12-21 12:21:12 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TIMESTAMP NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c timestamp YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c TIMESTAMP NULL, +c1 TIMESTAMP NULL DEFAULT NULL, +c2 TIMESTAMP NULL DEFAULT '2012-12-21 12:21:12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c timestamp YES NULL +c1 timestamp YES NULL +c2 timestamp YES 2012-12-21 12:21:12 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TIME NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c time YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c TIME NULL, +c1 TIME NULL DEFAULT NULL, +c2 TIME NULL DEFAULT '12:21:12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c time YES NULL +c1 time YES NULL +c2 time YES 12:21:12 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c YEAR NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(4) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c YEAR NULL, +c1 YEAR NULL DEFAULT NULL, +c2 YEAR NULL DEFAULT '2012' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(4) YES NULL +c1 year(4) YES NULL +c2 year(4) YES 2012 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c YEAR(2) NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(2) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c YEAR(2) NULL, +c1 YEAR(2) NULL DEFAULT NULL, +c2 YEAR(2) NULL DEFAULT '12' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c year(2) YES NULL +c1 year(2) YES NULL +c2 year(2) YES 12 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# ENUM columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a ENUM('') NULL, +b ENUM('test1','test2','test3','test4','test5') NULL, +c ENUM('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a enum('') # # # +b enum('test1','test2','test3','test4','test5') # # # +c enum('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') # # # +INSERT INTO t1 VALUES ('','test2','4'),('',5,2); +SELECT * FROM t1; +a b c + test2 4 + test5 2 +INSERT INTO t1 VALUES (0,'test6',-1); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1; +a b c + + test2 4 + test5 2 +ALTER TABLE t1 ADD COLUMN e ENUM('a','A') NULL; +Warnings: +Note 1291 Column 'e' has duplicated value 'a' in ENUM +Note 1291 Column 'e' has duplicated value 'a' in ENUM +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a enum('') # # # +b enum('test1','test2','test3','test4','test5') # # # +c enum('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i','3j','3k','3l','3m','3n','3o','3p','3q','3r','3s','3t','3u','3v','3w','3x','3y','3z','40','41','42','43','44','45','46','47','48','49','4a','4b','4c','4d','4e','4f','4g','4h','4i','4j','4k','4l','4m','4n','4o','4p','4q','4r','4s','4t','4u','4v','4w','4x','4y','4z','50','51','52','53','54','55','56','57','58','59','5a','5b','5c','5d','5e','5f','5g','5h','5i','5j','5k','5l','5m','5n','5o','5p','5q','5r','5s','5t','5u','5v','5w','5x','5y','5z','60','61','62','63','64','65','66','67','68','69','6a','6b','6c','6d','6e','6f','6g','6h','6i','6j','6k','6l','6m','6n','6o','6p','6q','6r','6s','6t','6u','6v','6w','6x','6y','6z','70','71','72','73','74','75') # # # +e enum('a','A') # # # +INSERT INTO t1 VALUES ('','test3','75','A'); +SELECT * FROM t1; +a b c e + NULL + test2 4 NULL + test3 75 a + test5 2 NULL +SELECT * FROM t1 WHERE b='test2' OR a != ''; +a b c e + test2 4 NULL +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c ENUM('test1','test2','test3') NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c enum('test1','test2','test3') YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c ENUM('test1','test2','test3') NULL, +c1 ENUM('test1','test2','test3') NULL DEFAULT NULL, +c2 ENUM('test1','test2','test3') NULL DEFAULT 'test2' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c enum('test1','test2','test3') YES NULL +c1 enum('test1','test2','test3') YES NULL +c2 enum('test1','test2','test3') YES test2 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# Fixed point columns (NUMERIC, DECIMAL) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (d DECIMAL NULL, +d0 DECIMAL(0) NULL, +d1_1 DECIMAL(1,1) NULL, +d10_2 DECIMAL(10,2) NULL, +d60_10 DECIMAL(60,10) NULL, +n NUMERIC NULL, +n0_0 NUMERIC(0,0) NULL, +n1 NUMERIC(1) NULL, +n20_4 NUMERIC(20,4) NULL, +n65_4 NUMERIC(65,4) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +d decimal(10,0) # # # +d0 decimal(10,0) # # # +d1_1 decimal(1,1) # # # +d10_2 decimal(10,2) # # # +d60_10 decimal(60,10) # # # +n decimal(10,0) # # # +n0_0 decimal(10,0) # # # +n1 decimal(1,0) # # # +n20_4 decimal(20,4) # # # +n65_4 decimal(65,4) # # # +INSERT INTO t1 VALUES (100,123456,0.3,40000.25,123456789123456789.10001,1024,7000.0,8.0,999999.9,9223372036854775807); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (9999999999.0,9999999999.0,0.9,99999999.99,99999999999999999999999999999999999999999999999999.9999999999,9999999999.0,9999999999.0,9.0,9999999999999999.9999,9999999999999999999999999999999999999999999999999999999999999.9999); +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (-100,-123456,-0.3,-40000.25,-123456789123456789.10001,-1024,-7000.0,-8.0,-999999.9,-9223372036854775807); +INSERT INTO t1 VALUES (-9999999999.0,-9999999999.0,-0.9,-99999999.99,-99999999999999999999999999999999999999999999999999.9999999999,-9999999999.0,-9999999999.0,-9.0,-9999999999999999.9999,-9999999999999999999999999999999999999999999999999999999999999.9999); +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +SELECT * FROM t1 WHERE n20_4 = 9999999999999999.9999 OR d < 100; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 SELECT n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4 FROM t1 WHERE n65_4 = ( SELECT MAX(n65_4) FROM t1 ); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (10000000000.0,10000000000.0,1.1,100000000.99,100000000000000000000000000000000000000000000000000.0,10000000000.0,10000000000.0,10.0,10000000000000000.9999,10000000000000000000000000000000000000000000000000000000000000.9999); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (9999999999.1,9999999999.1,1.9,99999999.001,99999999999999999999999999999999999999999999999999.99999999991,9999999999.1,9999999999.1,9.1,9999999999999999.00001,9999999999999999999999999999999999999999999999999999999999999.11111); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +Note 1265 Data truncated for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Note 1265 Data truncated for column 'd10_2' at row 1 +Note 1265 Data truncated for column 'd60_10' at row 1 +Note 1265 Data truncated for column 'n' at row 1 +Note 1265 Data truncated for column 'n0_0' at row 1 +Note 1265 Data truncated for column 'n1' at row 1 +Note 1265 Data truncated for column 'n20_4' at row 1 +Note 1265 Data truncated for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +-100 -123456 -0.3 -40000.25 -123456789123456789.1000100000 -1024 -7000 -8 -999999.9000 -9223372036854775807.0000 +-9999999999 -9999999999 -0.9 -99999999.99 -99999999999999999999999999999999999999999999999999.9999999999 -9999999999 -9999999999 -9 -9999999999999999.9999 -9999999999999999999999999999999999999999999999999999999999999.9999 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.00 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.0000 9999999999999999999999999999999999999999999999999999999999999.1111 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66); +ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6); +ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66); +ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DECIMAL NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c DECIMAL NULL, +c1 DECIMAL NULL DEFAULT NULL, +c2 DECIMAL NULL DEFAULT 1.1 +) ENGINE= ; +Warnings: +Note 1265 Data truncated for column 'c2' at row 1 +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) YES NULL +c1 decimal(10,0) YES NULL +c2 decimal(10,0) YES 1 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c NUMERIC NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c NUMERIC NULL, +c1 NUMERIC NULL DEFAULT NULL, +c2 NUMERIC NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c decimal(10,0) YES NULL +c1 decimal(10,0) YES NULL +c2 decimal(10,0) YES 0 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# Floating point columns (FLOAT, DOUBLE) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f FLOAT NULL, +f0 FLOAT(0) NULL, +r1_1 REAL(1,1) NULL, +f23_0 FLOAT(23) NULL, +f20_3 FLOAT(20,3) NULL, +d DOUBLE NULL, +d1_0 DOUBLE(1,0) NULL, +d10_10 DOUBLE PRECISION (10,10) NULL, +d53 DOUBLE(53,0) NULL, +d53_10 DOUBLE(53,10) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +f float # # # +f0 float # # # +r1_1 double(1,1) # # # +f23_0 float # # # +f20_3 float(20,3) # # # +d double # # # +d1_0 double(1,0) # # # +d10_10 double(10,10) # # # +d53 double(53,0) # # # +d53_10 double(53,10) # # # +INSERT INTO t1 VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999); +SELECT * FROM t1; +f 12345.1 +d 11111111.111 +d10_10 0.0123456789 +d1_0 8 +d53 1234566789123456800 +d53_10 100000000000000000.0000000000 +f0 12345.1 +f20_3 56789.988 +f23_0 123457000 +r1_1 0.9 +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES ( +99999999999999999999999999999999999999, +99999999999999999999999999999999999999.9999999999999999, +0.9, +99999999999999999999999999999999999999.9, +99999999999999999.999, +999999999999999999999999999999999999999999999999999999999999999999999999999999999, +9, +0.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d 0 +d 11111111.111 +d 1e81 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 0 +d1_0 8 +d1_0 9 +d53 0 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 0 +f 1e38 +f0 0 +f0 12345.1 +f0 1e38 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999); +SELECT * FROM t1; +f 12345.1 +d -1e60 +d 0 +d 11111111.111 +d 1e81 +d10_10 -0.9999999999 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 -9 +d1_0 0 +d1_0 8 +d1_0 9 +d53 -1000000000000000000000000000000 +d53 0 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 -10000000000000000000000000000000000000000000.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f -1e24 +f 0 +f 1e38 +f0 -100000000000 +f0 0 +f0 12345.1 +f0 1e38 +f20_3 -99999998430674940.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f23_0 -1000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +r1_1 -0.9 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +SELECT MAX(f), MAX(f0), MAX(r1_1), MAX(f23_0), MAX(f20_3), MAX(d), MAX(d1_0), MAX(d10_10), MAX(d53), MAX(d53_10) FROM t1; +MAX(f) 9.999999680285692e37 +MAX(d) 1e81 +MAX(d10_10) 0.9999999999 +MAX(d1_0) 9 +MAX(d53) 100000000000000000000000000000000000000000000000000000 +MAX(d53_10) 10000000000000000000000000000000000000000000.0000000000 +MAX(f0) 9.999999680285692e37 +MAX(f20_3) 99999998430674940.000 +MAX(f23_0) 9.999999680285692e37 +MAX(r1_1) 0.9 +INSERT INTO t1 SELECT d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10 FROM t1 ORDER BY d53_10 DESC LIMIT 1; +Warnings: +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +SELECT * FROM t1; +f 12345.1 +d -1e60 +d 0 +d 11111111.111 +d 1e43 +d 1e81 +d10_10 -0.9999999999 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 -9 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d53 -1000000000000000000000000000000 +d53 0 +d53 10000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 -10000000000000000000000000000000000000000000.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f -1e24 +f 0 +f 1e38 +f 3.40282e38 +f0 -100000000000 +f0 0 +f0 12345.1 +f0 1e38 +f0 3.40282e38 +f20_3 -99999998430674940.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 -1000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +f23_0 3.40282e38 +r1_1 -0.9 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES ( +999999999999999999999999999999999999999, +999999999999999999999999999999999999999.9999999999999999, +1.9, +999999999999999999999999999999999999999.9, +999999999999999999.999, +9999999999999999999999999999999999999999999999999999999999999999999999999999999999, +99, +1.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated. +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +Warning 1264 Out of range value for column 'd10_10' at row 1 +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d -1e60 +d 0 +d 11111111.111 +d 1e43 +d 1e65 +d 1e81 +d10_10 -0.9999999999 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 -9 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d1_0 9 +d53 -1000000000000000000000000000000 +d53 0 +d53 10000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 -10000000000000000000000000000000000000000000.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f -1e24 +f 0 +f 1e38 +f 3.40282e38 +f 3.40282e38 +f0 -100000000000 +f0 0 +f0 12345.1 +f0 1e38 +f0 3.40282e38 +f0 3.40282e38 +f20_3 -99999998430674940.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 -1000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +f23_0 3.40282e38 +f23_0 3.40282e38 +r1_1 -0.9 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0); +ERROR 42000: Display width out of range for 'd0_0' (max = 255) +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1); +ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35); +ERROR 42000: Too big scale 35 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c FLOAT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c float YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c FLOAT NULL, +c1 FLOAT NULL DEFAULT NULL, +c2 FLOAT NULL DEFAULT 1.1 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c float YES NULL +c1 float YES NULL +c2 float YES 1.1 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c DOUBLE NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c double YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c DOUBLE NULL, +c1 DOUBLE NULL DEFAULT NULL, +c2 DOUBLE NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c double YES NULL +c1 double YES NULL +c2 double YES 0 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# INT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (i INT NULL, +i0 INT(0) NULL, +i1 INT(1) NULL, +i20 INT(20) NULL, +t TINYINT NULL, +t0 TINYINT(0) NULL, +t1 TINYINT(1) NULL, +t20 TINYINT(20) NULL, +s SMALLINT NULL, +s0 SMALLINT(0) NULL, +s1 SMALLINT(1) NULL, +s20 SMALLINT(20) NULL, +m MEDIUMINT NULL, +m0 MEDIUMINT(0) NULL, +m1 MEDIUMINT(1) NULL, +m20 MEDIUMINT(20) NULL, +b BIGINT NULL, +b0 BIGINT(0) NULL, +b1 BIGINT(1) NULL, +b20 BIGINT(20) NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +i int(11) # # # +i0 int(11) # # # +i1 int(1) # # # +i20 int(20) # # # +t tinyint(4) # # # +t0 tinyint(4) # # # +t1 tinyint(1) # # # +t20 tinyint(20) # # # +s smallint(6) # # # +s0 smallint(6) # # # +s1 smallint(1) # # # +s20 smallint(20) # # # +m mediumint(9) # # # +m0 mediumint(9) # # # +m1 mediumint(1) # # # +m20 mediumint(20) # # # +b bigint(20) # # # +b0 bigint(20) # # # +b1 bigint(1) # # # +b20 bigint(20) # # # +INSERT INTO t1 VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (2147483647,2147483647,2147483647,2147483647,127,127,127,127,32767,32767,32767,32767,8388607,8388607,8388607,8388607,9223372036854775807,9223372036854775807,9223372036854775807,9223372036854775807); +SELECT * 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 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +INSERT INTO t1 VALUES (-2147483648,-2147483648,-2147483648,-2147483648,-128,-128,-128,-128,-32768,-32768,-32768,-32768,-8388608,-8388608,-8388608,-8388608,-9223372036854775808,-9223372036854775808,-9223372036854775808,-9223372036854775808); +INSERT INTO t1 VALUES (4294967295,4294967295,4294967295,4294967295,255,255,255,255,65535,65535,65535,65535,16777215,16777215,16777215,16777215,18446744073709551615,18446744073709551615,18446744073709551615,18446744073709551615); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +Warning 1264 Out of range value for column 'b1' at row 1 +Warning 1264 Out of range value for column 'b20' at row 1 +SELECT * 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 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +INSERT INTO t1 VALUES (-2147483649,-2147483649,-2147483649,-2147483649,-129,-129,-129,-129,-32769,-32769,-32769,-32769,-8388609,-8388609,-8388609,-8388609,-9223372036854775809,-9223372036854775809,-9223372036854775809,-9223372036854775809); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 VALUES (4294967296,4294967296,4294967296,4294967296,256,256,256,256,65536,65536,65536,65536,16777216,16777216,16777216,16777216,18446744073709551616,18446744073709551616,18446744073709551616,18446744073709551616); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 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 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 * 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 +-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 +-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 +-2147483648 -2147483648 -2147483648 -2147483648 -128 -128 -128 -128 -32768 -32768 -32768 -32768 -8388608 -8388608 -8388608 -8388608 -9223372036854775808 -9223372036854775808 -9223372036854775808 -9223372036854775808 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +ALTER TABLE t1 ADD COLUMN i257 INT(257); +ERROR 42000: Display width out of range for 'i257' (max = 255) +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c INT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c int(11) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c INT NULL, +c1 INT NULL DEFAULT NULL, +c2 INT NULL DEFAULT 2147483647 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c int(11) YES NULL +c1 int(11) YES NULL +c2 int(11) YES 2147483647 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TINYINT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(4) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c TINYINT NULL, +c1 TINYINT NULL DEFAULT NULL, +c2 TINYINT NULL DEFAULT 127 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinyint(4) YES NULL +c1 tinyint(4) YES NULL +c2 tinyint(4) YES 127 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c SMALLINT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c smallint(6) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c SMALLINT NULL, +c1 SMALLINT NULL DEFAULT NULL, +c2 SMALLINT NULL DEFAULT 0 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c smallint(6) YES NULL +c1 smallint(6) YES NULL +c2 smallint(6) YES 0 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c MEDIUMINT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumint(9) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c MEDIUMINT NULL, +c1 MEDIUMINT NULL DEFAULT NULL, +c2 MEDIUMINT NULL DEFAULT 1 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumint(9) YES NULL +c1 mediumint(9) YES NULL +c2 mediumint(9) YES 1 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c BIGINT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bigint(20) YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c BIGINT NULL, +c1 BIGINT NULL DEFAULT NULL, +c2 BIGINT NULL DEFAULT 9223372036854775807 +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c bigint(20) YES NULL +c1 bigint(20) YES NULL +c2 bigint(20) YES 9223372036854775807 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# SET columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a SET('') NULL, +b SET('test1','test2','test3','test4','test5') NULL, +c SET('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a set('') # # # +b set('test1','test2','test3','test4','test5') # # # +c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') # # # +INSERT INTO t1 VALUES +('','test2,test3','01,34,44,,23'), +('',5,2), +(',','test4,test2',''); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1; +a b c + test1,test3 02 + test2,test3 01,23,34,44 + test2,test4 +INSERT INTO t1 VALUES (0,'test6',-1); +Warnings: +Warning 1265 Data truncated for column 'b' at row 1 +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1; +a b c + 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50'51,52,53,54,55,56,57,58,59,60,61,62,63,64 + test1,test3 02 + test2,test3 01,23,34,44 + test2,test4 +ALTER TABLE t1 ADD COLUMN e SET('a','A') NULL; +Warnings: +Note 1291 Column 'e' has duplicated value 'a' in SET +Note 1291 Column 'e' has duplicated value 'a' in SET +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a set('') # # # +b set('test1','test2','test3','test4','test5') # # # +c set('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50''51','52','53','54','55','56','57','58','59','60','61','62','63','64') # # # +e set('a','A') # # # +ALTER TABLE t1 ADD COLUMN f SET('1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','11','12','13','14','15','16','17','18','19','1a','1b','1c','1d','1e','1f','1g','1h','1i','1j','1k','1l','1m','1n','1o','1p','1q','1r','1s','1t','1u','1v','1w','1x','1y','1z','20','21','22','23','24','25','26','27','28','29','2a','2b','2c','2d','2e','2f','2g','2h','2i','2j','2k','2l','2m','2n','2o','2p','2q','2r','2s','2t','2u','2v','2w','2x','2y','2z','30','31','32','33','34','35','36','37','38','39','3a','3b','3c','3d','3e','3f','3g','3h','3i') NULL; +ERROR HY000: Too many strings for column f and SET +SELECT * FROM t1 WHERE FIND_IN_SET('test2',b)>0 OR a != ''; +a b c e + test2,test3 01,23,34,44 NULL + test2,test4 NULL +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c SET('test1','test2','test3') NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c set('test1','test2','test3') YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +CREATE TABLE t1 (c SET('test1','test2','test3') NULL, +c1 SET('test1','test2','test3') NULL DEFAULT NULL, +c2 SET('test1','test2','test3') NULL DEFAULT 'test2,test3' +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c set('test1','test2','test3') YES NULL +c1 set('test1','test2','test3') YES NULL +c2 set('test1','test2','test3') YES test2,test3 +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c2), COUNT(c1), COUNT(c), COUNT(*) FROM t1; +COUNT(c2) COUNT(c1) COUNT(c) COUNT(*) +1 0 0 1 +DROP TABLE t1; +# +# TEXT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (t TEXT NULL, +t0 TEXT(0) NULL, +t1 TEXT(1) NULL, +t300 TEXT(300) NULL, +tm TEXT(65535) NULL, +t70k TEXT(70000) NULL, +t17m TEXT(17000000) NULL, +tt TINYTEXT NULL, +m MEDIUMTEXT NULL, +l LONGTEXT NULL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +t text # # # +t0 text # # # +t1 tinytext # # # +t300 text # # # +tm text # # # +t70k mediumtext # # # +t17m longtext # # # +tt tinytext # # # +m mediumtext # # # +l longtext # # # +INSERT INTO t1 VALUES +('','','','','','','','','',''), +('a','b','c','d','e','f','g','h','i','j'), +('test1','test2','test3','test4','test5','test6','test7','test8','test9','test10'), +( REPEAT('a',65535), REPEAT('b',65535), REPEAT('c',255), REPEAT('d',65535), REPEAT('e',65535), REPEAT('f',1048576), REPEAT('g',1048576), REPEAT('h',255), REPEAT('i',1048576), REPEAT('j',1048576) ); +SELECT LENGTH(t), LENGTH(t0), LENGTH(t1), LENGTH(t300), LENGTH(tm), LENGTH(t70k), LENGTH(t17m), LENGTH(tt), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m) LENGTH(tt) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +INSERT INTO t1 VALUES +( REPEAT('a',65536), REPEAT('b',65536), REPEAT('c',256), REPEAT('d',65536), REPEAT('e',65536), REPEAT('f',1048576), REPEAT('g',1048576), REPEAT('h',256), REPEAT('i',1048576), REPEAT('j',1048576) ); +Warnings: +Warning 1265 Data truncated for column 't' at row 1 +Warning 1265 Data truncated for column 't0' at row 1 +Warning 1265 Data truncated for column 't1' at row 1 +Warning 1265 Data truncated for column 't300' at row 1 +Warning 1265 Data truncated for column 'tm' at row 1 +Warning 1265 Data truncated for column 'tt' at row 1 +SELECT LENGTH(t), LENGTH(t0), LENGTH(t1), LENGTH(t300), LENGTH(tm), LENGTH(t70k), LENGTH(t17m), LENGTH(tt), LENGTH(m), LENGTH(l) FROM t1; +LENGTH(t) LENGTH(t0) LENGTH(t1) LENGTH(t300) LENGTH(tm) LENGTH(t70k) LENGTH(t17m) LENGTH(tt) LENGTH(m) LENGTH(l) +0 0 0 0 0 0 0 0 0 0 +1 1 1 1 1 1 1 1 1 1 +5 5 5 5 5 5 5 5 5 6 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +65535 65535 255 65535 65535 1048576 1048576 255 1048576 1048576 +ALTER TABLE t1 ADD COLUMN ttt TEXT(4294967296); +ERROR 42000: Display width out of range for 'ttt' (max = 4294967295) +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TEXT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c text YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c TINYTEXT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c tinytext YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c MEDIUMTEXT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c mediumtext YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c LONGTEXT NULL) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +c longtext YES NULL +INSERT INTO t1 (c) VALUES (NULL); +SELECT COUNT(c), COUNT(*) FROM t1; +COUNT(c) COUNT(*) +0 1 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/col_opt_null.test b/mysql-test/suite/storage_engine/col_opt_null.test new file mode 100644 index 00000000000..29979d29dfd --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_null.test @@ -0,0 +1,208 @@ +# +# NULL column attribute +# + +let $extra_col_opts = NULL; + +--source have_engine.inc + +--echo # +--echo # BINARY columns +--echo # + +--source type_binary.inc +--let $col_definition = BINARY $default_col_opts +--let $col_default = 0 +--source col_null.inc + +--echo # +--echo # VARBINARY columns +--echo # + +--source type_varbinary.inc +--let $col_definition = VARBINARY(64) $default_col_opts +--let $col_default = 'test' +--source col_null.inc + +--echo # +--echo # BIT columns +--echo # + +--source type_bit.inc +--let $col_definition = BIT $default_col_opts +--let $col_default = 1 +--source col_null.inc + +--echo # +--echo # BLOB columns +--echo # + +--source type_blob.inc + +--let $col_definition = BLOB $default_col_opts +--source col_null.inc + +--let $col_definition = TINYBLOB $default_col_opts +--source col_null.inc + +--let $col_definition = MEDIUMBLOB $default_col_opts +--source col_null.inc + +--let $col_definition = LONGBLOB $default_col_opts +--source col_null.inc + +--echo # +--echo # BOOL columns +--echo # + +--source type_bool.inc +--let $col_definition = BOOL $default_col_opts +--let $col_default = '0' +--source col_null.inc + + +--echo # +--echo # CHAR columns +--echo # + +--source type_char.inc +--let $col_definition = CHAR $default_col_opts +--let $col_default = '_' +--source col_null.inc + +--echo # +--echo # VARCHAR columns +--echo # + + +--source type_varchar.inc +--let $col_definition = VARCHAR(64) $default_col_opts +--let $col_default = 'test default' +--source col_null.inc + + +--echo # +--echo # date and time columns +--echo # + +--source type_date_time.inc + +--let $col_definition = DATE $default_col_opts +--let $col_default = '2012-12-21' +--source col_null.inc + +--let $col_definition = DATETIME $default_col_opts +--let $col_default = '2012-12-21 12:21:12' +--source col_null.inc + +--let $col_definition = TIMESTAMP $default_col_opts +--let $col_default = '2012-12-21 12:21:12' +--source col_null.inc + +--let $col_definition = TIME $default_col_opts +--let $col_default = '12:21:12' +--source col_null.inc + +--let $col_definition = YEAR $default_col_opts +--let $col_default = '2012' +--source col_null.inc + +--let $col_definition = YEAR(2) $default_col_opts +--let $col_default = '12' +--source col_null.inc + + +--echo # +--echo # ENUM columns +--echo # + +--source type_enum.inc +--let $col_definition = ENUM('test1','test2','test3') $default_col_opts +--let $col_default = 'test2' +--source col_null.inc + +--echo # +--echo # Fixed point columns (NUMERIC, DECIMAL) +--echo # + +--source type_fixed.inc + +--let $col_definition = DECIMAL $default_col_opts +--let $col_default = 1.1 +--source col_null.inc + +--let $col_definition = NUMERIC $default_col_opts +--let $col_default = 0 +--source col_null.inc + +--echo # +--echo # Floating point columns (FLOAT, DOUBLE) +--echo # + +--source type_float.inc + +--let $col_definition = FLOAT $default_col_opts +--let $col_default = 1.1 +--source col_null.inc + +--let $col_definition = DOUBLE $default_col_opts +--let $col_default = 0 +--source col_null.inc + +--echo # +--echo # INT columns +--echo # + +--source type_int.inc + +--let $col_definition = INT $default_col_opts +--let $col_default = 2147483647 +--source col_null.inc + +--let $col_definition = TINYINT $default_col_opts +--let $col_default = 127 +--source col_null.inc + +--let $col_definition = SMALLINT $default_col_opts +--let $col_default = 0 +--source col_null.inc + +--let $col_definition = MEDIUMINT $default_col_opts +--let $col_default = 1 +--source col_null.inc + +--let $col_definition = BIGINT $default_col_opts +--let $col_default = 9223372036854775807 +--source col_null.inc + +--echo # +--echo # SET columns +--echo # + +--source type_set.inc +--let $col_definition = SET('test1','test2','test3') $default_col_opts +--let $col_default = 'test2,test3' +--source col_null.inc + + +--echo # +--echo # TEXT columns +--echo # + +--source type_text.inc + +--let $col_definition = TEXT $default_col_opts +--source col_null.inc + +--let $col_definition = TINYTEXT $default_col_opts +--source col_null.inc + +--let $col_definition = MEDIUMTEXT $default_col_opts +--source col_null.inc + +--let $col_definition = LONGTEXT $default_col_opts +--source col_null.inc + + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/col_opt_unsigned.result b/mysql-test/suite/storage_engine/col_opt_unsigned.result new file mode 100644 index 00000000000..a68aa48ee79 --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_unsigned.result @@ -0,0 +1,697 @@ +# +# Fixed point columns (NUMERIC, DECIMAL) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (d DECIMAL UNSIGNED , +d0 DECIMAL(0) UNSIGNED , +d1_1 DECIMAL(1,1) UNSIGNED , +d10_2 DECIMAL(10,2) UNSIGNED , +d60_10 DECIMAL(60,10) UNSIGNED , +n NUMERIC UNSIGNED , +n0_0 NUMERIC(0,0) UNSIGNED , +n1 NUMERIC(1) UNSIGNED , +n20_4 NUMERIC(20,4) UNSIGNED , +n65_4 NUMERIC(65,4) UNSIGNED +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +d decimal(10,0) unsigned # # # +d0 decimal(10,0) unsigned # # # +d1_1 decimal(1,1) unsigned # # # +d10_2 decimal(10,2) unsigned # # # +d60_10 decimal(60,10) unsigned # # # +n decimal(10,0) unsigned # # # +n0_0 decimal(10,0) unsigned # # # +n1 decimal(1,0) unsigned # # # +n20_4 decimal(20,4) unsigned # # # +n65_4 decimal(65,4) unsigned # # # +INSERT INTO t1 VALUES (100,123456,0.3,40000.25,123456789123456789.10001,1024,7000.0,8.0,999999.9,9223372036854775807); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (9999999999.0,9999999999.0,0.9,99999999.99,99999999999999999999999999999999999999999999999999.9999999999,9999999999.0,9999999999.0,9.0,9999999999999999.9999,9999999999999999999999999999999999999999999999999999999999999.9999); +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (-100,-123456,-0.3,-40000.25,-123456789123456789.10001,-1024,-7000.0,-8.0,-999999.9,-9223372036854775807); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +INSERT INTO t1 VALUES (-9999999999.0,-9999999999.0,-0.9,-99999999.99,-99999999999999999999999999999999999999999999999999.9999999999,-9999999999.0,-9999999999.0,-9.0,-9999999999999999.9999,-9999999999999999999999999999999999999999999999999999999999999.9999); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +SELECT * FROM t1 WHERE n20_4 = 9999999999999999.9999 OR d < 100; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 SELECT n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4 FROM t1 WHERE n65_4 = ( SELECT MAX(n65_4) FROM t1 ); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (10000000000.0,10000000000.0,1.1,100000000.99,100000000000000000000000000000000000000000000000000.0,10000000000.0,10000000000.0,10.0,10000000000000000.9999,10000000000000000000000000000000000000000000000000000000000000.9999); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (9999999999.1,9999999999.1,1.9,99999999.001,99999999999999999999999999999999999999999999999999.99999999991,9999999999.1,9999999999.1,9.1,9999999999999999.00001,9999999999999999999999999999999999999999999999999999999999999.11111); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +Note 1265 Data truncated for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Note 1265 Data truncated for column 'd10_2' at row 1 +Note 1265 Data truncated for column 'd60_10' at row 1 +Note 1265 Data truncated for column 'n' at row 1 +Note 1265 Data truncated for column 'n0_0' at row 1 +Note 1265 Data truncated for column 'n1' at row 1 +Note 1265 Data truncated for column 'n20_4' at row 1 +Note 1265 Data truncated for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +0 0 0.0 0.00 0.0000000000 0 0 0 0.0000 0.0000 +100 123456 0.3 40000.25 123456789123456789.1000100000 1024 7000 8 999999.9000 9223372036854775807.0000 +9999999999 9999999999 0.9 99999999.00 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.0000 9999999999999999999999999999999999999999999999999999999999999.1111 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66); +ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6); +ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66); +ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +CREATE TABLE t1 (a DECIMAL UNSIGNED , +b NUMERIC UNSIGNED +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a decimal(10,0) unsigned # # # # +b decimal(10,0) unsigned # # # # +INSERT INTO t1 (a,b) VALUES (1.0,-1.0); +Warnings: +Warning 1264 Out of range value for column 'b' at row 1 +INSERT INTO t1 (a,b) VALUES (-100,100); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t1; +a b +0 100 +1 0 +DROP TABLE t1; +# +# Floating point columns (FLOAT, DOUBLE) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f FLOAT UNSIGNED , +f0 FLOAT(0) UNSIGNED , +r1_1 REAL(1,1) UNSIGNED , +f23_0 FLOAT(23) UNSIGNED , +f20_3 FLOAT(20,3) UNSIGNED , +d DOUBLE UNSIGNED , +d1_0 DOUBLE(1,0) UNSIGNED , +d10_10 DOUBLE PRECISION (10,10) UNSIGNED , +d53 DOUBLE(53,0) UNSIGNED , +d53_10 DOUBLE(53,10) UNSIGNED +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +f float unsigned # # # +f0 float unsigned # # # +r1_1 double(1,1) unsigned # # # +f23_0 float unsigned # # # +f20_3 float(20,3) unsigned # # # +d double unsigned # # # +d1_0 double(1,0) unsigned # # # +d10_10 double(10,10) unsigned # # # +d53 double(53,0) unsigned # # # +d53_10 double(53,10) unsigned # # # +INSERT INTO t1 VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999); +SELECT * FROM t1; +f 12345.1 +d 11111111.111 +d10_10 0.0123456789 +d1_0 8 +d53 1234566789123456800 +d53_10 100000000000000000.0000000000 +f0 12345.1 +f20_3 56789.988 +f23_0 123457000 +r1_1 0.9 +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES ( +99999999999999999999999999999999999999, +99999999999999999999999999999999999999.9999999999999999, +0.9, +99999999999999999999999999999999999999.9, +99999999999999999.999, +999999999999999999999999999999999999999999999999999999999999999999999999999999999, +9, +0.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d 0 +d 11111111.111 +d 1e81 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 0 +d1_0 8 +d1_0 9 +d53 0 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 0 +f 1e38 +f0 0 +f0 12345.1 +f0 1e38 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999); +Warnings: +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +Warning 1264 Out of range value for column 'd10_10' at row 1 +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d 0 +d 0 +d 11111111.111 +d 1e81 +d10_10 0.0000000000 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 0 +d1_0 0 +d1_0 8 +d1_0 9 +d53 0 +d53 0 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 0.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 0 +f 0 +f 1e38 +f0 0 +f0 0 +f0 12345.1 +f0 1e38 +f20_3 0.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f23_0 0 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +r1_1 0.0 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +SELECT MAX(f), MAX(f0), MAX(r1_1), MAX(f23_0), MAX(f20_3), MAX(d), MAX(d1_0), MAX(d10_10), MAX(d53), MAX(d53_10) FROM t1; +MAX(f) 9.999999680285692e37 +MAX(d) 1e81 +MAX(d10_10) 0.9999999999 +MAX(d1_0) 9 +MAX(d53) 100000000000000000000000000000000000000000000000000000 +MAX(d53_10) 10000000000000000000000000000000000000000000.0000000000 +MAX(f0) 9.999999680285692e37 +MAX(f20_3) 99999998430674940.000 +MAX(f23_0) 9.999999680285692e37 +MAX(r1_1) 0.9 +INSERT INTO t1 SELECT d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10 FROM t1 ORDER BY d53_10 DESC LIMIT 1; +Warnings: +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +SELECT * FROM t1; +f 12345.1 +d 0 +d 0 +d 11111111.111 +d 1e43 +d 1e81 +d10_10 0.0000000000 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 0 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d53 0 +d53 0 +d53 10000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 0.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 0 +f 0 +f 1e38 +f 3.40282e38 +f0 0 +f0 0 +f0 12345.1 +f0 1e38 +f0 3.40282e38 +f20_3 0.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 0 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +f23_0 3.40282e38 +r1_1 0.0 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES ( +999999999999999999999999999999999999999, +999999999999999999999999999999999999999.9999999999999999, +1.9, +999999999999999999999999999999999999999.9, +999999999999999999.999, +9999999999999999999999999999999999999999999999999999999999999999999999999999999999, +99, +1.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated. +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +Warning 1264 Out of range value for column 'd10_10' at row 1 +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 12345.1 +d 0 +d 0 +d 11111111.111 +d 1e43 +d 1e65 +d 1e81 +d10_10 0.0000000000 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 0 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d1_0 9 +d53 0 +d53 0 +d53 10000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 1234566789123456800 +d53_10 0.0000000000 +d53_10 0.0000000000 +d53_10 100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 0 +f 0 +f 1e38 +f 3.40282e38 +f 3.40282e38 +f0 0 +f0 0 +f0 12345.1 +f0 1e38 +f0 3.40282e38 +f0 3.40282e38 +f20_3 0.000 +f20_3 0.000 +f20_3 56789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 0 +f23_0 0 +f23_0 123457000 +f23_0 1e38 +f23_0 3.40282e38 +f23_0 3.40282e38 +r1_1 0.0 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0); +ERROR 42000: Display width out of range for 'd0_0' (max = 255) +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1); +ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35); +ERROR 42000: Too big scale 35 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +CREATE TABLE t1 (a DOUBLE UNSIGNED , +b FLOAT UNSIGNED +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a double unsigned # # # # +b float unsigned # # # # +INSERT INTO t1 (a,b) VALUES (1.0,-1.0); +Warnings: +Warning 1264 Out of range value for column 'b' at row 1 +INSERT INTO t1 (a,b) VALUES (-100,100); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +SELECT * FROM t1; +a b +0 100 +1 0 +DROP TABLE t1; +# +# INT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (i INT UNSIGNED , +i0 INT(0) UNSIGNED , +i1 INT(1) UNSIGNED , +i20 INT(20) UNSIGNED , +t TINYINT UNSIGNED , +t0 TINYINT(0) UNSIGNED , +t1 TINYINT(1) UNSIGNED , +t20 TINYINT(20) UNSIGNED , +s SMALLINT UNSIGNED , +s0 SMALLINT(0) UNSIGNED , +s1 SMALLINT(1) UNSIGNED , +s20 SMALLINT(20) UNSIGNED , +m MEDIUMINT UNSIGNED , +m0 MEDIUMINT(0) UNSIGNED , +m1 MEDIUMINT(1) UNSIGNED , +m20 MEDIUMINT(20) UNSIGNED , +b BIGINT UNSIGNED , +b0 BIGINT(0) UNSIGNED , +b1 BIGINT(1) UNSIGNED , +b20 BIGINT(20) UNSIGNED +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +i int(10) unsigned # # # +i0 int(10) unsigned # # # +i1 int(1) unsigned # # # +i20 int(20) unsigned # # # +t tinyint(3) unsigned # # # +t0 tinyint(3) unsigned # # # +t1 tinyint(1) unsigned # # # +t20 tinyint(20) unsigned # # # +s smallint(5) unsigned # # # +s0 smallint(5) unsigned # # # +s1 smallint(1) unsigned # # # +s20 smallint(20) unsigned # # # +m mediumint(8) unsigned # # # +m0 mediumint(8) unsigned # # # +m1 mediumint(1) unsigned # # # +m20 mediumint(20) unsigned # # # +b bigint(20) unsigned # # # +b0 bigint(20) unsigned # # # +b1 bigint(1) unsigned # # # +b20 bigint(20) unsigned # # # +INSERT INTO t1 VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (2147483647,2147483647,2147483647,2147483647,127,127,127,127,32767,32767,32767,32767,8388607,8388607,8388607,8388607,9223372036854775807,9223372036854775807,9223372036854775807,9223372036854775807); +SELECT * 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 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +INSERT INTO t1 VALUES (-2147483648,-2147483648,-2147483648,-2147483648,-128,-128,-128,-128,-32768,-32768,-32768,-32768,-8388608,-8388608,-8388608,-8388608,-9223372036854775808,-9223372036854775808,-9223372036854775808,-9223372036854775808); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 VALUES (4294967295,4294967295,4294967295,4294967295,255,255,255,255,65535,65535,65535,65535,16777215,16777215,16777215,16777215,18446744073709551615,18446744073709551615,18446744073709551615,18446744073709551615); +SELECT * 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 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +INSERT INTO t1 VALUES (-2147483649,-2147483649,-2147483649,-2147483649,-129,-129,-129,-129,-32769,-32769,-32769,-32769,-8388609,-8388609,-8388609,-8388609,-9223372036854775809,-9223372036854775809,-9223372036854775809,-9223372036854775809); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 VALUES (4294967296,4294967296,4294967296,4294967296,256,256,256,256,65536,65536,65536,65536,16777216,16777216,16777216,16777216,18446744073709551616,18446744073709551616,18446744073709551616,18446744073709551616); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 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 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 * 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 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +2147483647 2147483647 2147483647 2147483647 127 127 127 127 32767 32767 32767 32767 8388607 8388607 8388607 8388607 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 4294967295 255 255 255 255 65535 65535 65535 65535 16777215 16777215 16777215 16777215 9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 +ALTER TABLE t1 ADD COLUMN i257 INT(257); +ERROR 42000: Display width out of range for 'i257' (max = 255) +DROP TABLE t1; +CREATE TABLE t1 (t TINYINT UNSIGNED , +s SMALLINT UNSIGNED , +m MEDIUMINT UNSIGNED , +i INT UNSIGNED , +b BIGINT UNSIGNED +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +t tinyint(3) unsigned # # # # +s smallint(5) unsigned # # # # +m mediumint(8) unsigned # # # # +i int(10) unsigned # # # # +b bigint(20) unsigned # # # # +INSERT INTO t1 (t,s,m,i,b) VALUES (255,65535,16777215,4294967295,18446744073709551615); +INSERT INTO t1 (t,s,m,i,b) VALUES (-1,-1,-1,-1,-1); +Warnings: +Warning 1264 Out of range value for column 't' at row 1 +Warning 1264 Out of range value for column 's' at row 1 +Warning 1264 Out of range value for column 'm' at row 1 +Warning 1264 Out of range value for column 'i' at row 1 +Warning 1264 Out of range value for column 'b' at row 1 +SELECT * FROM t1; +t s m i b +0 0 0 0 0 +255 65535 16777215 4294967295 18446744073709551615 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/col_opt_unsigned.test b/mysql-test/suite/storage_engine/col_opt_unsigned.test new file mode 100644 index 00000000000..e9d4566de7f --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_unsigned.test @@ -0,0 +1,95 @@ +# +# UNSIGNED column attribute +# + +let $extra_type_opts = UNSIGNED; + +--source have_engine.inc + +--echo # +--echo # Fixed point columns (NUMERIC, DECIMAL) +--echo # + +--source type_fixed.inc +let $create_definition = + a DECIMAL $col_opts, + b NUMERIC $col_opts +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Fixed point types or UNSIGNED columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # 4 # 5 # 6 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (a,b) VALUES (1.0,-1.0); + INSERT INTO t1 (a,b) VALUES (-100,100); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +--echo # +--echo # Floating point columns (FLOAT, DOUBLE) +--echo # + +--source type_float.inc +let $create_definition = + a DOUBLE $col_opts, + b FLOAT $col_opts +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Floating point types or UNSIGNED columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # 4 # 5 # 6 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (a,b) VALUES (1.0,-1.0); + INSERT INTO t1 (a,b) VALUES (-100,100); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; +} + +--echo # +--echo # INT columns +--echo # + +--source type_int.inc +let $create_definition = + t TINYINT $col_opts, + s SMALLINT $col_opts, + m MEDIUMINT $col_opts, + i INT $col_opts, + b BIGINT $col_opts +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = INT types or UNSIGNED columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # 4 # 5 # 6 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (t,s,m,i,b) VALUES (255,65535,16777215,4294967295,18446744073709551615); + INSERT INTO t1 (t,s,m,i,b) VALUES (-1,-1,-1,-1,-1); + --sorted_result + SELECT * FROM t1; + DROP TABLE t1; + +} + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/col_opt_zerofill.result b/mysql-test/suite/storage_engine/col_opt_zerofill.result new file mode 100644 index 00000000000..c2445c5bbc7 --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_zerofill.result @@ -0,0 +1,679 @@ +# +# Fixed point columns (NUMERIC, DECIMAL) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (d DECIMAL ZEROFILL , +d0 DECIMAL(0) ZEROFILL , +d1_1 DECIMAL(1,1) ZEROFILL , +d10_2 DECIMAL(10,2) ZEROFILL , +d60_10 DECIMAL(60,10) ZEROFILL , +n NUMERIC ZEROFILL , +n0_0 NUMERIC(0,0) ZEROFILL , +n1 NUMERIC(1) ZEROFILL , +n20_4 NUMERIC(20,4) ZEROFILL , +n65_4 NUMERIC(65,4) ZEROFILL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +d decimal(10,0) unsigned zerofill # # # +d0 decimal(10,0) unsigned zerofill # # # +d1_1 decimal(1,1) unsigned zerofill # # # +d10_2 decimal(10,2) unsigned zerofill # # # +d60_10 decimal(60,10) unsigned zerofill # # # +n decimal(10,0) unsigned zerofill # # # +n0_0 decimal(10,0) unsigned zerofill # # # +n1 decimal(1,0) unsigned zerofill # # # +n20_4 decimal(20,4) unsigned zerofill # # # +n65_4 decimal(65,4) unsigned zerofill # # # +INSERT INTO t1 VALUES (100,123456,0.3,40000.25,123456789123456789.10001,1024,7000.0,8.0,999999.9,9223372036854775807); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (9999999999.0,9999999999.0,0.9,99999999.99,99999999999999999999999999999999999999999999999999.9999999999,9999999999.0,9999999999.0,9.0,9999999999999999.9999,9999999999999999999999999999999999999999999999999999999999999.9999); +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000100 0000123456 0.3 00040000.25 00000000000000000000000000000000123456789123456789.1000100000 0000001024 0000007000 8 0000000000999999.9000 0000000000000000000000000000000000000000009223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (-100,-123456,-0.3,-40000.25,-123456789123456789.10001,-1024,-7000.0,-8.0,-999999.9,-9223372036854775807); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +INSERT INTO t1 VALUES (-9999999999.0,-9999999999.0,-0.9,-99999999.99,-99999999999999999999999999999999999999999999999999.9999999999,-9999999999.0,-9999999999.0,-9.0,-9999999999999999.9999,-9999999999999999999999999999999999999999999999999999999999999.9999); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000100 0000123456 0.3 00040000.25 00000000000000000000000000000000123456789123456789.1000100000 0000001024 0000007000 8 0000000000999999.9000 0000000000000000000000000000000000000000009223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +SELECT * FROM t1 WHERE n20_4 = 9999999999999999.9999 OR d < 100; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 SELECT n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4, n65_4 FROM t1 WHERE n65_4 = ( SELECT MAX(n65_4) FROM t1 ); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000100 0000123456 0.3 00040000.25 00000000000000000000000000000000123456789123456789.1000100000 0000001024 0000007000 8 0000000000999999.9000 0000000000000000000000000000000000000000009223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (10000000000.0,10000000000.0,1.1,100000000.99,100000000000000000000000000000000000000000000000000.0,10000000000.0,10000000000.0,10.0,10000000000000000.9999,10000000000000000000000000000000000000000000000000000000000000.9999); +Warnings: +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Warning 1264 Out of range value for column 'd10_2' at row 1 +Warning 1264 Out of range value for column 'd60_10' at row 1 +Warning 1264 Out of range value for column 'n' at row 1 +Warning 1264 Out of range value for column 'n0_0' at row 1 +Warning 1264 Out of range value for column 'n1' at row 1 +Warning 1264 Out of range value for column 'n20_4' at row 1 +Warning 1264 Out of range value for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000100 0000123456 0.3 00040000.25 00000000000000000000000000000000123456789123456789.1000100000 0000001024 0000007000 8 0000000000999999.9000 0000000000000000000000000000000000000000009223372036854775807.0000 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +INSERT INTO t1 VALUES (9999999999.1,9999999999.1,1.9,99999999.001,99999999999999999999999999999999999999999999999999.99999999991,9999999999.1,9999999999.1,9.1,9999999999999999.00001,9999999999999999999999999999999999999999999999999999999999999.11111); +Warnings: +Note 1265 Data truncated for column 'd' at row 1 +Note 1265 Data truncated for column 'd0' at row 1 +Warning 1264 Out of range value for column 'd1_1' at row 1 +Note 1265 Data truncated for column 'd10_2' at row 1 +Note 1265 Data truncated for column 'd60_10' at row 1 +Note 1265 Data truncated for column 'n' at row 1 +Note 1265 Data truncated for column 'n0_0' at row 1 +Note 1265 Data truncated for column 'n1' at row 1 +Note 1265 Data truncated for column 'n20_4' at row 1 +Note 1265 Data truncated for column 'n65_4' at row 1 +SELECT * FROM t1; +d d0 d1_1 d10_2 d60_10 n n0_0 n1 n20_4 n65_4 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000000 0000000000 0.0 00000000.00 00000000000000000000000000000000000000000000000000.0000000000 0000000000 0000000000 0 0000000000000000.0000 0000000000000000000000000000000000000000000000000000000000000.0000 +0000000100 0000123456 0.3 00040000.25 00000000000000000000000000000000123456789123456789.1000100000 0000001024 0000007000 8 0000000000999999.9000 0000000000000000000000000000000000000000009223372036854775807.0000 +9999999999 9999999999 0.9 99999999.00 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.0000 9999999999999999999999999999999999999999999999999999999999999.1111 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +9999999999 9999999999 0.9 99999999.99 99999999999999999999999999999999999999999999999999.9999999999 9999999999 9999999999 9 9999999999999999.9999 9999999999999999999999999999999999999999999999999999999999999.9999 +ALTER TABLE t1 ADD COLUMN n66 NUMERIC(66); +ERROR 42000: Too big precision 66 specified for 'n66'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(66,6); +ERROR 42000: Too big precision 66 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(66,66); +ERROR 42000: Too big scale 66 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +CREATE TABLE t1 (a DECIMAL ZEROFILL , +b NUMERIC ZEROFILL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a decimal(10,0) unsigned zerofill # # # # +b decimal(10,0) unsigned zerofill # # # # +INSERT INTO t1 (a,b) VALUES (1.1,1234); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a b +0000000001 0000001234 +DROP TABLE t1; +# +# Floating point columns (FLOAT, DOUBLE) +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f FLOAT ZEROFILL , +f0 FLOAT(0) ZEROFILL , +r1_1 REAL(1,1) ZEROFILL , +f23_0 FLOAT(23) ZEROFILL , +f20_3 FLOAT(20,3) ZEROFILL , +d DOUBLE ZEROFILL , +d1_0 DOUBLE(1,0) ZEROFILL , +d10_10 DOUBLE PRECISION (10,10) ZEROFILL , +d53 DOUBLE(53,0) ZEROFILL , +d53_10 DOUBLE(53,10) ZEROFILL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +f float unsigned zerofill # # # +f0 float unsigned zerofill # # # +r1_1 double(1,1) unsigned zerofill # # # +f23_0 float unsigned zerofill # # # +f20_3 float(20,3) unsigned zerofill # # # +d double unsigned zerofill # # # +d1_0 double(1,0) unsigned zerofill # # # +d10_10 double(10,10) unsigned zerofill # # # +d53 double(53,0) unsigned zerofill # # # +d53_10 double(53,10) unsigned zerofill # # # +INSERT INTO t1 VALUES (12345.12345,12345.12345,0.9,123456789.123,56789.987,11111111.111,8.0,0.0123456789,1234566789123456789,99999999999999999.99999999); +SELECT * FROM t1; +f 0000012345.1 +d 000000000011111111.111 +d10_10 0.0123456789 +d1_0 8 +d53 00000000000000000000000000000000001234566789123456800 +d53_10 000000000000000000000000100000000000000000.0000000000 +f0 0000012345.1 +f20_3 0000000000056789.988 +f23_0 000123457000 +r1_1 0.9 +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES ( +99999999999999999999999999999999999999, +99999999999999999999999999999999999999.9999999999999999, +0.9, +99999999999999999999999999999999999999.9, +99999999999999999.999, +999999999999999999999999999999999999999999999999999999999999999999999999999999999, +9, +0.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 0000012345.1 +d 0000000000000000000000 +d 0000000000000000001e81 +d 000000000011111111.111 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 0 +d1_0 8 +d1_0 9 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000001234566789123456800 +d53 100000000000000000000000000000000000000000000000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 000000000000 +f 000000001e38 +f0 000000000000 +f0 000000001e38 +f0 0000012345.1 +f20_3 0000000000000000.000 +f20_3 0000000000056789.988 +f20_3 99999998430674940.000 +f23_0 000000000000 +f23_0 000000001e38 +f23_0 000123457000 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES (-999999999999999999999999,-99999999999.999999999999,-0.9,-999.99999999999999999999,-99999999999999999.999,-999999999999999999999999999999999999999999999999999999999999-0.999,-9,-.9999999999,-999999999999999999999999999999.99999999999999999999999,-9999999999999999999999999999999999999999999.9999999999); +Warnings: +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +Warning 1264 Out of range value for column 'd10_10' at row 1 +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 0000012345.1 +d 0000000000000000000000 +d 0000000000000000000000 +d 0000000000000000001e81 +d 000000000011111111.111 +d10_10 0.0000000000 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d1_0 0 +d1_0 0 +d1_0 8 +d1_0 9 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000001234566789123456800 +d53 100000000000000000000000000000000000000000000000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 000000000000 +f 000000000000 +f 000000001e38 +f0 000000000000 +f0 000000000000 +f0 000000001e38 +f0 0000012345.1 +f20_3 0000000000000000.000 +f20_3 0000000000000000.000 +f20_3 0000000000056789.988 +f20_3 99999998430674940.000 +f23_0 000000000000 +f23_0 000000000000 +f23_0 000000001e38 +f23_0 000123457000 +r1_1 0.0 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +SELECT MAX(f), MAX(f0), MAX(r1_1), MAX(f23_0), MAX(f20_3), MAX(d), MAX(d1_0), MAX(d10_10), MAX(d53), MAX(d53_10) FROM t1; +MAX(f) 9.999999680285692e37 +MAX(d) 1e81 +MAX(d10_10) 0.9999999999 +MAX(d1_0) 9 +MAX(d53) 100000000000000000000000000000000000000000000000000000 +MAX(d53_10) 10000000000000000000000000000000000000000000.0000000000 +MAX(f0) 9.999999680285692e37 +MAX(f20_3) 99999998430674940.000 +MAX(f23_0) 9.999999680285692e37 +MAX(r1_1) 0.9 +INSERT INTO t1 SELECT d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10, d53_10 FROM t1 ORDER BY d53_10 DESC LIMIT 1; +Warnings: +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +SELECT * FROM t1; +f 0000012345.1 +d 0000000000000000000000 +d 0000000000000000000000 +d 0000000000000000001e43 +d 0000000000000000001e81 +d 000000000011111111.111 +d10_10 0.0000000000 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 0 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000001234566789123456800 +d53 00000000010000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 000000000000 +f 000000000000 +f 000000001e38 +f 003.40282e38 +f0 000000000000 +f0 000000000000 +f0 000000001e38 +f0 0000012345.1 +f0 003.40282e38 +f20_3 0000000000000000.000 +f20_3 0000000000000000.000 +f20_3 0000000000056789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 000000000000 +f23_0 000000000000 +f23_0 000000001e38 +f23_0 000123457000 +f23_0 003.40282e38 +r1_1 0.0 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +INSERT INTO t1 VALUES ( +999999999999999999999999999999999999999, +999999999999999999999999999999999999999.9999999999999999, +1.9, +999999999999999999999999999999999999999.9, +999999999999999999.999, +9999999999999999999999999999999999999999999999999999999999999999999999999999999999, +99, +1.9999999999, +1999999999999999999999999999999999999999999999999999999, +19999999999999999999999999999999999999999999.9999999999 +); +Warnings: +Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated. +Warning 1264 Out of range value for column 'f' at row 1 +Warning 1264 Out of range value for column 'f0' at row 1 +Warning 1264 Out of range value for column 'r1_1' at row 1 +Warning 1264 Out of range value for column 'f23_0' at row 1 +Warning 1264 Out of range value for column 'f20_3' at row 1 +Warning 1264 Out of range value for column 'd1_0' at row 1 +Warning 1264 Out of range value for column 'd10_10' at row 1 +Warning 1264 Out of range value for column 'd53' at row 1 +Warning 1264 Out of range value for column 'd53_10' at row 1 +SELECT * FROM t1; +f 0000012345.1 +d 0000000000000000000000 +d 0000000000000000000000 +d 0000000000000000001e43 +d 0000000000000000001e65 +d 0000000000000000001e81 +d 000000000011111111.111 +d10_10 0.0000000000 +d10_10 0.0000000000 +d10_10 0.0123456789 +d10_10 0.9999999999 +d10_10 0.9999999999 +d10_10 10000000000000000000000000000000000000000000.0000000000 +d1_0 0 +d1_0 0 +d1_0 8 +d1_0 9 +d1_0 9 +d1_0 9 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000000000000000000000000 +d53 00000000000000000000000000000000001234566789123456800 +d53 00000000010000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53 100000000000000000000000000000000000000000000000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000000000000000000000.0000000000 +d53_10 000000000000000000000000100000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +d53_10 10000000000000000000000000000000000000000000.0000000000 +f 000000000000 +f 000000000000 +f 000000001e38 +f 003.40282e38 +f 003.40282e38 +f0 000000000000 +f0 000000000000 +f0 000000001e38 +f0 0000012345.1 +f0 003.40282e38 +f0 003.40282e38 +f20_3 0000000000000000.000 +f20_3 0000000000000000.000 +f20_3 0000000000056789.988 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f20_3 99999998430674940.000 +f23_0 000000000000 +f23_0 000000000000 +f23_0 000000001e38 +f23_0 000123457000 +f23_0 003.40282e38 +f23_0 003.40282e38 +r1_1 0.0 +r1_1 0.0 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +r1_1 0.9 +ALTER TABLE t1 ADD COLUMN d0_0 DOUBLE(0,0); +ERROR 42000: Display width out of range for 'd0_0' (max = 255) +ALTER TABLE t1 ADD COLUMN n66_6 DECIMAL(256,1); +ERROR 42000: Too big precision 256 specified for 'n66_6'. Maximum is 65. +ALTER TABLE t1 ADD COLUMN n66_66 DECIMAL(40,35); +ERROR 42000: Too big scale 35 specified for 'n66_66'. Maximum is 30. +DROP TABLE t1; +CREATE TABLE t1 (a DOUBLE ZEROFILL , +b FLOAT ZEROFILL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +a double unsigned zerofill # # # # +b float unsigned zerofill # # # # +INSERT INTO t1 (a,b) VALUES (1,1234.5); +SELECT * FROM t1; +a b +0000000000000000000001 0000001234.5 +DROP TABLE t1; +# +# INT columns +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (i INT ZEROFILL , +i0 INT(0) ZEROFILL , +i1 INT(1) ZEROFILL , +i20 INT(20) ZEROFILL , +t TINYINT ZEROFILL , +t0 TINYINT(0) ZEROFILL , +t1 TINYINT(1) ZEROFILL , +t20 TINYINT(20) ZEROFILL , +s SMALLINT ZEROFILL , +s0 SMALLINT(0) ZEROFILL , +s1 SMALLINT(1) ZEROFILL , +s20 SMALLINT(20) ZEROFILL , +m MEDIUMINT ZEROFILL , +m0 MEDIUMINT(0) ZEROFILL , +m1 MEDIUMINT(1) ZEROFILL , +m20 MEDIUMINT(20) ZEROFILL , +b BIGINT ZEROFILL , +b0 BIGINT(0) ZEROFILL , +b1 BIGINT(1) ZEROFILL , +b20 BIGINT(20) ZEROFILL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +i int(10) unsigned zerofill # # # +i0 int(10) unsigned zerofill # # # +i1 int(1) unsigned zerofill # # # +i20 int(20) unsigned zerofill # # # +t tinyint(3) unsigned zerofill # # # +t0 tinyint(3) unsigned zerofill # # # +t1 tinyint(1) unsigned zerofill # # # +t20 tinyint(20) unsigned zerofill # # # +s smallint(5) unsigned zerofill # # # +s0 smallint(5) unsigned zerofill # # # +s1 smallint(1) unsigned zerofill # # # +s20 smallint(20) unsigned zerofill # # # +m mediumint(8) unsigned zerofill # # # +m0 mediumint(8) unsigned zerofill # # # +m1 mediumint(1) unsigned zerofill # # # +m20 mediumint(20) unsigned zerofill # # # +b bigint(20) unsigned zerofill # # # +b0 bigint(20) unsigned zerofill # # # +b1 bigint(1) unsigned zerofill # # # +b20 bigint(20) unsigned zerofill # # # +INSERT INTO t1 VALUES (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); +INSERT INTO t1 VALUES (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO t1 VALUES (2147483647,2147483647,2147483647,2147483647,127,127,127,127,32767,32767,32767,32767,8388607,8388607,8388607,8388607,9223372036854775807,9223372036854775807,9223372036854775807,9223372036854775807); +SELECT * FROM t1; +i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 +0000000000 0000000000 0 00000000000000000000 000 000 0 00000000000000000000 00000 00000 0 00000000000000000000 00000000 00000000 0 00000000000000000000 00000000000000000000 00000000000000000000 0 00000000000000000000 +0000000001 0000000002 3 00000000000000000004 005 006 7 00000000000000000008 00009 00010 11 00000000000000000012 00000013 00000014 15 00000000000000000016 00000000000000000017 00000000000000000018 19 00000000000000000020 +2147483647 2147483647 2147483647 00000000002147483647 127 127 127 00000000000000000127 32767 32767 32767 00000000000000032767 08388607 08388607 8388607 00000000000008388607 09223372036854775807 09223372036854775807 9223372036854775807 09223372036854775807 +INSERT INTO t1 VALUES (-2147483648,-2147483648,-2147483648,-2147483648,-128,-128,-128,-128,-32768,-32768,-32768,-32768,-8388608,-8388608,-8388608,-8388608,-9223372036854775808,-9223372036854775808,-9223372036854775808,-9223372036854775808); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 VALUES (4294967295,4294967295,4294967295,4294967295,255,255,255,255,65535,65535,65535,65535,16777215,16777215,16777215,16777215,18446744073709551615,18446744073709551615,18446744073709551615,18446744073709551615); +SELECT * FROM t1; +i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 +0000000000 0000000000 0 00000000000000000000 000 000 0 00000000000000000000 00000 00000 0 00000000000000000000 00000000 00000000 0 00000000000000000000 00000000000000000000 00000000000000000000 0 00000000000000000000 +0000000000 0000000000 0 00000000000000000000 000 000 0 00000000000000000000 00000 00000 0 00000000000000000000 00000000 00000000 0 00000000000000000000 00000000000000000000 00000000000000000000 0 00000000000000000000 +0000000001 0000000002 3 00000000000000000004 005 006 7 00000000000000000008 00009 00010 11 00000000000000000012 00000013 00000014 15 00000000000000000016 00000000000000000017 00000000000000000018 19 00000000000000000020 +2147483647 2147483647 2147483647 00000000002147483647 127 127 127 00000000000000000127 32767 32767 32767 00000000000000032767 08388607 08388607 8388607 00000000000008388607 09223372036854775807 09223372036854775807 9223372036854775807 09223372036854775807 +4294967295 4294967295 4294967295 00000000004294967295 255 255 255 00000000000000000255 65535 65535 65535 00000000000000065535 16777215 16777215 16777215 00000000000016777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +INSERT INTO t1 VALUES (-2147483649,-2147483649,-2147483649,-2147483649,-129,-129,-129,-129,-32769,-32769,-32769,-32769,-8388609,-8388609,-8388609,-8388609,-9223372036854775809,-9223372036854775809,-9223372036854775809,-9223372036854775809); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 VALUES (4294967296,4294967296,4294967296,4294967296,256,256,256,256,65536,65536,65536,65536,16777216,16777216,16777216,16777216,18446744073709551616,18446744073709551616,18446744073709551616,18446744073709551616); +Warnings: +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 'b' at row 1 +Warning 1264 Out of range value for column 'b0' at row 1 +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 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 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 * FROM t1; +i i0 i1 i20 t t0 t1 t20 s s0 s1 s20 m m0 m1 m20 b b0 b1 b20 +0000000000 0000000000 0 00000000000000000000 000 000 0 00000000000000000000 00000 00000 0 00000000000000000000 00000000 00000000 0 00000000000000000000 00000000000000000000 00000000000000000000 0 00000000000000000000 +0000000000 0000000000 0 00000000000000000000 000 000 0 00000000000000000000 00000 00000 0 00000000000000000000 00000000 00000000 0 00000000000000000000 00000000000000000000 00000000000000000000 0 00000000000000000000 +0000000000 0000000000 0 00000000000000000000 000 000 0 00000000000000000000 00000 00000 0 00000000000000000000 00000000 00000000 0 00000000000000000000 00000000000000000000 00000000000000000000 0 00000000000000000000 +0000000001 0000000002 3 00000000000000000004 005 006 7 00000000000000000008 00009 00010 11 00000000000000000012 00000013 00000014 15 00000000000000000016 00000000000000000017 00000000000000000018 19 00000000000000000020 +2147483647 2147483647 2147483647 00000000002147483647 127 127 127 00000000000000000127 32767 32767 32767 00000000000000032767 08388607 08388607 8388607 00000000000008388607 09223372036854775807 09223372036854775807 9223372036854775807 09223372036854775807 +4294967295 4294967295 4294967295 00000000004294967295 255 255 255 00000000000000000255 65535 65535 65535 00000000000000065535 16777215 16777215 16777215 00000000000016777215 09223372036854775807 09223372036854775807 9223372036854775807 09223372036854775807 +4294967295 4294967295 4294967295 00000000004294967295 255 255 255 00000000000000000255 65535 65535 65535 00000000000000065535 16777215 16777215 16777215 00000000000016777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 00000000004294967295 255 255 255 00000000000000000255 65535 65535 65535 00000000000000065535 16777215 16777215 16777215 00000000000016777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 00000000004294967295 255 255 255 00000000000000000255 65535 65535 65535 00000000000000065535 16777215 16777215 16777215 00000000000016777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +4294967295 4294967295 4294967295 00000000004294967295 255 255 255 00000000000000000255 65535 65535 65535 00000000000000065535 16777215 16777215 16777215 00000000000016777215 18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615 +ALTER TABLE t1 ADD COLUMN i257 INT(257); +ERROR 42000: Display width out of range for 'i257' (max = 255) +DROP TABLE t1; +CREATE TABLE t1 (t TINYINT ZEROFILL , +s SMALLINT ZEROFILL , +m MEDIUMINT ZEROFILL , +i INT ZEROFILL , +b BIGINT ZEROFILL +) ENGINE= ; +SHOW COLUMNS IN t1; +Field Type Null Key Default Extra +t tinyint(3) unsigned zerofill # # # # +s smallint(5) unsigned zerofill # # # # +m mediumint(8) unsigned zerofill # # # # +i int(10) unsigned zerofill # # # # +b bigint(20) unsigned zerofill # # # # +INSERT INTO t1 (t,s,m,i,b) VALUES (1,10,100,1000,0); +SELECT * FROM t1; +t s m i b +001 00010 00000100 0000001000 00000000000000000000 +DROP TABLE t1; diff --git a/mysql-test/suite/storage_engine/col_opt_zerofill.test b/mysql-test/suite/storage_engine/col_opt_zerofill.test new file mode 100644 index 00000000000..83b7dcf28c1 --- /dev/null +++ b/mysql-test/suite/storage_engine/col_opt_zerofill.test @@ -0,0 +1,88 @@ +# +# ZEROFILL column attribute +# + +let $extra_type_opts = ZEROFILL; + +--source have_engine.inc + +--echo # +--echo # Fixed point columns (NUMERIC, DECIMAL) +--echo # + +--source type_fixed.inc +let $create_definition = + a DECIMAL $col_opts, + b NUMERIC $col_opts +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Fixed point types or ZEROFILL columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # 4 # 5 # 6 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (a,b) VALUES (1.1,1234); + SELECT * FROM t1; + DROP TABLE t1; +} + +--echo # +--echo # Floating point columns (FLOAT, DOUBLE) +--echo # + +--source type_float.inc +let $create_definition = + a DOUBLE $col_opts, + b FLOAT $col_opts +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = Floating point types or ZEROFILL columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # 4 # 5 # 6 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (a,b) VALUES (1,1234.5); + SELECT * FROM t1; + DROP TABLE t1; +} + +--echo # +--echo # INT columns +--echo # + +--source type_int.inc +let $create_definition = + t TINYINT $col_opts, + s SMALLINT $col_opts, + m MEDIUMINT $col_opts, + i INT $col_opts, + b BIGINT $col_opts +; +--source create_table.inc +if ($mysql_errname) +{ + --let $functionality = INT types or UNSIGNED columns + --source unexpected_result.inc +} +if (!$mysql_errname) +{ + --replace_column 3 # 4 # 5 # 6 # + SHOW COLUMNS IN t1; + + INSERT INTO t1 (t,s,m,i,b) VALUES (1,10,100,1000,0); + SELECT * FROM t1; + DROP TABLE t1; +} + +--source cleanup_engine.inc + diff --git a/mysql-test/suite/storage_engine/create_table.inc b/mysql-test/suite/storage_engine/create_table.inc new file mode 100644 index 00000000000..9a1cba5100a --- /dev/null +++ b/mysql-test/suite/storage_engine/create_table.inc @@ -0,0 +1,174 @@ +################################## +# +# This include file will be used for all CREATE TABLE statements in the suite. +# If you need to add additional steps or change the logic, copy the file +# to storage//mysql-test/storage_engine/ folder and modify it there. +# +################## +# +# Parameters: +# +# --let $create_definition = # optional, default t1 +# --let $table_options =
# optional, default based on define_engine.inc +# --let $partition_options = # optional, default none +# --let $as_select =
# optional, default t1 +# --let $error_codes = # optional, default 0 +# --let $online = [0|1] # optional, default 0 (1 adds ONLINE) +# --let $rename_to = # optional, default empty. +# # If set, means we are running RENAME TO, then alter definition is ignored +# +# Usage examples: +# +# --let $alter_definition = ADD COLUMN b $char_col DEFAULT '' +# + +--let $child_alter_definition = $alter_definition + +if ($rename_to) +{ + --let $alter_definition = RENAME TO $rename_to + --let $child_alter_definition = RENAME TO mrg.$rename_to +} + +if (!$alter_definition) +{ + --die # The ALTER statement is empty +} + +--let $alter_statement = ALTER + +if ($online) +{ + --let $alter_statement = $alter_statement ONLINE +} + +if (!$table_name) +{ + --let $table_name = t1 +} + +--let $alter_statement = $alter_statement TABLE $table_name $alter_definition +# We don't want to do ONLINE on underlying tables, we are not testing MyISAM +--let $child_statement = ALTER TABLE mrg.$table_name $child_alter_definition + + + +# We now have the complete ALTER statement in $alter_statement. +# If your ALTER statement should be composed differently, +# modify the logic above. + +##################### +# Here you can add logic needed BEFORE the main statement +# (e.g. base tables need to be altered, etc.). +# Surround it by --disable_query_log/--enable_query_log +# if you don't want it to appear in the result output. +##################### + +--source obfuscate.inc + +eval $alter_statement; +--source check_errors.inc + +# Make sure you don't add any statements between the main ALTER (above) +# and saving mysql_errno and mysql_errname (below) +# They are saved in case you want to add more logic after the main ALTER, +# because we need the result code of the statement. +# Also, do not change $alter_statement after it is executed! + +--let $my_errno = $mysql_errno +--let $my_errname = $mysql_errname + +##################### +# Here you can add logic needed AFTER the main statement. +# Surround it by --disable_query_log/--enable_query_log +# if you don't want it to appear in the result output. +##################### +--disable_query_log +--disable_warnings +--disable_result_log +# We will only try to alter the underlying table if the main alter was successful +if (!$my_errno) +{ + if ($rename_to) + { + eval ALTER TABLE $rename_to UNION(mrg.$rename_to); + } + # In the same section, the manual says that FLUSH TABLES should be performed before altering + # the underlying table, and later also says that it should be done after. We'll do both + FLUSH TABLES; + eval $child_statement; + FLUSH TABLES; +} +--enable_result_log +--enable_warnings +--enable_query_log + +# Unset the parameters, we don't want them to be accidentally reused later +--let $alter_definition = +--let $table_name = +--let $error_codes = +--let $online = 0 +--let $rename_to = + +# Restore the error codes of the main statement +--let $mysql_errno = $my_errno +--let $mysql_errname = $my_errname +# Make sure you don't add any SQL statements after restoring +# mysql_errno and mysql_errname (above) + diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff new file mode 100644 index 00000000000..447a38a5b2b --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/alter_table.rdiff @@ -0,0 +1,68 @@ +11c11 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +19c19 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +27c27 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +35c35 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +43c43 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +51c51 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +59c59 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +67c67 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +75c75 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +82c82 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +91c91 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t2`) +100c100 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +107c107 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +122c122 +< ) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs +--- +> ) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +130c130 +< ) ENGINE= DEFAULT CHARSET=utf8 +--- +> ) ENGINE= DEFAULT CHARSET=utf8 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +138c138 +< ) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci +--- +> ) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +146c146 +< ) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci +--- +> ) ENGINE= DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci INSERT_METHOD=LAST UNION=(`mrg`.`t1`) diff --git a/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff new file mode 100644 index 00000000000..cfc821582ed --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/alter_tablespace.rdiff @@ -0,0 +1,27 @@ +4,18c4,13 +< DROP TABLE t1; +< CREATE TABLE t1 (a ) ENGINE= ; +< INSERT INTO t1 (a) VALUES (1),(2); +< SELECT * FROM t1; +< a +< 1 +< 2 +< ALTER TABLE t1 DISCARD TABLESPACE; +< SELECT * FROM t1; +< ERROR HY000: Got error -1 from storage engine +< ALTER TABLE t1 IMPORT TABLESPACE; +< SELECT * FROM t1; +< a +< 1 +< 2 +--- +> ERROR HY000: 'test.t1' is not BASE TABLE +> # ERROR: Statement ended with errno 1347, errname ER_WRONG_OBJECT (expected to succeed) +> # ------------ UNEXPECTED RESULT ------------ +> # [ ALTER TABLE t1 DISCARD TABLESPACE ] +> # The statement|command finished with ER_WRONG_OBJECT. +> # Tablespace operations or the mix could be unsupported|malfunctioning, or the problem was caused by previous errors. +> # You can change the engine code, or create an rdiff, or disable the test by adding it to disabled.def. +> # Further in this test, the message might sometimes be suppressed; a part of the test might be skipped. +> # Also, this problem may cause a chain effect (more errors of different kinds in the test). +> # ------------------------------------------- diff --git a/storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff b/storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff new file mode 100644 index 00000000000..139bcc00a81 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/analyze_table.rdiff @@ -0,0 +1,22 @@ +8c8 +< test.t1 analyze status OK +--- +> test.t1 analyze note The storage engine for the table doesn't support analyze +12c12 +< test.t2 analyze status OK +--- +> test.t2 analyze note The storage engine for the table doesn't support analyze +17,18c17,18 +< test.t1 analyze status OK +< test.t2 analyze status OK +--- +> test.t1 analyze note The storage engine for the table doesn't support analyze +> test.t2 analyze note The storage engine for the table doesn't support analyze +24c24 +< test.t1 analyze status OK +--- +> test.t1 analyze note The storage engine for the table doesn't support analyze +28c28 +< test.t1 analyze status OK +--- +> test.t1 analyze note The storage engine for the table doesn't support analyze diff --git a/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff b/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff new file mode 100644 index 00000000000..e9095aa3944 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/autoincrement.rdiff @@ -0,0 +1,34 @@ +9c9 +< ) ENGINE= DEFAULT CHARSET=latin1 +--- +> ) ENGINE= DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`mrg`.`t1`) +55c55 +< t1 # # # # # # # # 6 # # # # # # # +--- +> t1 # # # # # # # # 0 # # # # # # # +62c62 +< t1 # # # # # # # # # 8 # # # # # # # +--- +> t1 # # # # # # # # # 0 # # # # # # # +81c81 +< t1 # # # # # # # # # 10 # # # # # # # +--- +> t1 # # # # # # # # # 0 # # # # # # # +85c85 +< t1 # # # # # # # # # 21 # # # # # # # +--- +> t1 # # # # # # # # # 0 # # # # # # # +106c106 +< t1 # # # # # # # # # 22 # # # # # # # +--- +> t1 # # # # # # # # # 0 # # # # # # # +128,129c128,129 +< 100 a +< 101 b +--- +> 1 a +> 2 b +132c132 +< 100 +--- +> 1 diff --git a/storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff b/storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff new file mode 100644 index 00000000000..e10b22a8e66 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/cache_index.rdiff @@ -0,0 +1,46 @@ +15,16c15,16 +< test.t1 assign_to_keycache status OK +< test.t2 assign_to_keycache status OK +--- +> test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache +> test.t2 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache +19,20c19,20 +< test.t1 preload_keys status OK +< test.t2 preload_keys status OK +--- +> test.t1 preload_keys note The storage engine for the table doesn't support preload_keys +> test.t2 preload_keys note The storage engine for the table doesn't support preload_keys +25,26c25,26 +< test.t1 preload_keys status OK +< test.t2 preload_keys status OK +--- +> test.t1 preload_keys note The storage engine for the table doesn't support preload_keys +> test.t2 preload_keys note The storage engine for the table doesn't support preload_keys +31c31 +< test.t1 preload_keys status OK +--- +> test.t1 preload_keys note The storage engine for the table doesn't support preload_keys +35c35 +< test.t1 assign_to_keycache status OK +--- +> test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache +39c39 +< test.t1 preload_keys status OK +--- +> test.t1 preload_keys note The storage engine for the table doesn't support preload_keys +50c50 +< test.t1 assign_to_keycache status OK +--- +> test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache +54c54 +< test.t1 preload_keys status OK +--- +> test.t1 preload_keys note The storage engine for the table doesn't support preload_keys +62c62 +< test.t1 assign_to_keycache status OK +--- +> test.t1 assign_to_keycache note The storage engine for the table doesn't support assign_to_keycache +66c66 +< test.t1 preload_keys status OK +--- +> test.t1 preload_keys note The storage engine for the table doesn't support preload_keys diff --git a/storage/myisammrg/mysql-test/storage_engine/char_indexes.rdiff b/storage/myisammrg/mysql-test/storage_engine/char_indexes.rdiff new file mode 100644 index 00000000000..e69de29bb2d diff --git a/storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff b/storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff new file mode 100644 index 00000000000..1710cc18fea --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/checksum_table_live.rdiff @@ -0,0 +1,6 @@ +14,15c14,15 +< test.t1 4272806499 +< test.t2 0 +--- +> test.t1 NULL +> test.t2 NULL diff --git a/storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc b/storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc new file mode 100644 index 00000000000..b8f84110c76 --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/cleanup_engine.inc @@ -0,0 +1,16 @@ +########################################### +# +# This is a stub of the include file cleanup_engine.inc which +# should be placed in storage//mysql-test/storage_engine folder. +# +################################ +# +# Here you can add whatever is needed to cleanup +# in case your define_engine.inc created any artefacts, +# e.g. an additional schema and/or tables. +--disable_query_log +--disable_warnings +DROP DATABASE IF EXISTS mrg; +--enable_warnings +--enable_query_log + diff --git a/storage/myisammrg/mysql-test/storage_engine/create_table.inc b/storage/myisammrg/mysql-test/storage_engine/create_table.inc new file mode 100644 index 00000000000..c74460d42fb --- /dev/null +++ b/storage/myisammrg/mysql-test/storage_engine/create_table.inc @@ -0,0 +1,208 @@ +################################## +# +# This include file will be used for all CREATE TABLE statements in the suite. +# If you need to add additional steps or change the logic, copy the file +# to storage//mysql-test/storage_engine/ folder and modify it there. +# +################## +# +# Parameters: +# +# --let $create_definition = # optional, default t1 +# --let $table_options =
# optional, default based on define_engine.inc +# --let $partition_options = # optional, default none +# --let $as_select =