From 54dcbf2cbe97d8e5274c451bc960ed1b9ab54f54 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 16 Jun 2009 15:26:17 +0200 Subject: Bug #45298 plugin.test is skipped in PB2 on UNIX platforms Added search for example plugin in lib/mysql/plugin --- mysql-test/mysql-test-run.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 2a6a069d81c..4e89fd899ce 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1763,7 +1763,8 @@ sub environment_setup { if ($mysql_version_id >= 50100) { my $lib_example_plugin= mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'), - "$basedir/storage/example/.libs/ha_example.so",); + "$basedir/storage/example/.libs/ha_example.so", + "$basedir/lib/mysql/plugin/ha_example.so",); $ENV{'EXAMPLE_PLUGIN'}= ($lib_example_plugin ? basename($lib_example_plugin) : ""); $ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=". -- cgit v1.2.1 From a9b438b2229a340343055f36528f10f504efb19d Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 22 Jun 2009 16:27:05 +0200 Subject: Bug #43780 mysql-test-run uses deprecated server options Updated to use general_log[_file] and slow_query_log[_file] --- mysql-test/lib/My/ConfigFactory.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 852f706c858..c1e8f7cd826 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -204,8 +204,10 @@ my @mysqld_rules= { 'port' => \&fix_port }, { 'socket' => \&fix_socket }, { '#log-error' => \&fix_log_error }, - { 'log' => \&fix_log }, - { 'log-slow-queries' => \&fix_log_slow_queries }, + { 'general_log' => 1 }, + { 'general_log_file' => \&fix_log }, + { 'slow_query_log' => 1 }, + { 'slow_query_log_file' => \&fix_log_slow_queries }, { '#user' => sub { return shift->{ARGS}->{user} || ""; } }, { '#password' => sub { return shift->{ARGS}->{password} || ""; } }, { 'server-id' => \&fix_server_id, }, -- cgit v1.2.1 From 47fa03abe75414040dc5ab96f6dc29f01ed7017b Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 22 Jun 2009 16:29:02 +0200 Subject: Bug #45532 MTR displays wrong option name 'print_testcases' in usage text Fix the name.... --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4e89fd899ce..e6e8a77f3ed 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5113,7 +5113,7 @@ Options to control what test suites or cases to run skip-rpl Skip the replication test cases. big-test Also run tests marked as "big" enable-disabled Run also tests marked as disabled - print_testcases Don't run the tests but print details about all the + print-testcases Don't run the tests but print details about all the selected tests, in the order they would be run. Options that specify ports -- cgit v1.2.1 From 6fed1e15c23dd882ddc8e522a0156269c9424635 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 15 Jul 2009 14:20:56 +0200 Subject: Bug #43005 main.init_connect fais on Windows in PB2 Server args containing spaces do not work on Windows Fixed my_safe_rprocess-win to re-apply "" around such args --- mysql-test/lib/My/SafeProcess/safe_process_win.cc | 9 ++++++++- mysql-test/suite/rpl/t/disabled.def | 1 - mysql-test/t/disabled.def | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc index 80c1b7a97f2..d85a9558a62 100755 --- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc @@ -188,7 +188,14 @@ int main(int argc, const char** argv ) die("No real args -> nothing to do"); /* Copy the remaining args to child_arg */ for (int j= i+1; j < argc; j++) { - to+= _snprintf(to, child_args + sizeof(child_args) - to, "%s ", argv[j]); + if (strchr (argv[j], ' ')) { + /* Protect with "" if this arg contains a space */ + to+= _snprintf(to, child_args + sizeof(child_args) - to, + "\"%s\" ", argv[j]); + } else { + to+= _snprintf(to, child_args + sizeof(child_args) - to, + "%s ", argv[j]); + } } break; } else { diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index fcc3d56a9f5..38fc9e21322 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,4 +11,3 @@ ############################################################################## rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx -rpl_init_slave : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index af4eb44b464..6d8f0af0c28 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,4 +12,3 @@ kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently" query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically -init_connect : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows -- cgit v1.2.1 From 5a2d043f1d8e4c00f98ae33dd009d91ee6a0ec78 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 16 Jul 2009 14:05:46 +0200 Subject: Bug #45698 MTR_VERSION=1 ./mtr --force does not work General problem: some test cannot run in V1, expect more in future Implement general mechanism for listing incompatible tests --- mysql-test/lib/v1/incompatible.tests | 6 ++++++ mysql-test/lib/v1/mtr_cases.pl | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 mysql-test/lib/v1/incompatible.tests (limited to 'mysql-test') diff --git a/mysql-test/lib/v1/incompatible.tests b/mysql-test/lib/v1/incompatible.tests new file mode 100644 index 00000000000..fefdad9ce4c --- /dev/null +++ b/mysql-test/lib/v1/incompatible.tests @@ -0,0 +1,6 @@ +# This file lists tests that cannot run in MTR v1 for some reason. +# They will be skipped. +# Any text following white space after full test name is ignored +# Only exact test names can be used, no regexp. + +main.fulltext_plugin # Refers to $SIMPLE_PARSER_OPT which is not set diff --git a/mysql-test/lib/v1/mtr_cases.pl b/mysql-test/lib/v1/mtr_cases.pl index 4d7b1f4ec70..bed24bcabfb 100644 --- a/mysql-test/lib/v1/mtr_cases.pl +++ b/mysql-test/lib/v1/mtr_cases.pl @@ -32,6 +32,7 @@ sub mtr_options_from_test_file($$); my $do_test; my $skip_test; +my %incompatible; sub init_pattern { my ($from, $what)= @_; @@ -47,6 +48,15 @@ sub init_pattern { } +sub collect_incomp_tests { + open (INCOMP, "lib/v1/incompatible.tests"); + while () + { + next unless /^\w/; + s/\s.*\n//; # Ignore anything from first white space + $incompatible{$_}= 1; + } +} ############################################################################## # @@ -58,6 +68,8 @@ sub collect_test_cases ($) { $do_test= init_pattern($::opt_do_test, "--do-test"); $skip_test= init_pattern($::opt_skip_test, "--skip-test"); + collect_incomp_tests(); + my $suites= shift; # Semicolon separated list of test suites my $cases = []; # Array of hash @@ -528,6 +540,13 @@ sub collect_one_test_case($$$$$$$$$) { $tinfo->{'component_id'} = $component_id; push(@$cases, $tinfo); + if (exists ($incompatible{$tinfo->{'name'}})) + { + $tinfo->{'skip'}= 1; + $tinfo->{'comment'}= "Test cannot run in mtr v1"; + return; + } + # ---------------------------------------------------------------------- # Skip some tests but include in list, just mark them to skip # ---------------------------------------------------------------------- -- cgit v1.2.1 From b9720c71700ad91b2320750ea72c787338d08810 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 17 Jul 2009 10:41:04 +0200 Subject: Bug #45700 MTR v1 --start-and-exit --default-storage-engine=Innodb is froken Change of variable states in Bug 19027 was not backported to v1 Changed ne "TRUE" to eq "OFF" --- mysql-test/lib/v1/mtr_cases.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/v1/mtr_cases.pl b/mysql-test/lib/v1/mtr_cases.pl index bed24bcabfb..906e330282a 100644 --- a/mysql-test/lib/v1/mtr_cases.pl +++ b/mysql-test/lib/v1/mtr_cases.pl @@ -860,7 +860,7 @@ sub collect_one_test_case($$$$$$$$$) { if ( $tinfo->{'innodb_test'} ) { # This is a test that need innodb - if ( $::mysqld_variables{'innodb'} ne "TRUE" ) + if ( $::mysqld_variables{'innodb'} eq "OFF" ) { # innodb is not supported, skip it $tinfo->{'skip'}= 1; -- cgit v1.2.1 From a80bd0b5d7267d420aa876ed7d7edaed2c7e898d Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 23 Jul 2009 19:01:24 +0200 Subject: Bug #46212 safe_process: FATAL ERROR, Unknown option: --nocore Also fixed mysqld.cc to avoid popup-boxes --- mysql-test/lib/My/SafeProcess/safe_process_win.cc | 30 +++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc index d85a9558a62..455262b29f5 100755 --- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc @@ -163,6 +163,7 @@ int main(int argc, const char** argv ) HANDLE job_handle; HANDLE wait_handles[NUM_HANDLES]= {0}; PROCESS_INFORMATION process_info= {0}; + BOOL nocore= FALSE; sprintf(safe_process_name, "safe_process[%d]", pid); @@ -199,18 +200,22 @@ int main(int argc, const char** argv ) } break; } else { - if ( strcmp(arg, "--verbose") == 0 ) + if (strcmp(arg, "--verbose") == 0) verbose++; - else if ( strncmp(arg, "--parent-pid", 10) == 0 ) - { - /* Override parent_pid with a value provided by user */ - const char* start; + else if (strncmp(arg, "--parent-pid", 10) == 0) + { + /* Override parent_pid with a value provided by user */ + const char* start; if ((start= strstr(arg, "=")) == NULL) - die("Could not find start of option value in '%s'", arg); - start++; /* Step past = */ - if ((parent_pid= atoi(start)) == 0) - die("Invalid value '%s' passed to --parent-id", start); - } + die("Could not find start of option value in '%s'", arg); + start++; /* Step past = */ + if ((parent_pid= atoi(start)) == 0) + die("Invalid value '%s' passed to --parent-id", start); + } + else if (strcmp(arg, "--nocore") == 0) + { + nocore= TRUE; + } else die("Unknown option: %s", arg); } @@ -248,6 +253,11 @@ int main(int argc, const char** argv ) &jeli, sizeof(jeli)) == 0) message("SetInformationJobObject failed, continue anyway..."); + /* Avoid popup box */ + if (nocore) + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX + | SEM_NOOPENFILEERRORBOX); + #if 0 /* Setup stdin, stdout and stderr redirect */ si.dwFlags= STARTF_USESTDHANDLES; -- cgit v1.2.1 From 252c37a6399355a05310f183645373c851a26a56 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 31 Jul 2009 11:22:57 +0200 Subject: Bug #45698 MTR_VERSION=1 ./mtr --force does not work Small amendment to original fix, as it did not work in azalea Need to handle combinations, would eventually break in 5.1 too --- mysql-test/lib/v1/mtr_cases.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/v1/mtr_cases.pl b/mysql-test/lib/v1/mtr_cases.pl index 906e330282a..288e8c22b44 100644 --- a/mysql-test/lib/v1/mtr_cases.pl +++ b/mysql-test/lib/v1/mtr_cases.pl @@ -540,7 +540,11 @@ sub collect_one_test_case($$$$$$$$$) { $tinfo->{'component_id'} = $component_id; push(@$cases, $tinfo); - if (exists ($incompatible{$tinfo->{'name'}})) + # Remove "combinations" part of test name + my $test_base_name= $tinfo->{'name'}; + $test_base_name=~ s/\s.*\n//; + + if (exists ($incompatible{$test_base_name})) { $tinfo->{'skip'}= 1; $tinfo->{'comment'}= "Test cannot run in mtr v1"; -- cgit v1.2.1 From 47227d7f6a064a91034e2571135e76e2ce9b6dd8 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 5 Aug 2009 09:41:40 +0200 Subject: Bug #45771 AIX and i5/OS Perl bug: check_socket_path_length in MTR fails Bug is actually in Perl Fixed by trapping and ignoring error from IO::Socket::UNIX --- mysql-test/lib/My/Platform.pm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm index 69ffdfbb4ce..7c7741a5c9e 100644 --- a/mysql-test/lib/My/Platform.pm +++ b/mysql-test/lib/My/Platform.pm @@ -126,13 +126,29 @@ sub check_socket_path_length { die "Could not create UNIX domain socket: $!" unless defined $sock; + my $hostpath = eval {$sock->hostpath()}; + if ($@) { + die unless $@ =~ /^Bad arg length for Socket::unpack_sockaddr_un/; + + # Bug on AIX and i5/OS Perl IO::Socket::UNIX which dies with something + # like: + # Bad arg length for Socket::unpack_sockaddr_un, length is 25, + # should be 106 at /path/to/perl/lib/5.8.0/aix/Socket.pm line 380. + # + # Just fake it that everything is fine + $hostpath = $testfile; + } + die "UNIX domain socket path was truncated" - unless ($testfile eq $sock->hostpath()); + unless ($testfile eq $hostpath); $truncated= 0; # Yes, it worked! }; + die "Unexpected failure when checking socket path length: $@" + if $@ and $@ !~ /^UNIX domain socket path was truncated/; + $sock= undef; # Close socket rmtree($tmpdir); # Remove the tempdir and any socket file created return $truncated; -- cgit v1.2.1 From 6ddeb379fe3b5dec58de5372666a640b1622659f Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 6 Aug 2009 09:30:53 +0200 Subject: Bug #45771 AIX and i5/OS Perl bug: check_socket_path_length in MTR fails Bug in Perl Scrap attempt to do this smartly on AIX, just drop the test and assume it's OK This commit undoes the previous push and adds a line to ignore on AIX --- mysql-test/lib/My/Platform.pm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm index 7c7741a5c9e..371120ab644 100644 --- a/mysql-test/lib/My/Platform.pm +++ b/mysql-test/lib/My/Platform.pm @@ -106,10 +106,13 @@ sub check_socket_path_length { my ($path)= @_; return 0 if IS_WINDOWS; + # This may not be true, but we can't test for it on AIX due to Perl bug + # See Bug #45771 + return 0 if ($^O eq 'aix'); require IO::Socket::UNIX; - my $truncated= 1; # Be negative + my $truncated= undef; # Create a tempfile name with same length as "path" my $tmpdir = tempdir( CLEANUP => 0); @@ -122,32 +125,20 @@ sub check_socket_path_length { Local => $testfile, Listen => 1, ); + $truncated= 1; # Be negatvie die "Could not create UNIX domain socket: $!" unless defined $sock; - my $hostpath = eval {$sock->hostpath()}; - if ($@) { - die unless $@ =~ /^Bad arg length for Socket::unpack_sockaddr_un/; - - # Bug on AIX and i5/OS Perl IO::Socket::UNIX which dies with something - # like: - # Bad arg length for Socket::unpack_sockaddr_un, length is 25, - # should be 106 at /path/to/perl/lib/5.8.0/aix/Socket.pm line 380. - # - # Just fake it that everything is fine - $hostpath = $testfile; - } - die "UNIX domain socket path was truncated" - unless ($testfile eq $hostpath); + unless ($testfile eq $sock->hostpath()); $truncated= 0; # Yes, it worked! }; die "Unexpected failure when checking socket path length: $@" - if $@ and $@ !~ /^UNIX domain socket path was truncated/; + if $@ and not defined $truncated; $sock= undef; # Close socket rmtree($tmpdir); # Remove the tempdir and any socket file created -- cgit v1.2.1 From 013717d110af5d94eab703567ef72744c0d174e4 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 11 Aug 2009 12:59:43 +0200 Subject: Bug #44479 mysql-test-run does not detect that external server has Innodb support Variable name mismatch Map variable have_innodb=YES to innodb=ON --- mysql-test/mysql-test-run.pl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index e6e8a77f3ed..06f02afaf5b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1506,6 +1506,10 @@ sub collect_mysqld_features_from_running_server () } } + # "Convert" innodb flag + $mysqld_variables{'innodb'}= "ON" + if ($mysqld_variables{'have_innodb'} eq "YES"); + # Parse version my $version_str= $mysqld_variables{'version'}; if ( $version_str =~ /^([0-9]*)\.([0-9]*)\.([0-9]*)/ ) -- cgit v1.2.1 From 1d99f9eae5f24b0c60872041ea960985386c4371 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 11 Aug 2009 15:59:05 +0200 Subject: Bug #45847 make --gdb disable all the timeouts by default Set to one week for testcase and suite timeout Also set one day timeout for PID file creation (not currently needed in 5.1 but might become, and is needed in azalea) --- mysql-test/mysql-test-run.pl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 06f02afaf5b..6a2e84d9c78 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1241,6 +1241,13 @@ sub command_line_setup { { mtr_error("Can't use --extern when using debugger"); } + # Set one week timeout (check-testcase timeout will be 1/10th) + $opt_testcase_timeout= 7 * 24 * 60; + $opt_suite_timeout= 7 * 24 * 60; + # One day to shutdown + $opt_shutdown_timeout= 24 * 60; + # One day for PID file creation (this is given in seconds not minutes) + $opt_start_timeout= 24 * 60 * 60; } # -------------------------------------------------------------------------- -- cgit v1.2.1 From 2000cef72ab3fbb6afd2f6612ed561bc67da3a92 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 13 Aug 2009 15:29:19 +0200 Subject: Bug #44979 Enhance MTR --experimental to support platform qualifier Adding @ syntax --- mysql-test/collections/README.experimental | 7 +++++++ mysql-test/collections/default.experimental | 1 + mysql-test/mysql-test-run.pl | 12 ++++++++++++ 3 files changed, 20 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/collections/README.experimental b/mysql-test/collections/README.experimental index 9eee2394423..2f5ee7b00ab 100644 --- a/mysql-test/collections/README.experimental +++ b/mysql-test/collections/README.experimental @@ -23,3 +23,10 @@ The syntax is as follows: start with the same characters up to the last letter before the asterisk are considered experimental: main.a* # get rid of main.alias, main.alibaba and main.agliolio + +6) Optionally, the test case may be followed by one or more platform + qualifiers beginning with @ or @!. The test will then be considered + experimental only/except on that platform. Basic OS names as + reported by $^O in Perl, or 'windows' are supported, this includes + solaris, linux, windows, aix, darwin, ... Example: + main.alias @aix @windows # Fails on those diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 103069f79cf..161af45f133 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -1 +1,2 @@ funcs_1.charset_collation_1 # depends on compile-time decisions +main.plugin_load @solaris # Bug #42144 diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6a2e84d9c78..40fc7446c9e 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -984,6 +984,9 @@ sub command_line_setup { if ( $opt_experimental ) { + # $^O on Windows considered not generic enough + my $plat= (IS_WINDOWS) ? 'windows' : $^O; + # read the list of experimental test cases from the file specified on # the command line open(FILE, "<", $opt_experimental) or mtr_error("Can't read experimental file: $opt_experimental"); @@ -994,6 +997,15 @@ sub command_line_setup { # remove comments (# foo) at the beginning of the line, or after a # blank at the end of the line s/( +|^)#.*$//; + # If @ platform specifier given, use this entry only if it contains + # @ or @! where xxx != platform + if (/\@.*/) + { + next if (/\@!$plat/); + next unless (/\@$plat/ or /\@!/); + # Then remove @ and everything after it + s/\@.*$//; + } # remove whitespace s/^ +//; s/ +$//; -- cgit v1.2.1 From e5ae860e32e5536c5c19dc3196199fb0a896b9a8 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 17 Aug 2009 11:21:02 +0200 Subject: Bug #46755 Wrong grammar in some skip messages: Test need instead of Test needs Fixed in two comments as well --- mysql-test/lib/mtr_cases.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 2a7b07debd0..94a4ab240b4 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -847,14 +847,14 @@ sub collect_one_test_case { if ( $tinfo->{'big_test'} and ! $::opt_big_test ) { $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "Test need 'big-test' option"; + $tinfo->{'comment'}= "Test needs 'big-test' option"; return $tinfo } if ( $tinfo->{'need_debug'} && ! $::debug_compiled_binaries ) { $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "Test need debug binaries"; + $tinfo->{'comment'}= "Test needs debug binaries"; return $tinfo } @@ -890,14 +890,14 @@ sub collect_one_test_case { if ($tinfo->{'federated_test'}) { - # This is a test that need federated, enable it + # This is a test that needs federated, enable it push(@{$tinfo->{'master_opt'}}, "--loose-federated"); push(@{$tinfo->{'slave_opt'}}, "--loose-federated"); } if ( $tinfo->{'innodb_test'} ) { - # This is a test that need innodb + # This is a test that needs innodb if ( $::mysqld_variables{'innodb'} eq "OFF" || ! exists $::mysqld_variables{'innodb'} ) { @@ -918,7 +918,7 @@ sub collect_one_test_case { if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) ) { $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "Test need binlog"; + $tinfo->{'comment'}= "Test needs binlog"; return $tinfo; } } -- cgit v1.2.1 From ca7bf9fad5f13122ae235a94f9299a6659b80686 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 18 Aug 2009 09:38:18 +0200 Subject: Bug #44222 mysql-test-run --start analyses which tests it would skip. This is redundant. Quicker test collection and better output with --start[-dirty] --- mysql-test/lib/mtr_cases.pm | 15 +++++++++++++-- mysql-test/mysql-test-run.pl | 22 +++++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 2a7b07debd0..5ce936352ce 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -41,6 +41,7 @@ our $opt_with_ndbcluster_only; our $defaults_file; our $defaults_extra_file; our $reorder= 1; +our $quick_collect; sub collect_option { my ($opt, $value)= @_; @@ -68,6 +69,9 @@ require "mtr_misc.pl"; my $do_test_reg; my $skip_test_reg; +# If "Quick collect", set to 1 once a test to run has been found. +my $some_test_found; + sub init_pattern { my ($from, $what)= @_; return undef unless defined $from; @@ -102,6 +106,7 @@ sub collect_test_cases ($$) { foreach my $suite (split(",", $suites)) { push(@$cases, collect_one_suite($suite, $opt_cases)); + last if $some_test_found; } if ( @$opt_cases ) @@ -139,7 +144,7 @@ sub collect_test_cases ($$) { } } - if ( $reorder ) + if ( $reorder && !$quick_collect) { # Reorder the test cases in an order that will make them faster to run my %sort_criteria; @@ -386,7 +391,7 @@ sub collect_one_suite($) # Read combinations for this suite and build testcases x combinations # if any combinations exists # ---------------------------------------------------------------------- - if ( ! $skip_combinations ) + if ( ! $skip_combinations && ! $quick_collect ) { my @combinations; my $combination_file= "$suitedir/combinations"; @@ -583,6 +588,12 @@ sub optimize_cases { if ( $default_engine =~ /^innodb/i ); } } + + if ($quick_collect && ! $tinfo->{'skip'}) + { + $some_test_found= 1; + return; + } } } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 40fc7446c9e..28ddd718f16 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -209,6 +209,7 @@ sub check_timeout { return $opt_testcase_timeout * 6; }; my $opt_start; my $opt_start_dirty; +my $start_only; my $opt_wait_all; my $opt_repeat= 1; my $opt_retry= 3; @@ -1262,11 +1263,19 @@ sub command_line_setup { $opt_start_timeout= 24 * 60 * 60; } + # -------------------------------------------------------------------------- + # Modified behavior with --start options + # -------------------------------------------------------------------------- + if ($opt_start or $opt_start_dirty) { + collect_option ('quick-collect', 1); + $start_only= 1; + } + # -------------------------------------------------------------------------- # Check use of wait-all # -------------------------------------------------------------------------- - if ($opt_wait_all && ! ($opt_start_dirty || $opt_start)) + if ($opt_wait_all && ! $start_only) { mtr_error("--wait-all can only be used with --start or --start-dirty"); } @@ -2824,7 +2833,7 @@ sub run_testcase_check_skip_test($) if ( $tinfo->{'skip'} ) { - mtr_report_test_skipped($tinfo); + mtr_report_test_skipped($tinfo) unless $start_only; return 1; } @@ -3311,9 +3320,16 @@ sub run_testcase ($) { # server exits # ---------------------------------------------------------------------- - if ( $opt_start or $opt_start_dirty ) + if ( $start_only ) { mtr_print("\nStarted", started(all_servers())); + mtr_print("Using config for test", $tinfo->{name}); + mtr_print("Port and socket path for server(s):"); + foreach my $mysqld ( mysqlds() ) + { + mtr_print ($mysqld->name() . " " . $mysqld->value('port') . + " " . $mysqld->value('socket')); + } mtr_print("Waiting for server(s) to exit..."); if ( $opt_wait_all ) { My::SafeProcess->wait_all(); -- cgit v1.2.1 From d19eda4a9b59de353c9047376fd513bc0f5d69da Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 19 Aug 2009 13:48:56 +0200 Subject: Bug #39003 mtr's diff_files command failed in pushbuild without printing a result diff diff was actually called but result never outputted before exiting Added extra code to dump output *unless* failure was expected --- mysql-test/t/mysqltest.test | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 578b2bf5c6c..92f39d943b9 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1710,10 +1710,6 @@ EOF --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp --diff_files $MYSQLTEST_VARDIR/tmp/diff2.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp -# Write the below commands to a intermediary file and execute them with -# mysqltest in --exec, since the output will vary depending on what "diff" -# is available it is sent to /dev/null ---write_file $MYSQLTEST_VARDIR/tmp/diff.test # Compare files that differ in size --error 2 --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp @@ -1725,13 +1721,6 @@ EOF --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp --error 1 --diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp -exit; -EOF - -# Execute the above diffs, and send their output to /dev/null - only -# interesting to see that it returns correct error codes ---exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/diff.test > /dev/null 2>&1 - # Compare equal files, again... --diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp @@ -1740,7 +1729,6 @@ EOF --remove_file $MYSQLTEST_VARDIR/tmp/diff2.tmp --remove_file $MYSQLTEST_VARDIR/tmp/diff3.tmp --remove_file $MYSQLTEST_VARDIR/tmp/diff4.tmp ---remove_file $MYSQLTEST_VARDIR/tmp/diff.test # ---------------------------------------------------------------------------- -- cgit v1.2.1 From 769d9f3803ada97d0032944aa1447520957aa73b Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 21 Aug 2009 13:58:33 +0200 Subject: Apply patch from bug#46834 to install the test suite in RPMs. --- mysql-test/Makefile.am | 3 ++- mysql-test/lib/My/SafeProcess/Makefile.am | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 810bead1adc..b1d0e85c70e 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -17,7 +17,8 @@ ## Process this file with automake to create Makefile.in -testdir = $(prefix)/mysql-test +testroot = $(prefix) +testdir = $(testroot)/mysql-test test_SCRIPTS = mtr \ mysql-test-run \ diff --git a/mysql-test/lib/My/SafeProcess/Makefile.am b/mysql-test/lib/My/SafeProcess/Makefile.am index 623c0e9a87a..722331453fe 100644 --- a/mysql-test/lib/My/SafeProcess/Makefile.am +++ b/mysql-test/lib/My/SafeProcess/Makefile.am @@ -13,7 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -safedir = $(prefix)/mysql-test/lib/My/SafeProcess +testroot = $(prefix) +safedir = $(testroot)/mysql-test/lib/My/SafeProcess #nobase_bin_PROGRAMS = ... safe_PROGRAMS = my_safe_process -- cgit v1.2.1 From 3a766492913ecf1d3642063c1fa57b5d94c182a6 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 25 Aug 2009 15:56:50 +0200 Subject: Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log Enabled proper pattern for Warnings and ERRORs Added some suppressions --- mysql-test/include/mtr_warnings.sql | 6 +++++- mysql-test/mysql-test-run.pl | 6 ++---- mysql-test/r/almost_full.result | 1 + mysql-test/r/upgrade.result | 4 ---- mysql-test/suite/rpl/r/rpl_idempotency.result | 3 ++- mysql-test/suite/rpl/t/rpl_idempotency.test | 3 ++- mysql-test/t/almost_full.test | 2 ++ mysql-test/t/upgrade.test | 2 ++ 8 files changed, 16 insertions(+), 11 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 73287900f3c..157244a9b0a 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -132,7 +132,7 @@ INSERT INTO global_suppressions VALUES ("Error in Log_event::read_log_event\\\(\\\): 'Sanity check failed', data_len: 258, event_type: 49"), - ("Statement is not safe to log in statement format"), + ("Statement may not be safe to log in statement format"), /* test case for Bug#bug29807 copies a stray frm into database */ ("InnoDB: Error: table `test`.`bug29807` does not exist in the InnoDB internal"), @@ -172,6 +172,10 @@ INSERT INTO global_suppressions VALUES */ ("Can't find file: '.\\\\test\\\\\\?{8}.frm'"), + /* Added 2009-08-XX after fixing Bug #42408 */ + + ("Slave: Operation DROP USER failed for '.*'@'localhost' Error_code: 1396"), + ("THE_LAST_SUPPRESSION")|| diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 28ddd718f16..c15f3990ec4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3624,10 +3624,8 @@ sub extract_warning_lines ($) { # and correcting them shows a few additional harmless warnings. # Thus those patterns are temporarily removed from the list # of patterns. For more info see BUG#42408 - # qr/^Warning:|mysqld: Warning|\[Warning\]/, - # qr/^Error:|\[ERROR\]/, - qr/^Warning:|mysqld: Warning/, - qr/^Error:/, + qr/^Warning:|mysqld: Warning|\[Warning\]/, + qr/^Error:|\[ERROR\]/, qr/^==.* at 0x/, qr/InnoDB: Warning|InnoDB: Error/, qr/^safe_mutex:|allocated at line/, diff --git a/mysql-test/r/almost_full.result b/mysql-test/r/almost_full.result index eb28f12fa51..b2d7092aa51 100644 --- a/mysql-test/r/almost_full.result +++ b/mysql-test/r/almost_full.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("The table 't1' is full"); drop table if exists t1; set global myisam_data_pointer_size=2; CREATE TABLE t1 (a int auto_increment primary key not null, b longtext) ENGINE=MyISAM; diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result index da6201692a9..034242079b1 100644 --- a/mysql-test/r/upgrade.result +++ b/mysql-test/r/upgrade.result @@ -108,11 +108,7 @@ a-b-c show create view `a-b-c`.v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `a`.`f1` AS `f1` from (`a-b-c`.`t1` `a` join `information_schema`.`tables` `b`) where (convert(`a`.`f1` using utf8) = `b`.`TABLE_NAME`) utf8 utf8_general_ci -Warnings: -Note 1600 Creation context of view `a-b-c`.`v1' is invalid select * from `a-b-c`.v1; f1 -Warnings: -Note 1600 Creation context of view `a-b-c`.`v1' is invalid drop database `a-b-c`; use test; diff --git a/mysql-test/suite/rpl/r/rpl_idempotency.result b/mysql-test/suite/rpl/r/rpl_idempotency.result index 3341c03db0f..bfdcbc6fa23 100644 --- a/mysql-test/suite/rpl/r/rpl_idempotency.result +++ b/mysql-test/suite/rpl/r/rpl_idempotency.result @@ -4,7 +4,8 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032"); +call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); +call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); SET @old_slave_exec_mode= @@global.slave_exec_mode; CREATE TABLE t1 (a INT PRIMARY KEY); diff --git a/mysql-test/suite/rpl/t/rpl_idempotency.test b/mysql-test/suite/rpl/t/rpl_idempotency.test index bfd1860759e..c96b88a1b1a 100644 --- a/mysql-test/suite/rpl/t/rpl_idempotency.test +++ b/mysql-test/suite/rpl/t/rpl_idempotency.test @@ -8,7 +8,8 @@ connection slave; source include/have_innodb.inc; # Add suppression for expected warning(s) in slaves error log -call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032"); +call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); +call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); SET @old_slave_exec_mode= @@global.slave_exec_mode; diff --git a/mysql-test/t/almost_full.test b/mysql-test/t/almost_full.test index 5c67ab3c088..24801f9cbc3 100644 --- a/mysql-test/t/almost_full.test +++ b/mysql-test/t/almost_full.test @@ -2,6 +2,8 @@ # Some special cases with empty tables # +call mtr.add_suppression("The table 't1' is full"); + --disable_warnings drop table if exists t1; --enable_warnings diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test index d571a2efc7c..e390e8a1253 100644 --- a/mysql-test/t/upgrade.test +++ b/mysql-test/t/upgrade.test @@ -124,6 +124,8 @@ with_check_option=0 timestamp=2009-04-10 11:53:37 create-version=1 source=select f1 from `a-b-c`.t1 a, information_schema.tables b\nwhere a.f1 = b.table_name +client_cs_name=utf8 +connection_cl_name=utf8_general_ci EOF show databases like '%a-b-c%'; -- cgit v1.2.1 From 4655118bea2bcb14a06f01046fb06052fd37214c Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 26 Aug 2009 12:51:23 +0200 Subject: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) There were a problem since pruning uses the field for comparison (while evaluate_join_record uses longlong), resulting in pruning failures when comparing DATE to DATETIME. Fix was to always comparing DATE vs DATETIME as DATETIME, by adding ' 00:00:00' to the DATE string. And adding optimization for comparing with 23:59:59, so that DATETIME_col > '2001-02-03 23:59:59' -> TO_DAYS(DATETIME_col) > TO_DAYS('2001-02-03 23:59:59') instead of '>='. mysql-test/r/partition_pruning.result: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) Updated result-file mysql-test/t/partition_pruning.test: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) Added testcases. sql-common/my_time.c: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) removed duplicate assignment. sql/item.cc: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) Changed field_is_equal_to_item into field_cmp_to_item, to better handling DATE vs DATETIME comparision. sql/item.h: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) Updated comment sql/item_timefunc.cc: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) Added optimization (pruning) of DATETIME where time-part is 23:59:59 sql/opt_range.cc: Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) Using the new stored_field_cmp_to_item for better pruning. --- mysql-test/r/partition_pruning.result | 621 ++++++++++++++++++++++++++++++++++ mysql-test/t/partition_pruning.test | 308 +++++++++++++++++ 2 files changed, 929 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 26ddc92e97b..abaa37715bf 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -1,4 +1,625 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +# Test with DATETIME column NOT NULL +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATETIME NOT NULL, +PRIMARY KEY (a, b) +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'), +(1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'), +(1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 6 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 8 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 8 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 index NULL PRIMARY 12 NULL 13 Using where; Using index +DROP TABLE t1; +# Test with DATE column NOT NULL +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATE NOT NULL, +PRIMARY KEY (a, b) +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), +(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), +(1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 5 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 7 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 7 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 index NULL PRIMARY 7 NULL 12 Using where; Using index +DROP TABLE t1; +# Test with DATETIME column NULL +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATETIME NULL +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'), +(1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'), +(1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 6 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 8 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 8 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090402,p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 13 Using where +DROP TABLE t1; +# Test with DATE column NULL +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATE NULL +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), +(1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), +(1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), +(1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 5 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 7 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 7 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402,p20090403 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090401,p20090402 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +EXPLAIN PARTITIONS SELECT * FROM t1 +WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p20090403,p20090404,p20090405 ALL NULL NULL NULL NULL 12 Using where +DROP TABLE t1; +# For better code coverage of the patch +CREATE TABLE t1 ( +a int(10) unsigned NOT NULL, +b DATE +) PARTITION BY RANGE ( TO_DAYS(b) ) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), +PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), +PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), +PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), +PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL); +# test with an invalid date, which lead to item->null_value is set. +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Warning 1292 Incorrect datetime value: '2009-04-99' +Warning 1292 Incorrect datetime value: '2009-04-99' +DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b DATETIME, diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index ad102062ef8..ef28820852e 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -8,6 +8,314 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; --enable_warnings +# +# Bug#46362: Endpoint should be set to false for TO_DAYS(DATE) +# +# There is a problem when comparing DATE with DATETIME. +# In pruning it is converted into the field type +# and in row evaluation it is converted to longlong +# (like a DATETIME). +--echo # Test with DATETIME column NOT NULL +CREATE TABLE t1 ( + a int(10) unsigned NOT NULL, + b DATETIME NOT NULL, + PRIMARY KEY (a, b) +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), + PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), + PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), + PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), + PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), + (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'), + (1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'), + (1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +DROP TABLE t1; + +--echo # Test with DATE column NOT NULL +CREATE TABLE t1 ( + a int(10) unsigned NOT NULL, + b DATE NOT NULL, + PRIMARY KEY (a, b) +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), + PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), + PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), + PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), + PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), + (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), + (1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), + (1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +DROP TABLE t1; + +--echo # Test with DATETIME column NULL +CREATE TABLE t1 ( + a int(10) unsigned NOT NULL, + b DATETIME NULL +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), + PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), + PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), + PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), + PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), + (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-02 23:59:59'), + (1, '2009-04-03'), (2, '2009-04-03'), (1, '2009-04-04'), (2, '2009-04-04'), + (1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +DROP TABLE t1; + +--echo # Test with DATE column NULL +CREATE TABLE t1 ( + a int(10) unsigned NOT NULL, + b DATE NULL +) PARTITION BY RANGE (TO_DAYS(b)) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), + PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), + PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), + PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), + PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (1, '2009-04-01'), (2, '2009-04-01'), + (1, '2009-04-02'), (2, '2009-04-02'), (1, '2009-04-03'), (2, '2009-04-03'), + (1, '2009-04-04'), (2, '2009-04-04'), (1, '2009-04-05'), (1, '2009-04-06'), + (1, '2009-04-07'); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE); +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03'; +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME); +EXPLAIN PARTITIONS SELECT * FROM t1 + WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME); +DROP TABLE t1; + +--echo # For better code coverage of the patch +CREATE TABLE t1 ( + a int(10) unsigned NOT NULL, + b DATE +) PARTITION BY RANGE ( TO_DAYS(b) ) +(PARTITION p20090401 VALUES LESS THAN (TO_DAYS('2009-04-02')), + PARTITION p20090402 VALUES LESS THAN (TO_DAYS('2009-04-03')), + PARTITION p20090403 VALUES LESS THAN (TO_DAYS('2009-04-04')), + PARTITION p20090404 VALUES LESS THAN (TO_DAYS('2009-04-05')), + PARTITION p20090405 VALUES LESS THAN MAXVALUE); +INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL); +--echo # test with an invalid date, which lead to item->null_value is set. +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME); +DROP TABLE t1; + # # Bug#40972: some sql execution lead the whole database crashing # -- cgit v1.2.1 From 67214ef4334deccdd1f1d89c49c4edecd9075962 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 26 Aug 2009 12:59:49 +0200 Subject: Bug#20577: Partitions: use of to_days() function leads to selection failures Problem was that the partition containing NULL values was pruned away, since '2001-01-01' < '2001-02-00' but TO_DAYS('2001-02-00') is NULL. Added the NULL partition for RANGE/LIST partitioning on TO_DAYS() function to be scanned too. Also fixed a bug that added ALLOW_INVALID_DATES to sql_mode (SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST partitioned table would add it). mysql-test/include/partition_date_range.inc: Bug#20577: Partitions: use of to_days() function leads to selection failures Added include file to decrease test code duplication mysql-test/r/partition_pruning.result: Bug#20577: Partitions: use of to_days() function leads to selection failures Added test results mysql-test/r/partition_range.result: Bug#20577: Partitions: use of to_days() function leads to selection failures Updated test result. This fix adds the partition containing NULL values to the list of partitions to be scanned. mysql-test/t/partition_pruning.test: Bug#20577: Partitions: use of to_days() function leads to selection failures Added test case sql/item.h: Bug#20577: Partitions: use of to_days() function leads to selection failures Added MONOTONIC_*INCREASE_NOT_NULL values to be used by TO_DAYS. sql/item_timefunc.cc: Bug#20577: Partitions: use of to_days() function leads to selection failures Calculate the number of days as return value even for invalid dates. This is so that pruning can be used even for invalid dates. sql/opt_range.cc: Bug#20577: Partitions: use of to_days() function leads to selection failures Fixed a bug that added ALLOW_INVALID_DATES to sql_mode (SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST partitioned table would add it). sql/partition_info.h: Bug#20577: Partitions: use of to_days() function leads to selection failures Resetting ret_null_part when a single partition is to be used, this to avoid adding the NULL partition. sql/sql_partition.cc: Bug#20577: Partitions: use of to_days() function leads to selection failures Always include the NULL partition if RANGE or LIST. Use the returned value for the function for pruning, even if it is marked as NULL, so that even '2000-00-00' can be used for pruning, even if TO_DAYS('2000-00-00') is NULL. Changed == to >= in get_next_partition_id_list to avoid crash if part_iter->part_nums is not correctly setup. --- mysql-test/include/partition_date_range.inc | 63 +++++ mysql-test/r/partition_pruning.result | 425 ++++++++++++++++++++++++++++ mysql-test/r/partition_range.result | 4 +- mysql-test/t/partition_pruning.test | 44 +++ 4 files changed, 534 insertions(+), 2 deletions(-) create mode 100644 mysql-test/include/partition_date_range.inc (limited to 'mysql-test') diff --git a/mysql-test/include/partition_date_range.inc b/mysql-test/include/partition_date_range.inc new file mode 100644 index 00000000000..c54396af9cb --- /dev/null +++ b/mysql-test/include/partition_date_range.inc @@ -0,0 +1,63 @@ +# Created for verifying bug#20577. +# expects TABLE t1 (... , a DATE, ...) + +--sorted_result +SELECT * FROM t1 WHERE a < '1001-01-01'; +--sorted_result +SELECT * FROM t1 WHERE a <= '1001-01-01'; +--sorted_result +SELECT * FROM t1 WHERE a >= '1001-01-01'; +--sorted_result +SELECT * FROM t1 WHERE a > '1001-01-01'; +--sorted_result +SELECT * FROM t1 WHERE a = '1001-01-01'; +--sorted_result +SELECT * FROM t1 WHERE a < '1001-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a <= '1001-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a >= '1001-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a > '1001-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a = '1001-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a < '1999-02-31'; +--sorted_result +SELECT * FROM t1 WHERE a <= '1999-02-31'; +--sorted_result +SELECT * FROM t1 WHERE a >= '1999-02-31'; +--sorted_result +SELECT * FROM t1 WHERE a > '1999-02-31'; +--sorted_result +SELECT * FROM t1 WHERE a = '1999-02-31'; +--sorted_result +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; +--sorted_result +SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; +--sorted_result +SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; +if ($explain_partitions) +{ +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; +EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; +} diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 26ddc92e97b..7ac1e24cfab 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -1,4 +1,429 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +# test of RANGE and index +CREATE TABLE t1 (a DATE, KEY(a)) +PARTITION BY RANGE (TO_DAYS(a)) +(PARTITION `pNULL` VALUES LESS THAN (0), +PARTITION `p0001-01-01` VALUES LESS THAN (366 + 1), +PARTITION `p1001-01-01` VALUES LESS THAN (TO_DAYS('1001-01-01') + 1), +PARTITION `p2001-01-01` VALUES LESS THAN (TO_DAYS('2001-01-01') + 1)); +INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'), +('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01'); +SELECT * FROM t1 WHERE a < '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a <= '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a >= '1001-01-01'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-01-01'; +a +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-01-01'; +a +1001-01-01 +SELECT * FROM t1 WHERE a < '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +SELECT * FROM t1 WHERE a <= '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a >= '1001-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-00-00'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-00-00'; +a +1001-00-00 +SELECT * FROM t1 WHERE a < '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a <= '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a >= '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a > '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a = '1999-02-31'; +a +Warning 1292 Incorrect date value: '1999-02-31' for column 'a' at row 1 +Warnings: +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; +a +0001-01-01 +1001-00-00 +1001-01-01 +# test without index +ALTER TABLE t1 DROP KEY a; +SELECT * FROM t1 WHERE a < '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a <= '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a >= '1001-01-01'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-01-01'; +a +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-01-01'; +a +1001-01-01 +SELECT * FROM t1 WHERE a < '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +SELECT * FROM t1 WHERE a <= '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a >= '1001-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-00-00'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-00-00'; +a +1001-00-00 +SELECT * FROM t1 WHERE a < '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a <= '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a >= '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a > '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a = '1999-02-31'; +a +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; +a +0001-01-01 +1001-00-00 +1001-01-01 +DROP TABLE t1; +# test of LIST and index +CREATE TABLE t1 (a DATE, KEY(a)) +PARTITION BY LIST (TO_DAYS(a)) +(PARTITION `p0001-01-01` VALUES IN (TO_DAYS('0001-01-01')), +PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')), +PARTITION `pNULL` VALUES IN (NULL), +PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')), +PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01'))); +INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'), +('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01'); +SELECT * FROM t1 WHERE a < '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a <= '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a >= '1001-01-01'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-01-01'; +a +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-01-01'; +a +1001-01-01 +SELECT * FROM t1 WHERE a < '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +SELECT * FROM t1 WHERE a <= '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a >= '1001-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-00-00'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-00-00'; +a +1001-00-00 +SELECT * FROM t1 WHERE a < '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a <= '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a >= '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a > '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a = '1999-02-31'; +a +Warning 1292 Incorrect date value: '1999-02-31' for column 'a' at row 1 +Warnings: +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; +a +0001-01-01 +1001-00-00 +1001-01-01 +# test without index +ALTER TABLE t1 DROP KEY a; +SELECT * FROM t1 WHERE a < '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a <= '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a >= '1001-01-01'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-01-01'; +a +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-01-01'; +a +1001-01-01 +SELECT * FROM t1 WHERE a < '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +SELECT * FROM t1 WHERE a <= '1001-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +SELECT * FROM t1 WHERE a >= '1001-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a > '1001-00-00'; +a +1001-01-01 +1002-00-00 +2001-01-01 +SELECT * FROM t1 WHERE a = '1001-00-00'; +a +1001-00-00 +SELECT * FROM t1 WHERE a < '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a <= '1999-02-31'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a >= '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a > '1999-02-31'; +a +2001-01-01 +SELECT * FROM t1 WHERE a = '1999-02-31'; +a +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; +a +0000-00-00 +0000-01-02 +0001-01-01 +1001-00-00 +1001-01-01 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; +a +1001-00-00 +1001-01-01 +1002-00-00 +SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; +a +0001-01-01 +1001-00-00 +1001-01-01 +DROP TABLE t1; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b DATETIME, diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index e8fc55b759b..02d2f6359c5 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -745,7 +745,7 @@ a EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '2004-07-01' AND a <= '2004-09-30'; id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p407,p408,p409 ALL NULL NULL NULL NULL 9 Using where +1 SIMPLE t1 p3xx,p407,p408,p409 ALL NULL NULL NULL NULL 18 Using where SELECT * from t1 WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR (a >= '2005-07-01' AND a <= '2005-09-30'); @@ -772,7 +772,7 @@ EXPLAIN PARTITIONS SELECT * from t1 WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR (a >= '2005-07-01' AND a <= '2005-09-30'); id select_type table partitions type possible_keys key key_len ref rows Extra -1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where +1 SIMPLE t1 p3xx,p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 27 Using where DROP TABLE t1; create table t1 (a int); insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test index ad102062ef8..511cfa595a4 100644 --- a/mysql-test/t/partition_pruning.test +++ b/mysql-test/t/partition_pruning.test @@ -8,6 +8,50 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; --enable_warnings +# +# Bug#20577: Partitions: use of to_days() function leads to selection failures +# +--let $explain_partitions= 1; +--let $verify_without_partitions= 0; +--echo # test of RANGE and index +CREATE TABLE t1 (a DATE, KEY(a)) +PARTITION BY RANGE (TO_DAYS(a)) +(PARTITION `pNULL` VALUES LESS THAN (0), + PARTITION `p0001-01-01` VALUES LESS THAN (366 + 1), + PARTITION `p1001-01-01` VALUES LESS THAN (TO_DAYS('1001-01-01') + 1), + PARTITION `p2001-01-01` VALUES LESS THAN (TO_DAYS('2001-01-01') + 1)); +if ($verify_without_partitions) +{ +ALTER TABLE t1 REMOVE PARTITIONING; +} +INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'), + ('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01'); +--source include/partition_date_range.inc +--echo # test without index +ALTER TABLE t1 DROP KEY a; +--source include/partition_date_range.inc +DROP TABLE t1; + +--echo # test of LIST and index +CREATE TABLE t1 (a DATE, KEY(a)) +PARTITION BY LIST (TO_DAYS(a)) +(PARTITION `p0001-01-01` VALUES IN (TO_DAYS('0001-01-01')), + PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')), + PARTITION `pNULL` VALUES IN (NULL), + PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')), + PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01'))); +if ($verify_without_partitions) +{ +ALTER TABLE t1 REMOVE PARTITIONING; +} +INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'), + ('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01'); +--source include/partition_date_range.inc +--echo # test without index +ALTER TABLE t1 DROP KEY a; +--source include/partition_date_range.inc +DROP TABLE t1; + # # Bug#40972: some sql execution lead the whole database crashing # -- cgit v1.2.1 From 6c2b32515e1856b65feedec2ebe47843f416b2ad Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Thu, 27 Aug 2009 00:13:03 +0100 Subject: BUG#28976 Mixing trans and non-trans tables in one transaction results in incorrect binlog Mixing transactional (T) and non-transactional (N) tables on behalf of a transaction may lead to inconsistencies among masters and slaves in STATEMENT mode. The problem stems from the fact that although modifications done to non-transactional tables on behalf of a transaction become immediately visible to other connections they do not immediately get to the binary log and therefore consistency is broken. Although there may be issues in mixing T and M tables in STATEMENT mode, there are safe combinations that clients find useful. In this bug, we fix the following issue. Mixing N and T tables in multi-level (e.g. a statement that fires a trigger) or multi-table table statements (e.g. update t1, t2...) were not handled correctly. In such cases, it was not possible to distinguish when a T table was updated if the sequence of changes was N and T. In a nutshell, just the flag "modified_non_trans_table" was not enough to reflect that both a N and T tables were changed. To circumvent this issue, we check if an engine is registered in the handler's list and changed something which means that a T table was modified. Check WL 2687 for a full-fledged patch that will make the use of either the MIXED or ROW modes completely safe. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Truncate statement is wrapped in BEGIN/COMMIT. mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Truncate statement is wrapped in BEGIN/COMMIT. --- mysql-test/extra/rpl_tests/rpl_mixing_engines.test | 727 +++++++++++++++++ mysql-test/include/commit.inc | 4 +- mysql-test/r/commit_1innodb.result | 8 +- .../binlog/r/binlog_row_mix_innodb_myisam.result | 4 + .../binlog/r/binlog_stm_mix_innodb_myisam.result | 6 + mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 2 + .../suite/rpl/r/rpl_stm_mixing_engines.result | 871 +++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test | 5 + 8 files changed, 1621 insertions(+), 6 deletions(-) create mode 100644 mysql-test/extra/rpl_tests/rpl_mixing_engines.test create mode 100644 mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result create mode 100644 mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test new file mode 100644 index 00000000000..73713b7998b --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test @@ -0,0 +1,727 @@ +################################################################################### +# This test checks if transactions that mixes transactional and non-transactional +# tables are correctly handled in statement mode. In an nutshell, we have what +# follows: +# +# 1) "B T T C" generates in binlog the "B T T C" entries. +# +# 2) "B T T R" generates in binlog an "empty" entry. +# +# 3) "B T N C" generates in binlog the "B T N C" entries. +# +# 4) "B T N R" generates in binlog the "B T N R" entries. +# +# 5) "T" generates in binlog the "B T C" entry. +# +# 6) "N" generates in binlog the "N" entry. +# +# 7) "M" generates in binglog the "B M C" entries. +# +# 8) "B N N T C" generates in binglog the "N N B T C" entries. +# +# 9) "B N N T R" generates in binlog the "N N B T R" entries. +# +# 10) "B N N C" generates in binglog the "N N" entries. +# +# 11) "B N N R" generates in binlog the "N N" entries. +# +# 12) "B M T C" generates in the binlog the "B M T C" entries. +# +# 13) "B M T R" generates in the binlog the "B M T R" entries. +################################################################################### + +--echo ################################################################################### +--echo # CONFIGURATION +--echo ################################################################################### +connection master; + +SET SQL_LOG_BIN=0; +CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +SET SQL_LOG_BIN=1; + +connection slave; + +SET SQL_LOG_BIN=0; +CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +SET SQL_LOG_BIN=1; + +connection master; + +DELIMITER |; + +CREATE FUNCTION f1 () RETURNS VARCHAR(64) +BEGIN + RETURN "Testing..."; +END| + +CREATE FUNCTION f2 () RETURNS VARCHAR(64) +BEGIN + RETURN f1(); +END| + +CREATE PROCEDURE pc_i_tt_3 (IN x INT, IN y VARCHAR(64)) +BEGIN + INSERT INTO tt_3 VALUES (y,x,x); +END| + +CREATE TRIGGER tr_i_tt_3_to_nt_3 BEFORE INSERT ON tt_3 FOR EACH ROW +BEGIN + INSERT INTO nt_3 VALUES (NEW.a, NEW.b, NEW.c); +END| + +CREATE TRIGGER tr_i_nt_4_to_tt_4 BEFORE INSERT ON nt_4 FOR EACH ROW +BEGIN + INSERT INTO tt_4 VALUES (NEW.a, NEW.b, NEW.c); +END| + +DELIMITER ;| + +--echo ################################################################################### +--echo # MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES +--echo ################################################################################### +connection master; + +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #1) "B T T C" generates in binlog the "B T T C" entries. +--echo # +BEGIN; +INSERT INTO tt_1 VALUES ("new text 4", 4, "new text 4"); +INSERT INTO tt_2 VALUES ("new text 4", 4, "new text 4"); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #1.e) "B T T C" with error in T generates in binlog the "B T T C" entries. +--echo # +INSERT INTO tt_1 VALUES ("new text -2", -2, "new text -2"); +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -2", -2, "new text -2"); +INSERT INTO tt_2 VALUES ("new text -3", -3, "new text -3"); +COMMIT; + +BEGIN; +INSERT INTO tt_2 VALUES ("new text -5", -5, "new text -5"); +--error ER_DUP_ENTRY +INSERT INTO tt_2 VALUES ("new text -4", -4, "new text -4"), ("new text -5", -5, "new text -5"); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #2) "B T T R" generates in binlog an "empty" entry. +--echo # +BEGIN; +INSERT INTO tt_1 VALUES ("new text 5", 5, "new text 5"); +INSERT INTO tt_2 VALUES ("new text 5", 5, "new text 5"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #2.e) "B T T R" with error in T generates in binlog an "empty" entry. +--echo # +INSERT INTO tt_1 VALUES ("new text -7", -7, "new text -7"); +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO tt_1 VALUES ("new text -6", -6, "new text -6"), ("new text -7", -7, "new text -7"); +INSERT INTO tt_2 VALUES ("new text -8", -8, "new text -8"); +ROLLBACK; + +BEGIN; +INSERT INTO tt_2 VALUES ("new text -10", -10, "new text -10"); +--error ER_DUP_ENTRY +INSERT INTO tt_2 VALUES ("new text -9", -9, "new text -9"), ("new text -10", -10, "new text -10"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #3) "B T N C" generates in binlog the "B T N C" entries. +--echo # +BEGIN; +INSERT INTO tt_1 VALUES ("new text 6", 6, "new text 6"); +INSERT INTO nt_1 VALUES ("new text 6", 6, "new text 6"); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #3.e) "B T N C" with error in either T or N generates in binlog the "B T N C" entries. +--echo # +INSERT INTO tt_1 VALUES ("new text -12", -12, "new text -12"); +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO tt_1 VALUES ("new text -11", -11, "new text -11"), ("new text -12", -12, "new text -12"); +INSERT INTO nt_1 VALUES ("new text -13", -13, "new text -13"); +COMMIT; + +BEGIN; +INSERT INTO tt_1 VALUES ("new text -14", -14, "new text -14"); +INSERT INTO nt_1 VALUES ("new text -16", -16, "new text -16"); +--error ER_DUP_ENTRY +INSERT INTO nt_1 VALUES ("new text -15", -15, "new text -15"), ("new text -16", -16, "new text -16"); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #4) "B T N R" generates in binlog the "B T N R" entries. +--echo # +BEGIN; +INSERT INTO tt_1 VALUES ("new text 7", 7, "new text 7"); +INSERT INTO nt_1 VALUES ("new text 7", 7, "new text 7"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #4.e) "B T N R" with error in either T or N generates in binlog the "B T N R" entries. +--echo # +INSERT INTO tt_1 VALUES ("new text -17", -17, "new text -17"); +BEGIN; +--error ER_DUP_ENTRY +INSERT INTO tt_1 VALUES ("new text -16", -16, "new text -16"), ("new text -17", -17, "new text -17"); +INSERT INTO nt_1 VALUES ("new text -18", -18, "new text -18"); +ROLLBACK; + +BEGIN; +INSERT INTO tt_1 VALUES ("new text -19", -19, "new text -19"); +INSERT INTO nt_1 VALUES ("new text -21", -21, "new text -21"); +--error ER_DUP_ENTRY +INSERT INTO nt_1 VALUES ("new text -20", -20, "new text -20"), ("new text -21", -21, "new text -21"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #5) "T" generates in binlog the "B T C" entry. +--echo # +INSERT INTO tt_1 VALUES ("new text 8", 8, "new text 8"); + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #5.e) "T" with error in T generates in binlog an "empty" entry. +--echo # +INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"); +--error ER_DUP_ENTRY +INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -22", -22, "new text -22"); +--error ER_DUP_ENTRY +INSERT INTO tt_1 VALUES ("new text -23", -23, "new text -23"), ("new text -1", -1, "new text -1"); + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #6) "N" generates in binlog the "N" entry. +--echo # +INSERT INTO nt_1 VALUES ("new text 9", 9, "new text 9"); + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #6.e) "N" with error in N generates in binlog an empty entry if the error +--echo # happens in the first tuple. Otherwise, generates the "N" entry and +--echo # the error is appended. +--echo # +INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1"); +--error ER_DUP_ENTRY +INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1"); +--error ER_DUP_ENTRY +INSERT INTO nt_1 VALUES ("new text -24", -24, "new text -24"), ("new text -1", -1, "new text -1"); + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #7) "M" generates in binglog the "B M C" entries. +--echo # + +DELETE FROM nt_1; + +INSERT INTO nt_1 SELECT * FROM tt_1; + +DELETE FROM tt_1; + +INSERT INTO tt_1 SELECT * FROM nt_1; + +INSERT INTO tt_3 VALUES ("new text 000", 000, ''); + +INSERT INTO tt_3 VALUES("new text 100", 100, f1()); + +INSERT INTO nt_4 VALUES("new text 100", 100, f1()); + +INSERT INTO tt_3 VALUES("new text 200", 200, f2()); + +INSERT INTO nt_4 VALUES ("new text 300", 300, ''); + +INSERT INTO nt_4 VALUES ("new text 400", 400, f1()); + +INSERT INTO nt_4 VALUES ("new text 500", 500, f2()); + +CALL pc_i_tt_3(600, "Testing..."); + +UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 1", nt_4.a= "new text 1", tt_3.a= "new text 1", tt_4.a= "new text 1" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; + +UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 2", tt_4.a= "new text 2", nt_3.a= "new text 2", nt_4.a = "new text 2" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; + +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 3", nt_3.a= "new text 3", nt_4.a= "new text 3", tt_4.a = "new text 3" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; + +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 4", nt_3.a= "new text 4", nt_4.a= "new text 4", tt_4.a = "new text 4" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #7.e) "M" with error in M generates in binglog the "B M R" entries. +--echo # + +INSERT INTO nt_3 VALUES ("new text -26", -26, ''); +SELECT * FROM tt_3; +--error ER_DUP_ENTRY +INSERT INTO tt_3 VALUES ("new text -25", -25, ''), ("new text -26", -26, ''); +SELECT * FROM tt_3; + +INSERT INTO tt_4 VALUES ("new text -26", -26, ''); +SELECT * FROM nt_4; +--error ER_DUP_ENTRY +INSERT INTO nt_4 VALUES ("new text -25", -25, ''), ("new text -26", -26, ''); +SELECT * FROM nt_4; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #8) "B N N T C" generates in binglog the "N N B T C" entries. +--echo # +BEGIN; +INSERT INTO nt_1 VALUES ("new text 10", 10, "new text 10"); +INSERT INTO nt_2 VALUES ("new text 10", 10, "new text 10"); +INSERT INTO tt_1 VALUES ("new text 10", 10, "new text 10"); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +--echo # +--echo #8.e) "B N N T R" See 6.e and 9.e. +--echo # + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #9) "B N N T R" generates in binlog the "N N B T R" entries. +--echo # +BEGIN; +INSERT INTO nt_1 VALUES ("new text 11", 11, "new text 11"); +INSERT INTO nt_2 VALUES ("new text 11", 11, "new text 11"); +INSERT INTO tt_1 VALUES ("new text 11", 11, "new text 11"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #9.e) "B N N T R" with error in N generates in binlog the "N N B T R" entries. +--echo # +BEGIN; +INSERT INTO nt_1 VALUES ("new text -25", -25, "new text -25"); +INSERT INTO nt_2 VALUES ("new text -25", -25, "new text -25"); +--error ER_DUP_ENTRY +INSERT INTO nt_2 VALUES ("new text -26", -26, "new text -26"), ("new text -25", -25, "new text -25"); +INSERT INTO tt_1 VALUES ("new text -27", -27, "new text -27"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #10) "B N N C" generates in binglog the "N N" entries. +--echo # +BEGIN; +INSERT INTO nt_1 VALUES ("new text 12", 12, "new text 12"); +INSERT INTO nt_2 VALUES ("new text 12", 12, "new text 12"); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +--echo # +--echo #10.e) "B N N C" See 6.e and 9.e. +--echo # + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #11) "B N N R" generates in binlog the "N N" entries. +--echo # +BEGIN; +INSERT INTO nt_1 VALUES ("new text 13", 13, "new text 13"); +INSERT INTO nt_2 VALUES ("new text 13", 13, "new text 13"); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +--echo # +--echo #11.e) "B N N R" See 6.e and 9.e. +--echo # + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #12) "B M T C" generates in the binlog the "B M T C" entries. +--echo # +DELETE FROM nt_1; +BEGIN; +INSERT INTO nt_1 SELECT * FROM tt_1; +INSERT INTO tt_2 VALUES ("new text 14", 14, "new text 14"); +COMMIT; + +DELETE FROM tt_1; +BEGIN; +INSERT INTO tt_1 SELECT * FROM nt_1; +INSERT INTO tt_2 VALUES ("new text 15", 15, "new text 15"); +COMMIT; + +BEGIN; +INSERT INTO tt_3 VALUES ("new text 700", 700, ''); +INSERT INTO tt_1 VALUES ("new text 800", 800, ''); +COMMIT; + +BEGIN; +INSERT INTO tt_3 VALUES("new text 900", 900, f1()); +INSERT INTO tt_1 VALUES ("new text 1000", 1000, ''); +COMMIT; + +BEGIN; +INSERT INTO tt_3 VALUES(1100, 1100, f2()); +INSERT INTO tt_1 VALUES ("new text 1200", 1200, ''); +COMMIT; + +BEGIN; +INSERT INTO nt_4 VALUES ("new text 1300", 1300, ''); +INSERT INTO tt_1 VALUES ("new text 1400", 1400, ''); +COMMIT; + +BEGIN; +INSERT INTO nt_4 VALUES("new text 1500", 1500, f1()); +INSERT INTO tt_1 VALUES ("new text 1600", 1600, ''); +COMMIT; + +BEGIN; +INSERT INTO nt_4 VALUES("new text 1700", 1700, f2()); +INSERT INTO tt_1 VALUES ("new text 1800", 1800, ''); +COMMIT; + +BEGIN; +CALL pc_i_tt_3(1900, "Testing..."); +INSERT INTO tt_1 VALUES ("new text 2000", 2000, ''); +COMMIT; + +BEGIN; +UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 5", nt_4.a= "new text 5", tt_3.a= "new text 5", tt_4.a= "new text 5" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2100", 2100, ''); +COMMIT; + +BEGIN; +UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 6", tt_4.a= "new text 6", nt_3.a= "new text 6", nt_4.a = "new text 6" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2200", 2200, ''); +COMMIT; + +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 7", nt_3.a= "new text 7", nt_4.a= "new text 7", tt_4.a = "new text 7" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2300", 2300, ''); +COMMIT; + +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 8", nt_3.a= "new text 8", nt_4.a= "new text 8", tt_4.a = "new text 8" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2400", 2400, ''); +COMMIT; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #12.e) "B M T C" with error in M generates in the binlog the "B M T C" entries. +--echo # + +--echo # There is a bug in the slave that needs to be fixed before enabling +--echo # this part of the test. A bug report will be filed referencing this +--echo # test case. +# +#BEGIN; +#INSERT INTO nt_3 VALUES ("new text -28", -28, ''); +#--error ER_DUP_ENTRY +#INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); +#INSERT INTO tt_1 VALUES ("new text -27", -27, ''); +#COMMIT; +# +#BEGIN; +#INSERT INTO tt_4 VALUES ("new text -28", -28, ''); +#--error ER_DUP_ENTRY +#INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); +#INSERT INTO tt_1 VALUES ("new text -28", -28, ''); +#COMMIT; +# +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #13) "B M T R" generates in the binlog the "B M T R" entries +--echo # + +DELETE FROM nt_1; +BEGIN; +INSERT INTO nt_1 SELECT * FROM tt_1; +INSERT INTO tt_2 VALUES ("new text 17", 17, "new text 17"); +ROLLBACK; + +DELETE FROM tt_1; +BEGIN; +INSERT INTO tt_1 SELECT * FROM nt_1; +INSERT INTO tt_2 VALUES ("new text 18", 18, "new text 18"); +ROLLBACK; +INSERT INTO tt_1 SELECT * FROM nt_1; + +BEGIN; +INSERT INTO tt_3 VALUES ("new text 2500", 2500, ''); +INSERT INTO tt_1 VALUES ("new text 2600", 2600, ''); +ROLLBACK; + +BEGIN; +INSERT INTO tt_3 VALUES("new text 2700", 2700, f1()); +INSERT INTO tt_1 VALUES ("new text 2800", 2800, ''); +ROLLBACK; + +BEGIN; +INSERT INTO tt_3 VALUES(2900, 2900, f2()); +INSERT INTO tt_1 VALUES ("new text 3000", 3000, ''); +ROLLBACK; + +BEGIN; +INSERT INTO nt_4 VALUES ("new text 3100", 3100, ''); +INSERT INTO tt_1 VALUES ("new text 3200", 3200, ''); +ROLLBACK; + +BEGIN; +INSERT INTO nt_4 VALUES("new text 3300", 3300, f1()); +INSERT INTO tt_1 VALUES ("new text 3400", 3400, ''); +ROLLBACK; + +BEGIN; +INSERT INTO nt_4 VALUES("new text 3500", 3500, f2()); +INSERT INTO tt_1 VALUES ("new text 3600", 3600, ''); +ROLLBACK; + +BEGIN; +CALL pc_i_tt_3(3700, "Testing..."); +INSERT INTO tt_1 VALUES ("new text 3700", 3700, ''); +ROLLBACK; + +BEGIN; +UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 9", nt_4.a= "new text 9", tt_3.a= "new text 9", tt_4.a= "new text 9" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 3800", 3800, ''); +ROLLBACK; + +BEGIN; +UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 10", tt_4.a= "new text 10", nt_3.a= "new text 10", nt_4.a = "new text 10" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 3900", 3900, ''); +ROLLBACK; + +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 11", nt_3.a= "new text 11", nt_4.a= "new text 11", tt_4.a = "new text 11" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 4000", 4000, ''); +ROLLBACK; + +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 12", nt_3.a= "new text 12", nt_4.a= "new text 12", tt_4.a = "new text 12" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 4100", 4100, ''); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #13.e) "B M T R" with error in M generates in the binlog the "B M T R" entries. +--echo # + +BEGIN; +INSERT INTO nt_3 VALUES ("new text -30", -30, ''); +--error ER_DUP_ENTRY +INSERT INTO tt_3 VALUES ("new text -29", -29, ''), ("new text -30", -30, ''); +INSERT INTO tt_1 VALUES ("new text -30", -30, ''); +ROLLBACK; + +BEGIN; +INSERT INTO tt_4 VALUES ("new text -30", -30, ''); +--error ER_DUP_ENTRY +INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, ''); +INSERT INTO tt_1 VALUES ("new text -31", -31, ''); +ROLLBACK; + +--source include/show_binlog_events.inc + +--echo +--echo +--echo +--echo +let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); +--echo # +--echo #14) "B M T R" with error in M generates in the binlog the "B M T R" entries. +--echo # + +BEGIN; +INSERT INTO tt_4 VALUES ("new text -32", -32, ''); +TRUNCATE TABLE tt_4; +INSERT INTO tt_4 VALUES ("new text -33", -33, ''); +ROLLBACK; + +--source include/show_binlog_events.inc + +connection master; +sync_slave_with_master; + +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/test-slave.sql +--diff_files $MYSQLTEST_VARDIR/tmp/test-master.sql $MYSQLTEST_VARDIR/tmp/test-slave.sql + +--echo ################################################################################### +--echo # CLEAN +--echo ################################################################################### + +connection master; +DROP TABLE tt_1; +DROP TABLE tt_2; +DROP TABLE tt_3; +DROP TABLE tt_4; +DROP TABLE nt_1; +DROP TABLE nt_2; +DROP TABLE nt_3; +DROP TABLE nt_4; +DROP PROCEDURE pc_i_tt_3; +DROP FUNCTION f1; +DROP FUNCTION f2; + +sync_slave_with_master; diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index d412eae8364..d91ba8291fd 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -725,9 +725,9 @@ call p_verify_status_increment(4, 4, 4, 4); alter table t3 add column (b int); call p_verify_status_increment(2, 0, 2, 0); alter table t3 rename t4; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(2, 2, 2, 2); rename table t4 to t3; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(2, 2, 2, 2); truncate table t3; call p_verify_status_increment(4, 4, 4, 4); create view v1 as select * from t2; diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index cabd4c29c1d..51c4ac3002c 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -841,17 +841,17 @@ call p_verify_status_increment(2, 0, 2, 0); SUCCESS alter table t3 rename t4; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(2, 2, 2, 2); SUCCESS rename table t4 to t3; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(2, 2, 2, 2); SUCCESS truncate table t3; call p_verify_status_increment(4, 4, 4, 4); -ERROR -Expected commit increment: 4 actual: 2 +SUCCESS + create view v1 as select * from t2; call p_verify_status_increment(1, 0, 1, 0); SUCCESS diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index 4d639c3da68..9ae5121f618 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -379,7 +379,9 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F @@ -838,8 +840,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 4 */; count(*) 4 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 95773a247b9..1ded5c8b622 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 @@ -346,7 +346,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (3,3) master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4,4) +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (5,5) master-bin.000001 # Query # # use `test`; DROP TABLE t2 master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (6,6) @@ -545,8 +547,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ +master-bin.000001 # Query # # ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 4 */; count(*) @@ -782,8 +786,10 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ +master-bin.000001 # Query # # ROLLBACK select count(*) from t1 /* must be 4 */; count(*) 4 diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 033f71c16b7..6c5ab43da5f 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -963,7 +963,9 @@ master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1') master-bin.000001 # Xid 1 # # +master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; TRUNCATE t1 +master-bin.000001 # Xid 1 # # master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 master-bin.000001 # Xid 1 # # diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result new file mode 100644 index 00000000000..f8510b3a85e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result @@ -0,0 +1,871 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +################################################################################### +# CONFIGURATION +################################################################################### +SET SQL_LOG_BIN=0; +CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +SET SQL_LOG_BIN=1; +SET SQL_LOG_BIN=0; +CREATE TABLE nt_1 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_2 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_3 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE nt_4 (a text, b int PRIMARY KEY, c text) ENGINE = MyISAM; +CREATE TABLE tt_1 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_2 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_3 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +CREATE TABLE tt_4 (a text, b int PRIMARY KEY, c text) ENGINE = Innodb; +SET SQL_LOG_BIN=1; +CREATE FUNCTION f1 () RETURNS VARCHAR(64) +BEGIN +RETURN "Testing..."; +END| +CREATE FUNCTION f2 () RETURNS VARCHAR(64) +BEGIN +RETURN f1(); +END| +CREATE PROCEDURE pc_i_tt_3 (IN x INT, IN y VARCHAR(64)) +BEGIN +INSERT INTO tt_3 VALUES (y,x,x); +END| +CREATE TRIGGER tr_i_tt_3_to_nt_3 BEFORE INSERT ON tt_3 FOR EACH ROW +BEGIN +INSERT INTO nt_3 VALUES (NEW.a, NEW.b, NEW.c); +END| +CREATE TRIGGER tr_i_nt_4_to_tt_4 BEFORE INSERT ON nt_4 FOR EACH ROW +BEGIN +INSERT INTO tt_4 VALUES (NEW.a, NEW.b, NEW.c); +END| +################################################################################### +# MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES +################################################################################### +# +#1) "B T T C" generates in binlog the "B T T C" entries. +# +BEGIN; +INSERT INTO tt_1 VALUES ("new text 4", 4, "new text 4"); +INSERT INTO tt_2 VALUES ("new text 4", 4, "new text 4"); +COMMIT; +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 tt_1 VALUES ("new text 4", 4, "new text 4") +master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 4", 4, "new text 4") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#1.e) "B T T C" with error in T generates in binlog the "B T T C" entries. +# +INSERT INTO tt_1 VALUES ("new text -2", -2, "new text -2"); +BEGIN; +INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -2", -2, "new text -2"); +ERROR 23000: Duplicate entry '-2' for key 'PRIMARY' +INSERT INTO tt_2 VALUES ("new text -3", -3, "new text -3"); +COMMIT; +BEGIN; +INSERT INTO tt_2 VALUES ("new text -5", -5, "new text -5"); +INSERT INTO tt_2 VALUES ("new text -4", -4, "new text -4"), ("new text -5", -5, "new text -5"); +ERROR 23000: Duplicate entry '-5' for key 'PRIMARY' +COMMIT; +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 tt_1 VALUES ("new text -2", -2, "new text -2") +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text -3", -3, "new text -3") +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text -5", -5, "new text -5") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#2) "B T T R" generates in binlog an "empty" entry. +# +BEGIN; +INSERT INTO tt_1 VALUES ("new text 5", 5, "new text 5"); +INSERT INTO tt_2 VALUES ("new text 5", 5, "new text 5"); +ROLLBACK; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info + + + + +# +#2.e) "B T T R" with error in T generates in binlog an "empty" entry. +# +INSERT INTO tt_1 VALUES ("new text -7", -7, "new text -7"); +BEGIN; +INSERT INTO tt_1 VALUES ("new text -6", -6, "new text -6"), ("new text -7", -7, "new text -7"); +ERROR 23000: Duplicate entry '-7' for key 'PRIMARY' +INSERT INTO tt_2 VALUES ("new text -8", -8, "new text -8"); +ROLLBACK; +BEGIN; +INSERT INTO tt_2 VALUES ("new text -10", -10, "new text -10"); +INSERT INTO tt_2 VALUES ("new text -9", -9, "new text -9"), ("new text -10", -10, "new text -10"); +ERROR 23000: Duplicate entry '-10' for key 'PRIMARY' +ROLLBACK; +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 tt_1 VALUES ("new text -7", -7, "new text -7") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#3) "B T N C" generates in binlog the "B T N C" entries. +# +BEGIN; +INSERT INTO tt_1 VALUES ("new text 6", 6, "new text 6"); +INSERT INTO nt_1 VALUES ("new text 6", 6, "new text 6"); +COMMIT; +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 tt_1 VALUES ("new text 6", 6, "new text 6") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 6", 6, "new text 6") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#3.e) "B T N C" with error in either T or N generates in binlog the "B T N C" entries. +# +INSERT INTO tt_1 VALUES ("new text -12", -12, "new text -12"); +BEGIN; +INSERT INTO tt_1 VALUES ("new text -11", -11, "new text -11"), ("new text -12", -12, "new text -12"); +ERROR 23000: Duplicate entry '-12' for key 'PRIMARY' +INSERT INTO nt_1 VALUES ("new text -13", -13, "new text -13"); +COMMIT; +BEGIN; +INSERT INTO tt_1 VALUES ("new text -14", -14, "new text -14"); +INSERT INTO nt_1 VALUES ("new text -16", -16, "new text -16"); +INSERT INTO nt_1 VALUES ("new text -15", -15, "new text -15"), ("new text -16", -16, "new text -16"); +ERROR 23000: Duplicate entry '-16' for key 'PRIMARY' +COMMIT; +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 tt_1 VALUES ("new text -12", -12, "new text -12") +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -13", -13, "new text -13") +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -14", -14, "new text -14") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -16", -16, "new text -16") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -15", -15, "new text -15"), ("new text -16", -16, "new text -16") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#4) "B T N R" generates in binlog the "B T N R" entries. +# +BEGIN; +INSERT INTO tt_1 VALUES ("new text 7", 7, "new text 7"); +INSERT INTO nt_1 VALUES ("new text 7", 7, "new text 7"); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +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 tt_1 VALUES ("new text 7", 7, "new text 7") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 7", 7, "new text 7") +master-bin.000001 # Query # # ROLLBACK + + + + +# +#4.e) "B T N R" with error in either T or N generates in binlog the "B T N R" entries. +# +INSERT INTO tt_1 VALUES ("new text -17", -17, "new text -17"); +BEGIN; +INSERT INTO tt_1 VALUES ("new text -16", -16, "new text -16"), ("new text -17", -17, "new text -17"); +ERROR 23000: Duplicate entry '-17' for key 'PRIMARY' +INSERT INTO nt_1 VALUES ("new text -18", -18, "new text -18"); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO tt_1 VALUES ("new text -19", -19, "new text -19"); +INSERT INTO nt_1 VALUES ("new text -21", -21, "new text -21"); +INSERT INTO nt_1 VALUES ("new text -20", -20, "new text -20"), ("new text -21", -21, "new text -21"); +ERROR 23000: Duplicate entry '-21' for key 'PRIMARY' +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +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 tt_1 VALUES ("new text -17", -17, "new text -17") +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -18", -18, "new text -18") +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -19", -19, "new text -19") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -21", -21, "new text -21") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -20", -20, "new text -20"), ("new text -21", -21, "new text -21") +master-bin.000001 # Query # # ROLLBACK + + + + +# +#5) "T" generates in binlog the "B T C" entry. +# +INSERT INTO tt_1 VALUES ("new text 8", 8, "new text 8"); +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 tt_1 VALUES ("new text 8", 8, "new text 8") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#5.e) "T" with error in T generates in binlog an "empty" entry. +# +INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"); +INSERT INTO tt_1 VALUES ("new text -1", -1, "new text -1"), ("new text -22", -22, "new text -22"); +ERROR 23000: Duplicate entry '-1' for key 'PRIMARY' +INSERT INTO tt_1 VALUES ("new text -23", -23, "new text -23"), ("new text -1", -1, "new text -1"); +ERROR 23000: Duplicate entry '-1' for key 'PRIMARY' +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 tt_1 VALUES ("new text -1", -1, "new text -1") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#6) "N" generates in binlog the "N" entry. +# +INSERT INTO nt_1 VALUES ("new text 9", 9, "new text 9"); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 9", 9, "new text 9") + + + + +# +#6.e) "N" with error in N generates in binlog an empty entry if the error +# happens in the first tuple. Otherwise, generates the "N" entry and +# the error is appended. +# +INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1"); +INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1"); +ERROR 23000: Duplicate entry '-1' for key 'PRIMARY' +INSERT INTO nt_1 VALUES ("new text -24", -24, "new text -24"), ("new text -1", -1, "new text -1"); +ERROR 23000: Duplicate entry '-1' for key 'PRIMARY' +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -1", -1, "new text -1") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -24", -24, "new text -24"), ("new text -1", -1, "new text -1") + + + + +# +#7) "M" generates in binglog the "B M C" entries. +# +DELETE FROM nt_1; +INSERT INTO nt_1 SELECT * FROM tt_1; +DELETE FROM tt_1; +INSERT INTO tt_1 SELECT * FROM nt_1; +INSERT INTO tt_3 VALUES ("new text 000", 000, ''); +INSERT INTO tt_3 VALUES("new text 100", 100, f1()); +INSERT INTO nt_4 VALUES("new text 100", 100, f1()); +INSERT INTO tt_3 VALUES("new text 200", 200, f2()); +INSERT INTO nt_4 VALUES ("new text 300", 300, ''); +INSERT INTO nt_4 VALUES ("new text 400", 400, f1()); +INSERT INTO nt_4 VALUES ("new text 500", 500, f2()); +CALL pc_i_tt_3(600, "Testing..."); +UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 1", nt_4.a= "new text 1", tt_3.a= "new text 1", tt_4.a= "new text 1" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 2", tt_4.a= "new text 2", nt_3.a= "new text 2", nt_4.a = "new text 2" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 3", nt_3.a= "new text 3", nt_4.a= "new text 3", tt_4.a = "new text 3" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 4", nt_3.a= "new text 4", nt_4.a= "new text 4", tt_4.a = "new text 4" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; DELETE FROM nt_1 +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 SELECT * FROM tt_1 +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; DELETE FROM tt_1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 SELECT * FROM nt_1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text 000", 000, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 100", 100, f1()) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 100", 100, f1()) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 200", 200, f2()) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 300", 300, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 400", 400, f1()) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 500", 500, f2()) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ( NAME_CONST('y',_latin1'Testing...' COLLATE 'latin1_swedish_ci'), NAME_CONST('x',600), NAME_CONST('x',600)) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 1", nt_4.a= "new text 1", tt_3.a= "new text 1", tt_4.a= "new text 1" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 2", tt_4.a= "new text 2", nt_3.a= "new text 2", nt_4.a = "new text 2" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 3", nt_3.a= "new text 3", nt_4.a= "new text 3", tt_4.a = "new text 3" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 4", nt_3.a= "new text 4", nt_4.a= "new text 4", tt_4.a = "new text 4" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#7.e) "M" with error in M generates in binglog the "B M R" entries. +# +INSERT INTO nt_3 VALUES ("new text -26", -26, ''); +SELECT * FROM tt_3; +a b c +new text 000 0 +new text 4 100 Testing... +new text 200 200 Testing... +Testing... 600 600 +INSERT INTO tt_3 VALUES ("new text -25", -25, ''), ("new text -26", -26, ''); +ERROR 23000: Duplicate entry '-26' for key 'PRIMARY' +SELECT * FROM tt_3; +a b c +new text 000 0 +new text 4 100 Testing... +new text 200 200 Testing... +Testing... 600 600 +INSERT INTO tt_4 VALUES ("new text -26", -26, ''); +SELECT * FROM nt_4; +a b c +new text 4 100 Testing... +new text 300 300 +new text 400 400 Testing... +new text 500 500 Testing... +INSERT INTO nt_4 VALUES ("new text -25", -25, ''), ("new text -26", -26, ''); +ERROR 23000: Duplicate entry '-26' for key 'PRIMARY' +SELECT * FROM nt_4; +a b c +new text 4 100 Testing... +new text 300 300 +new text 400 400 Testing... +new text 500 500 Testing... +new text -25 -25 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_3 VALUES ("new text -26", -26, '') +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text -25", -25, ''), ("new text -26", -26, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -26", -26, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -25", -25, ''), ("new text -26", -26, '') +master-bin.000001 # Query # # ROLLBACK + + + + +# +#8) "B N N T C" generates in binglog the "N N B T C" entries. +# +BEGIN; +INSERT INTO nt_1 VALUES ("new text 10", 10, "new text 10"); +INSERT INTO nt_2 VALUES ("new text 10", 10, "new text 10"); +INSERT INTO tt_1 VALUES ("new text 10", 10, "new text 10"); +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 10", 10, "new text 10") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 10", 10, "new text 10") +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 10", 10, "new text 10") +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#8.e) "B N N T R" See 6.e and 9.e. +# + + + + +# +#9) "B N N T R" generates in binlog the "N N B T R" entries. +# +BEGIN; +INSERT INTO nt_1 VALUES ("new text 11", 11, "new text 11"); +INSERT INTO nt_2 VALUES ("new text 11", 11, "new text 11"); +INSERT INTO tt_1 VALUES ("new text 11", 11, "new text 11"); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 11", 11, "new text 11") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 11", 11, "new text 11") +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 11", 11, "new text 11") +master-bin.000001 # Query # # ROLLBACK + + + + +# +#9.e) "B N N T R" with error in N generates in binlog the "N N B T R" entries. +# +BEGIN; +INSERT INTO nt_1 VALUES ("new text -25", -25, "new text -25"); +INSERT INTO nt_2 VALUES ("new text -25", -25, "new text -25"); +INSERT INTO nt_2 VALUES ("new text -26", -26, "new text -26"), ("new text -25", -25, "new text -25"); +ERROR 23000: Duplicate entry '-25' for key 'PRIMARY' +INSERT INTO tt_1 VALUES ("new text -27", -27, "new text -27"); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text -25", -25, "new text -25") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text -25", -25, "new text -25") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text -26", -26, "new text -26"), ("new text -25", -25, "new text -25") +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -27", -27, "new text -27") +master-bin.000001 # Query # # ROLLBACK + + + + +# +#10) "B N N C" generates in binglog the "N N" entries. +# +BEGIN; +INSERT INTO nt_1 VALUES ("new text 12", 12, "new text 12"); +INSERT INTO nt_2 VALUES ("new text 12", 12, "new text 12"); +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 12", 12, "new text 12") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 12", 12, "new text 12") + + + + +# +#10.e) "B N N C" See 6.e and 9.e. +# + + + + +# +#11) "B N N R" generates in binlog the "N N" entries. +# +BEGIN; +INSERT INTO nt_1 VALUES ("new text 13", 13, "new text 13"); +INSERT INTO nt_2 VALUES ("new text 13", 13, "new text 13"); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 VALUES ("new text 13", 13, "new text 13") +master-bin.000001 # Query # # use `test`; INSERT INTO nt_2 VALUES ("new text 13", 13, "new text 13") + + + + +# +#11.e) "B N N R" See 6.e and 9.e. +# + + + + +# +#12) "B M T C" generates in the binlog the "B M T C" entries. +# +DELETE FROM nt_1; +BEGIN; +INSERT INTO nt_1 SELECT * FROM tt_1; +INSERT INTO tt_2 VALUES ("new text 14", 14, "new text 14"); +COMMIT; +DELETE FROM tt_1; +BEGIN; +INSERT INTO tt_1 SELECT * FROM nt_1; +INSERT INTO tt_2 VALUES ("new text 15", 15, "new text 15"); +COMMIT; +BEGIN; +INSERT INTO tt_3 VALUES ("new text 700", 700, ''); +INSERT INTO tt_1 VALUES ("new text 800", 800, ''); +COMMIT; +BEGIN; +INSERT INTO tt_3 VALUES("new text 900", 900, f1()); +INSERT INTO tt_1 VALUES ("new text 1000", 1000, ''); +COMMIT; +BEGIN; +INSERT INTO tt_3 VALUES(1100, 1100, f2()); +INSERT INTO tt_1 VALUES ("new text 1200", 1200, ''); +COMMIT; +BEGIN; +INSERT INTO nt_4 VALUES ("new text 1300", 1300, ''); +INSERT INTO tt_1 VALUES ("new text 1400", 1400, ''); +COMMIT; +BEGIN; +INSERT INTO nt_4 VALUES("new text 1500", 1500, f1()); +INSERT INTO tt_1 VALUES ("new text 1600", 1600, ''); +COMMIT; +BEGIN; +INSERT INTO nt_4 VALUES("new text 1700", 1700, f2()); +INSERT INTO tt_1 VALUES ("new text 1800", 1800, ''); +COMMIT; +BEGIN; +CALL pc_i_tt_3(1900, "Testing..."); +INSERT INTO tt_1 VALUES ("new text 2000", 2000, ''); +COMMIT; +BEGIN; +UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 5", nt_4.a= "new text 5", tt_3.a= "new text 5", tt_4.a= "new text 5" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2100", 2100, ''); +COMMIT; +BEGIN; +UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 6", tt_4.a= "new text 6", nt_3.a= "new text 6", nt_4.a = "new text 6" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2200", 2200, ''); +COMMIT; +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 7", nt_3.a= "new text 7", nt_4.a= "new text 7", tt_4.a = "new text 7" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2300", 2300, ''); +COMMIT; +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 8", nt_3.a= "new text 8", nt_4.a= "new text 8", tt_4.a = "new text 8" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 2400", 2400, ''); +COMMIT; +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; DELETE FROM nt_1 +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 SELECT * FROM tt_1 +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 14", 14, "new text 14") +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; DELETE FROM tt_1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 SELECT * FROM nt_1 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 15", 15, "new text 15") +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text 700", 700, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 800", 800, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 900", 900, f1()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1000", 1000, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES(1100, 1100, f2()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1200", 1200, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 1300", 1300, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1400", 1400, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 1500", 1500, f1()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1600", 1600, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 1700", 1700, f2()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 1800", 1800, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ( NAME_CONST('y',_latin1'Testing...' COLLATE 'latin1_swedish_ci'), NAME_CONST('x',1900), NAME_CONST('x',1900)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2000", 2000, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 5", nt_4.a= "new text 5", tt_3.a= "new text 5", tt_4.a= "new text 5" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2100", 2100, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 6", tt_4.a= "new text 6", nt_3.a= "new text 6", nt_4.a = "new text 6" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2200", 2200, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 7", nt_3.a= "new text 7", nt_4.a= "new text 7", tt_4.a = "new text 7" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2300", 2300, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 8", nt_3.a= "new text 8", nt_4.a= "new text 8", tt_4.a = "new text 8" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2400", 2400, '') +master-bin.000001 # Xid # # COMMIT /* XID */ + + + + +# +#12.e) "B M T C" with error in M generates in the binlog the "B M T C" entries. +# +# There is a bug in the slave that needs to be fixed before enabling +# this part of the test. A bug report will be filed referencing this +# test case. +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info + + + + +# +#13) "B M T R" generates in the binlog the "B M T R" entries +# +DELETE FROM nt_1; +BEGIN; +INSERT INTO nt_1 SELECT * FROM tt_1; +INSERT INTO tt_2 VALUES ("new text 17", 17, "new text 17"); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +DELETE FROM tt_1; +BEGIN; +INSERT INTO tt_1 SELECT * FROM nt_1; +INSERT INTO tt_2 VALUES ("new text 18", 18, "new text 18"); +ROLLBACK; +INSERT INTO tt_1 SELECT * FROM nt_1; +BEGIN; +INSERT INTO tt_3 VALUES ("new text 2500", 2500, ''); +INSERT INTO tt_1 VALUES ("new text 2600", 2600, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO tt_3 VALUES("new text 2700", 2700, f1()); +INSERT INTO tt_1 VALUES ("new text 2800", 2800, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO tt_3 VALUES(2900, 2900, f2()); +INSERT INTO tt_1 VALUES ("new text 3000", 3000, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO nt_4 VALUES ("new text 3100", 3100, ''); +INSERT INTO tt_1 VALUES ("new text 3200", 3200, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO nt_4 VALUES("new text 3300", 3300, f1()); +INSERT INTO tt_1 VALUES ("new text 3400", 3400, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO nt_4 VALUES("new text 3500", 3500, f2()); +INSERT INTO tt_1 VALUES ("new text 3600", 3600, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +CALL pc_i_tt_3(3700, "Testing..."); +INSERT INTO tt_1 VALUES ("new text 3700", 3700, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 9", nt_4.a= "new text 9", tt_3.a= "new text 9", tt_4.a= "new text 9" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 3800", 3800, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 10", tt_4.a= "new text 10", nt_3.a= "new text 10", nt_4.a = "new text 10" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 3900", 3900, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 11", nt_3.a= "new text 11", nt_4.a= "new text 11", tt_4.a = "new text 11" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 4000", 4000, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 12", nt_3.a= "new text 12", nt_4.a= "new text 12", tt_4.a = "new text 12" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100; +INSERT INTO tt_1 VALUES ("new text 4100", 4100, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; DELETE FROM nt_1 +master-bin.000001 # Query # # use `test`; INSERT INTO nt_1 SELECT * FROM tt_1 +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_2 VALUES ("new text 17", 17, "new text 17") +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; DELETE FROM tt_1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 SELECT * FROM nt_1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text 2500", 2500, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2600", 2600, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES("new text 2700", 2700, f1()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 2800", 2800, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES(2900, 2900, f2()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3000", 3000, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text 3100", 3100, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3200", 3200, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 3300", 3300, f1()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3400", 3400, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES("new text 3500", 3500, f2()) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3600", 3600, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ( NAME_CONST('y',_latin1'Testing...' COLLATE 'latin1_swedish_ci'), NAME_CONST('x',3700), NAME_CONST('x',3700)) +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3700", 3700, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE nt_3, nt_4, tt_3, tt_4 SET nt_3.a= "new text 9", nt_4.a= "new text 9", tt_3.a= "new text 9", tt_4.a= "new text 9" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3800", 3800, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, tt_4, nt_3, nt_4 SET tt_3.a= "new text 10", tt_4.a= "new text 10", nt_3.a= "new text 10", nt_4.a = "new text 10" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 3900", 3900, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 11", nt_3.a= "new text 11", nt_4.a= "new text 11", tt_4.a = "new text 11" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 4000", 4000, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; UPDATE tt_3, nt_3, nt_4, tt_4 SET tt_3.a= "new text 12", nt_3.a= "new text 12", nt_4.a= "new text 12", tt_4.a = "new text 12" where nt_3.b = nt_4.b and nt_4.b = tt_3.b and tt_3.b = tt_4.b and tt_4.b = 100 +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text 4100", 4100, '') +master-bin.000001 # Query # # ROLLBACK + + + + +# +#13.e) "B M T R" with error in M generates in the binlog the "B M T R" entries. +# +BEGIN; +INSERT INTO nt_3 VALUES ("new text -30", -30, ''); +INSERT INTO tt_3 VALUES ("new text -29", -29, ''), ("new text -30", -30, ''); +ERROR 23000: Duplicate entry '-30' for key 'PRIMARY' +INSERT INTO tt_1 VALUES ("new text -30", -30, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +BEGIN; +INSERT INTO tt_4 VALUES ("new text -30", -30, ''); +INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, ''); +ERROR 23000: Duplicate entry '-30' for key 'PRIMARY' +INSERT INTO tt_1 VALUES ("new text -31", -31, ''); +ROLLBACK; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_3 VALUES ("new text -30", -30, '') +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text -29", -29, ''), ("new text -30", -30, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -30", -30, '') +master-bin.000001 # Query # # ROLLBACK +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -30", -30, '') +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -31", -31, '') +master-bin.000001 # Query # # ROLLBACK + + + + +# +#14) "B M T R" with error in M generates in the binlog the "B M T R" entries. +# +BEGIN; +INSERT INTO tt_4 VALUES ("new text -32", -32, ''); +TRUNCATE TABLE tt_4; +INSERT INTO tt_4 VALUES ("new text -33", -33, ''); +ROLLBACK; +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 tt_4 VALUES ("new text -32", -32, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_4 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -33", -33, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +################################################################################### +# CLEAN +################################################################################### +DROP TABLE tt_1; +DROP TABLE tt_2; +DROP TABLE tt_3; +DROP TABLE tt_4; +DROP TABLE nt_1; +DROP TABLE nt_2; +DROP TABLE nt_3; +DROP TABLE nt_4; +DROP PROCEDURE pc_i_tt_3; +DROP FUNCTION f1; +DROP FUNCTION f2; diff --git a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test new file mode 100644 index 00000000000..0097fde874a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test @@ -0,0 +1,5 @@ +--source include/have_binlog_format_statement.inc +--source include/master-slave.inc +--source include/have_innodb.inc + +--source extra/rpl_tests/rpl_mixing_engines.test -- cgit v1.2.1 From 1759f9ecb4a8ba67804410a8902c00ebbe12545a Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Thu, 27 Aug 2009 10:32:27 +0100 Subject: Post-fix for BUG#28976. Updated main.mysqlbinlog_row_trans's result file as TRUNCATE statements are wrapped in BEGIN...COMMIT. --- mysql-test/r/mysqlbinlog_row_trans.result | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqlbinlog_row_trans.result b/mysql-test/r/mysqlbinlog_row_trans.result index d0180e4a7a3..9c3348a9e76 100644 --- a/mysql-test/r/mysqlbinlog_row_trans.result +++ b/mysql-test/r/mysqlbinlog_row_trans.result @@ -215,14 +215,30 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; TRUNCATE TABLE t1 /*!*/; # at # +#010909 4:46:40 server id 1 end_log_pos # Xid = # +COMMIT/*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +# at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; TRUNCATE TABLE t1 /*!*/; # at # +#010909 4:46:40 server id 1 end_log_pos # Xid = # +COMMIT/*!*/; +# at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; BEGIN @@ -331,9 +347,17 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; TRUNCATE TABLE t1 /*!*/; # at # +#010909 4:46:40 server id 1 end_log_pos # Xid = # +COMMIT/*!*/; +# at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; TRUNCATE TABLE t2 @@ -449,9 +473,17 @@ ROLLBACK # at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; +BEGIN +/*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; TRUNCATE TABLE t1 /*!*/; # at # +#010909 4:46:40 server id 1 end_log_pos # Xid = # +COMMIT/*!*/; +# at # #010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; TRUNCATE TABLE t2 -- cgit v1.2.1 From 367c14b854f4afe6cfd41b9f56bf8fbf3c337b65 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 27 Aug 2009 15:22:19 +0500 Subject: Bug#46184 Crash, SELECT ... FROM derived table procedure analyze The crash happens because select_union object is used as result set for queries which have derived tables. select_union use temporary table as data storage and if fields count exceeds 10(count of values for procedure ANALYSE()) then we get a crash on fill_record() function. mysql-test/r/analyse.result: test result mysql-test/r/subselect.result: result fix mysql-test/t/analyse.test: test case mysql-test/t/subselect.test: test fix sql/sql_yacc.yy: The crash happens because select_union object is used as result set for queries which have derived tables. select_union use temporary table as data storage and if fields count exceeds 10(count of values for procedure ANALYSE()) then we get a crash on fill_record() function. --- mysql-test/r/analyse.result | 9 ++++++--- mysql-test/r/subselect.result | 2 +- mysql-test/t/analyse.test | 10 ++++++++++ mysql-test/t/subselect.test | 2 +- 4 files changed, 18 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result index 49722d5b0ab..1e3a2985f74 100644 --- a/mysql-test/r/analyse.result +++ b/mysql-test/r/analyse.result @@ -28,9 +28,7 @@ test.t1.bool N Y 1 1 0 0 1.0000 NULL ENUM('N','Y') NOT NULL test.t1.d 2002-03-03 2002-03-05 10 10 0 0 10.0000 NULL ENUM('2002-03-03','2002-03-04','2002-03-05') NOT NULL drop table t1,t2; EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY system NULL NULL NULL NULL 1 -2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +ERROR HY000: Incorrect usage of PROCEDURE and subquery create table t1 (a int not null); create table t2 select * from t1 where 0=1 procedure analyse(); show create table t2; @@ -153,4 +151,9 @@ select f3 from t1 procedure analyse(1, 1); Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype test.t1.f3 5.99999 9.55555 7 7 0 0 7.77777 1.77778 FLOAT(6,5) NOT NULL drop table t1; +CREATE TABLE t1(a INT,b INT,c INT,d INT,e INT,f INT,g INT,h INT,i INT,j INT,k INT); +INSERT INTO t1 VALUES (); +SELECT * FROM (SELECT * FROM t1) d PROCEDURE ANALYSE(); +ERROR HY000: Incorrect usage of PROCEDURE and subquery +DROP TABLE t1; End of 4.1 tests diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 324a6073426..3f6e82fb57e 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -75,7 +75,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -ERROR HY000: Incorrect parameters to procedure 'ANALYSE' +ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; ERROR 42S22: Unknown column 'a' in 'field list' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NOT NULL; diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyse.test index efcf5f6421c..d8466df14bf 100644 --- a/mysql-test/t/analyse.test +++ b/mysql-test/t/analyse.test @@ -14,6 +14,7 @@ create table t2 select * from t1 procedure analyse(); select * from t2; drop table t1,t2; +--error ER_WRONG_USAGE EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(); # @@ -102,4 +103,13 @@ select f2 from t1 procedure analyse(1, 1); select f3 from t1 procedure analyse(1, 1); drop table t1; +# +# Bug#46184 Crash, SELECT ... FROM derived table procedure analyze +# +CREATE TABLE t1(a INT,b INT,c INT,d INT,e INT,f INT,g INT,h INT,i INT,j INT,k INT); +INSERT INTO t1 VALUES (); +--error ER_WRONG_USAGE +SELECT * FROM (SELECT * FROM t1) d PROCEDURE ANALYSE(); +DROP TABLE t1; + --echo End of 4.1 tests diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 9d4fc9030f2..36a885350f6 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -30,7 +30,7 @@ SELECT 1 IN (SELECT 1); SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); -- error ER_WRONG_USAGE select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); --- error ER_WRONG_PARAMETERS_TO_PROCEDURE +-- error ER_WRONG_USAGE SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); -- error ER_BAD_FIELD_ERROR SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; -- cgit v1.2.1 From a22c29d5e49fddf8cf55f3b1bf51e02b03696b7f Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 27 Aug 2009 14:40:42 +0300 Subject: Bug #46749: Segfault in add_key_fields() with outer subquery level field references This error requires a combination of factors : 1. An "impossible where" in the outermost SELECT 2. An aggregate in the outermost SELECT 3. A correlated subquery with a WHERE clause that includes an outer field reference as a top level WHERE sargable predicate When JOIN::optimize detects an "impossible WHERE" it will bail out without doing the rest of the work and initializations. It will not call make_join_statistics() as well. And make_join_statistics fills in various structures for each table referenced. When processing the result of the "impossible WHERE" the query must send a single row of data if there are aggregate functions in it. In this case the server marks all the aggregates as having received no rows and calls the relevant Item::val_xxx() method on the SELECT list. However if this SELECT list happens to contain a correlated subquery this subquery is evaluated in a normal evaluation mode. And if this correlated subquery has a reference to a field from the outermost "impossible where" SELECT the add_key_fields will mistakenly consider the outer field reference as a "local" field reference when looking for sargable predicates. But since the SELECT where the outer field reference refers to is not completely initialized due to the "impossible WHERE" in this level we'll get a NULL pointer reference. Fixed by making a better condition for discovering if a field is "local" to the SELECT level being processed. It's not enough to look for OUTER_REF_TABLE_BIT in this case since for outer references to constant tables the Item_field::used_tables() will return 0 regardless of whether the field reference is from the local SELECT or not. --- mysql-test/r/subselect.result | 28 ++++++++++++++++++++++++++++ mysql-test/t/subselect.test | 31 +++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 3f6e82fb57e..eacde19ab1c 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4474,4 +4474,32 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY C ALL NULL NULL NULL NULL 20 Using where DROP TABLE C; # End of test for bug#45061. +# +# Bug #46749: Segfault in add_key_fields() with outer subquery level +# field references +# +CREATE TABLE t1 ( +a int, +b int, +UNIQUE (a), KEY (b) +); +INSERT INTO t1 VALUES (1,1), (2,1); +CREATE TABLE st1 like t1; +INSERT INTO st1 VALUES (1,1), (2,1); +CREATE TABLE st2 like t1; +INSERT INTO st2 VALUES (1,1), (2,1); +EXPLAIN +SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +FROM t1 +WHERE a = 230; +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 DEPENDENT SUBQUERY st1 index NULL a 5 NULL 2 Using index +2 DEPENDENT SUBQUERY st2 index b b 5 NULL 2 Using where; Using index +SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +FROM t1 +WHERE a = 230; +MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +NULL 0 +DROP TABLE t1, st1, st2; End of 5.0 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 36a885350f6..79918ca78a2 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3450,4 +3450,35 @@ DROP TABLE C; --echo # End of test for bug#45061. +--echo # +--echo # Bug #46749: Segfault in add_key_fields() with outer subquery level +--echo # field references +--echo # + +CREATE TABLE t1 ( + a int, + b int, + UNIQUE (a), KEY (b) +); +INSERT INTO t1 VALUES (1,1), (2,1); + +CREATE TABLE st1 like t1; +INSERT INTO st1 VALUES (1,1), (2,1); + +CREATE TABLE st2 like t1; +INSERT INTO st2 VALUES (1,1), (2,1); + +# should have "impossible where" +EXPLAIN +SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +FROM t1 +WHERE a = 230; + +# should not crash +SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b) +FROM t1 +WHERE a = 230; + +DROP TABLE t1, st1, st2; + --echo End of 5.0 tests. -- cgit v1.2.1 From 354f5f7bac16a688f8c851cbf866120871713105 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Thu, 27 Aug 2009 13:46:29 +0100 Subject: BUG#46864 Incorrect update of InnoDB table on slave when using trigger with myisam table Slave does not correctly handle "expected errors" leading to inconsistencies between the mater and slave. Specifically, when a statement changes both transactional and non-transactional tables, the transactional changes are automatically rolled back on the master but the slave ignores the error and does not roll them back thus leading to inconsistencies. To fix the problem, we automatically roll back a statement that fails on the slave but note that the transaction is not rolled back unless a "rollback" command is in the relay log file. mysql-test/extra/rpl_tests/rpl_mixing_engines.test: Enabled item 13.e which was disabled because of the bug fixed by the current and removed item 14 which was introduced by mistake. --- mysql-test/extra/rpl_tests/rpl_mixing_engines.test | 47 +++++++--------------- .../suite/rpl/r/rpl_stm_mixing_engines.result | 45 ++++++++++----------- 2 files changed, 37 insertions(+), 55 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test index 73713b7998b..cbda85527f1 100644 --- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test +++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test @@ -562,21 +562,21 @@ let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); --echo # There is a bug in the slave that needs to be fixed before enabling --echo # this part of the test. A bug report will be filed referencing this --echo # test case. -# -#BEGIN; -#INSERT INTO nt_3 VALUES ("new text -28", -28, ''); -#--error ER_DUP_ENTRY -#INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); -#INSERT INTO tt_1 VALUES ("new text -27", -27, ''); -#COMMIT; -# -#BEGIN; -#INSERT INTO tt_4 VALUES ("new text -28", -28, ''); -#--error ER_DUP_ENTRY -#INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); -#INSERT INTO tt_1 VALUES ("new text -28", -28, ''); -#COMMIT; -# + +BEGIN; +INSERT INTO nt_3 VALUES ("new text -28", -28, ''); +--error ER_DUP_ENTRY +INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); +INSERT INTO tt_1 VALUES ("new text -27", -27, ''); +COMMIT; + +BEGIN; +INSERT INTO tt_4 VALUES ("new text -28", -28, ''); +--error ER_DUP_ENTRY +INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); +INSERT INTO tt_1 VALUES ("new text -28", -28, ''); +COMMIT; + --source include/show_binlog_events.inc --echo @@ -683,23 +683,6 @@ ROLLBACK; --source include/show_binlog_events.inc ---echo ---echo ---echo ---echo -let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); ---echo # ---echo #14) "B M T R" with error in M generates in the binlog the "B M T R" entries. ---echo # - -BEGIN; -INSERT INTO tt_4 VALUES ("new text -32", -32, ''); -TRUNCATE TABLE tt_4; -INSERT INTO tt_4 VALUES ("new text -33", -33, ''); -ROLLBACK; - ---source include/show_binlog_events.inc - connection master; sync_slave_with_master; diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result index f8510b3a85e..03223166f44 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result +++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result @@ -652,8 +652,30 @@ master-bin.000001 # Xid # # COMMIT /* XID */ # There is a bug in the slave that needs to be fixed before enabling # this part of the test. A bug report will be filed referencing this # test case. +BEGIN; +INSERT INTO nt_3 VALUES ("new text -28", -28, ''); +INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); +ERROR 23000: Duplicate entry '-28' for key 'PRIMARY' +INSERT INTO tt_1 VALUES ("new text -27", -27, ''); +COMMIT; +BEGIN; +INSERT INTO tt_4 VALUES ("new text -28", -28, ''); +INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, ''); +ERROR 23000: Duplicate entry '-28' for key 'PRIMARY' +INSERT INTO tt_1 VALUES ("new text -28", -28, ''); +COMMIT; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; INSERT INTO nt_3 VALUES ("new text -28", -28, '') +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_3 VALUES ("new text -27", -27, ''), ("new text -28", -28, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -27", -27, '') +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -28", -28, '') +master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -27", -27, ''), ("new text -28", -28, '') +master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -28", -28, '') +master-bin.000001 # Xid # # COMMIT /* XID */ @@ -832,29 +854,6 @@ master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -30 master-bin.000001 # Query # # use `test`; INSERT INTO nt_4 VALUES ("new text -29", -29, ''), ("new text -30", -30, '') master-bin.000001 # Query # # use `test`; INSERT INTO tt_1 VALUES ("new text -31", -31, '') master-bin.000001 # Query # # ROLLBACK - - - - -# -#14) "B M T R" with error in M generates in the binlog the "B M T R" entries. -# -BEGIN; -INSERT INTO tt_4 VALUES ("new text -32", -32, ''); -TRUNCATE TABLE tt_4; -INSERT INTO tt_4 VALUES ("new text -33", -33, ''); -ROLLBACK; -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 tt_4 VALUES ("new text -32", -32, '') -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; TRUNCATE TABLE tt_4 -master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; INSERT INTO tt_4 VALUES ("new text -33", -33, '') -master-bin.000001 # Xid # # COMMIT /* XID */ ################################################################################### # CLEAN ################################################################################### -- cgit v1.2.1 From 9a8ef8f7a4f3a1bf88be69526763a667843e6870 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 27 Aug 2009 15:17:09 +0200 Subject: Bug #46322 Sporadic timeout in mysql_upgrade.test Apparently caused by logging to table Turn on logging to file only, add to .opt file for tests needing log to table --- mysql-test/mysql-test-run.pl | 4 ++-- mysql-test/t/events_logs_tests-master.opt | 2 +- mysql-test/t/log_tables-master.opt | 2 +- mysql-test/t/ps-master.opt | 2 +- mysql-test/t/show_check-master.opt | 2 +- mysql-test/t/status-master.opt | 1 + 6 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 mysql-test/t/status-master.opt (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index c15f3990ec4..429fbfe41c6 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4105,8 +4105,8 @@ sub mysqld_arguments ($$$) { if ( $mysql_version_id >= 50106 ) { - # Turn on logging to both tables and file - mtr_add_arg($args, "--log-output=table,file"); + # Turn on logging to file + mtr_add_arg($args, "--log-output=file"); } # Check if "extra_opt" contains skip-log-bin diff --git a/mysql-test/t/events_logs_tests-master.opt b/mysql-test/t/events_logs_tests-master.opt index 35ff7911705..3ece9710a45 100644 --- a/mysql-test/t/events_logs_tests-master.opt +++ b/mysql-test/t/events_logs_tests-master.opt @@ -1 +1 @@ ---log-slow-queries +--log-output=table,file --log-slow-queries diff --git a/mysql-test/t/log_tables-master.opt b/mysql-test/t/log_tables-master.opt index 35ff7911705..3ece9710a45 100644 --- a/mysql-test/t/log_tables-master.opt +++ b/mysql-test/t/log_tables-master.opt @@ -1 +1 @@ ---log-slow-queries +--log-output=table,file --log-slow-queries diff --git a/mysql-test/t/ps-master.opt b/mysql-test/t/ps-master.opt index 3eb98fc3d6b..31c287d2bb5 100644 --- a/mysql-test/t/ps-master.opt +++ b/mysql-test/t/ps-master.opt @@ -1 +1 @@ ---log-slow-queries --log-long-format --log-queries-not-using-indexes +--log-output=table,file --log-slow-queries --log-long-format --log-queries-not-using-indexes diff --git a/mysql-test/t/show_check-master.opt b/mysql-test/t/show_check-master.opt index 7a438da06cc..aab832e2848 100644 --- a/mysql-test/t/show_check-master.opt +++ b/mysql-test/t/show_check-master.opt @@ -1 +1 @@ ---log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover="" +--log-output=table,file --log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover="" diff --git a/mysql-test/t/status-master.opt b/mysql-test/t/status-master.opt new file mode 100644 index 00000000000..eb3bb4fe50d --- /dev/null +++ b/mysql-test/t/status-master.opt @@ -0,0 +1 @@ +--log-output=table,file -- cgit v1.2.1 From ea06bbd2b0cc4e33b3350ef0bff25b0c1d1c2e95 Mon Sep 17 00:00:00 2001 From: Alfranio Correia Date: Thu, 27 Aug 2009 17:28:09 +0100 Subject: BUG#46861 Auto-closing of temporary tables broken by replicate-rewrite-db When a connection is dropped any remaining temporary table is also automatically dropped and the SQL statement of this operation is written to the binary log in order to drop such tables on the slave and keep the slave in sync. Specifically, the current code base creates the following type of statement: DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `db`.`table`; Unfortunately, appending the database to the table name in this manner circumvents the replicate-rewrite-db option (and any options that check the current database). To solve the issue, we started writing the statement to the binary as follows: use `db`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `table`; --- mysql-test/r/drop_temp_table.result | 2 +- mysql-test/r/mix_innodb_myisam_binlog.result | 2 +- mysql-test/r/rpl_drop_temp.result | 7 ++ mysql-test/r/rpl_rewrite_db.result | 127 ++++++++++++++++++++++ mysql-test/t/rpl_drop_temp.test | 15 ++- mysql-test/t/rpl_rewrite_db-slave.opt | 2 +- mysql-test/t/rpl_rewrite_db.test | 155 +++++++++++++++++++++++++++ 7 files changed, 303 insertions(+), 7 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/drop_temp_table.result b/mysql-test/r/drop_temp_table.result index 96481341bd6..ff200d09de4 100644 --- a/mysql-test/r/drop_temp_table.result +++ b/mysql-test/r/drop_temp_table.result @@ -18,5 +18,5 @@ master-bin.000001 # Query 1 # create database `drop-temp+table-test` master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int) master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int) master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int) -master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1` +master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `shortn2`,`table:name`,`shortn1` drop database `drop-temp+table-test`; diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index eda3ff41c89..21bc6501dac 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -260,7 +260,7 @@ master-bin.000001 # Query # # use `test`; create table t0 (n int) master-bin.000001 # Query # # use `test`; insert t0 select * from t1 master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null) master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb -master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti` +master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t1`,`ti` do release_lock("lock1"); drop table t0,t2; reset master; diff --git a/mysql-test/r/rpl_drop_temp.result b/mysql-test/r/rpl_drop_temp.result index 04fe094ea26..fff179d7056 100644 --- a/mysql-test/r/rpl_drop_temp.result +++ b/mysql-test/r/rpl_drop_temp.result @@ -5,8 +5,15 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; create database if not exists mysqltest; +use mysqltest; create temporary table mysqltest.t1 (n int); create temporary table mysqltest.t2 (n int); +select get_lock("con_temp",10); +get_lock("con_temp",10) +1 +select get_lock("con_temp",10); +get_lock("con_temp",10) +1 show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 diff --git a/mysql-test/r/rpl_rewrite_db.result b/mysql-test/r/rpl_rewrite_db.result index 1b843bffdca..46e12bc166b 100644 --- a/mysql-test/r/rpl_rewrite_db.result +++ b/mysql-test/r/rpl_rewrite_db.result @@ -90,5 +90,132 @@ a b 2 row 2 3 row 3 0 +set sql_log_bin= 0; drop database rewrite; +set sql_log_bin= 1; +set sql_log_bin= 0; drop table t1; +set sql_log_bin= 1; + +**** +**** Bug #46861 Auto-closing of temporary tables broken by replicate-rewrite-db +**** + +**** +**** Preparing the environment +**** +SET sql_log_bin= 0; +CREATE DATABASE database_master_temp_01; +CREATE DATABASE database_master_temp_02; +CREATE DATABASE database_master_temp_03; +SET sql_log_bin= 1; +SET sql_log_bin= 0; +CREATE DATABASE database_slave_temp_01; +CREATE DATABASE database_slave_temp_02; +CREATE DATABASE database_slave_temp_03; +SET sql_log_bin= 1; + +**** +**** Creating temporary tables on different databases with different connections +**** +**** con_temp_01 --> creates +**** t_01_01_temp on database_master_temp_01 +**** +**** con_temp_02 --> creates +**** t_01_01_temp on database_master_temp_01 +**** t_02_01_temp, t_02_02_temp on database_master_temp_02 +**** +**** con_temp_02 --> creates +**** t_01_01_temp on database_master_temp_01 +**** t_02_01_temp, t_02_02_temp on database_master_temp_02 +**** t_03_01_temp, t_03_02_temp, t_03_03_temp on database_master_temp_03 +**** + +con_temp_01 + +USE database_master_temp_01; +CREATE TEMPORARY TABLE t_01_01_temp(a int); +INSERT INTO t_01_01_temp VALUES(1); + +con_temp_02 + +USE database_master_temp_01; +CREATE TEMPORARY TABLE t_01_01_temp(a int); +INSERT INTO t_01_01_temp VALUES(1); +USE database_master_temp_02; +CREATE TEMPORARY TABLE t_02_01_temp(a int); +INSERT INTO t_02_01_temp VALUES(1); +CREATE TEMPORARY TABLE t_02_02_temp(a int); +INSERT INTO t_02_02_temp VALUES(1); + +con_temp_03 + +USE database_master_temp_01; +CREATE TEMPORARY TABLE t_01_01_temp(a int); +INSERT INTO t_01_01_temp VALUES(1); +USE database_master_temp_02; +CREATE TEMPORARY TABLE t_02_01_temp(a int); +INSERT INTO t_02_01_temp VALUES(1); +CREATE TEMPORARY TABLE t_02_02_temp(a int); +INSERT INTO t_02_02_temp VALUES(1); +USE database_master_temp_03; +CREATE TEMPORARY TABLE t_03_01_temp(a int); +INSERT INTO t_03_01_temp VALUES(1); +CREATE TEMPORARY TABLE t_03_02_temp(a int); +INSERT INTO t_03_02_temp VALUES(1); +CREATE TEMPORARY TABLE t_03_03_temp(a int); +INSERT INTO t_03_03_temp VALUES(1); + +**** Dropping the connections +**** We want to SHOW BINLOG EVENTS, to know what was logged. But there is no +**** guarantee that logging of the terminated con1 has been done yet.a To be +**** sure that logging has been done, we use a user lock. + +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 10 +select get_lock("con_01",10); +get_lock("con_01",10) +1 +select get_lock("con_01",10); +get_lock("con_01",10) +1 +select get_lock("con_02",10); +get_lock("con_02",10) +1 +select get_lock("con_02",10); +get_lock("con_02",10) +1 +select get_lock("con_03",10); +get_lock("con_03",10) +1 +select get_lock("con_03",10); +get_lock("con_03",10) +1 + +**** Checking the binary log and temporary tables + +show status like 'Slave_open_temp_tables'; +Variable_name Value +Slave_open_temp_tables 0 +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `database_master_temp_01`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_01_01_temp` +master-bin.000001 # Query # # use `database_master_temp_02`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_02_02_temp`,`t_02_01_temp` +master-bin.000001 # Query # # use `database_master_temp_01`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_01_01_temp` +master-bin.000001 # Query # # use `database_master_temp_03`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_03_03_temp`,`t_03_02_temp`,`t_03_01_temp` +master-bin.000001 # Query # # use `database_master_temp_02`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_02_02_temp`,`t_02_01_temp` +master-bin.000001 # Query # # use `database_master_temp_01`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t_01_01_temp` +**** +**** Cleaning up the test case +**** +SET sql_log_bin= 0; +DROP DATABASE database_master_temp_01; +DROP DATABASE database_master_temp_02; +DROP DATABASE database_master_temp_03; +SET sql_log_bin= 1; +SET sql_log_bin= 0; +DROP DATABASE database_slave_temp_01; +DROP DATABASE database_slave_temp_02; +DROP DATABASE database_slave_temp_03; +SET sql_log_bin= 1; diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test index 55a4e741d7c..c22bcbe63d0 100644 --- a/mysql-test/t/rpl_drop_temp.test +++ b/mysql-test/t/rpl_drop_temp.test @@ -3,15 +3,22 @@ source include/master-slave.inc; create database if not exists mysqltest; --enable_warnings +connect (con_temp,127.0.0.1,root,,test,$MASTER_MYPORT,); + +connection con_temp; +use mysqltest; create temporary table mysqltest.t1 (n int); create temporary table mysqltest.t2 (n int); -sync_slave_with_master; +select get_lock("con_temp",10); + connection master; -disconnect master; +disconnect con_temp; +select get_lock("con_temp",10); +sync_slave_with_master; + connection slave; ---real_sleep 3 # time for DROP to be written show status like 'Slave_open_temp_tables'; -connection default; +connection master; drop database mysqltest; # End of 4.1 tests diff --git a/mysql-test/t/rpl_rewrite_db-slave.opt b/mysql-test/t/rpl_rewrite_db-slave.opt index a462ad19ba0..290b92e0a3e 100644 --- a/mysql-test/t/rpl_rewrite_db-slave.opt +++ b/mysql-test/t/rpl_rewrite_db-slave.opt @@ -1 +1 @@ -"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" +"--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1->test" "--replicate-rewrite-db=database_master_temp_01->database_slave_temp_01" "--replicate-rewrite-db=database_master_temp_02->database_slave_temp_02" "--replicate-rewrite-db=database_master_temp_03->database_slave_temp_03" diff --git a/mysql-test/t/rpl_rewrite_db.test b/mysql-test/t/rpl_rewrite_db.test index 6b8624aff39..a9742f252be 100644 --- a/mysql-test/t/rpl_rewrite_db.test +++ b/mysql-test/t/rpl_rewrite_db.test @@ -73,9 +73,164 @@ connection slave; # The empty line last comes from the end line field in the file select * from rewrite.t1; +set sql_log_bin= 0; drop database rewrite; +set sql_log_bin= 1; connection master; +set sql_log_bin= 0; drop table t1; +set sql_log_bin= 1; # End of 4.1 tests + +--echo +--echo **** +--echo **** Bug #46861 Auto-closing of temporary tables broken by replicate-rewrite-db +--echo **** +--echo + +--echo **** +--echo **** Preparing the environment +--echo **** +connection master; + +connect (con_temp_03,127.0.0.1,root,,test,$MASTER_MYPORT,); +connect (con_temp_02,127.0.0.1,root,,test,$MASTER_MYPORT,); +connect (con_temp_01,127.0.0.1,root,,test,$MASTER_MYPORT,); + +connection master; +SET sql_log_bin= 0; +CREATE DATABASE database_master_temp_01; +CREATE DATABASE database_master_temp_02; +CREATE DATABASE database_master_temp_03; +SET sql_log_bin= 1; + +connection slave; +SET sql_log_bin= 0; +CREATE DATABASE database_slave_temp_01; +CREATE DATABASE database_slave_temp_02; +CREATE DATABASE database_slave_temp_03; +SET sql_log_bin= 1; + +--echo +--echo **** +--echo **** Creating temporary tables on different databases with different connections +--echo **** +--echo **** con_temp_01 --> creates +--echo **** t_01_01_temp on database_master_temp_01 +--echo **** +--echo **** con_temp_02 --> creates +--echo **** t_01_01_temp on database_master_temp_01 +--echo **** t_02_01_temp, t_02_02_temp on database_master_temp_02 +--echo **** +--echo **** con_temp_02 --> creates +--echo **** t_01_01_temp on database_master_temp_01 +--echo **** t_02_01_temp, t_02_02_temp on database_master_temp_02 +--echo **** t_03_01_temp, t_03_02_temp, t_03_03_temp on database_master_temp_03 +--echo **** + +--echo +--echo con_temp_01 +--echo +connection con_temp_01; +USE database_master_temp_01; +CREATE TEMPORARY TABLE t_01_01_temp(a int); +INSERT INTO t_01_01_temp VALUES(1); + +--echo +--echo con_temp_02 +--echo +connection con_temp_02; +USE database_master_temp_01; +CREATE TEMPORARY TABLE t_01_01_temp(a int); +INSERT INTO t_01_01_temp VALUES(1); +USE database_master_temp_02; +CREATE TEMPORARY TABLE t_02_01_temp(a int); +INSERT INTO t_02_01_temp VALUES(1); +CREATE TEMPORARY TABLE t_02_02_temp(a int); +INSERT INTO t_02_02_temp VALUES(1); + +--echo +--echo con_temp_03 +--echo +connection con_temp_03; +USE database_master_temp_01; +CREATE TEMPORARY TABLE t_01_01_temp(a int); +INSERT INTO t_01_01_temp VALUES(1); +USE database_master_temp_02; +CREATE TEMPORARY TABLE t_02_01_temp(a int); +INSERT INTO t_02_01_temp VALUES(1); +CREATE TEMPORARY TABLE t_02_02_temp(a int); +INSERT INTO t_02_02_temp VALUES(1); +USE database_master_temp_03; +CREATE TEMPORARY TABLE t_03_01_temp(a int); +INSERT INTO t_03_01_temp VALUES(1); +CREATE TEMPORARY TABLE t_03_02_temp(a int); +INSERT INTO t_03_02_temp VALUES(1); +CREATE TEMPORARY TABLE t_03_03_temp(a int); +INSERT INTO t_03_03_temp VALUES(1); + +--echo +--echo **** Dropping the connections +--echo **** We want to SHOW BINLOG EVENTS, to know what was logged. But there is no +--echo **** guarantee that logging of the terminated con1 has been done yet.a To be +--echo **** sure that logging has been done, we use a user lock. +--echo +connection master; +sync_slave_with_master; +connection slave; +show status like 'Slave_open_temp_tables'; + +connection master; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +connection con_temp_01; +select get_lock("con_01",10); +connection master; +disconnect con_temp_01; +select get_lock("con_01",10); + +connection con_temp_02; +select get_lock("con_02",10); +connection master; +disconnect con_temp_02; +select get_lock("con_02",10); + +connection con_temp_03; +select get_lock("con_03",10); +connection master; +disconnect con_temp_03; +select get_lock("con_03",10); + +--echo +--echo **** Checking the binary log and temporary tables +--echo +connection master; +sync_slave_with_master; +connection slave; +show status like 'Slave_open_temp_tables'; + +connection master; +--source include/show_binlog_events.inc + +--echo **** +--echo **** Cleaning up the test case +--echo **** +connection master; +SET sql_log_bin= 0; +DROP DATABASE database_master_temp_01; +DROP DATABASE database_master_temp_02; +DROP DATABASE database_master_temp_03; +SET sql_log_bin= 1; + +connection slave; +SET sql_log_bin= 0; +DROP DATABASE database_slave_temp_01; +DROP DATABASE database_slave_temp_02; +DROP DATABASE database_slave_temp_03; +SET sql_log_bin= 1; + +connection master; +sync_slave_with_master; + +# end of 5.0 tests -- cgit v1.2.1 From de5ab42de65abb375a9c6cebdc2e490340816b96 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 28 Aug 2009 15:02:48 +0200 Subject: Bug #46973 MTR: extract_warning_lines does not check it's extracting lines for current test Rewrote logic (first commit was incomplete, sorry) --- mysql-test/mysql-test-run.pl | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 429fbfe41c6..5a5d063c105 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3571,8 +3571,8 @@ sub run_testcase ($) { # error log and write all lines that look # suspicious into $error_log.warnings # -sub extract_warning_lines ($) { - my ($error_log) = @_; +sub extract_warning_lines ($$) { + my ($error_log, $tname) = @_; # Open the servers .err log file and read all lines # belonging to current tets into @lines @@ -3580,14 +3580,27 @@ sub extract_warning_lines ($) { or mtr_error("Could not open file '$error_log' for reading: $!"); my @lines; + my $found_test= 0; # Set once we've found the log of this test while ( my $line = <$Ferr> ) { - if ( $line =~ /^CURRENT_TEST:/ ) + if ($found_test) { - # Throw away lines from previous tests - @lines = (); + # If test wasn't last after all, discard what we found, test again. + if ( $line =~ /^CURRENT_TEST:/) + { + @lines= (); + $found_test= $line =~ /^CURRENT_TEST: $tname/; + } + else + { + push(@lines, $line); + } + } + else + { + # Search for beginning of test, until found + $found_test= 1 if ($line =~ /^CURRENT_TEST: $tname/); } - push(@lines, $line); } $Ferr = undef; # Close error log file @@ -3665,7 +3678,7 @@ sub start_check_warnings ($$) { my $log_error= $mysqld->value('#log-error'); # To be communicated to the test $ENV{MTR_LOG_ERROR}= $log_error; - extract_warning_lines($log_error); + extract_warning_lines($log_error, $tinfo->{name}); my $args; mtr_init_args(\$args); -- cgit v1.2.1 From fa4f05139d0de6dc827cb72dd62a615e9365bc94 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Fri, 28 Aug 2009 16:13:27 +0200 Subject: Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log Some follow-up test fixes after seeing effect in PB2 --- mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test | 2 ++ mysql-test/r/lowercase_table3.result | 2 +- mysql-test/suite/rpl/r/rpl_bug33931.result | 2 +- mysql-test/suite/rpl/r/rpl_extraCol_innodb.result | 1 + mysql-test/suite/rpl/r/rpl_extraCol_myisam.result | 1 + mysql-test/suite/rpl/r/rpl_init_slave_errors.result | 1 + mysql-test/suite/rpl/t/rpl_bug33931.test | 2 +- mysql-test/suite/rpl/t/rpl_init_slave_errors.test | 1 + mysql-test/t/lowercase_table3.test | 2 +- 9 files changed, 10 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test index 6890913b7d1..a7b02065144 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test @@ -22,6 +22,8 @@ DROP TABLE IF EXISTS t1, t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t14a,t15,t1 # should stop the slave. # ################################################# +call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); + --echo **** Diff Table Def Start **** ############################################## diff --git a/mysql-test/r/lowercase_table3.result b/mysql-test/r/lowercase_table3.result index 1ef7d04bb1d..22e80aaeb26 100644 --- a/mysql-test/r/lowercase_table3.result +++ b/mysql-test/r/lowercase_table3.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("Cannot find or open table test/BUG29839 from .*"); +call mtr.add_suppression("Cannot find or open table test/BUG29839 from"); DROP TABLE IF EXISTS t1,T1; CREATE TABLE t1 (a INT); SELECT * FROM T1; diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result index 85c8fb0da9c..a17941f6ba9 100644 --- a/mysql-test/suite/rpl/r/rpl_bug33931.result +++ b/mysql-test/suite/rpl/r/rpl_bug33931.result @@ -1,5 +1,5 @@ reset master; -call mtr.add_suppression("Failed during slave thread initialization"); +call mtr.add_suppression("Failed during slave I/O thread initialization"); stop slave; reset slave; SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result index e57daad3342..e2ec78e7adc 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** STOP SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result index 6696ddc7789..ed5b4eac27d 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** STOP SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result index ab957e6d9bc..c6ee82b13f3 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result @@ -9,6 +9,7 @@ reset slave; SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; Reporting the following error: Failed during slave thread initialization +call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; stop slave; reset slave; diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test index 13f781c644b..1316ddb7401 100644 --- a/mysql-test/suite/rpl/t/rpl_bug33931.test +++ b/mysql-test/suite/rpl/t/rpl_bug33931.test @@ -15,7 +15,7 @@ reset master; connection slave; # Add suppression for expected warnings in slaves error log -call mtr.add_suppression("Failed during slave thread initialization"); +call mtr.add_suppression("Failed during slave I/O thread initialization"); --disable_warnings stop slave; diff --git a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test index 4ca0de6ec66..180821730ec 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test @@ -57,6 +57,7 @@ source include/wait_for_slave_to_stop.inc; let $error= query_get_value(SHOW SLAVE STATUS, Last_Error, 1); echo Reporting the following error: $error; +call mtr.add_suppression("Failed during slave I/O thread initialization"); SET GLOBAL debug= ""; diff --git a/mysql-test/t/lowercase_table3.test b/mysql-test/t/lowercase_table3.test index 4748953fe95..f7ca8211288 100644 --- a/mysql-test/t/lowercase_table3.test +++ b/mysql-test/t/lowercase_table3.test @@ -9,7 +9,7 @@ --source include/have_case_insensitive_file_system.inc --source include/not_windows.inc -call mtr.add_suppression("Cannot find or open table test/BUG29839 from .*"); +call mtr.add_suppression("Cannot find or open table test/BUG29839 from"); --disable_warnings DROP TABLE IF EXISTS t1,T1; -- cgit v1.2.1 From dc7106f5cae48d59ec6d30ad289d085e82f4bd7c Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 28 Aug 2009 18:49:16 -0300 Subject: Reduce test case runtime. mysql-test/r/lock_multi_bug38499.result: Update test case result. mysql-test/r/lock_multi_bug38691.result: Update test case result. mysql-test/t/lock_multi_bug38499.test: Do not sync .frm files. mysql-test/t/lock_multi_bug38691.test: Do not sync .frm files. --- mysql-test/r/lock_multi_bug38499.result | 3 +++ mysql-test/r/lock_multi_bug38691.result | 3 +++ mysql-test/t/lock_multi_bug38499.test | 5 +++++ mysql-test/t/lock_multi_bug38691.test | 5 +++++ 4 files changed, 16 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/lock_multi_bug38499.result b/mysql-test/r/lock_multi_bug38499.result index fd0f2138a8d..9b3f57c8e53 100644 --- a/mysql-test/r/lock_multi_bug38499.result +++ b/mysql-test/r/lock_multi_bug38499.result @@ -1,3 +1,5 @@ +SET @odl_sync_frm = @@global.sync_frm; +SET @@global.sync_frm = OFF; DROP TABLE IF EXISTS t1; CREATE TABLE t1( a INT, b INT ); INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4); @@ -17,3 +19,4 @@ ALTER TABLE t1 ADD COLUMN a INT; # 2.2.1. normal mode # 2.2.2. PS mode DROP TABLE t1; +SET @@global.sync_frm = @odl_sync_frm; diff --git a/mysql-test/r/lock_multi_bug38691.result b/mysql-test/r/lock_multi_bug38691.result index 74b9603d8e3..d0aa1c0277c 100644 --- a/mysql-test/r/lock_multi_bug38691.result +++ b/mysql-test/r/lock_multi_bug38691.result @@ -1,3 +1,5 @@ +SET @odl_sync_frm = @@global.sync_frm; +SET @@global.sync_frm = OFF; DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a int(11) unsigned default NULL, @@ -15,3 +17,4 @@ CREATE TABLE t3 SELECT * FROM t1; # normal mode # PS mode DROP TABLE t1, t2, t3; +SET @@global.sync_frm = @odl_sync_frm; diff --git a/mysql-test/t/lock_multi_bug38499.test b/mysql-test/t/lock_multi_bug38499.test index 8178987e802..3d3f084ba5f 100644 --- a/mysql-test/t/lock_multi_bug38499.test +++ b/mysql-test/t/lock_multi_bug38499.test @@ -5,6 +5,9 @@ # Save the initial number of concurrent sessions --source include/count_sessions.inc +SET @odl_sync_frm = @@global.sync_frm; +SET @@global.sync_frm = OFF; + connect (locker,localhost,root,,); connect (writer,localhost,root,,); @@ -214,6 +217,8 @@ DROP TABLE t1; --disconnect locker --disconnect writer +SET @@global.sync_frm = @odl_sync_frm; + # End of 5.0 tests # Wait till all disconnects are completed diff --git a/mysql-test/t/lock_multi_bug38691.test b/mysql-test/t/lock_multi_bug38691.test index 0458f31579e..881a0d8e502 100644 --- a/mysql-test/t/lock_multi_bug38691.test +++ b/mysql-test/t/lock_multi_bug38691.test @@ -8,6 +8,9 @@ # Save the initial number of concurrent sessions --source include/count_sessions.inc +SET @odl_sync_frm = @@global.sync_frm; +SET @@global.sync_frm = OFF; + # Test to see if select will get the lock ahead of low priority update connect (locker,localhost,root,,); @@ -136,6 +139,8 @@ DROP TABLE t1, t2, t3; --disconnect locker --disconnect writer +SET @@global.sync_frm = @odl_sync_frm; + # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc -- cgit v1.2.1 From abe47a0ebebf6ced1f71e8a79760d254962b52d4 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Sat, 29 Aug 2009 10:30:59 +0200 Subject: A few more suppression fixes after 42408 --- mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result | 1 + mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 3 +++ mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result | 1 + 3 files changed, 5 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index 777f7d8427b..71c17321117 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index 39f3b700f94..3a1fbe04e17 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -7,6 +7,9 @@ # 1 - Creates a table and populates it through "LOAD DATA INFILE". # 2 - Catches error. ########################################################################## + +call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); + --source include/have_binlog_format_mixed_or_statement.inc --source include/have_innodb.inc --source include/have_debug.inc diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result index d51599fd18b..f812509de6f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051"); **** Diff Table Def Start **** *** On Slave *** STOP SLAVE; -- cgit v1.2.1 From f32c08bd0ca20d23e95ca46912044d48282cfd6f Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Aug 2009 16:52:22 +0800 Subject: Bug #44331 Restore of database with events produces warning in replication If an EVENT is created without the DEFINER clause set explicitly or with it set to CURRENT_USER, the master and slaves become inconsistent. This issue stems from the fact that in both cases, the DEFINER is set to the CURRENT_USER of the current thread. On the master, the CURRENT_USER is the mysqld's user, while on the slave, the CURRENT_USER is empty for the SQL Thread which is responsible for executing the statement. To fix the problem, we do what follows. If the definer is not set explicitly, a DEFINER clause is added when writing the query into binlog; if 'CURRENT_USER' is used as the DEFINER, it is replaced with the value of the current user before writing to binlog. mysql-test/suite/rpl/r/rpl_create_if_not_exists.result: Updated the result file after fixing bug#44331 mysql-test/suite/rpl/r/rpl_drop_if_exists.result: Updated the result file after fixing bug#44331 mysql-test/suite/rpl/r/rpl_events.result: Test result of Bug#44331 mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Updated the result file after fixing bug#44331 mysql-test/suite/rpl/t/rpl_events.test: Added test to verify if the definer is consistent between master and slave when the event is created without the DEFINER clause set explicitly or the DEFINER is set to CURRENT_USER sql/events.cc: The "create_query_string" function is added to create a new query string for removing executable comments. sql/sql_yacc.yy: The remember_name token was added for recording the offset of EVENT_SYM. --- .../suite/rpl/r/rpl_create_if_not_exists.result | 2 +- mysql-test/suite/rpl/r/rpl_drop_if_exists.result | 4 +- mysql-test/suite/rpl/r/rpl_events.result | 42 ++++++++++++++++++++ mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result | 4 +- mysql-test/suite/rpl/t/rpl_events.test | 46 ++++++++++++++++++++-- 5 files changed, 90 insertions(+), 8 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result index 536f40dc7f1..12a956a6ce6 100644 --- a/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result +++ b/mysql-test/suite/rpl/r/rpl_create_if_not_exists.result @@ -29,5 +29,5 @@ t1 t2 SHOW EVENTS in mysqltest; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation -mysqltest e @ SYSTEM ONE TIME # NULL NULL NULL NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +mysqltest e root@localhost SYSTEM ONE TIME # NULL NULL NULL NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci DROP DATABASE IF EXISTS mysqltest; diff --git a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result b/mysql-test/suite/rpl/r/rpl_drop_if_exists.result index 59a2470cfdb..e2d4c727c98 100644 --- a/mysql-test/suite/rpl/r/rpl_drop_if_exists.result +++ b/mysql-test/suite/rpl/r/rpl_drop_if_exists.result @@ -43,7 +43,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 master-bin.000001 # Query # # CREATE DATABASE db_bug_13684 master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int) -master-bin.000001 # Query # # use `test`; CREATE EVENT db_bug_13684.e +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO UPDATE db_bug_13684.t SET a = a + 1 @@ -75,7 +75,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS db_bug_13684.t master-bin.000001 # Query # # DROP DATABASE IF EXISTS db_bug_13684 master-bin.000001 # Query # # CREATE DATABASE db_bug_13684 master-bin.000001 # Query # # use `test`; CREATE TABLE db_bug_13684.t (a int) -master-bin.000001 # Query # # use `test`; CREATE EVENT db_bug_13684.e +master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` EVENT db_bug_13684.e ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO UPDATE db_bug_13684.t SET a = a + 1 diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index b797183f9d2..8538d2ca373 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -191,5 +191,47 @@ select * from t28953; END;| ALTER EVENT event1 RENAME TO event2; DROP EVENT event2; +CREATE TABLE test.t1(details CHAR(30)); +CREATE EVENT /*!50000 event44331_1 */ +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO INSERT INTO test.t1 VALUES('event event44331_1 fired - no definer'); +CREATE DEFINER=CURRENT_USER /*!50000 EVENT event44331_2 */ +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO INSERT INTO test.t1 VALUES('event event44331_2 fired - DEFINER=CURRENT_USER'); +CREATE DEFINER=CURRENT_USER() EVENT event44331_3 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO INSERT INTO test.t1 VALUES('event event44331_3 fired - DEFINER=CURRENT_USER() function'); +CREATE /*!50000 DEFINER='user44331' */ EVENT event44331_4 +ON SCHEDULE AT CURRENT_TIMESTAMP +ON COMPLETION PRESERVE DISABLE +DO INSERT INTO test.t1 VALUES('event event44331_4 fired - DEFINER=user1'); +Warnings: +Note 1449 The user specified as a definer ('user44331'@'%') does not exist +#on master +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || +EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; +EVENT_SCHEMA EVENT_NAME DEFINER +test event44331_1 root@localhost +test event44331_2 root@localhost +test event44331_3 root@localhost +test event44331_4 user44331@% +#on slave +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || +EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; +EVENT_SCHEMA EVENT_NAME DEFINER +test event44331_1 root@localhost +test event44331_2 root@localhost +test event44331_3 root@localhost +test event44331_4 user44331@% SET @@global.event_scheduler= @old_event_scheduler; DROP TABLE t28953; +DROP TABLE t1; +DROP EVENT event44331_1; +DROP EVENT event44331_2; +DROP EVENT event44331_3; +DROP EVENT event44331_4; diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result index 6c5ab43da5f..81c486cb43c 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -690,7 +690,7 @@ test_rpl e1 root@localhost SYSTEM RECURRING NULL 1 # # NULL ENABLED 1 latin1 lat USE test_rpl; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation -test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +test_rpl e1 root@localhost SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci ==========MASTER========== SELECT COUNT(*) FROM t1; COUNT(*) @@ -1078,7 +1078,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'loca master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Xid 1 # # -master-bin.000001 # Query 1 # use `test_rpl`; CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1 +master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1 master-bin.000001 # Query 1 # use `test_rpl`; ALTER EVENT e1 RENAME TO e2 master-bin.000001 # Query 1 # use `test_rpl`; DROP EVENT e2 master-bin.000001 # Query 1 # BEGIN diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index d06a3118389..f306fb10972 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -46,12 +46,52 @@ connection master; DROP EVENT event2; -sync_slave_with_master; +# +# BUG#44331 +# This test verifies if the definer is consistent between master and slave, +# when the event is created without the DEFINER clause set explicitly or the +# DEFINER is set to CURRENT_USER +# +CREATE TABLE test.t1(details CHAR(30)); + +CREATE EVENT /*!50000 event44331_1 */ + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO INSERT INTO test.t1 VALUES('event event44331_1 fired - no definer'); + +CREATE DEFINER=CURRENT_USER /*!50000 EVENT event44331_2 */ + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO INSERT INTO test.t1 VALUES('event event44331_2 fired - DEFINER=CURRENT_USER'); + +CREATE DEFINER=CURRENT_USER() EVENT event44331_3 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO INSERT INTO test.t1 VALUES('event event44331_3 fired - DEFINER=CURRENT_USER() function'); + +CREATE /*!50000 DEFINER='user44331' */ EVENT event44331_4 + ON SCHEDULE AT CURRENT_TIMESTAMP + ON COMPLETION PRESERVE DISABLE + DO INSERT INTO test.t1 VALUES('event event44331_4 fired - DEFINER=user1'); + +--echo #on master +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || + EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; -# Doing cleanup of the table referred to in the event to guarantee -# that there is no bad timing cauing it to try to access the table. +sync_slave_with_master; +connection slave; +--echo #on slave +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || + EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; connection master; SET @@global.event_scheduler= @old_event_scheduler; DROP TABLE t28953; +DROP TABLE t1; +DROP EVENT event44331_1; +DROP EVENT event44331_2; +DROP EVENT event44331_3; +DROP EVENT event44331_4; sync_slave_with_master; -- cgit v1.2.1 From aa7e21c68fd36c66ac0603c416a29b1ca5d59b71 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Sat, 29 Aug 2009 23:29:47 +0200 Subject: even more suppression fixes --- mysql-test/suite/parts/r/partition_recover_myisam.result | 2 ++ mysql-test/suite/parts/t/partition_recover_myisam.test | 4 ++++ mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result | 2 +- mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result index df737ec2853..49775ee498e 100644 --- a/mysql-test/suite/parts/r/partition_recover_myisam.result +++ b/mysql-test/suite/parts/r/partition_recover_myisam.result @@ -1,3 +1,5 @@ +call mtr.add_suppression("./test/t1_will_crash"); +call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM; INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); FLUSH TABLES; diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test index 14604bfeb15..64bc821ac37 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam.test +++ b/mysql-test/suite/parts/t/partition_recover_myisam.test @@ -1,4 +1,8 @@ # test the auto-recover (--myisam-recover) of partitioned myisam tables + +call mtr.add_suppression("./test/t1_will_crash"); +call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); + --source include/have_partition.inc --disable_warnings --disable_query_log diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index 71c17321117..bc6fa377dc3 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; @@ -52,3 +51,4 @@ Last_SQL_Errno 9 Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed drop table t1; drop table t1; +call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index 3a1fbe04e17..fe1fc730ba8 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -8,8 +8,6 @@ # 2 - Catches error. ########################################################################## -call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); - --source include/have_binlog_format_mixed_or_statement.inc --source include/have_innodb.inc --source include/have_debug.inc @@ -50,3 +48,5 @@ drop table t1; connection slave; drop table t1; + +call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); -- cgit v1.2.1 From 6ce48392ea410ecb9937ea07943cc6434a5ac378 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sun, 30 Aug 2009 11:03:37 +0400 Subject: Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in server crash check_group_min_max_predicates() assumed the input condition item to be one of COND_ITEM, SUBSELECT_ITEM, or FUNC_ITEM. Since a condition of the form "field" is also a valid condition equivalent to "field <> 0", using such a condition in a query where the loose index scan was chosen resulted in a debug assertion failure. Fixed by handling conditions of the FIELD_ITEM type in check_group_min_max_predicates(). mysql-test/r/group_min_max.result: Added a test case for bug #46607. mysql-test/t/group_min_max.test: Added a test case for bug #46607. sql/opt_range.cc: Handle conditions of the FUNC_ITEM type in check_group_mix_max_predicates(). --- mysql-test/r/group_min_max.result | 12 ++++++++++++ mysql-test/t/group_min_max.test | 15 +++++++++++++++ 2 files changed, 27 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index 27448d3e949..ac9a53ca238 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -2502,3 +2502,15 @@ a MAX(b) 2 1 DROP TABLE t; End of 5.0 tests +# +# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in +# server crash +# +CREATE TABLE t (a INT, b INT, INDEX (a,b)); +INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1); +INSERT INTO t SELECT * FROM t; +SELECT a, MAX(b) FROM t WHERE b GROUP BY a; +a MAX(b) +2 1 +DROP TABLE t; +End of 5.1 tests diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test index 981be3efece..c09a4fbf490 100644 --- a/mysql-test/t/group_min_max.test +++ b/mysql-test/t/group_min_max.test @@ -1018,3 +1018,18 @@ DROP TABLE t; --echo End of 5.0 tests + +--echo # +--echo # Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in +--echo # server crash +--echo # + +CREATE TABLE t (a INT, b INT, INDEX (a,b)); +INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1); +INSERT INTO t SELECT * FROM t; + +SELECT a, MAX(b) FROM t WHERE b GROUP BY a; + +DROP TABLE t; + +--echo End of 5.1 tests -- cgit v1.2.1 From 02f67d5b1f484ffd7e363ab8f3b108ea7b27e26c Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Sun, 30 Aug 2009 12:01:08 +0200 Subject: yet another 42408 followup --- mysql-test/suite/rpl/t/disabled.def | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 38fc9e21322..cb7a2a98925 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,3 +11,4 @@ ############################################################################## rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx +rpl_slave_load_remove_tmpfile Bug#46996, unable to suppress warning -- cgit v1.2.1 From a00ba9ebea078f7dc12f7cd298782d1ada4bb4e9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 Aug 2009 10:26:01 +0800 Subject: Bug #44331 Restore of database with events produces warning in replication Update the test case for BUG#44331 to fix the push build failure. --- mysql-test/suite/rpl/r/rpl_events.result | 24 ++++++++++++++++++++---- mysql-test/suite/rpl/t/rpl_events.test | 18 ++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_events.result b/mysql-test/suite/rpl/r/rpl_events.result index 8538d2ca373..b3fd85d7e28 100644 --- a/mysql-test/suite/rpl/r/rpl_events.result +++ b/mysql-test/suite/rpl/r/rpl_events.result @@ -212,21 +212,37 @@ Warnings: Note 1449 The user specified as a definer ('user44331'@'%') does not exist #on master select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events -where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || -EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; +where EVENT_NAME='event44331_1'; EVENT_SCHEMA EVENT_NAME DEFINER test event44331_1 root@localhost +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_2'; +EVENT_SCHEMA EVENT_NAME DEFINER test event44331_2 root@localhost +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_3'; +EVENT_SCHEMA EVENT_NAME DEFINER test event44331_3 root@localhost +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_4'; +EVENT_SCHEMA EVENT_NAME DEFINER test event44331_4 user44331@% #on slave select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events -where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || -EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; +where EVENT_NAME='event44331_1'; EVENT_SCHEMA EVENT_NAME DEFINER test event44331_1 root@localhost +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_2'; +EVENT_SCHEMA EVENT_NAME DEFINER test event44331_2 root@localhost +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_3'; +EVENT_SCHEMA EVENT_NAME DEFINER test event44331_3 root@localhost +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events +where EVENT_NAME='event44331_4'; +EVENT_SCHEMA EVENT_NAME DEFINER test event44331_4 user44331@% SET @@global.event_scheduler= @old_event_scheduler; DROP TABLE t28953; diff --git a/mysql-test/suite/rpl/t/rpl_events.test b/mysql-test/suite/rpl/t/rpl_events.test index f306fb10972..7720ad6658c 100644 --- a/mysql-test/suite/rpl/t/rpl_events.test +++ b/mysql-test/suite/rpl/t/rpl_events.test @@ -76,15 +76,25 @@ CREATE /*!50000 DEFINER='user44331' */ EVENT event44331_4 --echo #on master select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events - where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || - EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; + where EVENT_NAME='event44331_1'; +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_2'; +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_3'; +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_4'; sync_slave_with_master; connection slave; --echo #on slave select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events - where EVENT_NAME='event44331_1' || EVENT_NAME='event44331_2' || - EVENT_NAME='event44331_3' || EVENT_NAME='event44331_4'; + where EVENT_NAME='event44331_1'; +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_2'; +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_3'; +select EVENT_SCHEMA, EVENT_NAME, DEFINER from information_schema.events + where EVENT_NAME='event44331_4'; connection master; SET @@global.event_scheduler= @old_event_scheduler; -- cgit v1.2.1 From 5166a56d0406fe6ab51e0b3cb91202497c888b8c Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 31 Aug 2009 09:24:59 +0200 Subject: forgot : in rpl's disabled.def --- mysql-test/suite/rpl/t/disabled.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index cb7a2a98925..546c0e6b194 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,4 +11,4 @@ ############################################################################## rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx -rpl_slave_load_remove_tmpfile Bug#46996, unable to suppress warning +rpl_slave_load_remove_tmpfile : Bug#46996, unable to suppress warning -- cgit v1.2.1 From 3a78dbe48208e786f0e8ad81c78a0a09a1cf191a Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Tue, 1 Sep 2009 13:38:17 +0200 Subject: 46996 workaruond --- mysql-test/include/mtr_warnings.sql | 4 ---- mysql-test/suite/rpl/r/rpl_do_grant.result | 3 +++ mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result | 2 +- mysql-test/suite/rpl/t/disabled.def | 1 - mysql-test/suite/rpl/t/rpl_do_grant.test | 7 ++++++- mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 157244a9b0a..b73234e6142 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -172,10 +172,6 @@ INSERT INTO global_suppressions VALUES */ ("Can't find file: '.\\\\test\\\\\\?{8}.frm'"), - /* Added 2009-08-XX after fixing Bug #42408 */ - - ("Slave: Operation DROP USER failed for '.*'@'localhost' Error_code: 1396"), - ("THE_LAST_SUPPRESSION")|| diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 69bcfad4347..0913b1afdbf 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -166,4 +166,7 @@ DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; DROP USER 'create_rout_db'@'localhost'; +call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); +USE mtr; +call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); "End of test" diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index bc6fa377dc3..e2efcf08d7a 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -51,4 +51,4 @@ Last_SQL_Errno 9 Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed drop table t1; drop table t1; -call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); +call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 546c0e6b194..38fc9e21322 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,4 +11,3 @@ ############################################################################## rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx -rpl_slave_load_remove_tmpfile : Bug#46996, unable to suppress warning diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 806de780086..a8b15516682 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -207,5 +207,10 @@ DROP FUNCTION upgrade_del_func; DROP FUNCTION upgrade_alter_func; DROP DATABASE bug42217_db; DROP USER 'create_rout_db'@'localhost'; - + +call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); +connection slave; +USE mtr; +call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396"); + --echo "End of test" diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index fe1fc730ba8..437e1ebb92d 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -49,4 +49,4 @@ connection slave; drop table t1; -call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' (Errcode: 9) Error_code: 3"); +call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); -- cgit v1.2.1 From 2c6789aa3bcfcd21dd3c913ffe567e352b0a9280 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Tue, 1 Sep 2009 14:53:27 +0200 Subject: post push fix for bug#20577 and bug#46362, disabling warnings --- mysql-test/include/partition_date_range.inc | 6 ++++++ mysql-test/r/partition_pruning.result | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/include/partition_date_range.inc b/mysql-test/include/partition_date_range.inc index c54396af9cb..5093cb3701d 100644 --- a/mysql-test/include/partition_date_range.inc +++ b/mysql-test/include/partition_date_range.inc @@ -21,6 +21,8 @@ SELECT * FROM t1 WHERE a >= '1001-00-00'; SELECT * FROM t1 WHERE a > '1001-00-00'; --sorted_result SELECT * FROM t1 WHERE a = '1001-00-00'; +--echo # Disabling warnings for the invalid date +--disable_warnings --sorted_result SELECT * FROM t1 WHERE a < '1999-02-31'; --sorted_result @@ -31,6 +33,7 @@ SELECT * FROM t1 WHERE a >= '1999-02-31'; SELECT * FROM t1 WHERE a > '1999-02-31'; --sorted_result SELECT * FROM t1 WHERE a = '1999-02-31'; +--enable_warnings --sorted_result SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; --sorted_result @@ -51,11 +54,14 @@ EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; +--echo # Disabling warnings for the invalid date +--disable_warnings EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31'; +--enable_warnings EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result index 86aa89be8a7..769d499fc0a 100644 --- a/mysql-test/r/partition_pruning.result +++ b/mysql-test/r/partition_pruning.result @@ -58,6 +58,7 @@ a SELECT * FROM t1 WHERE a = '1001-00-00'; a 1001-00-00 +# Disabling warnings for the invalid date SELECT * FROM t1 WHERE a < '1999-02-31'; a 0000-00-00 @@ -82,8 +83,6 @@ a 2001-01-01 SELECT * FROM t1 WHERE a = '1999-02-31'; a -Warning 1292 Incorrect date value: '1999-02-31' for column 'a' at row 1 -Warnings: SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; a 0000-00-00 @@ -139,6 +138,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index +# Disabling warnings for the invalid date EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 5 Using where; Using index @@ -218,6 +218,7 @@ a SELECT * FROM t1 WHERE a = '1001-00-00'; a 1001-00-00 +# Disabling warnings for the invalid date SELECT * FROM t1 WHERE a < '1999-02-31'; a 0000-00-00 @@ -297,6 +298,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pNULL ALL NULL NULL NULL NULL 7 Using where +# Disabling warnings for the invalid date EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 ALL NULL NULL NULL NULL 7 Using where @@ -385,6 +387,7 @@ a SELECT * FROM t1 WHERE a = '1001-00-00'; a 1001-00-00 +# Disabling warnings for the invalid date SELECT * FROM t1 WHERE a < '1999-02-31'; a 0000-00-00 @@ -409,8 +412,6 @@ a 2001-01-01 SELECT * FROM t1 WHERE a = '1999-02-31'; a -Warning 1292 Incorrect date value: '1999-02-31' for column 'a' at row 1 -Warnings: SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; a 0000-00-00 @@ -466,6 +467,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index +# Disabling warnings for the invalid date EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 5 Using where; Using index @@ -545,6 +547,7 @@ a SELECT * FROM t1 WHERE a = '1001-00-00'; a 1001-00-00 +# Disabling warnings for the invalid date SELECT * FROM t1 WHERE a < '1999-02-31'; a 0000-00-00 @@ -624,6 +627,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 pNULL ALL NULL NULL NULL NULL 7 Using where +# Disabling warnings for the invalid date EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 ALL NULL NULL NULL NULL 7 Using where -- cgit v1.2.1 From fe3ea31d9310e14ffce99d23a9b5979864e96fe2 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 2 Sep 2009 11:17:33 +0200 Subject: Bug #32296 mysqltest fails to parse "append_file" inside a "while", it works inside a "if" Bug #41913 mysqltest cannot source files from if inside while Some commands require additional processing which only works first time Keep content for write_file or append_file with the st_command struct Add tests for those cases to mysqltest.test --- mysql-test/r/mysqltest.result | 19 ++++++------------- mysql-test/t/mysqltest.test | 26 +++++++++++++++++++++----- 2 files changed, 27 insertions(+), 18 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 52a1734ea54..f68413264e4 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -314,21 +314,10 @@ here is the sourced script 1 = outer loop variable before dec 0 = outer loop variable after dec - -2 = outer loop variable after while +outer=2 ifval=0 +outer=1 ifval=1 here is the sourced script -2 = outer loop variable before dec - -1 = outer loop variable after dec - -1 = outer loop variable after while -here is the sourced script - -1 = outer loop variable before dec - -0 = outer loop variable after dec - In loop here is the sourced script @@ -538,6 +527,10 @@ mysqltest: At line 1: Missing required argument 'filename' to command 'write_fil mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found Content for test_file1 mysqltest: At line 1: File already exist: 'MYSQLTEST_VARDIR/tmp/test_file1.tmp' +These lines should be repeated, +if things work as expected +These lines should be repeated, +if things work as expected Some data for cat_file command of mysqltest diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 92f39d943b9..9859e73cfae 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -853,16 +853,18 @@ while ($outer) eval SELECT '$outer = outer loop variable after dec' AS ""; } +# Test source in an if in a while which is false on 1st iteration let $outer= 2; # Number of outer loops +let $ifval= 0; # false 1st time while ($outer) { - eval SELECT '$outer = outer loop variable after while' AS ""; - - echo here is the sourced script; + echo outer=$outer ifval=$ifval; - eval SELECT '$outer = outer loop variable before dec' AS ""; + if ($ifval) { + --source $MYSQLTEST_VARDIR/tmp/sourced.inc + } dec $outer; - eval SELECT '$outer = outer loop variable after dec' AS ""; + inc $ifval; } @@ -1663,6 +1665,20 @@ EOF remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp; +# Test append_file within while +let $outer= 2; # Number of outer loops +while ($outer) +{ + append_file $MYSQLTEST_VARDIR/tmp/app_while.tmp; +These lines should be repeated, +if things work as expected +EOF + dec $outer; +} + +cat_file $MYSQLTEST_VARDIR/tmp/app_while.tmp; +remove_file $MYSQLTEST_VARDIR/tmp/app_while.tmp; + # ---------------------------------------------------------------------------- # test for cat_file # ---------------------------------------------------------------------------- -- cgit v1.2.1 From 32c7efa6b420b09e00d42b99f29a790064694d3b Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 2 Sep 2009 16:19:28 +0500 Subject: BUG#46483 - drop table of partitioned table may leave extraneous file Online/fast ALTER TABLE of a partitioned table may leave temporary file in database directory. Fixed by removing unnecessary call to handler::ha_create_handler_files(), which was creating partitioning definition file. mysql-test/r/partition_innodb.result: A test case for BUG#46483. mysql-test/t/partition_innodb.test: A test case for BUG#46483. sql/unireg.cc: Do not call ha_create_handler_files() when we were requested to create only dot-frm file. --- mysql-test/r/partition_innodb.result | 4 ++++ mysql-test/t/partition_innodb.test | 12 ++++++++++++ 2 files changed, 16 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index ad4d08e89ff..8af9133ab3f 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -256,3 +256,7 @@ SUBPARTITION BY KEY (char_column) SUBPARTITIONS 2 (PARTITION p1 VALUES LESS THAN (5) ENGINE = MyISAM) */ drop table t1; +CREATE TABLE t1 (a INT) ENGINE=InnoDB +PARTITION BY list(a) (PARTITION p1 VALUES IN (1)); +CREATE INDEX i1 ON t1 (a); +DROP TABLE t1; diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 2abbceffbb0..c2e98ab59b8 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -270,3 +270,15 @@ PARTITION BY RANGE (int_column) (PARTITION p1 VALUES LESS THAN (5)); show create table t1; drop table t1; + +# +# BUG#46483 - drop table of partitioned table may leave extraneous file +# Note: was only repeatable with InnoDB plugin +# +CREATE TABLE t1 (a INT) ENGINE=InnoDB + PARTITION BY list(a) (PARTITION p1 VALUES IN (1)); +CREATE INDEX i1 ON t1 (a); +DROP TABLE t1; +let $MYSQLD_DATADIR= `SELECT @@datadir`; +# Before the fix it should show extra file like #sql-2405_2.par +--list_files $MYSQLD_DATADIR/test/ * -- cgit v1.2.1 From 183607b8c864684a67fea2c11fa2755abd11f6ab Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 2 Sep 2009 16:36:52 +0300 Subject: Backported the --parallel=str option from mtr2 for backward compatibility with the newer pb2 testing environments --- mysql-test/mysql-test-run.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f60701b7b49..e98e05eadb1 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -302,6 +302,7 @@ our $debug_compiled_binaries; our %mysqld_variables; +our $opt_parallel; my $source_dist= 0; our $opt_max_save_core= 5; @@ -645,6 +646,7 @@ sub command_line_setup () { 'testcase-timeout=i' => \$opt_testcase_timeout, 'suite-timeout=i' => \$opt_suite_timeout, 'warnings|log-warnings' => \$opt_warnings, + 'parallel=s' => \$opt_parallel, # Options which are no longer used (map { $_ => \&warn_about_removed_option } @removed_options), @@ -5278,6 +5280,7 @@ Misc options the specified test case (if any) fast Don't try to clean up from earlier runs reorder Reorder tests to get fewer server restarts + parallel=STR Compatibility slot. Ignored. help Get this help text testcase-timeout=MINUTES Max test case run time (default $default_testcase_timeout) -- cgit v1.2.1 From 4d676f314c5f41d3060b1326e677dc92487dcbcc Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 3 Sep 2009 08:19:54 +0200 Subject: Bug #47075 Wildcards in experimental test names destroyed when tested first time Extract substr into local variable --- mysql-test/lib/mtr_report.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index a246c5bbef6..f2131b9bd76 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -134,8 +134,8 @@ sub mtr_report_test ($) { # an asterisk at the end, determine if the characters up to # but excluding the asterisk are the same if ( $exp ne "" && substr($exp, -1, 1) eq "*" ) { - $exp = substr($exp, 0, length($exp) - 1); - if ( substr($test_name, 0, length($exp)) ne $exp ) { + my $nexp = substr($exp, 0, length($exp) - 1); + if ( substr($test_name, 0, length($nexp)) ne $nexp ) { # no match, try next entry next; } -- cgit v1.2.1 From b5e3f4a35837b8fc924b54cc26a803cfe770d2f5 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Thu, 3 Sep 2009 08:38:06 +0200 Subject: A few suppression follow-ups --- mysql-test/r/bug46080.result | 2 ++ mysql-test/r/partition_csv.result | 1 + mysql-test/t/bug46080.test | 3 +++ mysql-test/t/partition_csv.test | 2 ++ 4 files changed, 8 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/bug46080.result b/mysql-test/r/bug46080.result index 18c7c22829a..2173768cdad 100644 --- a/mysql-test/r/bug46080.result +++ b/mysql-test/r/bug46080.result @@ -2,6 +2,8 @@ # Bug #46080: group_concat(... order by) crashes server when # sort_buffer_size cannot allocate # +call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); +call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); CREATE TABLE t1(a CHAR(255)); INSERT INTO t1 VALUES ('a'); SET @@SESSION.sort_buffer_size=5*16*1000000; diff --git a/mysql-test/r/partition_csv.result b/mysql-test/r/partition_csv.result index 07651f29da4..18e28d4670a 100644 --- a/mysql-test/r/partition_csv.result +++ b/mysql-test/r/partition_csv.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Failed to write to mysql.general_log"); drop table if exists t1; create table t1 (a int) engine = csv diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test index 7e56e3ce421..8b4cee4d8b0 100644 --- a/mysql-test/t/bug46080.test +++ b/mysql-test/t/bug46080.test @@ -3,6 +3,9 @@ --echo # sort_buffer_size cannot allocate --echo # +call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); +call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); + CREATE TABLE t1(a CHAR(255)); INSERT INTO t1 VALUES ('a'); diff --git a/mysql-test/t/partition_csv.test b/mysql-test/t/partition_csv.test index dd2ef7c1d1f..44013dd4b0a 100644 --- a/mysql-test/t/partition_csv.test +++ b/mysql-test/t/partition_csv.test @@ -10,6 +10,8 @@ --source include/have_partition.inc --source include/have_csv.inc +call mtr.add_suppression("Failed to write to mysql.general_log"); + # # Bug#19307: Partitions: csv delete failure # = CSV engine crashes -- cgit v1.2.1 From 629557ff13e28e3422dfa1c354c44ef2fd62e4d0 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 3 Sep 2009 18:03:46 +0300 Subject: Bug #46791: Assertion failed:(table->key_read==0),function unknown function,file sql_base.cc When uncacheable queries are written to a temp table the optimizer must preserve the original JOIN structure, because it is re-using the JOIN structure to read from the resulting temporary table. This was done only for uncacheable sub-queries. But top level queries can also benefit from this mechanism, specially if they're using index access and need a reset. Fixed by not limiting the saving of JOIN structure to subqueries exclusively. Added a new test file to extend the existing (large) subquery.test. --- mysql-test/r/subselect4.result | 30 ++++++++++++++++++++++++++++++ mysql-test/t/subselect4.test | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 mysql-test/r/subselect4.result create mode 100644 mysql-test/t/subselect4.test (limited to 'mysql-test') diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result new file mode 100644 index 00000000000..68577cb2a4c --- /dev/null +++ b/mysql-test/r/subselect4.result @@ -0,0 +1,30 @@ +# +# Bug #46791: Assertion failed:(table->key_read==0),function unknown +# function,file sql_base.cc +# +CREATE TABLE t1 (a INT, b INT, KEY(a)); +INSERT INTO t1 VALUES (1,1),(2,2); +CREATE TABLE t2 LIKE t1; +INSERT INTO t2 VALUES (1,1),(2,2); +CREATE TABLE t3 LIKE t1; +# should have 1 impossible where and 2 dependent subqueries +EXPLAIN +SELECT 1 FROM t1 +WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3)) +ORDER BY count(*); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 5 NULL 2 Using index; Using temporary +2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where +3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL no matching row in const table +# should not crash the next statement +SELECT 1 FROM t1 +WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3)) +ORDER BY count(*); +1 +1 +# should not crash: the crash is caused by the previous statement +SELECT 1; +1 +1 +DROP TABLE t1,t2,t3; +End of 5.0 tests. diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test new file mode 100644 index 00000000000..ff4cdf3c439 --- /dev/null +++ b/mysql-test/t/subselect4.test @@ -0,0 +1,32 @@ +# General purpose bug fix tests go here : subselect.test too large + + +--echo # +--echo # Bug #46791: Assertion failed:(table->key_read==0),function unknown +--echo # function,file sql_base.cc +--echo # + +CREATE TABLE t1 (a INT, b INT, KEY(a)); +INSERT INTO t1 VALUES (1,1),(2,2); +CREATE TABLE t2 LIKE t1; +INSERT INTO t2 VALUES (1,1),(2,2); +CREATE TABLE t3 LIKE t1; + +--echo # should have 1 impossible where and 2 dependent subqueries +EXPLAIN +SELECT 1 FROM t1 +WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3)) +ORDER BY count(*); + +--echo # should not crash the next statement +SELECT 1 FROM t1 +WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE 1 = (SELECT MIN(t2.b) FROM t3)) +ORDER BY count(*); + +--echo # should not crash: the crash is caused by the previous statement +SELECT 1; + +DROP TABLE t1,t2,t3; + + +--echo End of 5.0 tests. -- cgit v1.2.1 From 1eb40ce319411cf0f06a6115210b5475593cef7f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Sep 2009 09:33:45 +0800 Subject: BUG#45581 Test rpl_row_sp006_InnoDB fails randomly: Unknown database 'mysqltest1' Essentially, Bug#45574 results in this bug. The 'CREATE DATABASE IF NOT EXISTS' statement was not binlogged, when the database has existed. Sometimes, the master and slaves become inconsistent. The "CREATE DATABASE IF NOT EXISTS mysqltest1" statement is not binlogged if the db 'mysqltest1' existed before the test case is executed. So the db 'mysqltest1' can't be created on slave. Patch of Bug#45574 has resolved this problem. But I think it is better to replace 'mysqltest1' by default db 'test'. --- mysql-test/extra/rpl_tests/rpl_row_sp006.test | 41 ++++++++++------------ mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result | 36 +++++++++---------- 2 files changed, 36 insertions(+), 41 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp006.test b/mysql-test/extra/rpl_tests/rpl_row_sp006.test index 897d7e492bf..16a8374ae7f 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_sp006.test +++ b/mysql-test/extra/rpl_tests/rpl_row_sp006.test @@ -9,29 +9,27 @@ ############################################################################# # Begin clean up test section -connection master; --disable_warnings -create database if not exists mysqltest1; -DROP PROCEDURE IF EXISTS mysqltest1.p1; -DROP PROCEDURE IF EXISTS mysqltest1.p2; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t1; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; --enable_warnings # End of cleanup # Begin test section 1 -eval CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=$engine_type; -eval CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=$engine_type; +eval CREATE TABLE IF NOT EXISTS t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=$engine_type; +eval CREATE TABLE IF NOT EXISTS t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=$engine_type; delimiter |; -CREATE PROCEDURE mysqltest1.p1() +CREATE PROCEDURE p1() BEGIN DECLARE done INT DEFAULT 0; DECLARE spa CHAR(16); DECLARE spb INT; DECLARE cur1 CURSOR FOR SELECT name, (YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) $MYSQLTEST_VARDIR/tmp/sp006_master.sql ---exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/sp006_slave.sql +--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp006_master.sql +--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/sp006_slave.sql -DROP PROCEDURE IF EXISTS mysqltest1.p1; -DROP PROCEDURE IF EXISTS mysqltest1.p2; -DROP TABLE IF EXISTS mysqltest1.t1; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP DATABASE mysqltest1; +DROP TABLE t1; +DROP TABLE t2; +DROP PROCEDURE p1; +DROP PROCEDURE p2; # Lets compare. Note: If they match test will pass, if they do not match # the test will show that the diff statement failed and not reject file diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result index 8339e77d3a0..6792a701577 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result @@ -4,21 +4,20 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create database if not exists mysqltest1; -DROP PROCEDURE IF EXISTS mysqltest1.p1; -DROP PROCEDURE IF EXISTS mysqltest1.p2; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t1; -CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=InnoDB; -CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=InnoDB; -CREATE PROCEDURE mysqltest1.p1() +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +CREATE TABLE IF NOT EXISTS t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=InnoDB; +CREATE TABLE IF NOT EXISTS t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=InnoDB; +CREATE PROCEDURE p1() BEGIN DECLARE done INT DEFAULT 0; DECLARE spa CHAR(16); DECLARE spb INT; DECLARE cur1 CURSOR FOR SELECT name, (YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) Date: Fri, 4 Sep 2009 09:27:11 +0530 Subject: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Inserting a negative value in the autoincrement column of a partitioned innodb table was causing the value of the auto increment counter to wrap around into a very large positive value. The consequences are the same as if a very large positive value was inserted into a column, e.g. reduced autoincrement range, failure to read autoincrement counter. The current patch ensures that before calculating the next auto increment value, the current value is within the positive maximum allowed limit. mysql-test/suite/parts/inc/partition_auto_increment.inc: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds tests for performing insert,update and delete on a partition table with negative auto_increment values. mysql-test/suite/parts/r/partition_auto_increment_innodb.result: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the innodb engine. mysql-test/suite/parts/r/partition_auto_increment_memory.result: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the memory engine. mysql-test/suite/parts/r/partition_auto_increment_myisam.result: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the myisam engine. mysql-test/suite/parts/r/partition_auto_increment_ndb.result: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Result file for the ndb engine. mysql-test/suite/parts/t/partition_auto_increment_archive.test: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Archive engine to skip tests that involve insertion of negative auto increment values. mysql-test/suite/parts/t/partition_auto_increment_blackhole.test: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Adds a variable that allows the Blackhole engine to skip tests that involve insertion of negative auto increment values. sql/ha_partition.cc: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Ensures that the current value is lesser than the upper limit for the type of the field before setting the next auto increment value to be calculated. sql/ha_partition.h: Bug#45823 Assertion failure in file row/row0mysql.c line 1386 Modifies the set_auto_increment_if_higher function, to take into account negative auto increment values when doing a comparison. --- .../suite/parts/inc/partition_auto_increment.inc | 192 +++++++++++++++++++++ .../parts/r/partition_auto_increment_innodb.result | 191 ++++++++++++++++++++ .../parts/r/partition_auto_increment_memory.result | 191 ++++++++++++++++++++ .../parts/r/partition_auto_increment_myisam.result | 191 ++++++++++++++++++++ .../parts/r/partition_auto_increment_ndb.result | 191 ++++++++++++++++++++ .../parts/t/partition_auto_increment_archive.test | 3 + .../t/partition_auto_increment_blackhole.test | 3 + 7 files changed, 962 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/parts/inc/partition_auto_increment.inc b/mysql-test/suite/parts/inc/partition_auto_increment.inc index 6963de90c83..2c615e58ef9 100644 --- a/mysql-test/suite/parts/inc/partition_auto_increment.inc +++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc @@ -623,3 +623,195 @@ SHOW CREATE TABLE t1; SELECT * FROM t1 ORDER BY c1; DROP TABLE t1; +if (!$skip_negative_auto_inc) +{ +--echo ############################################################################# +--echo # Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 +--echo # Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 +--echo ############################################################################## + +--echo # Inserting negative autoincrement values into a partition table (partitions >= 4) + +eval CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Reading from a partition table (partitions >= 2 ) after inserting a negative +--echo # value into the auto increment column + + +eval CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 2; + +INSERT INTO t VALUES (-2,-20); +INSERT INTO t(c2) VALUES (30); + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Inserting negative auto increment value into a partition table (partitions >= 2) +--echo # auto increment value > 2. + +eval CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 2; + +INSERT INTO t VALUES (-4,-20); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Inserting -1 into autoincrement column of a partition table (partition >= 4) + +eval CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); + +SELECT * FROM t ORDER BY c1 ASC; + +INSERT INTO t(c2) VALUES (30); + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Deleting from an auto increment table after inserting negative values + +eval CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t VALUES (-3,-20); +INSERT INTO t(c2) VALUES (40); + +SELECT * FROM t ORDER BY c1 ASC; + +if (!$skip_delete) +{ +DELETE FROM t WHERE c1 > 1; +} + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Inserting a positive value that exceeds maximum allowed value for an +--echo # Auto Increment column (positive maximum) + +eval CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); + +--error ER_DUP_ENTRY +INSERT INTO t VALUES (128,50); +--error ER_DUP_ENTRY +INSERT INTO t VALUES (129,60); + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Inserting a negative value that goes below minimum allowed value for an +--echo # Auto Increment column (negative minimum) + +eval CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-127,30); +INSERT INTO t VALUES (-128,40); + +--error ER_DUP_ENTRY +INSERT INTO t VALUES (-129,50); +--error ER_DUP_ENTRY +INSERT INTO t VALUES (-130,60); + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Updating the partition table with a negative Auto Increment value + +eval CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); + +SELECT * FROM t ORDER BY c1 ASC; + +if (!$skip_update) +{ +UPDATE t SET c1 = -6 WHERE c1 = 2; +} + +SELECT * FROM t ORDER BY c1 ASC; + +INSERT INTO t(c2) VALUES (40); +INSERT INTO t(c2) VALUES (50); + +if (!$skip_update) +{ +UPDATE t SET c1 = -6 WHERE c1 = 2; +} + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo # Updating the partition table with a value that crosses the upper limits +--echo # on both the positive and the negative side. + +eval CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), + c2 INT) ENGINE=$engine PARTITION BY HASH(c1) PARTITIONS 4; + +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); + +SELECT * FROM t ORDER BY c1 ASC; + +if (!$skip_update) +{ +UPDATE t SET c1 = 130 where c1 = 127; +} + +SELECT * FROM t ORDER BY c1 ASC; + +if (!$skip_update) +{ +UPDATE t SET c1 = -140 where c1 = 126; +} + +SELECT * FROM t ORDER BY c1 ASC; + +DROP TABLE t; + +--echo ############################################################################## +} diff --git a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result index 9a23cd4364e..6295d14d98f 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result @@ -825,3 +825,194 @@ c1 4 5 DROP TABLE t1; +############################################################################# +# Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 +# Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 +############################################################################## +# Inserting negative autoincrement values into a partition table (partitions >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DROP TABLE t; +# Reading from a partition table (partitions >= 2 ) after inserting a negative +# value into the auto increment column +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-2,-20); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-2 -20 +1 30 +DROP TABLE t; +# Inserting negative auto increment value into a partition table (partitions >= 2) +# auto increment value > 2. +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-4,-20); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-4 -20 +1 30 +2 40 +DROP TABLE t; +# Inserting -1 into autoincrement column of a partition table (partition >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +DROP TABLE t; +# Deleting from an auto increment table after inserting negative values +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t VALUES (-3,-20); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DELETE FROM t WHERE c1 > 1; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +DROP TABLE t; +# Inserting a positive value that exceeds maximum allowed value for an +# Auto Increment column (positive maximum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +INSERT INTO t VALUES (128,50); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +INSERT INTO t VALUES (129,60); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +DROP TABLE t; +# Inserting a negative value that goes below minimum allowed value for an +# Auto Increment column (negative minimum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-127,30); +INSERT INTO t VALUES (-128,40); +INSERT INTO t VALUES (-129,50); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +INSERT INTO t VALUES (-130,60); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 40 +-127 30 +1 10 +2 20 +DROP TABLE t; +# Updating the partition table with a negative Auto Increment value +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +INSERT INTO t(c2) VALUES (40); +INSERT INTO t(c2) VALUES (50); +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +4 40 +5 50 +DROP TABLE t; +# Updating the partition table with a value that crosses the upper limits +# on both the positive and the negative side. +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='InnoDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = 130 where c1 = 127; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = -140 where c1 = 126; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 30 +1 10 +2 20 +127 40 +DROP TABLE t; +############################################################################## diff --git a/mysql-test/suite/parts/r/partition_auto_increment_memory.result b/mysql-test/suite/parts/r/partition_auto_increment_memory.result index f4d783825f4..6e3b990dc0f 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result @@ -851,3 +851,194 @@ c1 4 5 DROP TABLE t1; +############################################################################# +# Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 +# Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 +############################################################################## +# Inserting negative autoincrement values into a partition table (partitions >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DROP TABLE t; +# Reading from a partition table (partitions >= 2 ) after inserting a negative +# value into the auto increment column +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-2,-20); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-2 -20 +1 30 +DROP TABLE t; +# Inserting negative auto increment value into a partition table (partitions >= 2) +# auto increment value > 2. +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-4,-20); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-4 -20 +1 30 +2 40 +DROP TABLE t; +# Inserting -1 into autoincrement column of a partition table (partition >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +DROP TABLE t; +# Deleting from an auto increment table after inserting negative values +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t VALUES (-3,-20); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DELETE FROM t WHERE c1 > 1; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +DROP TABLE t; +# Inserting a positive value that exceeds maximum allowed value for an +# Auto Increment column (positive maximum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +INSERT INTO t VALUES (128,50); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +INSERT INTO t VALUES (129,60); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +DROP TABLE t; +# Inserting a negative value that goes below minimum allowed value for an +# Auto Increment column (negative minimum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-127,30); +INSERT INTO t VALUES (-128,40); +INSERT INTO t VALUES (-129,50); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +INSERT INTO t VALUES (-130,60); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 40 +-127 30 +1 10 +2 20 +DROP TABLE t; +# Updating the partition table with a negative Auto Increment value +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +INSERT INTO t(c2) VALUES (40); +INSERT INTO t(c2) VALUES (50); +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +4 40 +5 50 +DROP TABLE t; +# Updating the partition table with a value that crosses the upper limits +# on both the positive and the negative side. +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='Memory' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = 130 where c1 = 127; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = -140 where c1 = 126; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 30 +1 10 +2 20 +127 40 +DROP TABLE t; +############################################################################## diff --git a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result index 6abf08b68a0..047b974f0a3 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result @@ -870,3 +870,194 @@ c1 4 5 DROP TABLE t1; +############################################################################# +# Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 +# Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 +############################################################################## +# Inserting negative autoincrement values into a partition table (partitions >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DROP TABLE t; +# Reading from a partition table (partitions >= 2 ) after inserting a negative +# value into the auto increment column +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-2,-20); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-2 -20 +1 30 +DROP TABLE t; +# Inserting negative auto increment value into a partition table (partitions >= 2) +# auto increment value > 2. +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-4,-20); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-4 -20 +1 30 +2 40 +DROP TABLE t; +# Inserting -1 into autoincrement column of a partition table (partition >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +DROP TABLE t; +# Deleting from an auto increment table after inserting negative values +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t VALUES (-3,-20); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DELETE FROM t WHERE c1 > 1; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +DROP TABLE t; +# Inserting a positive value that exceeds maximum allowed value for an +# Auto Increment column (positive maximum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +INSERT INTO t VALUES (128,50); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +INSERT INTO t VALUES (129,60); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +DROP TABLE t; +# Inserting a negative value that goes below minimum allowed value for an +# Auto Increment column (negative minimum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-127,30); +INSERT INTO t VALUES (-128,40); +INSERT INTO t VALUES (-129,50); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +INSERT INTO t VALUES (-130,60); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 40 +-127 30 +1 10 +2 20 +DROP TABLE t; +# Updating the partition table with a negative Auto Increment value +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +INSERT INTO t(c2) VALUES (40); +INSERT INTO t(c2) VALUES (50); +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +4 40 +5 50 +DROP TABLE t; +# Updating the partition table with a value that crosses the upper limits +# on both the positive and the negative side. +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='MyISAM' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = 130 where c1 = 127; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = -140 where c1 = 126; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 30 +1 10 +2 20 +127 40 +DROP TABLE t; +############################################################################## diff --git a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result index 5a1c5b06b36..317669be7ad 100644 --- a/mysql-test/suite/parts/r/partition_auto_increment_ndb.result +++ b/mysql-test/suite/parts/r/partition_auto_increment_ndb.result @@ -846,3 +846,194 @@ c1 4 5 DROP TABLE t1; +############################################################################# +# Bug #45823 - Assertion failure in file row/row0mysql.c line 1386 +# Bug #43988 - AUTO_INCREMENT errors with partitioned InnoDB tables in 5.1.31 +############################################################################## +# Inserting negative autoincrement values into a partition table (partitions >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DROP TABLE t; +# Reading from a partition table (partitions >= 2 ) after inserting a negative +# value into the auto increment column +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-2,-20); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-2 -20 +1 30 +DROP TABLE t; +# Inserting negative auto increment value into a partition table (partitions >= 2) +# auto increment value > 2. +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 2; +INSERT INTO t VALUES (-4,-20); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-4 -20 +1 30 +2 40 +DROP TABLE t; +# Inserting -1 into autoincrement column of a partition table (partition >= 4) +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +DROP TABLE t; +# Deleting from an auto increment table after inserting negative values +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +INSERT INTO t VALUES (-3,-20); +INSERT INTO t(c2) VALUES (40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +2 20 +3 30 +4 40 +DELETE FROM t WHERE c1 > 1; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-3 -20 +-1 -10 +1 10 +DROP TABLE t; +# Inserting a positive value that exceeds maximum allowed value for an +# Auto Increment column (positive maximum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +INSERT INTO t VALUES (128,50); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +INSERT INTO t VALUES (129,60); +ERROR 23000: Duplicate entry '127' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +DROP TABLE t; +# Inserting a negative value that goes below minimum allowed value for an +# Auto Increment column (negative minimum) +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-127,30); +INSERT INTO t VALUES (-128,40); +INSERT INTO t VALUES (-129,50); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +INSERT INTO t VALUES (-130,60); +ERROR 23000: Duplicate entry '-128' for key 'PRIMARY' +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 40 +-127 30 +1 10 +2 20 +DROP TABLE t; +# Updating the partition table with a negative Auto Increment value +CREATE TABLE t (c1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (-1,-10); +INSERT INTO t(c2) VALUES (30); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-1 -10 +1 10 +2 20 +3 30 +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +INSERT INTO t(c2) VALUES (40); +INSERT INTO t(c2) VALUES (50); +UPDATE t SET c1 = -6 WHERE c1 = 2; +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-6 20 +-1 -10 +1 10 +3 30 +4 40 +5 50 +DROP TABLE t; +# Updating the partition table with a value that crosses the upper limits +# on both the positive and the negative side. +CREATE TABLE t (c1 TINYINT NOT NULL AUTO_INCREMENT, PRIMARY KEY(c1), +c2 INT) ENGINE='NDB' PARTITION BY HASH(c1) PARTITIONS 4; +INSERT INTO t(c2) VALUES (10); +INSERT INTO t(c2) VALUES (20); +INSERT INTO t VALUES (126,30); +INSERT INTO t VALUES (127,40); +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = 130 where c1 = 127; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +1 10 +2 20 +126 30 +127 40 +UPDATE t SET c1 = -140 where c1 = 126; +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +SELECT * FROM t ORDER BY c1 ASC; +c1 c2 +-128 30 +1 10 +2 20 +127 40 +DROP TABLE t; +############################################################################## diff --git a/mysql-test/suite/parts/t/partition_auto_increment_archive.test b/mysql-test/suite/parts/t/partition_auto_increment_archive.test index fb09557204f..e99a0b23b36 100644 --- a/mysql-test/suite/parts/t/partition_auto_increment_archive.test +++ b/mysql-test/suite/parts/t/partition_auto_increment_archive.test @@ -30,6 +30,9 @@ let $skip_delete= 1; let $skip_truncate= 1; let $skip_update= 1; let $only_ai_pk= 1; +# Bug#45823 Assertion failure in file row/row0mysql.c line 1386 +# Archive does not handle negative autoincrement values correctly +let $skip_negative_auto_inc= 1; ##### Storage engine to be tested let $engine= 'Archive'; diff --git a/mysql-test/suite/parts/t/partition_auto_increment_blackhole.test b/mysql-test/suite/parts/t/partition_auto_increment_blackhole.test index 64cd96c6173..f92dc33f263 100644 --- a/mysql-test/suite/parts/t/partition_auto_increment_blackhole.test +++ b/mysql-test/suite/parts/t/partition_auto_increment_blackhole.test @@ -25,6 +25,9 @@ #------------------------------------------------------------------------------# # Engine specific settings and requirements --source include/have_blackhole.inc +# Bug#45823 Assertion failure in file row/row0mysql.c line 1386 +# Blackhole does not handle negative autoincrement values correctly +let $skip_negative_auto_inc= 1; ##### Storage engine to be tested let $engine= 'Blackhole'; -- cgit v1.2.1 From 6e27ef435e3863382295f1a1d41424c9b8d4c197 Mon Sep 17 00:00:00 2001 From: Satya B Date: Fri, 4 Sep 2009 12:21:54 +0530 Subject: Fix for BUG#46384 - mysqld segfault when trying to create table with same name as existing view When trying to create a table with the same name as existing view with join, mysql server crashes. The problem is when create table is issued with the same name as view, while verifying with the existing tables, we assume that base table object is created always. In this case, since it is a view over multiple tables, we don't have the mysql derived table object. Fixed the logic which checks if there is an existing table to not to assume that table object is created when the base table is view over multiple tables. mysql-test/r/create.result: BUG#46384 - mysqld segfault when trying to create table with same name as existing view Testcase for the bug mysql-test/t/create.test: BUG#46384 - mysqld segfault when trying to create table with same name as existing view Testcase for the bug sql/sql_insert.cc: BUG#46384 - mysqld segfault when trying to create table with same name as existing view Fixed create_table_from_items() method to properly check, if the base table is a view over multiple tables. --- mysql-test/r/create.result | 13 +++++++++++++ mysql-test/t/create.test | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index d37c1a04daa..dfd376a6bde 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1559,4 +1559,17 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY) SELECT a FROM t1; ERROR 23000: Duplicate entry '1' for key 1 DROP TABLE t1, t2; +# +# BUG#46384 - mysqld segfault when trying to create table with same +# name as existing view +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t2 VALUES (1),(2),(3); +CREATE VIEW v1 AS SELECT t1.a FROM t1, t2; +CREATE TABLE v1 AS SELECT * FROM t1; +ERROR 42S01: Table 'v1' already exists +DROP VIEW v1; +DROP TABLE t1,t2; End of 5.0 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index a837653d618..2ec416cfc87 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1194,5 +1194,22 @@ CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY) DROP TABLE t1, t2; +--echo # +--echo # BUG#46384 - mysqld segfault when trying to create table with same +--echo # name as existing view +--echo # + +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); + +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t2 VALUES (1),(2),(3); + +CREATE VIEW v1 AS SELECT t1.a FROM t1, t2; +--error ER_TABLE_EXISTS_ERROR +CREATE TABLE v1 AS SELECT * FROM t1; + +DROP VIEW v1; +DROP TABLE t1,t2; --echo End of 5.0 tests -- cgit v1.2.1 From 643fbe4234a06e51746c8912223652a3b41fe133 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Fri, 4 Sep 2009 12:20:53 +0500 Subject: Bug#45989 memory leak after explain encounters an error in the query Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up. The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy. mysql-test/r/explain.result: test result mysql-test/t/explain.test: test case sql/sql_select.cc: Memory allocated in TMP_TABLE_PARAM::copy_field is not cleaned up. The fix is to clean up TMP_TABLE_PARAM::copy_field array in JOIN::destroy. --- mysql-test/r/explain.result | 8 ++++++++ mysql-test/t/explain.test | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index b0adc428e4c..8d3859fd68e 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -159,3 +159,11 @@ CREATE TABLE t1 (a INT PRIMARY KEY); EXPLAIN EXTENDED SELECT COUNT(a) FROM t1 USE KEY(a); ERROR HY000: Key 'a' doesn't exist in table 't1' DROP TABLE t1; +CREATE TABLE t1(a LONGTEXT); +INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); +INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); +EXPLAIN SELECT DISTINCT 1 FROM t1, +(SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) as d1 +WHERE t1.a = d1.a; +ERROR 42S22: Unknown column 'd1.a' in 'where clause' +DROP TABLE t1; diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test index 1bc98a8acb1..7b7bdd3563c 100644 --- a/mysql-test/t/explain.test +++ b/mysql-test/t/explain.test @@ -135,5 +135,16 @@ EXPLAIN EXTENDED SELECT COUNT(a) FROM t1 USE KEY(a); DROP TABLE t1; +# +# Bug#45989 memory leak after explain encounters an error in the query +# +CREATE TABLE t1(a LONGTEXT); +INSERT INTO t1 VALUES (repeat('a',@@global.max_allowed_packet)); +INSERT INTO t1 VALUES (repeat('b',@@global.max_allowed_packet)); +--error ER_BAD_FIELD_ERROR +EXPLAIN SELECT DISTINCT 1 FROM t1, + (SELECT DISTINCTROW a AS away FROM t1 GROUP BY a WITH ROLLUP) as d1 + WHERE t1.a = d1.a; +DROP TABLE t1; # End of 5.0 tests. -- cgit v1.2.1 From a7de20574749ececbe8492f340f6ddc7be1544fa Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 4 Sep 2009 12:29:18 +0500 Subject: BUG#46961 - archive engine loses rows during self joining select! SELECT with join (not only self-join) from archive table may return incomplete result set, when result set size exceeds join buffer size. The problem was that archive row counter was initialzed too early, when ha_archive::info() method was called. Later, when optimizer exceeds join buffer, it attempts to reuse handler without calling ha_archive::info() again (which is correct). Fixed by moving row counter initialization from ha_archive::info() to ha_archive::rnd_init(). mysql-test/r/archive.result: A test case for BUG#46961. mysql-test/t/archive.test: A test case for BUG#46961. storage/archive/ha_archive.cc: Since a cursor may get reused without a call to ::info(), move assignment of scan_rows to a proper place, that is ::rnd_init(). --- mysql-test/r/archive.result | 11 +++++++++++ mysql-test/t/archive.test | 13 +++++++++++++ 2 files changed, 24 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 8c26ea1ff82..9a6edbaa85c 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12695,3 +12695,14 @@ a b 1 NULL 2 NULL DROP TABLE t1; +SET @save_join_buffer_size= @@join_buffer_size; +SET @@join_buffer_size= 8228; +CREATE TABLE t1(a CHAR(255)) ENGINE=archive; +INSERT INTO t1 VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), +('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), +('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +SELECT COUNT(t1.a) FROM t1, t1 a, t1 b, t1 c, t1 d, t1 e; +COUNT(t1.a) +729 +DROP TABLE t1; +SET @@join_buffer_size= @save_join_buffer_size; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 7139d95ab49..663f7faf208 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1599,3 +1599,16 @@ INSERT INTO t1 VALUES (NULL, NULL),(NULL, NULL); FLUSH TABLE t1; SELECT * FROM t1 ORDER BY a; DROP TABLE t1; + +# +# BUG#46961 - archive engine loses rows during self joining select! +# +SET @save_join_buffer_size= @@join_buffer_size; +SET @@join_buffer_size= 8228; +CREATE TABLE t1(a CHAR(255)) ENGINE=archive; +INSERT INTO t1 VALUES('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), + ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), + ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'); +SELECT COUNT(t1.a) FROM t1, t1 a, t1 b, t1 c, t1 d, t1 e; +DROP TABLE t1; +SET @@join_buffer_size= @save_join_buffer_size; -- cgit v1.2.1 From 2a6ac469fc7cd940d7864babafb72798b7643bf3 Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Fri, 4 Sep 2009 13:14:54 +0500 Subject: Fix for bug#46629: Item_in_subselect::val_int(): Assertion `0' on subquery inside a SP Problem: repeated call of a SP containing an incorrect query with a subselect may lead to failed ASSERT(). Fix: set proper sublelect's state in case of error occured during subquery transformation. mysql-test/r/sp.result: Fix for bug#46629: Item_in_subselect::val_int(): Assertion `0' on subquery inside a SP - test result. mysql-test/t/sp.test: Fix for bug#46629: Item_in_subselect::val_int(): Assertion `0' on subquery inside a SP - test case. sql/item_subselect.cc: Fix for bug#46629: Item_in_subselect::val_int(): Assertion `0' on subquery inside a SP - don't set Item_subselect::changed in the Item_subselect::fix_fields() if an error occured during subquery transformation. That prevents us of further processing incorrect subqueries after Item_in_subselect::select_in_like_transformer(). --- mysql-test/r/sp.result | 16 ++++++++++++++++ mysql-test/t/sp.test | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 3ad556b8c30..67514c314f4 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6963,6 +6963,22 @@ CALL p1(); CALL p1(); DROP PROCEDURE p1; DROP TABLE t1; +# +# Bug #46629: Item_in_subselect::val_int(): Assertion `0' +# on subquery inside a SP +# +CREATE TABLE t1(a INT); +CREATE TABLE t2(a INT, b INT PRIMARY KEY); +CREATE PROCEDURE p1 () +BEGIN +SELECT a FROM t1 A WHERE A.b IN (SELECT b FROM t2 AS B); +END| +CALL p1; +ERROR 42S22: Unknown column 'A.b' in 'IN/ALL/ANY subquery' +CALL p1; +ERROR 42S22: Unknown column 'A.b' in 'IN/ALL/ANY subquery' +DROP PROCEDURE p1; +DROP TABLE t1, t2; # ------------------------------------------------------------------ # -- End of 5.1 tests # ------------------------------------------------------------------ diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 5eeac457958..44c4556340e 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -8242,6 +8242,28 @@ while ($tab_count) DROP PROCEDURE p1; DROP TABLE t1; + +--echo # +--echo # Bug #46629: Item_in_subselect::val_int(): Assertion `0' +--echo # on subquery inside a SP +--echo # +CREATE TABLE t1(a INT); +CREATE TABLE t2(a INT, b INT PRIMARY KEY); + +DELIMITER |; +CREATE PROCEDURE p1 () +BEGIN + SELECT a FROM t1 A WHERE A.b IN (SELECT b FROM t2 AS B); +END| +DELIMITER ;| +--error ER_BAD_FIELD_ERROR +CALL p1; +--error ER_BAD_FIELD_ERROR +CALL p1; +DROP PROCEDURE p1; +DROP TABLE t1, t2; + + --echo # ------------------------------------------------------------------ --echo # -- End of 5.1 tests --echo # ------------------------------------------------------------------ -- cgit v1.2.1 From e49a210c8c47dedb2fd384f3f5c170506e580ba7 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 4 Sep 2009 17:02:17 -0300 Subject: Bug#45605: ps_not_windows.test fails: The plugin feature is disabled, you need HAVE_DLOPEN Selectively skip tests that require dynamic loading (ie: static builds). mysql-test/include/have_dynamic_loading.inc: Add require file. mysql-test/t/ps_not_windows.test: Test requires dynamic loading support. --- mysql-test/include/have_dynamic_loading.inc | 7 +++++++ mysql-test/include/have_example_plugin.inc | 5 +---- mysql-test/include/have_simple_parser.inc | 5 +---- mysql-test/include/have_udf.inc | 5 +---- mysql-test/t/ps_not_windows.test | 2 ++ 5 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 mysql-test/include/have_dynamic_loading.inc (limited to 'mysql-test') diff --git a/mysql-test/include/have_dynamic_loading.inc b/mysql-test/include/have_dynamic_loading.inc new file mode 100644 index 00000000000..1b2c85b3904 --- /dev/null +++ b/mysql-test/include/have_dynamic_loading.inc @@ -0,0 +1,7 @@ +# +# Whether server supports dynamic loading. +# +--require r/have_dynamic_loading.require +disable_query_log; +show variables like 'have_dynamic_loading'; +enable_query_log; diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc index 8e57c725eb5..a2fffc17b97 100644 --- a/mysql-test/include/have_example_plugin.inc +++ b/mysql-test/include/have_example_plugin.inc @@ -2,10 +2,7 @@ # Check if server has support for loading udf's # i.e it will support dlopen # ---require r/have_dynamic_loading.require -disable_query_log; -show variables like 'have_dynamic_loading'; -enable_query_log; +--source include/have_dynamic_loading.inc # # Check if the variable EXAMPLE_PLUGIN is set diff --git a/mysql-test/include/have_simple_parser.inc b/mysql-test/include/have_simple_parser.inc index c85786bd524..5a4dc93ec81 100644 --- a/mysql-test/include/have_simple_parser.inc +++ b/mysql-test/include/have_simple_parser.inc @@ -2,10 +2,7 @@ # Check if server has support for loading udf's # i.e it will support dlopen # ---require r/have_dynamic_loading.require -disable_query_log; -show variables like 'have_dynamic_loading'; -enable_query_log; +--source include/have_dynamic_loading.inc # # Check if the variable SIMPLE_PARSER is set diff --git a/mysql-test/include/have_udf.inc b/mysql-test/include/have_udf.inc index 3f7e260c5ba..7be57bbb7a9 100644 --- a/mysql-test/include/have_udf.inc +++ b/mysql-test/include/have_udf.inc @@ -2,10 +2,7 @@ # Check if server has support for loading udf's # i.e it will support dlopen # ---require r/have_dynamic_loading.require -disable_query_log; -show variables like 'have_dynamic_loading'; -enable_query_log; +--source include/have_dynamic_loading.inc # # Check if the variable UDF_EXAMPLE_LIB is set diff --git a/mysql-test/t/ps_not_windows.test b/mysql-test/t/ps_not_windows.test index 6d85f737b32..0ab08b59f1e 100644 --- a/mysql-test/t/ps_not_windows.test +++ b/mysql-test/t/ps_not_windows.test @@ -2,6 +2,8 @@ --source include/not_embedded.inc # Non-windows specific ps tests. --source include/not_windows.inc +# requires dynamic loading +--source include/have_dynamic_loading.inc # # Bug #20665: All commands supported in Stored Procedures should work in -- cgit v1.2.1 From 645f7841cf09294eb70838eaee58928a10f615a8 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Sat, 5 Sep 2009 09:40:18 +0200 Subject: followup fixes after merge to -trunk --- mysql-test/collections/default.experimental | 4 +++- mysql-test/r/bug46080.result | 2 ++ mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result | 2 ++ mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test | 4 ++++ mysql-test/t/bug46080.test | 3 +++ 5 files changed, 14 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 69176a47a5e..e4e65ad555f 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -4,5 +4,7 @@ main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fail rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2 rpl_ndb.rpl_ndb_log # Bug#38998 rpl.rpl_innodb_bug28430* @solaris # Bug#46029 -main.plugin_load @solaris # Bug #42144 +main.plugin_load @solaris # Bug#42144 rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31 +main.plugin* @solaris # Bug#47146 Linking problem with example plugin when dtrace enabled +rpl.rpl_plugin_load* @solaris # Bug#47146 diff --git a/mysql-test/r/bug46080.result b/mysql-test/r/bug46080.result index 18c7c22829a..2173768cdad 100644 --- a/mysql-test/r/bug46080.result +++ b/mysql-test/r/bug46080.result @@ -2,6 +2,8 @@ # Bug #46080: group_concat(... order by) crashes server when # sort_buffer_size cannot allocate # +call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); +call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); CREATE TABLE t1(a CHAR(255)); INSERT INTO t1 VALUES ('a'); SET @@SESSION.sort_buffer_size=5*16*1000000; diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result index 263896b884a..4b90cf3e8cc 100644 --- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result +++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result @@ -4,6 +4,8 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +call mtr.add_suppression("Slave I/O: Get master clock failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); +call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again"); SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP"); IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP") 1 diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index 40d11f2cec2..db20a808b09 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -16,6 +16,10 @@ source include/master-slave.inc; source include/have_debug.inc; + +call mtr.add_suppression("Slave I/O: Get master clock failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); +call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again"); + #Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection connection slave; let $debug_saved= `select @@global.debug`; diff --git a/mysql-test/t/bug46080.test b/mysql-test/t/bug46080.test index 7e56e3ce421..8b4cee4d8b0 100644 --- a/mysql-test/t/bug46080.test +++ b/mysql-test/t/bug46080.test @@ -3,6 +3,9 @@ --echo # sort_buffer_size cannot allocate --echo # +call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'"); +call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k"); + CREATE TABLE t1(a CHAR(255)); INSERT INTO t1 VALUES ('a'); -- cgit v1.2.1 From c18e4b42b32e89307f5c903566b6ee43da12466f Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Sat, 5 Sep 2009 18:50:31 +0200 Subject: suppression for rpl.rpl_get_master_version_and_clock was incomplete --- mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result | 2 +- mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result index 4b90cf3e8cc..99a0fd21f66 100644 --- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result +++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result @@ -4,7 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -call mtr.add_suppression("Slave I/O: Get master clock failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); +call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again"); SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP"); IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP") diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index db20a808b09..c7c66bfde71 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -17,7 +17,7 @@ source include/master-slave.inc; source include/have_debug.inc; -call mtr.add_suppression("Slave I/O: Get master clock failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); +call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'"); call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again"); #Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection -- cgit v1.2.1 From 505346028f975d26f1353c46bdb3db618b1e306c Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sun, 6 Sep 2009 00:42:17 +0400 Subject: Bug #46159: simple query that never returns The external 'for' loop in remove_dup_with_compare() handled HA_ERR_RECORD_DELETED by just starting over without advancing to the next record which caused an infinite loop. This condition could be triggered on certain data by a SELECT query containing DISTINCT, GROUP BY and HAVING clauses. Fixed remove_dup_with_compare() so that we always advance to the next record when receiving HA_ERR_RECORD_DELETED from rnd_next(). mysql-test/r/distinct.result: Added a test case for bug #46159. mysql-test/t/distinct.test: Added a test case for bug #46159. sql/sql_select.cc: Fixed remove_dup_with_compare() so that we always advance to the next record when receiving HA_ERR_RECORD_DELETED from rnd_next(). --- mysql-test/r/distinct.result | 30 ++++++++++++++++++++++++++++++ mysql-test/t/distinct.test | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index e0324af8cfd..b1cb70fa43c 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -763,4 +763,34 @@ a b d c 1 2 0 2 1 2 0 3 DROP TABLE t1; +# +# Bug #46159: simple query that never returns +# +SET @old_max_heap_table_size = @@max_heap_table_size; +SET @@max_heap_table_size = 16384; +SET @old_sort_buffer_size = @@sort_buffer_size; +SET @@sort_buffer_size = 32804; +CREATE TABLE t1(c1 int, c2 VARCHAR(20)); +INSERT INTO t1 VALUES (1, '1'), (1, '1'), (2, '2'), (3, '1'), (3, '1'), (4, '4'); +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +SELECT c1, c2, COUNT(*) FROM t1 GROUP BY c1 LIMIT 4; +c1 c2 COUNT(*) +1 1 2 +2 2 1 +3 1 2 +4 4 1 +SELECT DISTINCT c2 FROM t1 GROUP BY c1 HAVING COUNT(*) > 1; +c2 +1 +5 +DROP TABLE t1; +SET @@sort_buffer_size = @old_sort_buffer_size; +SET @@max_heap_table_size = @old_max_heap_table_size; End of 5.1 tests diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index a77d1136840..bf4c23562cf 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -573,4 +573,44 @@ SELECT DISTINCT a, b, d, c FROM t1; DROP TABLE t1; +--echo # +--echo # Bug #46159: simple query that never returns +--echo # + +# Set max_heap_table_size to the minimum value so that GROUP BY table in the +# SELECT query below gets converted to MyISAM +SET @old_max_heap_table_size = @@max_heap_table_size; +SET @@max_heap_table_size = 16384; + +# Set sort_buffer_size to the mininum value so that remove_duplicates() calls +# remove_dup_with_compare() +SET @old_sort_buffer_size = @@sort_buffer_size; +SET @@sort_buffer_size = 32804; + +CREATE TABLE t1(c1 int, c2 VARCHAR(20)); +INSERT INTO t1 VALUES (1, '1'), (1, '1'), (2, '2'), (3, '1'), (3, '1'), (4, '4'); +# Now we just need to pad the table with random data so we have enough unique +# values to force conversion of the GROUP BY table to MyISAM +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; +INSERT INTO t1 SELECT 5 + 10000 * RAND(), '5' FROM t1; + +# First rows of the GROUP BY table that will be processed by +# remove_dup_with_compare() +SELECT c1, c2, COUNT(*) FROM t1 GROUP BY c1 LIMIT 4; + +# The actual test case +SELECT DISTINCT c2 FROM t1 GROUP BY c1 HAVING COUNT(*) > 1; + +# Cleanup + +DROP TABLE t1; +SET @@sort_buffer_size = @old_sort_buffer_size; +SET @@max_heap_table_size = @old_max_heap_table_size; + --echo End of 5.1 tests -- cgit v1.2.1 From 5210d5a9a6bb30d1158ea0b0de934f7dddde854c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Sep 2009 13:01:03 +0800 Subject: Bug#45581 Test rpl_row_sp006_InnoDB fails randomly: Unknown database 'mysqltest1' Postfix. extra/rpl_tests/rpl_row_sp006.test had changed to fix this bug. extra/rpl_tests/rpl_row_sp006.test is also referenced by rpl_ndb_sp006, So rpl_row_sp006.result must be changed too. --- mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result | 36 ++++++++++++------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result index 482d43c8f10..047402f826f 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result @@ -4,21 +4,20 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create database if not exists mysqltest1; -DROP PROCEDURE IF EXISTS mysqltest1.p1; -DROP PROCEDURE IF EXISTS mysqltest1.p2; -DROP TABLE IF EXISTS mysqltest1.t2; -DROP TABLE IF EXISTS mysqltest1.t1; -CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER; -CREATE PROCEDURE mysqltest1.p1() +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +CREATE TABLE IF NOT EXISTS t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER; +CREATE TABLE IF NOT EXISTS t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER; +CREATE PROCEDURE p1() BEGIN DECLARE done INT DEFAULT 0; DECLARE spa CHAR(16); DECLARE spb INT; DECLARE cur1 CURSOR FOR SELECT name, (YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5) Date: Mon, 7 Sep 2009 13:42:54 +0800 Subject: Bug#46010 main.ctype_gbk_binlog fails sporadically : Table 't2' already exists This test case uses mysqlbinlog to dump the content of master-bin.000001, but the content of master-bin.000001 is not that this test needs. MTR runs a lot of test cases on one server, so when this test starts, the current binlog file might not be master-bin.000001, or there are other events are written by tests before. 'RESET MASTER' command must be called at the begin, it ensures that binlog of this test is wrote to master-bin.000001 correctly. Three other tests have the same problem, They were fixed together. mysqlbinlog-cp932 binlog_incident binlog_tmp_table --- mysql-test/r/ctype_gbk_binlog.result | 1 + mysql-test/r/mysqlbinlog-cp932.result | 2 +- mysql-test/suite/binlog/r/binlog_incident.result | 1 + mysql-test/suite/binlog/r/binlog_tmp_table.result | 1 + mysql-test/suite/binlog/t/binlog_incident.test | 3 ++- mysql-test/suite/binlog/t/binlog_tmp_table.test | 1 + mysql-test/t/ctype_gbk_binlog.test | 1 + mysql-test/t/mysqlbinlog-cp932.test | 5 +++-- 8 files changed, 11 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/ctype_gbk_binlog.result b/mysql-test/r/ctype_gbk_binlog.result index a49e170ff19..df927af9a6b 100644 --- a/mysql-test/r/ctype_gbk_binlog.result +++ b/mysql-test/r/ctype_gbk_binlog.result @@ -1,3 +1,4 @@ +RESET MASTER; SET NAMES gbk; CREATE TABLE t1 ( f1 BLOB diff --git a/mysql-test/r/mysqlbinlog-cp932.result b/mysql-test/r/mysqlbinlog-cp932.result index 1640a3b1642..cbf6159516a 100644 --- a/mysql-test/r/mysqlbinlog-cp932.result +++ b/mysql-test/r/mysqlbinlog-cp932.result @@ -1,4 +1,4 @@ -flush logs; +RESET MASTER; create table t3 (f text character set utf8); create table t4 (f text character set cp932); flush logs; diff --git a/mysql-test/suite/binlog/r/binlog_incident.result b/mysql-test/suite/binlog/r/binlog_incident.result index d8b0357b8c4..7a555743723 100644 --- a/mysql-test/suite/binlog/r/binlog_incident.result +++ b/mysql-test/suite/binlog/r/binlog_incident.result @@ -1,3 +1,4 @@ +RESET MASTER; CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); SELECT * FROM t1; diff --git a/mysql-test/suite/binlog/r/binlog_tmp_table.result b/mysql-test/suite/binlog/r/binlog_tmp_table.result index e4928432324..14b1963ffd9 100644 --- a/mysql-test/suite/binlog/r/binlog_tmp_table.result +++ b/mysql-test/suite/binlog/r/binlog_tmp_table.result @@ -1,3 +1,4 @@ +RESET MASTER; create table foo (a int); flush logs; create temporary table tmp1_foo like foo; diff --git a/mysql-test/suite/binlog/t/binlog_incident.test b/mysql-test/suite/binlog/t/binlog_incident.test index 208c7f24df2..901ac49ea24 100644 --- a/mysql-test/suite/binlog/t/binlog_incident.test +++ b/mysql-test/suite/binlog/t/binlog_incident.test @@ -6,6 +6,7 @@ source include/have_log_bin.inc; source include/have_debug.inc; let $MYSQLD_DATADIR= `select @@datadir`; +RESET MASTER; CREATE TABLE t1 (a INT); @@ -24,4 +25,4 @@ exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQ eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl; --enable_query_log -remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; \ No newline at end of file +remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql; diff --git a/mysql-test/suite/binlog/t/binlog_tmp_table.test b/mysql-test/suite/binlog/t/binlog_tmp_table.test index 6947959a5e0..54af8a8cb68 100644 --- a/mysql-test/suite/binlog/t/binlog_tmp_table.test +++ b/mysql-test/suite/binlog/t/binlog_tmp_table.test @@ -30,6 +30,7 @@ source include/have_binlog_format_mixed_or_statement.inc; connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); +RESET MASTER; create table foo (a int); diff --git a/mysql-test/t/ctype_gbk_binlog.test b/mysql-test/t/ctype_gbk_binlog.test index a8f653d1b1e..e4c1bee19af 100644 --- a/mysql-test/t/ctype_gbk_binlog.test +++ b/mysql-test/t/ctype_gbk_binlog.test @@ -1,6 +1,7 @@ -- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_gbk.inc +RESET MASTER; SET NAMES gbk; --character_set gbk diff --git a/mysql-test/t/mysqlbinlog-cp932.test b/mysql-test/t/mysqlbinlog-cp932.test index a7055bfc8ca..2a210bea0e0 100644 --- a/mysql-test/t/mysqlbinlog-cp932.test +++ b/mysql-test/t/mysqlbinlog-cp932.test @@ -5,8 +5,9 @@ -- source include/have_cp932.inc -- source include/have_log_bin.inc +RESET MASTER; + # Bug#16217 (mysql client did not know how not switch its internal charset) -flush logs; create table t3 (f text character set utf8); create table t4 (f text character set cp932); --exec $MYSQL --default-character-set=utf8 test -e "insert into t3 values(_utf8'ソ')" @@ -14,7 +15,7 @@ create table t4 (f text character set cp932); flush logs; rename table t3 to t03, t4 to t04; let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000002 | $MYSQL --default-character-set=utf8 +--exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8 # original and recovered data must be equal select HEX(f) from t03; select HEX(f) from t3; -- cgit v1.2.1 From dd407c5228df80a7ef6086c412940084e7498627 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Mon, 7 Sep 2009 10:37:54 +0200 Subject: Fix to ensure that all subpartitions gets deleted before renaming starts, BUG#47029 --- mysql-test/r/partition_innodb.result | 14 ++++++++++++++ mysql-test/t/partition_innodb.test | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index ad4d08e89ff..9c5675c0c75 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -1,4 +1,18 @@ drop table if exists t1; +create table t1 (a int not null, +b datetime not null, +primary key (a,b)) +engine=innodb +partition by range (to_days(b)) +subpartition by hash (a) +subpartitions 2 +( partition p0 values less than (to_days('2009-01-01')), +partition p1 values less than (to_days('2009-02-01')), +partition p2 values less than (to_days('2009-03-01')), +partition p3 values less than maxvalue); +alter table t1 reorganize partition p1,p2 into +( partition p2 values less than (to_days('2009-03-01'))); +drop table t1; CREATE TABLE t1 (id INT PRIMARY KEY, data INT) ENGINE = InnoDB PARTITION BY RANGE(id) ( PARTITION p0 VALUES LESS THAN (5), diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 2abbceffbb0..b29ce289811 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -5,6 +5,23 @@ drop table if exists t1; --enable_warnings +# +# Bug#47029: Crash when reorganize partition with subpartition +# +create table t1 (a int not null, + b datetime not null, + primary key (a,b)) +engine=innodb +partition by range (to_days(b)) +subpartition by hash (a) +subpartitions 2 +( partition p0 values less than (to_days('2009-01-01')), + partition p1 values less than (to_days('2009-02-01')), + partition p2 values less than (to_days('2009-03-01')), + partition p3 values less than maxvalue); +alter table t1 reorganize partition p1,p2 into +( partition p2 values less than (to_days('2009-03-01'))); +drop table t1; # # Bug#40595: Non-matching rows not released with READ-COMMITTED on tables # with partitions -- cgit v1.2.1 From 2cb3a131f47a8bcf0398a28e4a6a16d1c30c9708 Mon Sep 17 00:00:00 2001 From: Martin Hansson Date: Mon, 7 Sep 2009 11:57:22 +0200 Subject: Bug#46259: 5.0.83 -> 5.1.36, query doesn't work The parser rule for expressions in a udf parameter list contains two hacks: First, the parser input stream is read verbatim, bypassing the lexer. Second, the Item::name field is overwritten. If the argument to a udf was a field, the field's name as seen by name resolution was overwritten this way. If the field name was quoted or escaped, it would appear as e.g. "`field`". Fixed by not overwriting field names. mysql-test/r/udf.result: Bug#46259: Test result. mysql-test/t/udf.test: Bug#46259: Test case. sql/sql_yacc.yy: Bug#46259: Fix. --- mysql-test/r/udf.result | 16 ++++++++++++++++ mysql-test/t/udf.test | 12 ++++++++++++ 2 files changed, 28 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result index 15410ac2039..601b364fbbe 100644 --- a/mysql-test/r/udf.result +++ b/mysql-test/r/udf.result @@ -392,4 +392,20 @@ a 4 DROP FUNCTION sequence; DROP TABLE t1,t2; +# +# Bug#46259: 5.0.83 -> 5.1.36, query doesn't work +# +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (1), (2), (3); +SELECT IF( a = 1, a, a ) AS `b` FROM t1 ORDER BY field( `b` + 1, 1 ); +b +1 +2 +3 +SELECT IF( a = 1, a, a ) AS `b` FROM t1 ORDER BY field( `b`, 1 ); +b +2 +3 +1 +DROP TABLE t1; End of 5.0 tests. diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test index e9ae1a31079..7bf252040e5 100644 --- a/mysql-test/t/udf.test +++ b/mysql-test/t/udf.test @@ -436,4 +436,16 @@ SELECT * FROM t2 WHERE a = sequence(); DROP FUNCTION sequence; DROP TABLE t1,t2; +--echo # +--echo # Bug#46259: 5.0.83 -> 5.1.36, query doesn't work +--echo # +CREATE TABLE t1 ( a INT ); + +INSERT INTO t1 VALUES (1), (2), (3); + +SELECT IF( a = 1, a, a ) AS `b` FROM t1 ORDER BY field( `b` + 1, 1 ); +SELECT IF( a = 1, a, a ) AS `b` FROM t1 ORDER BY field( `b`, 1 ); + +DROP TABLE t1; + --echo End of 5.0 tests. -- cgit v1.2.1 From 36703050e8e5ef12dde3440864bc84cc0099944d Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Tue, 8 Sep 2009 16:10:06 +0200 Subject: Make sure that variables which are (or may be) used in an ".opt" file are defined to some value (even if it is empty). Without this, a test suite run aborted on Windows for "embedded". This fix was applied dusing the build of 5.4.2-beta. mysql-test/mysql-test-run.pl: From the code (function "envsubst()"), it is obvious that any variable which is used in an ".opt" file needs to be defined. If the value is wrong, starting the server may fail - but if the variable is undefined, the whole test suite will abort. So variables which are used in an ".opt" file should always be defined to some value, even if it is blank. This fix may be overkill, I did not check in detail whether all these variables are really used in an ".opt" file - but some are. --- mysql-test/mysql-test-run.pl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7591e091992..cdc7dbb01cd 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1781,6 +1781,14 @@ sub environment_setup { $ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'"; $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=;EXAMPLE=".$plugin_filename.";"; } + else + { + # Some ".opt" files use some of these variables, so they must be defined + $ENV{'EXAMPLE_PLUGIN'}= ""; + $ENV{'EXAMPLE_PLUGIN_OPT'}= ""; + $ENV{'HA_EXAMPLE_SO'}= ""; + $ENV{'EXAMPLE_PLUGIN_LOAD'}= ""; + } # ---------------------------------------------------- # Add the path where mysqld will find mypluglib.so -- cgit v1.2.1 From 24f103e39c100d0ca4fa4a4777fe82cd6d69034b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 9 Sep 2009 12:06:15 +0300 Subject: Bug #45159 Part 1 : rejuvenate the jp test suite using normal run. Updates the results of all the out-dated test suites and adds the special mysqltest command to enable innodb for the tests that need it. --- mysql-test/suite/jp/r/jp_alter_sjis.result | 78 +++---- mysql-test/suite/jp/r/jp_alter_ucs2.result | 78 +++---- mysql-test/suite/jp/r/jp_alter_ujis.result | 78 +++---- mysql-test/suite/jp/r/jp_alter_utf8.result | 78 +++---- mysql-test/suite/jp/r/jp_convert_sjis.result | 12 + mysql-test/suite/jp/r/jp_create_db_sjis.result | 1 + mysql-test/suite/jp/r/jp_create_db_ucs2.result | 1 + mysql-test/suite/jp/r/jp_create_db_ujis.result | 1 + mysql-test/suite/jp/r/jp_create_db_utf8.result | 1 + mysql-test/suite/jp/r/jp_create_tbl_sjis.result | 78 +++++-- mysql-test/suite/jp/r/jp_create_tbl_ucs2.result | 78 +++++-- mysql-test/suite/jp/r/jp_create_tbl_ujis.result | 78 +++++-- mysql-test/suite/jp/r/jp_create_tbl_utf8.result | 78 +++++-- mysql-test/suite/jp/r/jp_enum_sjis.result | 60 ++--- mysql-test/suite/jp/r/jp_enum_ucs2.result | 6 +- mysql-test/suite/jp/r/jp_enum_ujis.result | 60 ++--- mysql-test/suite/jp/r/jp_enum_utf8.result | 60 ++--- mysql-test/suite/jp/r/jp_join_sjis.result | 288 ++++++++++++------------ mysql-test/suite/jp/r/jp_join_ucs2.result | 288 ++++++++++++------------ mysql-test/suite/jp/r/jp_join_ujis.result | 288 ++++++++++++------------ mysql-test/suite/jp/r/jp_join_utf8.result | 288 ++++++++++++------------ mysql-test/suite/jp/r/jp_select_sjis.result | 4 + mysql-test/suite/jp/t/jp_alter_sjis.test | 2 + mysql-test/suite/jp/t/jp_alter_ucs2.test | 2 + mysql-test/suite/jp/t/jp_alter_ujis.test | 2 + mysql-test/suite/jp/t/jp_alter_utf8.test | 2 + mysql-test/suite/jp/t/jp_charlength_sjis.test | 2 + mysql-test/suite/jp/t/jp_charlength_ucs2.test | 2 + mysql-test/suite/jp/t/jp_charlength_ujis.test | 2 + mysql-test/suite/jp/t/jp_charlength_utf8.test | 2 + mysql-test/suite/jp/t/jp_charset_sjis.test | 2 + mysql-test/suite/jp/t/jp_charset_ucs2.test | 2 + mysql-test/suite/jp/t/jp_charset_ujis.test | 2 + mysql-test/suite/jp/t/jp_charset_utf8.test | 2 + mysql-test/suite/jp/t/jp_convert_sjis.test | 2 + mysql-test/suite/jp/t/jp_convert_ucs2.test | 2 + mysql-test/suite/jp/t/jp_convert_ujis.test | 2 + mysql-test/suite/jp/t/jp_convert_utf8.test | 2 + mysql-test/suite/jp/t/jp_create_tbl_sjis.test | 2 + mysql-test/suite/jp/t/jp_create_tbl_ucs2.test | 2 + mysql-test/suite/jp/t/jp_create_tbl_ujis.test | 2 + mysql-test/suite/jp/t/jp_create_tbl_utf8.test | 2 + mysql-test/suite/jp/t/jp_enum_sjis.test | 2 + mysql-test/suite/jp/t/jp_enum_ucs2.test | 2 + mysql-test/suite/jp/t/jp_enum_ujis.test | 2 + mysql-test/suite/jp/t/jp_enum_utf8.test | 2 + mysql-test/suite/jp/t/jp_insert_sjis.test | 2 + mysql-test/suite/jp/t/jp_insert_ucs2.test | 2 + mysql-test/suite/jp/t/jp_insert_ujis.test | 2 + mysql-test/suite/jp/t/jp_insert_utf8.test | 2 + mysql-test/suite/jp/t/jp_instr_sjis.test | 2 + mysql-test/suite/jp/t/jp_instr_ucs2.test | 2 + mysql-test/suite/jp/t/jp_instr_ujis.test | 2 + mysql-test/suite/jp/t/jp_instr_utf8.test | 2 + mysql-test/suite/jp/t/jp_join_sjis.test | 1 + mysql-test/suite/jp/t/jp_join_ucs2.test | 1 + mysql-test/suite/jp/t/jp_join_ujis.test | 1 + mysql-test/suite/jp/t/jp_join_utf8.test | 1 + mysql-test/suite/jp/t/jp_left_sjis.test | 2 + mysql-test/suite/jp/t/jp_left_ucs2.test | 2 + mysql-test/suite/jp/t/jp_left_ujis.test | 2 + mysql-test/suite/jp/t/jp_left_utf8.test | 2 + mysql-test/suite/jp/t/jp_length_sjis.test | 2 + mysql-test/suite/jp/t/jp_length_ucs2.test | 2 + mysql-test/suite/jp/t/jp_length_ujis.test | 2 + mysql-test/suite/jp/t/jp_length_utf8.test | 2 + mysql-test/suite/jp/t/jp_like_sjis.test | 2 + mysql-test/suite/jp/t/jp_like_ucs2.test | 2 + mysql-test/suite/jp/t/jp_like_ujis.test | 2 + mysql-test/suite/jp/t/jp_like_utf8.test | 2 + mysql-test/suite/jp/t/jp_locate_sjis.test | 2 + mysql-test/suite/jp/t/jp_locate_ucs2.test | 2 + mysql-test/suite/jp/t/jp_locate_ujis.test | 2 + mysql-test/suite/jp/t/jp_locate_utf8.test | 2 + mysql-test/suite/jp/t/jp_lpad_sjis.test | 2 + mysql-test/suite/jp/t/jp_lpad_ucs2.test | 2 + mysql-test/suite/jp/t/jp_lpad_ujis.test | 2 + mysql-test/suite/jp/t/jp_lpad_utf8.test | 2 + mysql-test/suite/jp/t/jp_ltrim_sjis.test | 2 + mysql-test/suite/jp/t/jp_ltrim_ucs2.test | 2 + mysql-test/suite/jp/t/jp_ltrim_ujis.test | 2 + mysql-test/suite/jp/t/jp_ltrim_utf8.test | 2 + mysql-test/suite/jp/t/jp_ps_sjis.test | 2 + mysql-test/suite/jp/t/jp_ps_ujis.test | 2 + mysql-test/suite/jp/t/jp_replace_sjis.test | 2 + mysql-test/suite/jp/t/jp_replace_ucs2.test | 2 + mysql-test/suite/jp/t/jp_replace_ujis.test | 2 + mysql-test/suite/jp/t/jp_replace_utf8.test | 2 + mysql-test/suite/jp/t/jp_reverse_sjis.test | 2 + mysql-test/suite/jp/t/jp_reverse_ucs2.test | 2 + mysql-test/suite/jp/t/jp_reverse_ujis.test | 2 + mysql-test/suite/jp/t/jp_reverse_utf8.test | 2 + mysql-test/suite/jp/t/jp_right_sjis.test | 2 + mysql-test/suite/jp/t/jp_right_ucs2.test | 2 + mysql-test/suite/jp/t/jp_right_ujis.test | 2 + mysql-test/suite/jp/t/jp_right_utf8.test | 2 + mysql-test/suite/jp/t/jp_rpad_sjis.test | 2 + mysql-test/suite/jp/t/jp_rpad_ucs2.test | 2 + mysql-test/suite/jp/t/jp_rpad_ujis.test | 2 + mysql-test/suite/jp/t/jp_rpad_utf8.test | 2 + mysql-test/suite/jp/t/jp_rtrim_sjis.test | 2 + mysql-test/suite/jp/t/jp_rtrim_ucs2.test | 2 + mysql-test/suite/jp/t/jp_rtrim_ujis.test | 2 + mysql-test/suite/jp/t/jp_rtrim_utf8.test | 2 + mysql-test/suite/jp/t/jp_select_sjis.test | 2 + mysql-test/suite/jp/t/jp_select_ucs2.test | 2 + mysql-test/suite/jp/t/jp_select_ujis.test | 2 + mysql-test/suite/jp/t/jp_select_utf8.test | 2 + mysql-test/suite/jp/t/jp_subquery_sjis.test | 1 + mysql-test/suite/jp/t/jp_subquery_ucs2.test | 1 + mysql-test/suite/jp/t/jp_subquery_ujis.test | 1 + mysql-test/suite/jp/t/jp_subquery_utf8.test | 1 + mysql-test/suite/jp/t/jp_substring_sjis.test | 2 + mysql-test/suite/jp/t/jp_substring_ucs2.test | 2 + mysql-test/suite/jp/t/jp_substring_ujis.test | 2 + mysql-test/suite/jp/t/jp_substring_utf8.test | 2 + mysql-test/suite/jp/t/jp_trim_sjis.test | 2 + mysql-test/suite/jp/t/jp_trim_ucs2.test | 2 + mysql-test/suite/jp/t/jp_trim_ujis.test | 2 + mysql-test/suite/jp/t/jp_trim_utf8.test | 2 + mysql-test/suite/jp/t/jp_union_ujis.test | 2 + mysql-test/suite/jp/t/jp_update_sjis.test | 2 + mysql-test/suite/jp/t/jp_update_ucs2.test | 2 + mysql-test/suite/jp/t/jp_update_ujis.test | 2 + mysql-test/suite/jp/t/jp_update_utf8.test | 2 + mysql-test/suite/jp/t/jp_where_sjis.test | 2 + mysql-test/suite/jp/t/jp_where_ucs2.test | 2 + mysql-test/suite/jp/t/jp_where_ujis.test | 2 + mysql-test/suite/jp/t/jp_where_utf8.test | 2 + 129 files changed, 1303 insertions(+), 885 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/jp/r/jp_alter_sjis.result b/mysql-test/suite/jp/r/jp_alter_sjis.result index f970508229a..32ae7d5729d 100644 --- a/mysql-test/suite/jp/r/jp_alter_sjis.result +++ b/mysql-test/suite/jp/r/jp_alter_sjis.result @@ -31,8 +31,8 @@ NULL DESC `±±±`; Field Type Null Key Default Extra ¶¶ char(1) YES MUL NULL -··· char(6) PRI -¸¸¸ char(1) YES MUL NULL +··· char(6) NO PRI +¸¸¸ char(1) YES UNI NULL ¹¹¹ char(1) YES NULL SHOW CREATE TABLE `±±±`; Table Create Table @@ -58,7 +58,7 @@ SELECT * FROM ` ³³³³³ DESC `±±±`; Field Type Null Key Default Extra -··· char(6) +··· char(6) NO SHOW CREATE TABLE `±±±`; Table Create Table ±±± CREATE TABLE `±±±` ( @@ -80,8 +80,8 @@ NULL DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra ‚©‚© char(1) YES MUL NULL -‚«‚«‚« char(6) PRI -‚­‚­‚­ char(1) YES MUL NULL +‚«‚«‚« char(6) NO PRI +‚­‚­‚­ char(1) YES UNI NULL ‚¯‚¯‚¯ char(1) YES NULL SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table @@ -107,7 +107,7 @@ SELECT * FROM ` ‚¤‚¤‚¤‚¤‚¤ DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra -‚«‚«‚« char(6) +‚«‚«‚« char(6) NO SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table ‚ ‚ ‚  CREATE TABLE `‚ ‚ ‚ ` ( @@ -129,8 +129,8 @@ NULL DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra \\ char(1) YES MUL NULL -•\•\•\ char(6) PRI -”\”\”\ char(1) YES MUL NULL +•\•\•\ char(6) NO PRI +”\”\”\ char(1) YES UNI NULL —\—\—\ char(1) YES NULL SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table @@ -156,7 +156,7 @@ SELECT * FROM ` •\•\•\•\•\ DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra -•\•\•\ char(6) +•\•\•\ char(6) NO SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table ƒ\ƒ\ƒ\ CREATE TABLE `ƒ\ƒ\ƒ\` ( @@ -193,8 +193,8 @@ NULL DESC `±±±`; Field Type Null Key Default Extra ¶¶ char(1) YES MUL NULL -··· char(6) PRI -¸¸¸ char(1) YES MUL NULL +··· char(6) NO PRI +¸¸¸ char(1) YES UNI NULL ¹¹¹ char(1) YES NULL SHOW CREATE TABLE `±±±`; Table Create Table @@ -220,7 +220,7 @@ SELECT * FROM ` ³³³³³ DESC `±±±`; Field Type Null Key Default Extra -··· char(6) +··· char(6) NO SHOW CREATE TABLE `±±±`; Table Create Table ±±± CREATE TABLE `±±±` ( @@ -242,8 +242,8 @@ NULL DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra ‚©‚© char(1) YES MUL NULL -‚«‚«‚« char(6) PRI -‚­‚­‚­ char(1) YES MUL NULL +‚«‚«‚« char(6) NO PRI +‚­‚­‚­ char(1) YES UNI NULL ‚¯‚¯‚¯ char(1) YES NULL SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table @@ -269,7 +269,7 @@ SELECT * FROM ` ‚¤‚¤‚¤‚¤‚¤ DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra -‚«‚«‚« char(6) +‚«‚«‚« char(6) NO SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table ‚ ‚ ‚  CREATE TABLE `‚ ‚ ‚ ` ( @@ -291,8 +291,8 @@ NULL DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra \\ char(1) YES MUL NULL -•\•\•\ char(6) PRI -”\”\”\ char(1) YES MUL NULL +•\•\•\ char(6) NO PRI +”\”\”\ char(1) YES UNI NULL —\—\—\ char(1) YES NULL SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table @@ -318,7 +318,7 @@ SELECT * FROM ` ”\”\”\”\”\ DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra -•\•\•\ char(6) +•\•\•\ char(6) NO SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table ƒ\ƒ\ƒ\ CREATE TABLE `ƒ\ƒ\ƒ\` ( @@ -355,8 +355,8 @@ NULL DESC `±±±`; Field Type Null Key Default Extra ¶¶ char(1) YES MUL NULL -··· char(6) PRI -¸¸¸ char(1) YES MUL NULL +··· char(6) NO PRI +¸¸¸ char(1) YES UNI NULL ¹¹¹ char(1) YES NULL SHOW CREATE TABLE `±±±`; Table Create Table @@ -368,7 +368,7 @@ Table Create Table PRIMARY KEY (`···`), UNIQUE KEY `¸¸¸` (`¸¸¸`), KEY `¶¶¶` (`¶¶`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis ALTER TABLE `±±±` DROP INDEX `¶¶¶`; ALTER TABLE `±±±` DROP PRIMARY KEY; ALTER TABLE `±±±` DROP INDEX `¸¸¸`; @@ -382,12 +382,12 @@ SELECT * FROM ` ³³³³³ DESC `±±±`; Field Type Null Key Default Extra -··· char(6) +··· char(6) NO SHOW CREATE TABLE `±±±`; Table Create Table ±±± CREATE TABLE `±±±` ( `···` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis ALTER TABLE `‚ ‚ ‚ ` ADD `‚©‚©‚©` char(1) FIRST; ALTER TABLE `‚ ‚ ‚ ` ADD `‚­‚­‚­` char(1) AFTER `‚«‚«‚«`; ALTER TABLE `‚ ‚ ‚ ` ADD `‚¯‚¯‚¯` char(1); @@ -404,8 +404,8 @@ NULL DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra ‚©‚© char(1) YES MUL NULL -‚«‚«‚« char(6) PRI -‚­‚­‚­ char(1) YES MUL NULL +‚«‚«‚« char(6) NO PRI +‚­‚­‚­ char(1) YES UNI NULL ‚¯‚¯‚¯ char(1) YES NULL SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table @@ -417,7 +417,7 @@ Table Create Table PRIMARY KEY (`‚«‚«‚«`), UNIQUE KEY `‚­‚­‚­` (`‚­‚­‚­`), KEY `‚©‚©‚©` (`‚©‚©`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis ALTER TABLE `‚ ‚ ‚ ` DROP INDEX `‚©‚©‚©`; ALTER TABLE `‚ ‚ ‚ ` DROP PRIMARY KEY; ALTER TABLE `‚ ‚ ‚ ` DROP INDEX `‚­‚­‚­`; @@ -431,12 +431,12 @@ SELECT * FROM ` ‚¤‚¤‚¤‚¤‚¤ DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra -‚«‚«‚« char(6) +‚«‚«‚« char(6) NO SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table ‚ ‚ ‚  CREATE TABLE `‚ ‚ ‚ ` ( `‚«‚«‚«` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis ALTER TABLE `ƒ\ƒ\ƒ\` ADD `\\\` char(1) FIRST; ALTER TABLE `ƒ\ƒ\ƒ\` ADD `”\”\”\` char(1) AFTER `•\•\•\`; ALTER TABLE `ƒ\ƒ\ƒ\` ADD `—\—\—\` char(1); @@ -453,8 +453,8 @@ NULL DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra \\ char(1) YES MUL NULL -•\•\•\ char(6) PRI -”\”\”\ char(1) YES MUL NULL +•\•\•\ char(6) NO PRI +”\”\”\ char(1) YES UNI NULL —\—\—\ char(1) YES NULL SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table @@ -466,7 +466,7 @@ Table Create Table PRIMARY KEY (`•\•\•\`), UNIQUE KEY `”\”\”\` (`”\”\”\`), KEY `\\\` (`\\`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis ALTER TABLE `ƒ\ƒ\ƒ\` DROP INDEX `\\\`; ALTER TABLE `ƒ\ƒ\ƒ\` DROP PRIMARY KEY; ALTER TABLE `ƒ\ƒ\ƒ\` DROP INDEX `”\”\”\`; @@ -480,12 +480,12 @@ SELECT * FROM ` ”\”\”\”\”\ DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra -•\•\•\ char(6) +•\•\•\ char(6) NO SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table ƒ\ƒ\ƒ\ CREATE TABLE `ƒ\ƒ\ƒ\` ( `•\•\•\` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis DROP TABLE `±±±`; DROP TABLE `²²²`; DROP TABLE `‚ ‚ ‚ `; @@ -516,7 +516,7 @@ NULL DESC `±±±`; Field Type Null Key Default Extra ¶¶ char(1) YES MUL NULL -··· char(6) PRI +··· char(6) NO PRI ¸¸¸ char(1) YES NULL ¹¹¹ char(1) YES NULL SHOW CREATE TABLE `±±±`; @@ -541,7 +541,7 @@ SELECT * FROM ` ³³³³³ DESC `±±±`; Field Type Null Key Default Extra -··· char(6) +··· char(6) NO SHOW CREATE TABLE `±±±`; Table Create Table ±±± CREATE TABLE `±±±` ( @@ -562,7 +562,7 @@ NULL DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra ‚©‚© char(1) YES MUL NULL -‚«‚«‚« char(6) PRI +‚«‚«‚« char(6) NO PRI ‚­‚­‚­ char(1) YES NULL ‚¯‚¯‚¯ char(1) YES NULL SHOW CREATE TABLE `‚ ‚ ‚ `; @@ -587,7 +587,7 @@ SELECT * FROM ` ‚¤‚¤‚¤‚¤‚¤ DESC `‚ ‚ ‚ `; Field Type Null Key Default Extra -‚«‚«‚« char(6) +‚«‚«‚« char(6) NO SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table ‚ ‚ ‚  CREATE TABLE `‚ ‚ ‚ ` ( @@ -608,7 +608,7 @@ NULL DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra \\ char(1) YES MUL NULL -•\•\•\ char(6) PRI +•\•\•\ char(6) NO PRI ”\”\”\ char(1) YES NULL —\—\—\ char(1) YES NULL SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; @@ -633,7 +633,7 @@ SELECT * FROM ` •\•\•\•\•\ DESC `ƒ\ƒ\ƒ\`; Field Type Null Key Default Extra -•\•\•\ char(6) +•\•\•\ char(6) NO SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table ƒ\ƒ\ƒ\ CREATE TABLE `ƒ\ƒ\ƒ\` ( diff --git a/mysql-test/suite/jp/r/jp_alter_ucs2.result b/mysql-test/suite/jp/r/jp_alter_ucs2.result index 2756e5a758d..746dfdd62cc 100644 --- a/mysql-test/suite/jp/r/jp_alter_ucs2.result +++ b/mysql-test/suite/jp/r/jp_alter_ucs2.result @@ -32,8 +32,8 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI -ޏޏޏ char(1) YES MUL NULL +Ž·Ž·Ž· char(6) NO PRI +ޏޏޏ char(1) YES UNI NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; Table Create Table @@ -59,7 +59,7 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( @@ -81,8 +81,8 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI -¤¯¤¯¤¯ char(1) YES MUL NULL +¤­¤­¤­ char(6) NO PRI +¤¯¤¯¤¯ char(1) YES UNI NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table @@ -108,7 +108,7 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( @@ -130,8 +130,8 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI -°£°£°£ char(1) YES MUL NULL +°¡°¡°¡ char(6) NO PRI +°£°£°£ char(1) YES UNI NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table @@ -157,7 +157,7 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( @@ -194,8 +194,8 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI -ޏޏޏ char(1) YES MUL NULL +Ž·Ž·Ž· char(6) NO PRI +ޏޏޏ char(1) YES UNI NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; Table Create Table @@ -221,7 +221,7 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( @@ -243,8 +243,8 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI -¤¯¤¯¤¯ char(1) YES MUL NULL +¤­¤­¤­ char(6) NO PRI +¤¯¤¯¤¯ char(1) YES UNI NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table @@ -270,7 +270,7 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( @@ -292,8 +292,8 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI -°£°£°£ char(1) YES MUL NULL +°¡°¡°¡ char(6) NO PRI +°£°£°£ char(1) YES UNI NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table @@ -319,7 +319,7 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( @@ -356,8 +356,8 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI -ޏޏޏ char(1) YES MUL NULL +Ž·Ž·Ž· char(6) NO PRI +ޏޏޏ char(1) YES UNI NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; Table Create Table @@ -369,7 +369,7 @@ Table Create Table PRIMARY KEY (`Ž·Ž·Ž·`), UNIQUE KEY `ޏޏޏ` (`ޏޏޏ`), KEY `޶޶޶` (`޶޶`) -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 ALTER TABLE `ޱޱޱ` DROP INDEX `޶޶޶`; ALTER TABLE `ޱޱޱ` DROP PRIMARY KEY; ALTER TABLE `ޱޱޱ` DROP INDEX `ޏޏޏ`; @@ -383,12 +383,12 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( `Ž·Ž·Ž·` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 ALTER TABLE `¤¢¤¢¤¢` ADD `¤«¤«¤«` char(1) FIRST; ALTER TABLE `¤¢¤¢¤¢` ADD `¤¯¤¯¤¯` char(1) AFTER `¤­¤­¤­`; ALTER TABLE `¤¢¤¢¤¢` ADD `¤±¤±¤±` char(1); @@ -405,8 +405,8 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI -¤¯¤¯¤¯ char(1) YES MUL NULL +¤­¤­¤­ char(6) NO PRI +¤¯¤¯¤¯ char(1) YES UNI NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table @@ -418,7 +418,7 @@ Table Create Table PRIMARY KEY (`¤­¤­¤­`), UNIQUE KEY `¤¯¤¯¤¯` (`¤¯¤¯¤¯`), KEY `¤«¤«¤«` (`¤«¤«`) -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 ALTER TABLE `¤¢¤¢¤¢` DROP INDEX `¤«¤«¤«`; ALTER TABLE `¤¢¤¢¤¢` DROP PRIMARY KEY; ALTER TABLE `¤¢¤¢¤¢` DROP INDEX `¤¯¤¯¤¯`; @@ -432,12 +432,12 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( `¤­¤­¤­` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 ALTER TABLE `íÝíÝíÝ` ADD `°¢°¢°¢` char(1) FIRST; ALTER TABLE `íÝíÝíÝ` ADD `°£°£°£` char(1) AFTER `°¡°¡°¡`; ALTER TABLE `íÝíÝíÝ` ADD `°´°´°´` char(1); @@ -454,8 +454,8 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI -°£°£°£ char(1) YES MUL NULL +°¡°¡°¡ char(6) NO PRI +°£°£°£ char(1) YES UNI NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table @@ -467,7 +467,7 @@ Table Create Table PRIMARY KEY (`°¡°¡°¡`), UNIQUE KEY `°£°£°£` (`°£°£°£`), KEY `°¢°¢°¢` (`°¢°¢`) -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 ALTER TABLE `íÝíÝíÝ` DROP INDEX `°¢°¢°¢`; ALTER TABLE `íÝíÝíÝ` DROP PRIMARY KEY; ALTER TABLE `íÝíÝíÝ` DROP INDEX `°£°£°£`; @@ -481,12 +481,12 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( `°¡°¡°¡` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 DROP TABLE `ޱޱޱ`; DROP TABLE `޲޲޲`; DROP TABLE `¤¢¤¢¤¢`; @@ -517,7 +517,7 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI +Ž·Ž·Ž· char(6) NO PRI ޏޏޏ char(1) YES NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; @@ -542,7 +542,7 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( @@ -563,7 +563,7 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI +¤­¤­¤­ char(6) NO PRI ¤¯¤¯¤¯ char(1) YES NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; @@ -588,7 +588,7 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( @@ -609,7 +609,7 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI +°¡°¡°¡ char(6) NO PRI °£°£°£ char(1) YES NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; @@ -634,7 +634,7 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( diff --git a/mysql-test/suite/jp/r/jp_alter_ujis.result b/mysql-test/suite/jp/r/jp_alter_ujis.result index afa3c79cbce..daea68caa3f 100644 --- a/mysql-test/suite/jp/r/jp_alter_ujis.result +++ b/mysql-test/suite/jp/r/jp_alter_ujis.result @@ -31,8 +31,8 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI -ޏޏޏ char(1) YES MUL NULL +Ž·Ž·Ž· char(6) NO PRI +ޏޏޏ char(1) YES UNI NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; Table Create Table @@ -58,7 +58,7 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( @@ -80,8 +80,8 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI -¤¯¤¯¤¯ char(1) YES MUL NULL +¤­¤­¤­ char(6) NO PRI +¤¯¤¯¤¯ char(1) YES UNI NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table @@ -107,7 +107,7 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( @@ -129,8 +129,8 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI -°£°£°£ char(1) YES MUL NULL +°¡°¡°¡ char(6) NO PRI +°£°£°£ char(1) YES UNI NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table @@ -156,7 +156,7 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( @@ -193,8 +193,8 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI -ޏޏޏ char(1) YES MUL NULL +Ž·Ž·Ž· char(6) NO PRI +ޏޏޏ char(1) YES UNI NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; Table Create Table @@ -220,7 +220,7 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( @@ -242,8 +242,8 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI -¤¯¤¯¤¯ char(1) YES MUL NULL +¤­¤­¤­ char(6) NO PRI +¤¯¤¯¤¯ char(1) YES UNI NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table @@ -269,7 +269,7 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( @@ -291,8 +291,8 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI -°£°£°£ char(1) YES MUL NULL +°¡°¡°¡ char(6) NO PRI +°£°£°£ char(1) YES UNI NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table @@ -318,7 +318,7 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( @@ -355,8 +355,8 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI -ޏޏޏ char(1) YES MUL NULL +Ž·Ž·Ž· char(6) NO PRI +ޏޏޏ char(1) YES UNI NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; Table Create Table @@ -368,7 +368,7 @@ Table Create Table PRIMARY KEY (`Ž·Ž·Ž·`), UNIQUE KEY `ޏޏޏ` (`ޏޏޏ`), KEY `޶޶޶` (`޶޶`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis ALTER TABLE `ޱޱޱ` DROP INDEX `޶޶޶`; ALTER TABLE `ޱޱޱ` DROP PRIMARY KEY; ALTER TABLE `ޱޱޱ` DROP INDEX `ޏޏޏ`; @@ -382,12 +382,12 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( `Ž·Ž·Ž·` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis ALTER TABLE `¤¢¤¢¤¢` ADD `¤«¤«¤«` char(1) FIRST; ALTER TABLE `¤¢¤¢¤¢` ADD `¤¯¤¯¤¯` char(1) AFTER `¤­¤­¤­`; ALTER TABLE `¤¢¤¢¤¢` ADD `¤±¤±¤±` char(1); @@ -404,8 +404,8 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI -¤¯¤¯¤¯ char(1) YES MUL NULL +¤­¤­¤­ char(6) NO PRI +¤¯¤¯¤¯ char(1) YES UNI NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table @@ -417,7 +417,7 @@ Table Create Table PRIMARY KEY (`¤­¤­¤­`), UNIQUE KEY `¤¯¤¯¤¯` (`¤¯¤¯¤¯`), KEY `¤«¤«¤«` (`¤«¤«`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis ALTER TABLE `¤¢¤¢¤¢` DROP INDEX `¤«¤«¤«`; ALTER TABLE `¤¢¤¢¤¢` DROP PRIMARY KEY; ALTER TABLE `¤¢¤¢¤¢` DROP INDEX `¤¯¤¯¤¯`; @@ -431,12 +431,12 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( `¤­¤­¤­` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis ALTER TABLE `íÝíÝíÝ` ADD `°¢°¢°¢` char(1) FIRST; ALTER TABLE `íÝíÝíÝ` ADD `°£°£°£` char(1) AFTER `°¡°¡°¡`; ALTER TABLE `íÝíÝíÝ` ADD `°´°´°´` char(1); @@ -453,8 +453,8 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI -°£°£°£ char(1) YES MUL NULL +°¡°¡°¡ char(6) NO PRI +°£°£°£ char(1) YES UNI NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table @@ -466,7 +466,7 @@ Table Create Table PRIMARY KEY (`°¡°¡°¡`), UNIQUE KEY `°£°£°£` (`°£°£°£`), KEY `°¢°¢°¢` (`°¢°¢`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis ALTER TABLE `íÝíÝíÝ` DROP INDEX `°¢°¢°¢`; ALTER TABLE `íÝíÝíÝ` DROP PRIMARY KEY; ALTER TABLE `íÝíÝíÝ` DROP INDEX `°£°£°£`; @@ -480,12 +480,12 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( `°¡°¡°¡` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis DROP TABLE `ޱޱޱ`; DROP TABLE `޲޲޲`; DROP TABLE `¤¢¤¢¤¢`; @@ -516,7 +516,7 @@ NULL DESC `ޱޱޱ`; Field Type Null Key Default Extra ޶޶ char(1) YES MUL NULL -Ž·Ž·Ž· char(6) PRI +Ž·Ž·Ž· char(6) NO PRI ޏޏޏ char(1) YES NULL ޹޹޹ char(1) YES NULL SHOW CREATE TABLE `ޱޱޱ`; @@ -541,7 +541,7 @@ SELECT * FROM ` ޳޳޳޳޳ DESC `ޱޱޱ`; Field Type Null Key Default Extra -Ž·Ž·Ž· char(6) +Ž·Ž·Ž· char(6) NO SHOW CREATE TABLE `ޱޱޱ`; Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( @@ -562,7 +562,7 @@ NULL DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra ¤«¤« char(1) YES MUL NULL -¤­¤­¤­ char(6) PRI +¤­¤­¤­ char(6) NO PRI ¤¯¤¯¤¯ char(1) YES NULL ¤±¤±¤± char(1) YES NULL SHOW CREATE TABLE `¤¢¤¢¤¢`; @@ -587,7 +587,7 @@ SELECT * FROM ` ¤¦¤¦¤¦¤¦¤¦ DESC `¤¢¤¢¤¢`; Field Type Null Key Default Extra -¤­¤­¤­ char(6) +¤­¤­¤­ char(6) NO SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( @@ -608,7 +608,7 @@ NULL DESC `íÝíÝíÝ`; Field Type Null Key Default Extra °¢°¢ char(1) YES MUL NULL -°¡°¡°¡ char(6) PRI +°¡°¡°¡ char(6) NO PRI °£°£°£ char(1) YES NULL °´°´°´ char(1) YES NULL SHOW CREATE TABLE `íÝíÝíÝ`; @@ -633,7 +633,7 @@ SELECT * FROM ` °£°£°£°£°£ DESC `íÝíÝíÝ`; Field Type Null Key Default Extra -°¡°¡°¡ char(6) +°¡°¡°¡ char(6) NO SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( diff --git a/mysql-test/suite/jp/r/jp_alter_utf8.result b/mysql-test/suite/jp/r/jp_alter_utf8.result index 19475e06a87..f2f374eed87 100644 --- a/mysql-test/suite/jp/r/jp_alter_utf8.result +++ b/mysql-test/suite/jp/r/jp_alter_utf8.result @@ -31,8 +31,8 @@ NULL ウウウウウ NULL NULL DESC `アアア`; Field Type Null Key Default Extra ï½¶ï½¶ char(1) YES MUL NULL -ï½·ï½·ï½· char(6) PRI -ククク char(1) YES MUL NULL +ï½·ï½·ï½· char(6) NO PRI +ククク char(1) YES UNI NULL ケケケ char(1) YES NULL SHOW CREATE TABLE `アアア`; Table Create Table @@ -58,7 +58,7 @@ SELECT * FROM `アアア`; ウウウウウ DESC `アアア`; Field Type Null Key Default Extra -ï½·ï½·ï½· char(6) +ï½·ï½·ï½· char(6) NO SHOW CREATE TABLE `アアア`; Table Create Table アアア CREATE TABLE `アアア` ( @@ -80,8 +80,8 @@ NULL ã†ã†ã†ã†ã† NULL NULL DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra ã‹ã‹ char(1) YES MUL NULL -ããã char(6) PRI -ããã char(1) YES MUL NULL +ããã char(6) NO PRI +ããã char(1) YES UNI NULL ã‘ã‘ã‘ char(1) YES NULL SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table @@ -107,7 +107,7 @@ SELECT * FROM `ã‚ã‚ã‚`; ã†ã†ã†ã†ã† DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra -ããã char(6) +ããã char(6) NO SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table ã‚ã‚ã‚ CREATE TABLE `ã‚ã‚ã‚` ( @@ -129,8 +129,8 @@ NULL 丅丅丅丅丅 NULL NULL DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra 丄丄 char(1) YES MUL NULL -丂丂丂 char(6) PRI -丅丅丅 char(1) YES MUL NULL +丂丂丂 char(6) NO PRI +丅丅丅 char(1) YES UNI NULL 乚乚乚 char(1) YES NULL SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table @@ -156,7 +156,7 @@ SELECT * FROM `é¾–é¾–é¾–`; 丅丅丅丅丅 DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra -丂丂丂 char(6) +丂丂丂 char(6) NO SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table é¾–é¾–é¾– CREATE TABLE `é¾–é¾–é¾–` ( @@ -193,8 +193,8 @@ NULL ウウウウウ NULL NULL DESC `アアア`; Field Type Null Key Default Extra ï½¶ï½¶ char(1) YES MUL NULL -ï½·ï½·ï½· char(6) PRI -ククク char(1) YES MUL NULL +ï½·ï½·ï½· char(6) NO PRI +ククク char(1) YES UNI NULL ケケケ char(1) YES NULL SHOW CREATE TABLE `アアア`; Table Create Table @@ -220,7 +220,7 @@ SELECT * FROM `アアア`; ウウウウウ DESC `アアア`; Field Type Null Key Default Extra -ï½·ï½·ï½· char(6) +ï½·ï½·ï½· char(6) NO SHOW CREATE TABLE `アアア`; Table Create Table アアア CREATE TABLE `アアア` ( @@ -242,8 +242,8 @@ NULL ã†ã†ã†ã†ã† NULL NULL DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra ã‹ã‹ char(1) YES MUL NULL -ããã char(6) PRI -ããã char(1) YES MUL NULL +ããã char(6) NO PRI +ããã char(1) YES UNI NULL ã‘ã‘ã‘ char(1) YES NULL SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table @@ -269,7 +269,7 @@ SELECT * FROM `ã‚ã‚ã‚`; ã†ã†ã†ã†ã† DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra -ããã char(6) +ããã char(6) NO SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table ã‚ã‚ã‚ CREATE TABLE `ã‚ã‚ã‚` ( @@ -291,8 +291,8 @@ NULL 丅丅丅丅丅 NULL NULL DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra 丄丄 char(1) YES MUL NULL -丂丂丂 char(6) PRI -丅丅丅 char(1) YES MUL NULL +丂丂丂 char(6) NO PRI +丅丅丅 char(1) YES UNI NULL 乚乚乚 char(1) YES NULL SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table @@ -318,7 +318,7 @@ SELECT * FROM `é¾–é¾–é¾–`; 丅丅丅丅丅 DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra -丂丂丂 char(6) +丂丂丂 char(6) NO SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table é¾–é¾–é¾– CREATE TABLE `é¾–é¾–é¾–` ( @@ -355,8 +355,8 @@ NULL ウウウウウ NULL NULL DESC `アアア`; Field Type Null Key Default Extra ï½¶ï½¶ char(1) YES MUL NULL -ï½·ï½·ï½· char(6) PRI -ククク char(1) YES MUL NULL +ï½·ï½·ï½· char(6) NO PRI +ククク char(1) YES UNI NULL ケケケ char(1) YES NULL SHOW CREATE TABLE `アアア`; Table Create Table @@ -368,7 +368,7 @@ Table Create Table PRIMARY KEY (`ï½·ï½·ï½·`), UNIQUE KEY `ククク` (`ククク`), KEY `ï½¶ï½¶ï½¶` (`ï½¶ï½¶`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 ALTER TABLE `アアア` DROP INDEX `ï½¶ï½¶ï½¶`; ALTER TABLE `アアア` DROP PRIMARY KEY; ALTER TABLE `アアア` DROP INDEX `ククク`; @@ -382,12 +382,12 @@ SELECT * FROM `アアア`; ウウウウウ DESC `アアア`; Field Type Null Key Default Extra -ï½·ï½·ï½· char(6) +ï½·ï½·ï½· char(6) NO SHOW CREATE TABLE `アアア`; Table Create Table アアア CREATE TABLE `アアア` ( `ï½·ï½·ï½·` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 ALTER TABLE `ã‚ã‚ã‚` ADD `ã‹ã‹ã‹` char(1) FIRST; ALTER TABLE `ã‚ã‚ã‚` ADD `ããã` char(1) AFTER `ããã`; ALTER TABLE `ã‚ã‚ã‚` ADD `ã‘ã‘ã‘` char(1); @@ -404,8 +404,8 @@ NULL ã†ã†ã†ã†ã† NULL NULL DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra ã‹ã‹ char(1) YES MUL NULL -ããã char(6) PRI -ããã char(1) YES MUL NULL +ããã char(6) NO PRI +ããã char(1) YES UNI NULL ã‘ã‘ã‘ char(1) YES NULL SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table @@ -417,7 +417,7 @@ Table Create Table PRIMARY KEY (`ããã`), UNIQUE KEY `ããã` (`ããã`), KEY `ã‹ã‹ã‹` (`ã‹ã‹`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 ALTER TABLE `ã‚ã‚ã‚` DROP INDEX `ã‹ã‹ã‹`; ALTER TABLE `ã‚ã‚ã‚` DROP PRIMARY KEY; ALTER TABLE `ã‚ã‚ã‚` DROP INDEX `ããã`; @@ -431,12 +431,12 @@ SELECT * FROM `ã‚ã‚ã‚`; ã†ã†ã†ã†ã† DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra -ããã char(6) +ããã char(6) NO SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table ã‚ã‚ã‚ CREATE TABLE `ã‚ã‚ã‚` ( `ããã` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 ALTER TABLE `é¾–é¾–é¾–` ADD `丄丄丄` char(1) FIRST; ALTER TABLE `é¾–é¾–é¾–` ADD `丅丅丅` char(1) AFTER `丂丂丂`; ALTER TABLE `é¾–é¾–é¾–` ADD `乚乚乚` char(1); @@ -453,8 +453,8 @@ NULL 丅丅丅丅丅 NULL NULL DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra 丄丄 char(1) YES MUL NULL -丂丂丂 char(6) PRI -丅丅丅 char(1) YES MUL NULL +丂丂丂 char(6) NO PRI +丅丅丅 char(1) YES UNI NULL 乚乚乚 char(1) YES NULL SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table @@ -466,7 +466,7 @@ Table Create Table PRIMARY KEY (`丂丂丂`), UNIQUE KEY `丅丅丅` (`丅丅丅`), KEY `丄丄丄` (`丄丄`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 ALTER TABLE `é¾–é¾–é¾–` DROP INDEX `丄丄丄`; ALTER TABLE `é¾–é¾–é¾–` DROP PRIMARY KEY; ALTER TABLE `é¾–é¾–é¾–` DROP INDEX `丅丅丅`; @@ -480,12 +480,12 @@ SELECT * FROM `é¾–é¾–é¾–`; 丅丅丅丅丅 DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra -丂丂丂 char(6) +丂丂丂 char(6) NO SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table é¾–é¾–é¾– CREATE TABLE `é¾–é¾–é¾–` ( `丂丂丂` char(6) NOT NULL default '' -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 DROP TABLE `アアア`; DROP TABLE `イイイ`; DROP TABLE `ã‚ã‚ã‚`; @@ -516,7 +516,7 @@ NULL ウウウウウ NULL NULL DESC `アアア`; Field Type Null Key Default Extra ï½¶ï½¶ char(1) YES MUL NULL -ï½·ï½·ï½· char(6) PRI +ï½·ï½·ï½· char(6) NO PRI ククク char(1) YES NULL ケケケ char(1) YES NULL SHOW CREATE TABLE `アアア`; @@ -541,7 +541,7 @@ SELECT * FROM `アアア`; ウウウウウ DESC `アアア`; Field Type Null Key Default Extra -ï½·ï½·ï½· char(6) +ï½·ï½·ï½· char(6) NO SHOW CREATE TABLE `アアア`; Table Create Table アアア CREATE TABLE `アアア` ( @@ -562,7 +562,7 @@ NULL ã†ã†ã†ã†ã† NULL NULL DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra ã‹ã‹ char(1) YES MUL NULL -ããã char(6) PRI +ããã char(6) NO PRI ããã char(1) YES NULL ã‘ã‘ã‘ char(1) YES NULL SHOW CREATE TABLE `ã‚ã‚ã‚`; @@ -587,7 +587,7 @@ SELECT * FROM `ã‚ã‚ã‚`; ã†ã†ã†ã†ã† DESC `ã‚ã‚ã‚`; Field Type Null Key Default Extra -ããã char(6) +ããã char(6) NO SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table ã‚ã‚ã‚ CREATE TABLE `ã‚ã‚ã‚` ( @@ -608,7 +608,7 @@ NULL 丅丅丅丅丅 NULL NULL DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra 丄丄 char(1) YES MUL NULL -丂丂丂 char(6) PRI +丂丂丂 char(6) NO PRI 丅丅丅 char(1) YES NULL 乚乚乚 char(1) YES NULL SHOW CREATE TABLE `é¾–é¾–é¾–`; @@ -633,7 +633,7 @@ SELECT * FROM `é¾–é¾–é¾–`; 丅丅丅丅丅 DESC `é¾–é¾–é¾–`; Field Type Null Key Default Extra -丂丂丂 char(6) +丂丂丂 char(6) NO SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table é¾–é¾–é¾– CREATE TABLE `é¾–é¾–é¾–` ( diff --git a/mysql-test/suite/jp/r/jp_convert_sjis.result b/mysql-test/suite/jp/r/jp_convert_sjis.result index 8c9df3606c8..ff8a3fb2cd9 100644 --- a/mysql-test/suite/jp/r/jp_convert_sjis.result +++ b/mysql-test/suite/jp/r/jp_convert_sjis.result @@ -278,12 +278,15 @@ SELECT ` êê‘ê’ê“ê”ê•ê–ê—ê˜ê™êšê›êœêêžEEEEE êê‘ê’ê“ê”ê•ê–ê—ê˜ê™êšê›êœêêžEEEEE SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚R`; ‚b‚P CONVERT(`‚b‚P` using utf8) + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚R`; ‚b‚P CONVERT(`‚b‚P` using ucs2) + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚R`; ‚b‚P CONVERT(`‚b‚P` using ujis) + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚S`; ‚b‚P CONVERT(`‚b‚P` using utf8) @@ -527,12 +530,15 @@ SELECT ` êê‘ê’ê“ê”ê•ê–ê—ê˜ê™êšê›êœêêžEEEEE êê‘ê’ê“ê”ê•ê–ê—ê˜ê™êšê›êœêêžEEEEE SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚U`; ‚b‚P CONVERT(`‚b‚P` using utf8) + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚U`; ‚b‚P CONVERT(`‚b‚P` using ucs2) + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚U`; ‚b‚P CONVERT(`‚b‚P` using ujis) + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚V`; ‚b‚P CONVERT(`‚b‚P` using utf8) @@ -777,12 +783,15 @@ SELECT ` SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚X`; ‚b‚P CONVERT(`‚b‚P` using utf8) ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚X`; ‚b‚P CONVERT(`‚b‚P` using ucs2) ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚X`; ‚b‚P CONVERT(`‚b‚P` using ujis) ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚O`; ‚b‚P CONVERT(`‚b‚P` using utf8) !"#$%&'()*+,-./ !"#$%&'()*+,-./ @@ -1026,12 +1035,15 @@ SELECT ` SELECT `‚b‚P`, CONVERT(`‚b‚P` using utf8) FROM `‚s‚P‚Q`; ‚b‚P CONVERT(`‚b‚P` using utf8) ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + SELECT `‚b‚P`, CONVERT(`‚b‚P` using ucs2) FROM `‚s‚P‚Q`; ‚b‚P CONVERT(`‚b‚P` using ucs2) ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + SELECT `‚b‚P`, CONVERT(`‚b‚P` using ujis) FROM `‚s‚P‚Q`; ‚b‚P CONVERT(`‚b‚P` using ujis) ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + drop table `‚s‚P`; drop table `‚s‚Q`; drop table `‚s‚R`; diff --git a/mysql-test/suite/jp/r/jp_create_db_sjis.result b/mysql-test/suite/jp/r/jp_create_db_sjis.result index 1ce0b7228d5..5d13cf74a39 100644 --- a/mysql-test/suite/jp/r/jp_create_db_sjis.result +++ b/mysql-test/suite/jp/r/jp_create_db_sjis.result @@ -8,6 +8,7 @@ CREATE DATABASE ` CREATE DATABASE `ƒ\\•\`; SHOW DATABASES; Database +information_schema mysql test ƒ\\•\ diff --git a/mysql-test/suite/jp/r/jp_create_db_ucs2.result b/mysql-test/suite/jp/r/jp_create_db_ucs2.result index 8fd921ea8e6..f03baadf707 100644 --- a/mysql-test/suite/jp/r/jp_create_db_ucs2.result +++ b/mysql-test/suite/jp/r/jp_create_db_ucs2.result @@ -9,6 +9,7 @@ CREATE DATABASE ` CREATE DATABASE `íÜíÝíÞ`; SHOW DATABASES; Database +information_schema mysql test ÆüËܸì diff --git a/mysql-test/suite/jp/r/jp_create_db_ujis.result b/mysql-test/suite/jp/r/jp_create_db_ujis.result index 45fdb34717b..627381bbacb 100644 --- a/mysql-test/suite/jp/r/jp_create_db_ujis.result +++ b/mysql-test/suite/jp/r/jp_create_db_ujis.result @@ -8,6 +8,7 @@ CREATE DATABASE ` CREATE DATABASE `íÜíÝíÞ`; SHOW DATABASES; Database +information_schema mysql test ÆüËܸì diff --git a/mysql-test/suite/jp/r/jp_create_db_utf8.result b/mysql-test/suite/jp/r/jp_create_db_utf8.result index c0e996040de..1813259bdc9 100644 --- a/mysql-test/suite/jp/r/jp_create_db_utf8.result +++ b/mysql-test/suite/jp/r/jp_create_db_utf8.result @@ -8,6 +8,7 @@ CREATE DATABASE `日本語`; CREATE DATABASE `龔龖龗`; SHOW DATABASES; Database +information_schema mysql test 日本語 diff --git a/mysql-test/suite/jp/r/jp_create_tbl_sjis.result b/mysql-test/suite/jp/r/jp_create_tbl_sjis.result index ecc72f9d91b..763a25bc127 100644 --- a/mysql-test/suite/jp/r/jp_create_tbl_sjis.result +++ b/mysql-test/suite/jp/r/jp_create_tbl_sjis.result @@ -22,11 +22,23 @@ CREATE TABLE ` CREATE TABLE `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=INNODB; CREATE TABLE `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=INNODB; CREATE TABLE IF NOT EXISTS `±±±`(`¶¶¶` char(1)) DEFAULT CHARSET = sjis engine=INNODB; +Warnings: +Note 1050 Table '±±±' already exists CREATE TABLE IF NOT EXISTS `²²²`(`···` char(1)) DEFAULT CHARSET = sjis engine=INNODB; +Warnings: +Note 1050 Table '²²²' already exists CREATE TABLE IF NOT EXISTS `‚ ‚ ‚ `(`‚©‚©‚©` char(1)) DEFAULT CHARSET = sjis engine=INNODB; +Warnings: +Note 1050 Table '‚ ‚ ‚ ' already exists CREATE TABLE IF NOT EXISTS `‚¢‚¢‚¢`(`‚«‚«‚«` char(1)) DEFAULT CHARSET = sjis engine=INNODB; +Warnings: +Note 1050 Table '‚¢‚¢‚¢' already exists CREATE TABLE IF NOT EXISTS `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=INNODB; +Warnings: +Note 1050 Table 'ƒ\ƒ\ƒ\' already exists CREATE TABLE IF NOT EXISTS `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=INNODB; +Warnings: +Note 1050 Table '\\\' already exists CREATE TABLE IF NOT EXISTS `³³³`(`¸¸¸` char(1)) DEFAULT CHARSET = sjis engine=INNODB; CREATE TABLE IF NOT EXISTS `‚¤‚¤‚¤`(`‚­‚­‚­` char(1)) DEFAULT CHARSET = sjis engine=INNODB; CREATE TABLE IF NOT EXISTS `•\•\•\`(`\\\`char(1)) DEFAULT CHARSET = sjis engine=INNODB; @@ -178,11 +190,23 @@ CREATE TABLE ` CREATE TABLE `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; CREATE TABLE `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; CREATE TABLE IF NOT EXISTS `±±±`(`¶¶¶` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; +Warnings: +Note 1050 Table '±±±' already exists CREATE TABLE IF NOT EXISTS `²²²`(`···` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; +Warnings: +Note 1050 Table '²²²' already exists CREATE TABLE IF NOT EXISTS `‚ ‚ ‚ `(`‚©‚©‚©` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; +Warnings: +Note 1050 Table '‚ ‚ ‚ ' already exists CREATE TABLE IF NOT EXISTS `‚¢‚¢‚¢`(`‚«‚«‚«` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; +Warnings: +Note 1050 Table '‚¢‚¢‚¢' already exists CREATE TABLE IF NOT EXISTS `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; +Warnings: +Note 1050 Table 'ƒ\ƒ\ƒ\' already exists CREATE TABLE IF NOT EXISTS `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; +Warnings: +Note 1050 Table '\\\' already exists CREATE TABLE IF NOT EXISTS `³³³`(`¸¸¸` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; CREATE TABLE IF NOT EXISTS `‚¤‚¤‚¤`(`‚­‚­‚­` char(1)) DEFAULT CHARSET = sjis engine=MyISAM; CREATE TABLE IF NOT EXISTS `•\•\•\`(`\\\`char(1)) DEFAULT CHARSET = sjis engine=MyISAM; @@ -334,11 +358,23 @@ CREATE TABLE ` CREATE TABLE `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=HEAP; CREATE TABLE `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=HEAP; CREATE TABLE IF NOT EXISTS `±±±`(`¶¶¶` char(1)) DEFAULT CHARSET = sjis engine=HEAP; +Warnings: +Note 1050 Table '±±±' already exists CREATE TABLE IF NOT EXISTS `²²²`(`···` char(1)) DEFAULT CHARSET = sjis engine=HEAP; +Warnings: +Note 1050 Table '²²²' already exists CREATE TABLE IF NOT EXISTS `‚ ‚ ‚ `(`‚©‚©‚©` char(1)) DEFAULT CHARSET = sjis engine=HEAP; +Warnings: +Note 1050 Table '‚ ‚ ‚ ' already exists CREATE TABLE IF NOT EXISTS `‚¢‚¢‚¢`(`‚«‚«‚«` char(1)) DEFAULT CHARSET = sjis engine=HEAP; +Warnings: +Note 1050 Table '‚¢‚¢‚¢' already exists CREATE TABLE IF NOT EXISTS `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=HEAP; +Warnings: +Note 1050 Table 'ƒ\ƒ\ƒ\' already exists CREATE TABLE IF NOT EXISTS `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=HEAP; +Warnings: +Note 1050 Table '\\\' already exists CREATE TABLE IF NOT EXISTS `³³³`(`¸¸¸` char(1)) DEFAULT CHARSET = sjis engine=HEAP; CREATE TABLE IF NOT EXISTS `‚¤‚¤‚¤`(`‚­‚­‚­` char(1)) DEFAULT CHARSET = sjis engine=HEAP; CREATE TABLE IF NOT EXISTS `•\•\•\`(`\\\`char(1)) DEFAULT CHARSET = sjis engine=HEAP; @@ -397,77 +433,77 @@ SHOW CREATE TABLE ` Table Create Table ±±± CREATE TABLE `±±±` ( `¶¶¶` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `²²²`; Table Create Table ²²² CREATE TABLE `²²²` ( `···` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `³³³`; Table Create Table ³³³ CREATE TABLE `³³³` ( `¸¸¸` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `´´´`; Table Create Table ´´´ CREATE TEMPORARY TABLE `´´´` ( `¹¹¹` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `µµµ`; Table Create Table µµµ CREATE TEMPORARY TABLE `µµµ` ( `ººº` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚ ‚ ‚ `; Table Create Table ‚ ‚ ‚  CREATE TABLE `‚ ‚ ‚ ` ( `‚©‚©‚©` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚¢‚¢‚¢`; Table Create Table ‚¢‚¢‚¢ CREATE TABLE `‚¢‚¢‚¢` ( `‚«‚«‚«` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚¤‚¤‚¤`; Table Create Table ‚¤‚¤‚¤ CREATE TABLE `‚¤‚¤‚¤` ( `‚­‚­‚­` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚¦‚¦‚¦`; Table Create Table ‚¦‚¦‚¦ CREATE TEMPORARY TABLE `‚¦‚¦‚¦` ( `‚¯‚¯‚¯` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚¨‚¨‚¨`; Table Create Table ‚¨‚¨‚¨ CREATE TEMPORARY TABLE `‚¨‚¨‚¨` ( `‚±‚±‚±` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `ƒ\ƒ\ƒ\`; Table Create Table ƒ\ƒ\ƒ\ CREATE TABLE `ƒ\ƒ\ƒ\` ( `‰\‰\‰\` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `\\\`; Table Create Table \\\ CREATE TABLE `\\\` ( `Ž\Ž\Ž\` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `•\•\•\`; Table Create Table •\•\•\ CREATE TABLE `•\•\•\` ( `\\\` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `—\—\—\`; Table Create Table —\—\—\ CREATE TEMPORARY TABLE `—\—\—\` ( `“\“\“\` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `\\\`; Table Create Table \\\ CREATE TEMPORARY TABLE `\\\` ( `”\”\”\` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis DROP TABLE `±±±`; DROP TABLE `²²²`; DROP TABLE `³³³`; @@ -490,11 +526,23 @@ CREATE TABLE ` CREATE TABLE `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=BDB; CREATE TABLE `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=BDB; CREATE TABLE IF NOT EXISTS `±±±`(`¶¶¶` char(1)) DEFAULT CHARSET = sjis engine=BDB; +Warnings: +Note 1050 Table '±±±' already exists CREATE TABLE IF NOT EXISTS `²²²`(`···` char(1)) DEFAULT CHARSET = sjis engine=BDB; +Warnings: +Note 1050 Table '²²²' already exists CREATE TABLE IF NOT EXISTS `‚ ‚ ‚ `(`‚©‚©‚©` char(1)) DEFAULT CHARSET = sjis engine=BDB; +Warnings: +Note 1050 Table '‚ ‚ ‚ ' already exists CREATE TABLE IF NOT EXISTS `‚¢‚¢‚¢`(`‚«‚«‚«` char(1)) DEFAULT CHARSET = sjis engine=BDB; +Warnings: +Note 1050 Table '‚¢‚¢‚¢' already exists CREATE TABLE IF NOT EXISTS `ƒ\ƒ\ƒ\`(`‰\‰\‰\` char(1)) DEFAULT CHARSET = sjis engine=BDB; +Warnings: +Note 1050 Table 'ƒ\ƒ\ƒ\' already exists CREATE TABLE IF NOT EXISTS `\\\`(`Ž\Ž\Ž\` char(1)) DEFAULT CHARSET = sjis engine=BDB; +Warnings: +Note 1050 Table '\\\' already exists CREATE TABLE IF NOT EXISTS `³³³`(`¸¸¸` char(1)) DEFAULT CHARSET = sjis engine=BDB; CREATE TABLE IF NOT EXISTS `‚¤‚¤‚¤`(`‚­‚­‚­` char(1)) DEFAULT CHARSET = sjis engine=BDB; CREATE TABLE IF NOT EXISTS `•\•\•\`(`\\\`char(1)) DEFAULT CHARSET = sjis engine=BDB; diff --git a/mysql-test/suite/jp/r/jp_create_tbl_ucs2.result b/mysql-test/suite/jp/r/jp_create_tbl_ucs2.result index 0bf5a6891b0..d6616f66d9f 100644 --- a/mysql-test/suite/jp/r/jp_create_tbl_ucs2.result +++ b/mysql-test/suite/jp/r/jp_create_tbl_ucs2.result @@ -22,11 +22,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ucs2 engine=INNODB; @@ -178,11 +190,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ucs2 engine=MyISAM; @@ -334,11 +358,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ucs2 engine=HEAP; @@ -397,77 +433,77 @@ SHOW CREATE TABLE ` Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( `޶޶޶` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `޲޲޲`; Table Create Table ޲޲޲ CREATE TABLE `޲޲޲` ( `Ž·Ž·Ž·` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `޳޳޳`; Table Create Table ޳޳޳ CREATE TABLE `޳޳޳` ( `ޏޏޏ` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `Ž´Ž´Ž´`; Table Create Table Ž´Ž´Ž´ CREATE TEMPORARY TABLE `Ž´Ž´Ž´` ( `޹޹޹` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `޵޵޵`; Table Create Table ޵޵޵ CREATE TEMPORARY TABLE `޵޵޵` ( `ŽºŽºŽº` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( `¤«¤«¤«` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `¤¤¤¤¤¤`; Table Create Table ¤¤¤¤¤¤ CREATE TABLE `¤¤¤¤¤¤` ( `¤­¤­¤­` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `¤¦¤¦¤¦`; Table Create Table ¤¦¤¦¤¦ CREATE TABLE `¤¦¤¦¤¦` ( `¤¯¤¯¤¯` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `¤¨¤¨¤¨`; Table Create Table ¤¨¤¨¤¨ CREATE TEMPORARY TABLE `¤¨¤¨¤¨` ( `¤±¤±¤±` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `¤ª¤ª¤ª`; Table Create Table ¤ª¤ª¤ª CREATE TEMPORARY TABLE `¤ª¤ª¤ª` ( `¤³¤³¤³` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( `°¡°¡°¡` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `íÞíÞíÞ`; Table Create Table íÞíÞíÞ CREATE TABLE `íÞíÞíÞ` ( `°¢°¢°¢` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `íßíßíß`; Table Create Table íßíßíß CREATE TABLE `íßíßíß` ( `°£°£°£` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `íàíàíà`; Table Create Table íàíàíà CREATE TEMPORARY TABLE `íàíàíà` ( `°¤°¤°¤` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `íáíáíá`; Table Create Table íáíáíá CREATE TEMPORARY TABLE `íáíáíá` ( `°¥°¥°¥` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 DROP TABLE `ޱޱޱ`; DROP TABLE `޲޲޲`; DROP TABLE `޳޳޳`; @@ -490,11 +526,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ucs2 engine=BDB; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ucs2 engine=BDB; diff --git a/mysql-test/suite/jp/r/jp_create_tbl_ujis.result b/mysql-test/suite/jp/r/jp_create_tbl_ujis.result index ae555e5af15..f53e1e58793 100644 --- a/mysql-test/suite/jp/r/jp_create_tbl_ujis.result +++ b/mysql-test/suite/jp/r/jp_create_tbl_ujis.result @@ -22,11 +22,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=INNODB; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=INNODB; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ujis engine=INNODB; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ujis engine=INNODB; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ujis engine=INNODB; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ujis engine=INNODB; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=INNODB; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=INNODB; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ujis engine=INNODB; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ujis engine=INNODB; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ujis engine=INNODB; @@ -178,11 +190,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ujis engine=MyISAM; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ujis engine=MyISAM; @@ -334,11 +358,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=HEAP; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=HEAP; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ujis engine=HEAP; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ujis engine=HEAP; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ujis engine=HEAP; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ujis engine=HEAP; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=HEAP; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=HEAP; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ujis engine=HEAP; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ujis engine=HEAP; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ujis engine=HEAP; @@ -397,77 +433,77 @@ SHOW CREATE TABLE ` Table Create Table ޱޱޱ CREATE TABLE `ޱޱޱ` ( `޶޶޶` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `޲޲޲`; Table Create Table ޲޲޲ CREATE TABLE `޲޲޲` ( `Ž·Ž·Ž·` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `޳޳޳`; Table Create Table ޳޳޳ CREATE TABLE `޳޳޳` ( `ޏޏޏ` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `Ž´Ž´Ž´`; Table Create Table Ž´Ž´Ž´ CREATE TEMPORARY TABLE `Ž´Ž´Ž´` ( `޹޹޹` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `޵޵޵`; Table Create Table ޵޵޵ CREATE TEMPORARY TABLE `޵޵޵` ( `ŽºŽºŽº` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `¤¢¤¢¤¢`; Table Create Table ¤¢¤¢¤¢ CREATE TABLE `¤¢¤¢¤¢` ( `¤«¤«¤«` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `¤¤¤¤¤¤`; Table Create Table ¤¤¤¤¤¤ CREATE TABLE `¤¤¤¤¤¤` ( `¤­¤­¤­` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `¤¦¤¦¤¦`; Table Create Table ¤¦¤¦¤¦ CREATE TABLE `¤¦¤¦¤¦` ( `¤¯¤¯¤¯` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `¤¨¤¨¤¨`; Table Create Table ¤¨¤¨¤¨ CREATE TEMPORARY TABLE `¤¨¤¨¤¨` ( `¤±¤±¤±` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `¤ª¤ª¤ª`; Table Create Table ¤ª¤ª¤ª CREATE TEMPORARY TABLE `¤ª¤ª¤ª` ( `¤³¤³¤³` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `íÝíÝíÝ`; Table Create Table íÝíÝíÝ CREATE TABLE `íÝíÝíÝ` ( `°¡°¡°¡` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `íÞíÞíÞ`; Table Create Table íÞíÞíÞ CREATE TABLE `íÞíÞíÞ` ( `°¢°¢°¢` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `íßíßíß`; Table Create Table íßíßíß CREATE TABLE `íßíßíß` ( `°£°£°£` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `íàíàíà`; Table Create Table íàíàíà CREATE TEMPORARY TABLE `íàíàíà` ( `°¤°¤°¤` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `íáíáíá`; Table Create Table íáíáíá CREATE TEMPORARY TABLE `íáíáíá` ( `°¥°¥°¥` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis DROP TABLE `ޱޱޱ`; DROP TABLE `޲޲޲`; DROP TABLE `޳޳޳`; @@ -490,11 +526,23 @@ CREATE TABLE ` CREATE TABLE `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=BDB; CREATE TABLE `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=BDB; CREATE TABLE IF NOT EXISTS `ޱޱޱ`(`޶޶޶` char(1)) DEFAULT CHARSET = ujis engine=BDB; +Warnings: +Note 1050 Table 'ޱޱޱ' already exists CREATE TABLE IF NOT EXISTS `޲޲޲`(`Ž·Ž·Ž·` char(1)) DEFAULT CHARSET = ujis engine=BDB; +Warnings: +Note 1050 Table '޲޲޲' already exists CREATE TABLE IF NOT EXISTS `¤¢¤¢¤¢`(`¤«¤«¤«` char(1)) DEFAULT CHARSET = ujis engine=BDB; +Warnings: +Note 1050 Table '¤¢¤¢¤¢' already exists CREATE TABLE IF NOT EXISTS `¤¤¤¤¤¤`(`¤­¤­¤­` char(1)) DEFAULT CHARSET = ujis engine=BDB; +Warnings: +Note 1050 Table '¤¤¤¤¤¤' already exists CREATE TABLE IF NOT EXISTS `íÝíÝíÝ`(`°¡°¡°¡` char(1)) DEFAULT CHARSET = ujis engine=BDB; +Warnings: +Note 1050 Table 'íÝíÝíÝ' already exists CREATE TABLE IF NOT EXISTS `íÞíÞíÞ`(`°¢°¢°¢` char(1)) DEFAULT CHARSET = ujis engine=BDB; +Warnings: +Note 1050 Table 'íÞíÞíÞ' already exists CREATE TABLE IF NOT EXISTS `޳޳޳`(`ޏޏޏ` char(1)) DEFAULT CHARSET = ujis engine=BDB; CREATE TABLE IF NOT EXISTS `¤¦¤¦¤¦`(`¤¯¤¯¤¯` char(1)) DEFAULT CHARSET = ujis engine=BDB; CREATE TABLE IF NOT EXISTS `íßíßíß`(`°£°£°£`char(1)) DEFAULT CHARSET = ujis engine=BDB; diff --git a/mysql-test/suite/jp/r/jp_create_tbl_utf8.result b/mysql-test/suite/jp/r/jp_create_tbl_utf8.result index d4873406c46..6df30acbd7f 100644 --- a/mysql-test/suite/jp/r/jp_create_tbl_utf8.result +++ b/mysql-test/suite/jp/r/jp_create_tbl_utf8.result @@ -22,11 +22,23 @@ CREATE TABLE `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=INNO CREATE TABLE `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; CREATE TABLE `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; CREATE TABLE IF NOT EXISTS `アアア`(`ï½¶ï½¶ï½¶` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; +Warnings: +Note 1050 Table 'アアア' already exists CREATE TABLE IF NOT EXISTS `イイイ`(`ï½·ï½·ï½·` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; +Warnings: +Note 1050 Table 'イイイ' already exists CREATE TABLE IF NOT EXISTS `ã‚ã‚ã‚`(`ã‹ã‹ã‹` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; +Warnings: +Note 1050 Table 'ã‚ã‚ã‚' already exists CREATE TABLE IF NOT EXISTS `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; +Warnings: +Note 1050 Table 'ã„ã„ã„' already exists CREATE TABLE IF NOT EXISTS `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; +Warnings: +Note 1050 Table 'é¾–é¾–é¾–' already exists CREATE TABLE IF NOT EXISTS `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; +Warnings: +Note 1050 Table 'é¾—é¾—é¾—' already exists CREATE TABLE IF NOT EXISTS `ウウウ`(`ククク` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; CREATE TABLE IF NOT EXISTS `ã†ã†ã†`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=INNODB; CREATE TABLE IF NOT EXISTS `龞龞龞`(`丅丅丅`char(1)) DEFAULT CHARSET = utf8 engine=INNODB; @@ -178,11 +190,23 @@ CREATE TABLE `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=MyIS CREATE TABLE `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; CREATE TABLE `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; CREATE TABLE IF NOT EXISTS `アアア`(`ï½¶ï½¶ï½¶` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; +Warnings: +Note 1050 Table 'アアア' already exists CREATE TABLE IF NOT EXISTS `イイイ`(`ï½·ï½·ï½·` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; +Warnings: +Note 1050 Table 'イイイ' already exists CREATE TABLE IF NOT EXISTS `ã‚ã‚ã‚`(`ã‹ã‹ã‹` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; +Warnings: +Note 1050 Table 'ã‚ã‚ã‚' already exists CREATE TABLE IF NOT EXISTS `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; +Warnings: +Note 1050 Table 'ã„ã„ã„' already exists CREATE TABLE IF NOT EXISTS `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; +Warnings: +Note 1050 Table 'é¾–é¾–é¾–' already exists CREATE TABLE IF NOT EXISTS `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; +Warnings: +Note 1050 Table 'é¾—é¾—é¾—' already exists CREATE TABLE IF NOT EXISTS `ウウウ`(`ククク` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; CREATE TABLE IF NOT EXISTS `ã†ã†ã†`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; CREATE TABLE IF NOT EXISTS `龞龞龞`(`丅丅丅`char(1)) DEFAULT CHARSET = utf8 engine=MyISAM; @@ -334,11 +358,23 @@ CREATE TABLE `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=HEAP CREATE TABLE `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; CREATE TABLE `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; CREATE TABLE IF NOT EXISTS `アアア`(`ï½¶ï½¶ï½¶` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; +Warnings: +Note 1050 Table 'アアア' already exists CREATE TABLE IF NOT EXISTS `イイイ`(`ï½·ï½·ï½·` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; +Warnings: +Note 1050 Table 'イイイ' already exists CREATE TABLE IF NOT EXISTS `ã‚ã‚ã‚`(`ã‹ã‹ã‹` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; +Warnings: +Note 1050 Table 'ã‚ã‚ã‚' already exists CREATE TABLE IF NOT EXISTS `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; +Warnings: +Note 1050 Table 'ã„ã„ã„' already exists CREATE TABLE IF NOT EXISTS `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; +Warnings: +Note 1050 Table 'é¾–é¾–é¾–' already exists CREATE TABLE IF NOT EXISTS `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; +Warnings: +Note 1050 Table 'é¾—é¾—é¾—' already exists CREATE TABLE IF NOT EXISTS `ウウウ`(`ククク` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; CREATE TABLE IF NOT EXISTS `ã†ã†ã†`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=HEAP; CREATE TABLE IF NOT EXISTS `龞龞龞`(`丅丅丅`char(1)) DEFAULT CHARSET = utf8 engine=HEAP; @@ -397,77 +433,77 @@ SHOW CREATE TABLE `アアア`; Table Create Table アアア CREATE TABLE `アアア` ( `ï½¶ï½¶ï½¶` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `イイイ`; Table Create Table イイイ CREATE TABLE `イイイ` ( `ï½·ï½·ï½·` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ウウウ`; Table Create Table ウウウ CREATE TABLE `ウウウ` ( `ククク` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï½´ï½´ï½´`; Table Create Table ï½´ï½´ï½´ CREATE TEMPORARY TABLE `ï½´ï½´ï½´` ( `ケケケ` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `オオオ`; Table Create Table オオオ CREATE TEMPORARY TABLE `オオオ` ( `コココ` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ã‚ã‚ã‚`; Table Create Table ã‚ã‚ã‚ CREATE TABLE `ã‚ã‚ã‚` ( `ã‹ã‹ã‹` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ã„ã„ã„`; Table Create Table ã„ã„ã„ CREATE TABLE `ã„ã„ã„` ( `ããã` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ã†ã†ã†`; Table Create Table ã†ã†ã† CREATE TABLE `ã†ã†ã†` ( `ããã` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ãˆãˆãˆ`; Table Create Table ãˆãˆãˆ CREATE TEMPORARY TABLE `ãˆãˆãˆ` ( `ã‘ã‘ã‘` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ãŠãŠãŠ`; Table Create Table ãŠãŠãŠ CREATE TEMPORARY TABLE `ãŠãŠãŠ` ( `ã“ã“ã“` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `é¾–é¾–é¾–`; Table Create Table é¾–é¾–é¾– CREATE TABLE `é¾–é¾–é¾–` ( `丂丂丂` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `é¾—é¾—é¾—`; Table Create Table é¾—é¾—é¾— CREATE TABLE `é¾—é¾—é¾—` ( `丄丄丄` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `龞龞龞`; Table Create Table 龞龞龞 CREATE TABLE `龞龞龞` ( `丅丅丅` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `龡龡龡`; Table Create Table 龡龡龡 CREATE TEMPORARY TABLE `龡龡龡` ( `丌丌丌` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `龢龢龢`; Table Create Table 龢龢龢 CREATE TEMPORARY TABLE `龢龢龢` ( `丒丒丒` char(1) default NULL -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 DROP TABLE `アアア`; DROP TABLE `イイイ`; DROP TABLE `ウウウ`; @@ -490,11 +526,23 @@ CREATE TABLE `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=BDB; CREATE TABLE `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=BDB; CREATE TABLE `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=BDB; CREATE TABLE IF NOT EXISTS `アアア`(`ï½¶ï½¶ï½¶` char(1)) DEFAULT CHARSET = utf8 engine=BDB; +Warnings: +Note 1050 Table 'アアア' already exists CREATE TABLE IF NOT EXISTS `イイイ`(`ï½·ï½·ï½·` char(1)) DEFAULT CHARSET = utf8 engine=BDB; +Warnings: +Note 1050 Table 'イイイ' already exists CREATE TABLE IF NOT EXISTS `ã‚ã‚ã‚`(`ã‹ã‹ã‹` char(1)) DEFAULT CHARSET = utf8 engine=BDB; +Warnings: +Note 1050 Table 'ã‚ã‚ã‚' already exists CREATE TABLE IF NOT EXISTS `ã„ã„ã„`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=BDB; +Warnings: +Note 1050 Table 'ã„ã„ã„' already exists CREATE TABLE IF NOT EXISTS `é¾–é¾–é¾–`(`丂丂丂` char(1)) DEFAULT CHARSET = utf8 engine=BDB; +Warnings: +Note 1050 Table 'é¾–é¾–é¾–' already exists CREATE TABLE IF NOT EXISTS `é¾—é¾—é¾—`(`丄丄丄` char(1)) DEFAULT CHARSET = utf8 engine=BDB; +Warnings: +Note 1050 Table 'é¾—é¾—é¾—' already exists CREATE TABLE IF NOT EXISTS `ウウウ`(`ククク` char(1)) DEFAULT CHARSET = utf8 engine=BDB; CREATE TABLE IF NOT EXISTS `ã†ã†ã†`(`ããã` char(1)) DEFAULT CHARSET = utf8 engine=BDB; CREATE TABLE IF NOT EXISTS `龞龞龞`(`丅丅丅`char(1)) DEFAULT CHARSET = utf8 engine=BDB; diff --git a/mysql-test/suite/jp/r/jp_enum_sjis.result b/mysql-test/suite/jp/r/jp_enum_sjis.result index 1e46dbffbb1..43994123e3b 100644 --- a/mysql-test/suite/jp/r/jp_enum_sjis.result +++ b/mysql-test/suite/jp/r/jp_enum_sjis.result @@ -137,19 +137,19 @@ Table Create Table ‚s‚V CREATE TABLE `‚s‚V` ( `‚b‚P` enum('±','²','³') default NULL, KEY `‚b‚P` (`‚b‚P`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚W`; Table Create Table ‚s‚W CREATE TABLE `‚s‚W` ( `‚b‚P` enum('‚ ','‚¢','‚¤') default NULL, KEY `‚b‚P` (`‚b‚P`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚X`; Table Create Table ‚s‚X CREATE TABLE `‚s‚X` ( `‚b‚P` enum('ƒ\','\','•\') default NULL, KEY `‚b‚P` (`‚b‚P`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚P‚O`; Table Create Table ‚s‚P‚O CREATE TABLE `‚s‚P‚O` ( @@ -219,134 +219,134 @@ ALTER TABLE ` SHOW CREATE TABLE `‚s‚P`; Table Create Table ‚s‚P CREATE TABLE `‚s‚P` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('±','²','³') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=InnoDB DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚Q`; Table Create Table ‚s‚Q CREATE TABLE `‚s‚Q` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('‚ ','‚¢','‚¤') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=InnoDB DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚R`; Table Create Table ‚s‚R CREATE TABLE `‚s‚R` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('ƒ\','\','•\') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=InnoDB DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚S`; Table Create Table ‚s‚S CREATE TABLE `‚s‚S` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('±','²','³') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=MyISAM DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚T`; Table Create Table ‚s‚T CREATE TABLE `‚s‚T` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('‚ ','‚¢','‚¤') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=MyISAM DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚U`; Table Create Table ‚s‚U CREATE TABLE `‚s‚U` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('ƒ\','\','•\') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=MyISAM DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚V`; Table Create Table ‚s‚V CREATE TABLE `‚s‚V` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('±','²','³') default NULL, KEY `‚b‚P` (`‚b‚P`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚W`; Table Create Table ‚s‚W CREATE TABLE `‚s‚W` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('‚ ','‚¢','‚¤') default NULL, KEY `‚b‚P` (`‚b‚P`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚X`; Table Create Table ‚s‚X CREATE TABLE `‚s‚X` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('ƒ\','\','•\') default NULL, KEY `‚b‚P` (`‚b‚P`) -) ENGINE=HEAP DEFAULT CHARSET=sjis +) ENGINE=MEMORY DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚P‚O`; Table Create Table ‚s‚P‚O CREATE TABLE `‚s‚P‚O` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('±','²','³') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚P‚P`; Table Create Table ‚s‚P‚P CREATE TABLE `‚s‚P‚P` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('‚ ','‚¢','‚¤') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=sjis SHOW CREATE TABLE `‚s‚P‚Q`; Table Create Table ‚s‚P‚Q CREATE TABLE `‚s‚P‚Q` ( - `‚b‚Q` char(1) NOT NULL default '', + `‚b‚Q` char(1) NOT NULL, `‚b‚P` enum('ƒ\','\','•\') default NULL, KEY `‚b‚P` (`‚b‚P`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=sjis DESC `‚s‚P`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('±','²','³') YES MUL NULL DESC `‚s‚Q`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('‚ ','‚¢','‚¤') YES MUL NULL DESC `‚s‚R`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('ƒ\','\','•\') YES MUL NULL DESC `‚s‚S`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('±','²','³') YES MUL NULL DESC `‚s‚T`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('‚ ','‚¢','‚¤') YES MUL NULL DESC `‚s‚U`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('ƒ\','\','•\') YES MUL NULL DESC `‚s‚V`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('±','²','³') YES MUL NULL DESC `‚s‚W`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('‚ ','‚¢','‚¤') YES MUL NULL DESC `‚s‚X`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('ƒ\','\','•\') YES MUL NULL DESC `‚s‚P‚O`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('±','²','³') YES MUL NULL DESC `‚s‚P‚P`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('‚ ','‚¢','‚¤') YES MUL NULL DESC `‚s‚P‚Q`; Field Type Null Key Default Extra -‚b‚Q char(1) +‚b‚Q char(1) NO NULL ‚b‚P enum('ƒ\','\','•\') YES MUL NULL DROP TABLE `‚s‚P`; DROP TABLE `‚s‚Q`; diff --git a/mysql-test/suite/jp/r/jp_enum_ucs2.result b/mysql-test/suite/jp/r/jp_enum_ucs2.result index a84cace35fe..c41e6c262eb 100644 --- a/mysql-test/suite/jp/r/jp_enum_ucs2.result +++ b/mysql-test/suite/jp/r/jp_enum_ucs2.result @@ -138,19 +138,19 @@ Table Create Table £Ô£· CREATE TABLE `£Ô£·` ( `£Ã£±` enum('ޱ','޲','޳') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `£Ô£¸`; Table Create Table £Ô£¸ CREATE TABLE `£Ô£¸` ( `£Ã£±` enum('¤¢','¤¤','¤¦') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `£Ô£¹`; Table Create Table £Ô£¹ CREATE TABLE `£Ô£¹` ( `£Ã£±` enum('íÜ','íÝ','íÞ') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ucs2 +) ENGINE=MEMORY DEFAULT CHARSET=ucs2 SHOW CREATE TABLE `£Ô£±£°`; Table Create Table £Ô£±£° CREATE TABLE `£Ô£±£°` ( diff --git a/mysql-test/suite/jp/r/jp_enum_ujis.result b/mysql-test/suite/jp/r/jp_enum_ujis.result index dbc850b1368..9ba445eaba5 100644 --- a/mysql-test/suite/jp/r/jp_enum_ujis.result +++ b/mysql-test/suite/jp/r/jp_enum_ujis.result @@ -137,19 +137,19 @@ Table Create Table £Ô£· CREATE TABLE `£Ô£·` ( `£Ã£±` enum('ޱ','޲','޳') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£¸`; Table Create Table £Ô£¸ CREATE TABLE `£Ô£¸` ( `£Ã£±` enum('¤¢','¤¤','¤¦') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£¹`; Table Create Table £Ô£¹ CREATE TABLE `£Ô£¹` ( `£Ã£±` enum('íÜ','íÝ','íÞ') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£±£°`; Table Create Table £Ô£±£° CREATE TABLE `£Ô£±£°` ( @@ -219,134 +219,134 @@ ALTER TABLE ` SHOW CREATE TABLE `£Ô£±`; Table Create Table £Ô£± CREATE TABLE `£Ô£±` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('ޱ','޲','޳') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=InnoDB DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£²`; Table Create Table £Ô£² CREATE TABLE `£Ô£²` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('¤¢','¤¤','¤¦') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=InnoDB DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£³`; Table Create Table £Ô£³ CREATE TABLE `£Ô£³` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('íÜ','íÝ','íÞ') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=InnoDB DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£´`; Table Create Table £Ô£´ CREATE TABLE `£Ô£´` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('ޱ','޲','޳') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=MyISAM DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£µ`; Table Create Table £Ô£µ CREATE TABLE `£Ô£µ` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('¤¢','¤¤','¤¦') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=MyISAM DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£¶`; Table Create Table £Ô£¶ CREATE TABLE `£Ô£¶` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('íÜ','íÝ','íÞ') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=MyISAM DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£·`; Table Create Table £Ô£· CREATE TABLE `£Ô£·` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('ޱ','޲','޳') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£¸`; Table Create Table £Ô£¸ CREATE TABLE `£Ô£¸` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('¤¢','¤¤','¤¦') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£¹`; Table Create Table £Ô£¹ CREATE TABLE `£Ô£¹` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('íÜ','íÝ','íÞ') default NULL, KEY `£Ã£±` (`£Ã£±`) -) ENGINE=HEAP DEFAULT CHARSET=ujis +) ENGINE=MEMORY DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£±£°`; Table Create Table £Ô£±£° CREATE TABLE `£Ô£±£°` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('ޱ','޲','޳') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£±£±`; Table Create Table £Ô£±£± CREATE TABLE `£Ô£±£±` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('¤¢','¤¤','¤¦') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=ujis SHOW CREATE TABLE `£Ô£±£²`; Table Create Table £Ô£±£² CREATE TABLE `£Ô£±£²` ( - `£Ã£²` char(1) NOT NULL default '', + `£Ã£²` char(1) NOT NULL, `£Ã£±` enum('íÜ','íÝ','íÞ') default NULL, KEY `£Ã£±` (`£Ã£±`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=ujis DESC `£Ô£±`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('ޱ','޲','޳') YES MUL NULL DESC `£Ô£²`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('¤¢','¤¤','¤¦') YES MUL NULL DESC `£Ô£³`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('íÜ','íÝ','íÞ') YES MUL NULL DESC `£Ô£´`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('ޱ','޲','޳') YES MUL NULL DESC `£Ô£µ`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('¤¢','¤¤','¤¦') YES MUL NULL DESC `£Ô£¶`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('íÜ','íÝ','íÞ') YES MUL NULL DESC `£Ô£·`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('ޱ','޲','޳') YES MUL NULL DESC `£Ô£¸`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('¤¢','¤¤','¤¦') YES MUL NULL DESC `£Ô£¹`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('íÜ','íÝ','íÞ') YES MUL NULL DESC `£Ô£±£°`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('ޱ','޲','޳') YES MUL NULL DESC `£Ô£±£±`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('¤¢','¤¤','¤¦') YES MUL NULL DESC `£Ô£±£²`; Field Type Null Key Default Extra -£Ã£² char(1) +£Ã£² char(1) NO NULL £Ã£± enum('íÜ','íÝ','íÞ') YES MUL NULL DROP TABLE `£Ô£±`; DROP TABLE `£Ô£²`; diff --git a/mysql-test/suite/jp/r/jp_enum_utf8.result b/mysql-test/suite/jp/r/jp_enum_utf8.result index f2515871ece..c4ff9193447 100644 --- a/mysql-test/suite/jp/r/jp_enum_utf8.result +++ b/mysql-test/suite/jp/r/jp_enum_utf8.result @@ -137,19 +137,19 @@ Table Create Table ï¼´ï¼— CREATE TABLE `ï¼´ï¼—` ( `C1` enum('ï½±','ï½²','ï½³') default NULL, KEY `C1` (`C1`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T8`; Table Create Table T8 CREATE TABLE `T8` ( `C1` enum('ã‚','ã„','ã†') default NULL, KEY `C1` (`C1`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï¼´ï¼™`; Table Create Table ï¼´ï¼™ CREATE TABLE `ï¼´ï¼™` ( `C1` enum('é¾”','é¾–','é¾—') default NULL, KEY `C1` (`C1`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T1ï¼`; Table Create Table ï¼´ï¼‘ï¼ CREATE TABLE `T1ï¼` ( @@ -219,134 +219,134 @@ ALTER TABLE `T12` ADD `C2` CHAR(1) NOT NULL FIRST; SHOW CREATE TABLE `T1`; Table Create Table T1 CREATE TABLE `T1` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ï½±','ï½²','ï½³') default NULL, KEY `C1` (`C1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï¼´ï¼’`; Table Create Table ï¼´ï¼’ CREATE TABLE `ï¼´ï¼’` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ã‚','ã„','ã†') default NULL, KEY `C1` (`C1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T3`; Table Create Table T3 CREATE TABLE `T3` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('é¾”','é¾–','é¾—') default NULL, KEY `C1` (`C1`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï¼´ï¼”`; Table Create Table ï¼´ï¼” CREATE TABLE `ï¼´ï¼”` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ï½±','ï½²','ï½³') default NULL, KEY `C1` (`C1`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T5`; Table Create Table T5 CREATE TABLE `T5` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ã‚','ã„','ã†') default NULL, KEY `C1` (`C1`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï¼´ï¼–`; Table Create Table ï¼´ï¼– CREATE TABLE `ï¼´ï¼–` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('é¾”','é¾–','é¾—') default NULL, KEY `C1` (`C1`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï¼´ï¼—`; Table Create Table ï¼´ï¼— CREATE TABLE `ï¼´ï¼—` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ï½±','ï½²','ï½³') default NULL, KEY `C1` (`C1`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T8`; Table Create Table T8 CREATE TABLE `T8` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ã‚','ã„','ã†') default NULL, KEY `C1` (`C1`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `ï¼´ï¼™`; Table Create Table ï¼´ï¼™ CREATE TABLE `ï¼´ï¼™` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('é¾”','é¾–','é¾—') default NULL, KEY `C1` (`C1`) -) ENGINE=HEAP DEFAULT CHARSET=utf8 +) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T1ï¼`; Table Create Table ï¼´ï¼‘ï¼ CREATE TABLE `T1ï¼` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ï½±','ï½²','ï½³') default NULL, KEY `C1` (`C1`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T11`; Table Create Table T11 CREATE TABLE `T11` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('ã‚','ã„','ã†') default NULL, KEY `C1` (`C1`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=utf8 SHOW CREATE TABLE `T12`; Table Create Table T12 CREATE TABLE `T12` ( - `C2` char(1) NOT NULL default '', + `C2` char(1) NOT NULL, `C1` enum('é¾”','é¾–','é¾—') default NULL, KEY `C1` (`C1`) ) ENGINE=BerkeleyDB DEFAULT CHARSET=utf8 DESC `T1`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ï½±','ï½²','ï½³') YES MUL NULL DESC `ï¼´ï¼’`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ã‚','ã„','ã†') YES MUL NULL DESC `T3`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('é¾”','é¾–','é¾—') YES MUL NULL DESC `ï¼´ï¼”`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ï½±','ï½²','ï½³') YES MUL NULL DESC `T5`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ã‚','ã„','ã†') YES MUL NULL DESC `ï¼´ï¼–`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('é¾”','é¾–','é¾—') YES MUL NULL DESC `ï¼´ï¼—`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ï½±','ï½²','ï½³') YES MUL NULL DESC `T8`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ã‚','ã„','ã†') YES MUL NULL DESC `ï¼´ï¼™`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('é¾”','é¾–','é¾—') YES MUL NULL DESC `T1ï¼`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ï½±','ï½²','ï½³') YES MUL NULL DESC `T11`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('ã‚','ã„','ã†') YES MUL NULL DESC `T12`; Field Type Null Key Default Extra -C2 char(1) +C2 char(1) NO NULL C1 enum('é¾”','é¾–','é¾—') YES MUL NULL DROP TABLE `T1`; DROP TABLE `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/r/jp_join_sjis.result b/mysql-test/suite/jp/r/jp_join_sjis.result index a5ccc58ae4c..95df2d5488e 100644 --- a/mysql-test/suite/jp/r/jp_join_sjis.result +++ b/mysql-test/suite/jp/r/jp_join_sjis.result @@ -71,31 +71,31 @@ SELECT * FROM ` ¶ ± » ± SELECT * FROM `‚s‚Pa` JOIN `‚s‚Pb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚Pa` INNER JOIN `‚s‚Pb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚Pa` CROSS JOIN `‚s‚Pb`; ‚b‚P ‚b‚P ± ± ¶ ± » ± SELECT * FROM `‚s‚Pa` LEFT JOIN `‚s‚Pb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -¶ NULL -» NULL +‚b‚P +± +¶ +» SELECT * FROM `‚s‚Pa` LEFT JOIN `‚s‚Pb` ON (`‚s‚Pa`.`‚b‚P` = `‚s‚Pb`.`‚b‚P`); ‚b‚P ‚b‚P ± ± ¶ NULL » NULL SELECT * FROM `‚s‚Pb` RIGHT JOIN `‚s‚Pa` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -NULL ¶ -NULL » +‚b‚P +± +¶ +» SELECT * FROM `‚s‚Pb` RIGHT JOIN `‚s‚Pa` ON (`‚s‚Pa`.`‚b‚P` = `‚s‚Pb`.`‚b‚P`); ‚b‚P ‚b‚P ± ± @@ -112,31 +112,31 @@ SELECT * FROM ` ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚Qa` JOIN `‚s‚Qb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚Qa` INNER JOIN `‚s‚Qb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚Qa` CROSS JOIN `‚s‚Qb`; ‚b‚P ‚b‚P ‚  ‚  ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚Qa` LEFT JOIN `‚s‚Qb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -‚© NULL -‚³ NULL +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚Qa` LEFT JOIN `‚s‚Qb` ON (`‚s‚Qa`.`‚b‚P` = `‚s‚Qb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  ‚© NULL ‚³ NULL SELECT * FROM `‚s‚Qb` RIGHT JOIN `‚s‚Qa` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -NULL ‚© -NULL ‚³ +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚Qb` RIGHT JOIN `‚s‚Qa` ON (`‚s‚Qa`.`‚b‚P` = `‚s‚Qb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  @@ -153,31 +153,31 @@ SELECT * FROM ` \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚Ra` JOIN `‚s‚Rb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚Ra` INNER JOIN `‚s‚Rb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚Ra` CROSS JOIN `‚s‚Rb`; ‚b‚P ‚b‚P ƒ\ ƒ\ \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚Ra` LEFT JOIN `‚s‚Rb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -\ NULL -•\ NULL +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚Ra` LEFT JOIN `‚s‚Rb` ON (`‚s‚Ra`.`‚b‚P` = `‚s‚Rb`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ \ NULL •\ NULL SELECT * FROM `‚s‚Rb` RIGHT JOIN `‚s‚Ra` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -NULL \ -NULL •\ +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚Rb` RIGHT JOIN `‚s‚Ra` ON (`‚s‚Ra`.`‚b‚P` = `‚s‚Rb`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ @@ -194,31 +194,31 @@ SELECT * FROM ` ¶ ± » ± SELECT * FROM `‚s‚Sa` JOIN `‚s‚Sb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚Sa` INNER JOIN `‚s‚Sb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚Sa` CROSS JOIN `‚s‚Sb`; ‚b‚P ‚b‚P ± ± ¶ ± » ± SELECT * FROM `‚s‚Sa` LEFT JOIN `‚s‚Sb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -¶ NULL -» NULL +‚b‚P +± +¶ +» SELECT * FROM `‚s‚Sa` LEFT JOIN `‚s‚Sb` ON (`‚s‚Sa`.`‚b‚P` = `‚s‚Sb`.`‚b‚P`); ‚b‚P ‚b‚P ± ± ¶ NULL » NULL SELECT * FROM `‚s‚Sb` RIGHT JOIN `‚s‚Sa` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -NULL ¶ -NULL » +‚b‚P +± +¶ +» SELECT * FROM `‚s‚Sb` RIGHT JOIN `‚s‚Sa` ON (`‚s‚Sa`.`‚b‚P` = `‚s‚Sb`.`‚b‚P`); ‚b‚P ‚b‚P ± ± @@ -235,31 +235,31 @@ SELECT * FROM ` ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚Ta` JOIN `‚s‚Tb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚Ta` INNER JOIN `‚s‚Tb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚Ta` CROSS JOIN `‚s‚Tb`; ‚b‚P ‚b‚P ‚  ‚  ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚Ta` LEFT JOIN `‚s‚Tb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -‚© NULL -‚³ NULL +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚Ta` LEFT JOIN `‚s‚Tb` ON (`‚s‚Ta`.`‚b‚P` = `‚s‚Tb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  ‚© NULL ‚³ NULL SELECT * FROM `‚s‚Tb` RIGHT JOIN `‚s‚Ta` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -NULL ‚© -NULL ‚³ +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚Tb` RIGHT JOIN `‚s‚Ta` ON (`‚s‚Ta`.`‚b‚P` = `‚s‚Tb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  @@ -276,31 +276,31 @@ SELECT * FROM ` \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚Ua` JOIN `‚s‚Ub` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚Ua` INNER JOIN `‚s‚Ub` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚Ua` CROSS JOIN `‚s‚Ub`; ‚b‚P ‚b‚P ƒ\ ƒ\ \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚Ua` LEFT JOIN `‚s‚Ub` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -\ NULL -•\ NULL +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚Ua` LEFT JOIN `‚s‚Ub` ON (`‚s‚Ua`.`‚b‚P` = `‚s‚Ub`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ \ NULL •\ NULL SELECT * FROM `‚s‚Ub` RIGHT JOIN `‚s‚Ua` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -NULL \ -NULL •\ +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚Ub` RIGHT JOIN `‚s‚Ua` ON (`‚s‚Ua`.`‚b‚P` = `‚s‚Ub`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ @@ -317,31 +317,31 @@ SELECT * FROM ` ¶ ± » ± SELECT * FROM `‚s‚Va` JOIN `‚s‚Vb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚Va` INNER JOIN `‚s‚Vb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚Va` CROSS JOIN `‚s‚Vb`; ‚b‚P ‚b‚P ± ± ¶ ± » ± SELECT * FROM `‚s‚Va` LEFT JOIN `‚s‚Vb` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -¶ NULL -» NULL +‚b‚P +± +¶ +» SELECT * FROM `‚s‚Va` LEFT JOIN `‚s‚Vb` ON (`‚s‚Va`.`‚b‚P` = `‚s‚Vb`.`‚b‚P`); ‚b‚P ‚b‚P ± ± ¶ NULL » NULL SELECT * FROM `‚s‚Vb` RIGHT JOIN `‚s‚Va` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -NULL ¶ -NULL » +‚b‚P +± +¶ +» SELECT * FROM `‚s‚Vb` RIGHT JOIN `‚s‚Va` ON (`‚s‚Va`.`‚b‚P` = `‚s‚Vb`.`‚b‚P`); ‚b‚P ‚b‚P ± ± @@ -358,31 +358,31 @@ SELECT * FROM ` ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚Wa` JOIN `‚s‚Wb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚Wa` INNER JOIN `‚s‚Wb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚Wa` CROSS JOIN `‚s‚Wb`; ‚b‚P ‚b‚P ‚  ‚  ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚Wa` LEFT JOIN `‚s‚Wb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -‚© NULL -‚³ NULL +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚Wa` LEFT JOIN `‚s‚Wb` ON (`‚s‚Wa`.`‚b‚P` = `‚s‚Wb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  ‚© NULL ‚³ NULL SELECT * FROM `‚s‚Wb` RIGHT JOIN `‚s‚Wa` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -NULL ‚© -NULL ‚³ +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚Wb` RIGHT JOIN `‚s‚Wa` ON (`‚s‚Wa`.`‚b‚P` = `‚s‚Wb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  @@ -399,31 +399,31 @@ SELECT * FROM ` \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚Xa` JOIN `‚s‚Xb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚Xa` INNER JOIN `‚s‚Xb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚Xa` CROSS JOIN `‚s‚Xb`; ‚b‚P ‚b‚P ƒ\ ƒ\ \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚Xa` LEFT JOIN `‚s‚Xb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -\ NULL -•\ NULL +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚Xa` LEFT JOIN `‚s‚Xb` ON (`‚s‚Xa`.`‚b‚P` = `‚s‚Xb`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ \ NULL •\ NULL SELECT * FROM `‚s‚Xb` RIGHT JOIN `‚s‚Xa` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -NULL \ -NULL •\ +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚Xb` RIGHT JOIN `‚s‚Xa` ON (`‚s‚Xa`.`‚b‚P` = `‚s‚Xb`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ @@ -440,31 +440,31 @@ SELECT * FROM ` ¶ ± » ± SELECT * FROM `‚s‚P‚Oa` JOIN `‚s‚P‚Ob` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚P‚Oa` INNER JOIN `‚s‚P‚Ob` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± +‚b‚P +± SELECT * FROM `‚s‚P‚Oa` CROSS JOIN `‚s‚P‚Ob`; ‚b‚P ‚b‚P ± ± ¶ ± » ± SELECT * FROM `‚s‚P‚Oa` LEFT JOIN `‚s‚P‚Ob` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -¶ NULL -» NULL +‚b‚P +± +¶ +» SELECT * FROM `‚s‚P‚Oa` LEFT JOIN `‚s‚P‚Ob` ON (`‚s‚P‚Oa`.`‚b‚P` = `‚s‚P‚Ob`.`‚b‚P`); ‚b‚P ‚b‚P ± ± ¶ NULL » NULL SELECT * FROM `‚s‚P‚Ob` RIGHT JOIN `‚s‚P‚Oa` USING (`‚b‚P`); -‚b‚P ‚b‚P -± ± -NULL ¶ -NULL » +‚b‚P +± +¶ +» SELECT * FROM `‚s‚P‚Ob` RIGHT JOIN `‚s‚P‚Oa` ON (`‚s‚P‚Oa`.`‚b‚P` = `‚s‚P‚Ob`.`‚b‚P`); ‚b‚P ‚b‚P ± ± @@ -481,31 +481,31 @@ SELECT * FROM ` ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚P‚Pa` JOIN `‚s‚P‚Pb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚P‚Pa` INNER JOIN `‚s‚P‚Pb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  +‚b‚P +‚  SELECT * FROM `‚s‚P‚Pa` CROSS JOIN `‚s‚P‚Pb`; ‚b‚P ‚b‚P ‚  ‚  ‚© ‚  ‚³ ‚  SELECT * FROM `‚s‚P‚Pa` LEFT JOIN `‚s‚P‚Pb` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -‚© NULL -‚³ NULL +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚P‚Pa` LEFT JOIN `‚s‚P‚Pb` ON (`‚s‚P‚Pa`.`‚b‚P` = `‚s‚P‚Pb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  ‚© NULL ‚³ NULL SELECT * FROM `‚s‚P‚Pb` RIGHT JOIN `‚s‚P‚Pa` USING (`‚b‚P`); -‚b‚P ‚b‚P -‚  ‚  -NULL ‚© -NULL ‚³ +‚b‚P +‚  +‚© +‚³ SELECT * FROM `‚s‚P‚Pb` RIGHT JOIN `‚s‚P‚Pa` ON (`‚s‚P‚Pa`.`‚b‚P` = `‚s‚P‚Pb`.`‚b‚P`); ‚b‚P ‚b‚P ‚  ‚  @@ -522,31 +522,31 @@ SELECT * FROM ` \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚P‚Qa` JOIN `‚s‚P‚Qb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚P‚Qa` INNER JOIN `‚s‚P‚Qb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ +‚b‚P +ƒ\ SELECT * FROM `‚s‚P‚Qa` CROSS JOIN `‚s‚P‚Qb`; ‚b‚P ‚b‚P ƒ\ ƒ\ \ ƒ\ •\ ƒ\ SELECT * FROM `‚s‚P‚Qa` LEFT JOIN `‚s‚P‚Qb` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -\ NULL -•\ NULL +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚P‚Qa` LEFT JOIN `‚s‚P‚Qb` ON (`‚s‚P‚Qa`.`‚b‚P` = `‚s‚P‚Qb`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ \ NULL •\ NULL SELECT * FROM `‚s‚P‚Qb` RIGHT JOIN `‚s‚P‚Qa` USING (`‚b‚P`); -‚b‚P ‚b‚P -ƒ\ ƒ\ -NULL \ -NULL •\ +‚b‚P +ƒ\ +\ +•\ SELECT * FROM `‚s‚P‚Qb` RIGHT JOIN `‚s‚P‚Qa` ON (`‚s‚P‚Qa`.`‚b‚P` = `‚s‚P‚Qb`.`‚b‚P`); ‚b‚P ‚b‚P ƒ\ ƒ\ diff --git a/mysql-test/suite/jp/r/jp_join_ucs2.result b/mysql-test/suite/jp/r/jp_join_ucs2.result index 76988f15cc4..ac19554eb5a 100644 --- a/mysql-test/suite/jp/r/jp_join_ucs2.result +++ b/mysql-test/suite/jp/r/jp_join_ucs2.result @@ -72,31 +72,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±a` JOIN `£Ô£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±a` INNER JOIN `£Ô£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±a` CROSS JOIN `£Ô£±b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±a` LEFT JOIN `£Ô£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±a` LEFT JOIN `£Ô£±b` ON (`£Ô£±a`.`£Ã£±` = `£Ô£±b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£±b` RIGHT JOIN `£Ô£±a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±b` RIGHT JOIN `£Ô£±a` ON (`£Ô£±a`.`£Ã£±` = `£Ô£±b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -113,31 +113,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£²a` JOIN `£Ô£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£²a` INNER JOIN `£Ô£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£²a` CROSS JOIN `£Ô£²b`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£²a` LEFT JOIN `£Ô£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£²a` LEFT JOIN `£Ô£²b` ON (`£Ô£²a`.`£Ã£±` = `£Ô£²b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£²b` RIGHT JOIN `£Ô£²a` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£²b` RIGHT JOIN `£Ô£²a` ON (`£Ô£²a`.`£Ã£±` = `£Ô£²b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -154,31 +154,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£³a` JOIN `£Ô£³b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£³a` INNER JOIN `£Ô£³b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£³a` CROSS JOIN `£Ô£³b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£³a` LEFT JOIN `£Ô£³b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£³a` LEFT JOIN `£Ô£³b` ON (`£Ô£³a`.`£Ã£±` = `£Ô£³b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£³b` RIGHT JOIN `£Ô£³a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£³b` RIGHT JOIN `£Ô£³a` ON (`£Ô£³a`.`£Ã£±` = `£Ô£³b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ @@ -195,31 +195,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£´a` JOIN `£Ô£´b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£´a` INNER JOIN `£Ô£´b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£´a` CROSS JOIN `£Ô£´b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£´a` LEFT JOIN `£Ô£´b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£´a` LEFT JOIN `£Ô£´b` ON (`£Ô£´a`.`£Ã£±` = `£Ô£´b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£´b` RIGHT JOIN `£Ô£´a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£´b` RIGHT JOIN `£Ô£´a` ON (`£Ô£´a`.`£Ã£±` = `£Ô£´b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -236,31 +236,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£µa` JOIN `£Ô£µb` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£µa` INNER JOIN `£Ô£µb` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£µa` CROSS JOIN `£Ô£µb`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£µa` LEFT JOIN `£Ô£µb` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£µa` LEFT JOIN `£Ô£µb` ON (`£Ô£µa`.`£Ã£±` = `£Ô£µb`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£µb` RIGHT JOIN `£Ô£µa` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£µb` RIGHT JOIN `£Ô£µa` ON (`£Ô£µa`.`£Ã£±` = `£Ô£µb`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -277,31 +277,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¶a` JOIN `£Ô£¶b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¶a` INNER JOIN `£Ô£¶b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¶a` CROSS JOIN `£Ô£¶b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¶a` LEFT JOIN `£Ô£¶b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¶a` LEFT JOIN `£Ô£¶b` ON (`£Ô£¶a`.`£Ã£±` = `£Ô£¶b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£¶b` RIGHT JOIN `£Ô£¶a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¶b` RIGHT JOIN `£Ô£¶a` ON (`£Ô£¶a`.`£Ã£±` = `£Ô£¶b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ @@ -318,31 +318,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£·a` JOIN `£Ô£·b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£·a` INNER JOIN `£Ô£·b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£·a` CROSS JOIN `£Ô£·b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£·a` LEFT JOIN `£Ô£·b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£·a` LEFT JOIN `£Ô£·b` ON (`£Ô£·a`.`£Ã£±` = `£Ô£·b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£·b` RIGHT JOIN `£Ô£·a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£·b` RIGHT JOIN `£Ô£·a` ON (`£Ô£·a`.`£Ã£±` = `£Ô£·b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -359,31 +359,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£¸a` JOIN `£Ô£¸b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£¸a` INNER JOIN `£Ô£¸b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£¸a` CROSS JOIN `£Ô£¸b`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£¸a` LEFT JOIN `£Ô£¸b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£¸a` LEFT JOIN `£Ô£¸b` ON (`£Ô£¸a`.`£Ã£±` = `£Ô£¸b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£¸b` RIGHT JOIN `£Ô£¸a` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£¸b` RIGHT JOIN `£Ô£¸a` ON (`£Ô£¸a`.`£Ã£±` = `£Ô£¸b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -400,31 +400,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¹a` JOIN `£Ô£¹b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¹a` INNER JOIN `£Ô£¹b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¹a` CROSS JOIN `£Ô£¹b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¹a` LEFT JOIN `£Ô£¹b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¹a` LEFT JOIN `£Ô£¹b` ON (`£Ô£¹a`.`£Ã£±` = `£Ô£¹b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£¹b` RIGHT JOIN `£Ô£¹a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¹b` RIGHT JOIN `£Ô£¹a` ON (`£Ô£¹a`.`£Ã£±` = `£Ô£¹b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ @@ -441,31 +441,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±£°a` JOIN `£Ô£±£°b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±£°a` INNER JOIN `£Ô£±£°b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±£°a` CROSS JOIN `£Ô£±£°b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±£°a` LEFT JOIN `£Ô£±£°b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±£°a` LEFT JOIN `£Ô£±£°b` ON (`£Ô£±£°a`.`£Ã£±` = `£Ô£±£°b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£±£°b` RIGHT JOIN `£Ô£±£°a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±£°b` RIGHT JOIN `£Ô£±£°a` ON (`£Ô£±£°a`.`£Ã£±` = `£Ô£±£°b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -482,31 +482,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£±£±a` JOIN `£Ô£±£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£±£±a` INNER JOIN `£Ô£±£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£±£±a` CROSS JOIN `£Ô£±£±b`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£±£±a` LEFT JOIN `£Ô£±£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£±£±a` LEFT JOIN `£Ô£±£±b` ON (`£Ô£±£±a`.`£Ã£±` = `£Ô£±£±b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£±£±b` RIGHT JOIN `£Ô£±£±a` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£±£±b` RIGHT JOIN `£Ô£±£±a` ON (`£Ô£±£±a`.`£Ã£±` = `£Ô£±£±b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -523,31 +523,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£±£²a` JOIN `£Ô£±£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£±£²a` INNER JOIN `£Ô£±£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£±£²a` CROSS JOIN `£Ô£±£²b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£±£²a` LEFT JOIN `£Ô£±£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£±£²a` LEFT JOIN `£Ô£±£²b` ON (`£Ô£±£²a`.`£Ã£±` = `£Ô£±£²b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£±£²b` RIGHT JOIN `£Ô£±£²a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£±£²b` RIGHT JOIN `£Ô£±£²a` ON (`£Ô£±£²a`.`£Ã£±` = `£Ô£±£²b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ diff --git a/mysql-test/suite/jp/r/jp_join_ujis.result b/mysql-test/suite/jp/r/jp_join_ujis.result index ac430cd9b5e..838d701cdcc 100644 --- a/mysql-test/suite/jp/r/jp_join_ujis.result +++ b/mysql-test/suite/jp/r/jp_join_ujis.result @@ -71,31 +71,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±a` JOIN `£Ô£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±a` INNER JOIN `£Ô£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±a` CROSS JOIN `£Ô£±b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±a` LEFT JOIN `£Ô£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±a` LEFT JOIN `£Ô£±b` ON (`£Ô£±a`.`£Ã£±` = `£Ô£±b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£±b` RIGHT JOIN `£Ô£±a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±b` RIGHT JOIN `£Ô£±a` ON (`£Ô£±a`.`£Ã£±` = `£Ô£±b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -112,31 +112,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£²a` JOIN `£Ô£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£²a` INNER JOIN `£Ô£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£²a` CROSS JOIN `£Ô£²b`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£²a` LEFT JOIN `£Ô£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£²a` LEFT JOIN `£Ô£²b` ON (`£Ô£²a`.`£Ã£±` = `£Ô£²b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£²b` RIGHT JOIN `£Ô£²a` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£²b` RIGHT JOIN `£Ô£²a` ON (`£Ô£²a`.`£Ã£±` = `£Ô£²b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -153,31 +153,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£³a` JOIN `£Ô£³b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£³a` INNER JOIN `£Ô£³b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£³a` CROSS JOIN `£Ô£³b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£³a` LEFT JOIN `£Ô£³b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£³a` LEFT JOIN `£Ô£³b` ON (`£Ô£³a`.`£Ã£±` = `£Ô£³b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£³b` RIGHT JOIN `£Ô£³a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£³b` RIGHT JOIN `£Ô£³a` ON (`£Ô£³a`.`£Ã£±` = `£Ô£³b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ @@ -194,31 +194,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£´a` JOIN `£Ô£´b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£´a` INNER JOIN `£Ô£´b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£´a` CROSS JOIN `£Ô£´b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£´a` LEFT JOIN `£Ô£´b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£´a` LEFT JOIN `£Ô£´b` ON (`£Ô£´a`.`£Ã£±` = `£Ô£´b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£´b` RIGHT JOIN `£Ô£´a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£´b` RIGHT JOIN `£Ô£´a` ON (`£Ô£´a`.`£Ã£±` = `£Ô£´b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -235,31 +235,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£µa` JOIN `£Ô£µb` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£µa` INNER JOIN `£Ô£µb` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£µa` CROSS JOIN `£Ô£µb`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£µa` LEFT JOIN `£Ô£µb` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£µa` LEFT JOIN `£Ô£µb` ON (`£Ô£µa`.`£Ã£±` = `£Ô£µb`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£µb` RIGHT JOIN `£Ô£µa` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£µb` RIGHT JOIN `£Ô£µa` ON (`£Ô£µa`.`£Ã£±` = `£Ô£µb`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -276,31 +276,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¶a` JOIN `£Ô£¶b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¶a` INNER JOIN `£Ô£¶b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¶a` CROSS JOIN `£Ô£¶b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¶a` LEFT JOIN `£Ô£¶b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¶a` LEFT JOIN `£Ô£¶b` ON (`£Ô£¶a`.`£Ã£±` = `£Ô£¶b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£¶b` RIGHT JOIN `£Ô£¶a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¶b` RIGHT JOIN `£Ô£¶a` ON (`£Ô£¶a`.`£Ã£±` = `£Ô£¶b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ @@ -317,31 +317,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£·a` JOIN `£Ô£·b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£·a` INNER JOIN `£Ô£·b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£·a` CROSS JOIN `£Ô£·b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£·a` LEFT JOIN `£Ô£·b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£·a` LEFT JOIN `£Ô£·b` ON (`£Ô£·a`.`£Ã£±` = `£Ô£·b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£·b` RIGHT JOIN `£Ô£·a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£·b` RIGHT JOIN `£Ô£·a` ON (`£Ô£·a`.`£Ã£±` = `£Ô£·b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -358,31 +358,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£¸a` JOIN `£Ô£¸b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£¸a` INNER JOIN `£Ô£¸b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£¸a` CROSS JOIN `£Ô£¸b`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£¸a` LEFT JOIN `£Ô£¸b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£¸a` LEFT JOIN `£Ô£¸b` ON (`£Ô£¸a`.`£Ã£±` = `£Ô£¸b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£¸b` RIGHT JOIN `£Ô£¸a` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£¸b` RIGHT JOIN `£Ô£¸a` ON (`£Ô£¸a`.`£Ã£±` = `£Ô£¸b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -399,31 +399,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¹a` JOIN `£Ô£¹b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¹a` INNER JOIN `£Ô£¹b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£¹a` CROSS JOIN `£Ô£¹b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£¹a` LEFT JOIN `£Ô£¹b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¹a` LEFT JOIN `£Ô£¹b` ON (`£Ô£¹a`.`£Ã£±` = `£Ô£¹b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£¹b` RIGHT JOIN `£Ô£¹a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£¹b` RIGHT JOIN `£Ô£¹a` ON (`£Ô£¹a`.`£Ã£±` = `£Ô£¹b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ @@ -440,31 +440,31 @@ SELECT * FROM ` ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±£°a` JOIN `£Ô£±£°b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±£°a` INNER JOIN `£Ô£±£°b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ +£Ã£± +ޱ SELECT * FROM `£Ô£±£°a` CROSS JOIN `£Ô£±£°b`; £Ã£± £Ã£± ޱ ޱ ޶ ޱ Ž» ޱ SELECT * FROM `£Ô£±£°a` LEFT JOIN `£Ô£±£°b` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -޶ NULL -Ž» NULL +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±£°a` LEFT JOIN `£Ô£±£°b` ON (`£Ô£±£°a`.`£Ã£±` = `£Ô£±£°b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ ޶ NULL Ž» NULL SELECT * FROM `£Ô£±£°b` RIGHT JOIN `£Ô£±£°a` USING (`£Ã£±`); -£Ã£± £Ã£± -ޱ ޱ -NULL ޶ -NULL Ž» +£Ã£± +ޱ +޶ +Ž» SELECT * FROM `£Ô£±£°b` RIGHT JOIN `£Ô£±£°a` ON (`£Ô£±£°a`.`£Ã£±` = `£Ô£±£°b`.`£Ã£±`); £Ã£± £Ã£± ޱ ޱ @@ -481,31 +481,31 @@ SELECT * FROM ` ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£±£±a` JOIN `£Ô£±£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£±£±a` INNER JOIN `£Ô£±£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ +£Ã£± +¤¢ SELECT * FROM `£Ô£±£±a` CROSS JOIN `£Ô£±£±b`; £Ã£± £Ã£± ¤¢ ¤¢ ¤« ¤¢ ¤µ ¤¢ SELECT * FROM `£Ô£±£±a` LEFT JOIN `£Ô£±£±b` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -¤« NULL -¤µ NULL +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£±£±a` LEFT JOIN `£Ô£±£±b` ON (`£Ô£±£±a`.`£Ã£±` = `£Ô£±£±b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ ¤« NULL ¤µ NULL SELECT * FROM `£Ô£±£±b` RIGHT JOIN `£Ô£±£±a` USING (`£Ã£±`); -£Ã£± £Ã£± -¤¢ ¤¢ -NULL ¤« -NULL ¤µ +£Ã£± +¤¢ +¤« +¤µ SELECT * FROM `£Ô£±£±b` RIGHT JOIN `£Ô£±£±a` ON (`£Ô£±£±a`.`£Ã£±` = `£Ô£±£±b`.`£Ã£±`); £Ã£± £Ã£± ¤¢ ¤¢ @@ -522,31 +522,31 @@ SELECT * FROM ` íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£±£²a` JOIN `£Ô£±£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£±£²a` INNER JOIN `£Ô£±£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ +£Ã£± +íÜ SELECT * FROM `£Ô£±£²a` CROSS JOIN `£Ô£±£²b`; £Ã£± £Ã£± íÜ íÜ íÝ íÜ íÞ íÜ SELECT * FROM `£Ô£±£²a` LEFT JOIN `£Ô£±£²b` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -íÝ NULL -íÞ NULL +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£±£²a` LEFT JOIN `£Ô£±£²b` ON (`£Ô£±£²a`.`£Ã£±` = `£Ô£±£²b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ íÝ NULL íÞ NULL SELECT * FROM `£Ô£±£²b` RIGHT JOIN `£Ô£±£²a` USING (`£Ã£±`); -£Ã£± £Ã£± -íÜ íÜ -NULL íÝ -NULL íÞ +£Ã£± +íÜ +íÝ +íÞ SELECT * FROM `£Ô£±£²b` RIGHT JOIN `£Ô£±£²a` ON (`£Ô£±£²a`.`£Ã£±` = `£Ô£±£²b`.`£Ã£±`); £Ã£± £Ã£± íÜ íÜ diff --git a/mysql-test/suite/jp/r/jp_join_utf8.result b/mysql-test/suite/jp/r/jp_join_utf8.result index 716e97a2bb3..8c222653c3e 100644 --- a/mysql-test/suite/jp/r/jp_join_utf8.result +++ b/mysql-test/suite/jp/r/jp_join_utf8.result @@ -71,31 +71,31 @@ SELECT * FROM `T1a` INNER JOIN `T1b`; ï½¶ ï½± ï½» ï½± SELECT * FROM `T1a` JOIN `T1b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `T1a` INNER JOIN `T1b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `T1a` CROSS JOIN `T1b`; C1 C1 ï½± ï½± ï½¶ ï½± ï½» ï½± SELECT * FROM `T1a` LEFT JOIN `T1b` USING (`C1`); -C1 C1 -ï½± ï½± -ï½¶ NULL -ï½» NULL +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `T1a` LEFT JOIN `T1b` ON (`T1a`.`C1` = `T1b`.`C1`); C1 C1 ï½± ï½± ï½¶ NULL ï½» NULL SELECT * FROM `T1b` RIGHT JOIN `T1a` USING (`C1`); -C1 C1 -ï½± ï½± -NULL ï½¶ -NULL ï½» +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `T1b` RIGHT JOIN `T1a` ON (`T1a`.`C1` = `T1b`.`C1`); C1 C1 ï½± ï½± @@ -112,31 +112,31 @@ SELECT * FROM `ï¼´ï¼’a` INNER JOIN `ï¼´ï¼’b`; ã‹ ã‚ ã• ã‚ SELECT * FROM `ï¼´ï¼’a` JOIN `ï¼´ï¼’b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `ï¼´ï¼’a` INNER JOIN `ï¼´ï¼’b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `ï¼´ï¼’a` CROSS JOIN `ï¼´ï¼’b`; C1 C1 ã‚ ã‚ ã‹ ã‚ ã• ã‚ SELECT * FROM `ï¼´ï¼’a` LEFT JOIN `ï¼´ï¼’b` USING (`C1`); -C1 C1 -ã‚ ã‚ -ã‹ NULL -ã• NULL +C1 +ã‚ +ã‹ +ã• SELECT * FROM `ï¼´ï¼’a` LEFT JOIN `ï¼´ï¼’b` ON (`ï¼´ï¼’a`.`C1` = `ï¼´ï¼’b`.`C1`); C1 C1 ã‚ ã‚ ã‹ NULL ã• NULL SELECT * FROM `ï¼´ï¼’b` RIGHT JOIN `ï¼´ï¼’a` USING (`C1`); -C1 C1 -ã‚ ã‚ -NULL ã‹ -NULL ã• +C1 +ã‚ +ã‹ +ã• SELECT * FROM `ï¼´ï¼’b` RIGHT JOIN `ï¼´ï¼’a` ON (`ï¼´ï¼’a`.`C1` = `ï¼´ï¼’b`.`C1`); C1 C1 ã‚ ã‚ @@ -153,31 +153,31 @@ SELECT * FROM `T3a` INNER JOIN `T3b`; é¾– é¾” é¾— é¾” SELECT * FROM `T3a` JOIN `T3b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `T3a` INNER JOIN `T3b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `T3a` CROSS JOIN `T3b`; C1 C1 é¾” é¾” é¾– é¾” é¾— é¾” SELECT * FROM `T3a` LEFT JOIN `T3b` USING (`C1`); -C1 C1 -é¾” é¾” -é¾– NULL -é¾— NULL +C1 +é¾” +é¾– +é¾— SELECT * FROM `T3a` LEFT JOIN `T3b` ON (`T3a`.`C1` = `T3b`.`C1`); C1 C1 é¾” é¾” é¾– NULL é¾— NULL SELECT * FROM `T3b` RIGHT JOIN `T3a` USING (`C1`); -C1 C1 -é¾” é¾” -NULL é¾– -NULL é¾— +C1 +é¾” +é¾– +é¾— SELECT * FROM `T3b` RIGHT JOIN `T3a` ON (`T3a`.`C1` = `T3b`.`C1`); C1 C1 é¾” é¾” @@ -194,31 +194,31 @@ SELECT * FROM `ï¼´ï¼”a` INNER JOIN `ï¼´ï¼”b`; ï½¶ ï½± ï½» ï½± SELECT * FROM `ï¼´ï¼”a` JOIN `ï¼´ï¼”b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `ï¼´ï¼”a` INNER JOIN `ï¼´ï¼”b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `ï¼´ï¼”a` CROSS JOIN `ï¼´ï¼”b`; C1 C1 ï½± ï½± ï½¶ ï½± ï½» ï½± SELECT * FROM `ï¼´ï¼”a` LEFT JOIN `ï¼´ï¼”b` USING (`C1`); -C1 C1 -ï½± ï½± -ï½¶ NULL -ï½» NULL +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `ï¼´ï¼”a` LEFT JOIN `ï¼´ï¼”b` ON (`ï¼´ï¼”a`.`C1` = `ï¼´ï¼”b`.`C1`); C1 C1 ï½± ï½± ï½¶ NULL ï½» NULL SELECT * FROM `ï¼´ï¼”b` RIGHT JOIN `ï¼´ï¼”a` USING (`C1`); -C1 C1 -ï½± ï½± -NULL ï½¶ -NULL ï½» +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `ï¼´ï¼”b` RIGHT JOIN `ï¼´ï¼”a` ON (`ï¼´ï¼”a`.`C1` = `ï¼´ï¼”b`.`C1`); C1 C1 ï½± ï½± @@ -235,31 +235,31 @@ SELECT * FROM `T5a` INNER JOIN `T5b`; ã‹ ã‚ ã• ã‚ SELECT * FROM `T5a` JOIN `T5b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `T5a` INNER JOIN `T5b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `T5a` CROSS JOIN `T5b`; C1 C1 ã‚ ã‚ ã‹ ã‚ ã• ã‚ SELECT * FROM `T5a` LEFT JOIN `T5b` USING (`C1`); -C1 C1 -ã‚ ã‚ -ã‹ NULL -ã• NULL +C1 +ã‚ +ã‹ +ã• SELECT * FROM `T5a` LEFT JOIN `T5b` ON (`T5a`.`C1` = `T5b`.`C1`); C1 C1 ã‚ ã‚ ã‹ NULL ã• NULL SELECT * FROM `T5b` RIGHT JOIN `T5a` USING (`C1`); -C1 C1 -ã‚ ã‚ -NULL ã‹ -NULL ã• +C1 +ã‚ +ã‹ +ã• SELECT * FROM `T5b` RIGHT JOIN `T5a` ON (`T5a`.`C1` = `T5b`.`C1`); C1 C1 ã‚ ã‚ @@ -276,31 +276,31 @@ SELECT * FROM `ï¼´ï¼–a` INNER JOIN `ï¼´ï¼–b`; é¾– é¾” é¾— é¾” SELECT * FROM `ï¼´ï¼–a` JOIN `ï¼´ï¼–b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `ï¼´ï¼–a` INNER JOIN `ï¼´ï¼–b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `ï¼´ï¼–a` CROSS JOIN `ï¼´ï¼–b`; C1 C1 é¾” é¾” é¾– é¾” é¾— é¾” SELECT * FROM `ï¼´ï¼–a` LEFT JOIN `ï¼´ï¼–b` USING (`C1`); -C1 C1 -é¾” é¾” -é¾– NULL -é¾— NULL +C1 +é¾” +é¾– +é¾— SELECT * FROM `ï¼´ï¼–a` LEFT JOIN `ï¼´ï¼–b` ON (`ï¼´ï¼–a`.`C1` = `ï¼´ï¼–b`.`C1`); C1 C1 é¾” é¾” é¾– NULL é¾— NULL SELECT * FROM `ï¼´ï¼–b` RIGHT JOIN `ï¼´ï¼–a` USING (`C1`); -C1 C1 -é¾” é¾” -NULL é¾– -NULL é¾— +C1 +é¾” +é¾– +é¾— SELECT * FROM `ï¼´ï¼–b` RIGHT JOIN `ï¼´ï¼–a` ON (`ï¼´ï¼–a`.`C1` = `ï¼´ï¼–b`.`C1`); C1 C1 é¾” é¾” @@ -317,31 +317,31 @@ SELECT * FROM `ï¼´ï¼—a` INNER JOIN `ï¼´ï¼—b`; ï½¶ ï½± ï½» ï½± SELECT * FROM `ï¼´ï¼—a` JOIN `ï¼´ï¼—b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `ï¼´ï¼—a` INNER JOIN `ï¼´ï¼—b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `ï¼´ï¼—a` CROSS JOIN `ï¼´ï¼—b`; C1 C1 ï½± ï½± ï½¶ ï½± ï½» ï½± SELECT * FROM `ï¼´ï¼—a` LEFT JOIN `ï¼´ï¼—b` USING (`C1`); -C1 C1 -ï½± ï½± -ï½¶ NULL -ï½» NULL +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `ï¼´ï¼—a` LEFT JOIN `ï¼´ï¼—b` ON (`ï¼´ï¼—a`.`C1` = `ï¼´ï¼—b`.`C1`); C1 C1 ï½± ï½± ï½¶ NULL ï½» NULL SELECT * FROM `ï¼´ï¼—b` RIGHT JOIN `ï¼´ï¼—a` USING (`C1`); -C1 C1 -ï½± ï½± -NULL ï½¶ -NULL ï½» +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `ï¼´ï¼—b` RIGHT JOIN `ï¼´ï¼—a` ON (`ï¼´ï¼—a`.`C1` = `ï¼´ï¼—b`.`C1`); C1 C1 ï½± ï½± @@ -358,31 +358,31 @@ SELECT * FROM `T8a` INNER JOIN `T8b`; ã‹ ã‚ ã• ã‚ SELECT * FROM `T8a` JOIN `T8b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `T8a` INNER JOIN `T8b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `T8a` CROSS JOIN `T8b`; C1 C1 ã‚ ã‚ ã‹ ã‚ ã• ã‚ SELECT * FROM `T8a` LEFT JOIN `T8b` USING (`C1`); -C1 C1 -ã‚ ã‚ -ã‹ NULL -ã• NULL +C1 +ã‚ +ã‹ +ã• SELECT * FROM `T8a` LEFT JOIN `T8b` ON (`T8a`.`C1` = `T8b`.`C1`); C1 C1 ã‚ ã‚ ã‹ NULL ã• NULL SELECT * FROM `T8b` RIGHT JOIN `T8a` USING (`C1`); -C1 C1 -ã‚ ã‚ -NULL ã‹ -NULL ã• +C1 +ã‚ +ã‹ +ã• SELECT * FROM `T8b` RIGHT JOIN `T8a` ON (`T8a`.`C1` = `T8b`.`C1`); C1 C1 ã‚ ã‚ @@ -399,31 +399,31 @@ SELECT * FROM `ï¼´ï¼™a` INNER JOIN `ï¼´ï¼™b`; é¾– é¾” é¾— é¾” SELECT * FROM `ï¼´ï¼™a` JOIN `ï¼´ï¼™b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `ï¼´ï¼™a` INNER JOIN `ï¼´ï¼™b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `ï¼´ï¼™a` CROSS JOIN `ï¼´ï¼™b`; C1 C1 é¾” é¾” é¾– é¾” é¾— é¾” SELECT * FROM `ï¼´ï¼™a` LEFT JOIN `ï¼´ï¼™b` USING (`C1`); -C1 C1 -é¾” é¾” -é¾– NULL -é¾— NULL +C1 +é¾” +é¾– +é¾— SELECT * FROM `ï¼´ï¼™a` LEFT JOIN `ï¼´ï¼™b` ON (`ï¼´ï¼™a`.`C1` = `ï¼´ï¼™b`.`C1`); C1 C1 é¾” é¾” é¾– NULL é¾— NULL SELECT * FROM `ï¼´ï¼™b` RIGHT JOIN `ï¼´ï¼™a` USING (`C1`); -C1 C1 -é¾” é¾” -NULL é¾– -NULL é¾— +C1 +é¾” +é¾– +é¾— SELECT * FROM `ï¼´ï¼™b` RIGHT JOIN `ï¼´ï¼™a` ON (`ï¼´ï¼™a`.`C1` = `ï¼´ï¼™b`.`C1`); C1 C1 é¾” é¾” @@ -440,31 +440,31 @@ SELECT * FROM `T1ï¼a` INNER JOIN `T1ï¼b`; ï½¶ ï½± ï½» ï½± SELECT * FROM `T1ï¼a` JOIN `T1ï¼b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `T1ï¼a` INNER JOIN `T1ï¼b` USING (`C1`); -C1 C1 -ï½± ï½± +C1 +ï½± SELECT * FROM `T1ï¼a` CROSS JOIN `T1ï¼b`; C1 C1 ï½± ï½± ï½¶ ï½± ï½» ï½± SELECT * FROM `T1ï¼a` LEFT JOIN `T1ï¼b` USING (`C1`); -C1 C1 -ï½± ï½± -ï½¶ NULL -ï½» NULL +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `T1ï¼a` LEFT JOIN `T1ï¼b` ON (`T1ï¼a`.`C1` = `T1ï¼b`.`C1`); C1 C1 ï½± ï½± ï½¶ NULL ï½» NULL SELECT * FROM `T1ï¼b` RIGHT JOIN `T1ï¼a` USING (`C1`); -C1 C1 -ï½± ï½± -NULL ï½¶ -NULL ï½» +C1 +ï½± +ï½¶ +ï½» SELECT * FROM `T1ï¼b` RIGHT JOIN `T1ï¼a` ON (`T1ï¼a`.`C1` = `T1ï¼b`.`C1`); C1 C1 ï½± ï½± @@ -481,31 +481,31 @@ SELECT * FROM `T11a` INNER JOIN `T11b`; ã‹ ã‚ ã• ã‚ SELECT * FROM `T11a` JOIN `T11b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `T11a` INNER JOIN `T11b` USING (`C1`); -C1 C1 -ã‚ ã‚ +C1 +ã‚ SELECT * FROM `T11a` CROSS JOIN `T11b`; C1 C1 ã‚ ã‚ ã‹ ã‚ ã• ã‚ SELECT * FROM `T11a` LEFT JOIN `T11b` USING (`C1`); -C1 C1 -ã‚ ã‚ -ã‹ NULL -ã• NULL +C1 +ã‚ +ã‹ +ã• SELECT * FROM `T11a` LEFT JOIN `T11b` ON (`T11a`.`C1` = `T11b`.`C1`); C1 C1 ã‚ ã‚ ã‹ NULL ã• NULL SELECT * FROM `T11b` RIGHT JOIN `T11a` USING (`C1`); -C1 C1 -ã‚ ã‚ -NULL ã‹ -NULL ã• +C1 +ã‚ +ã‹ +ã• SELECT * FROM `T11b` RIGHT JOIN `T11a` ON (`T11a`.`C1` = `T11b`.`C1`); C1 C1 ã‚ ã‚ @@ -522,31 +522,31 @@ SELECT * FROM `T12a` INNER JOIN `T12b`; é¾– é¾” é¾— é¾” SELECT * FROM `T12a` JOIN `T12b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `T12a` INNER JOIN `T12b` USING (`C1`); -C1 C1 -é¾” é¾” +C1 +é¾” SELECT * FROM `T12a` CROSS JOIN `T12b`; C1 C1 é¾” é¾” é¾– é¾” é¾— é¾” SELECT * FROM `T12a` LEFT JOIN `T12b` USING (`C1`); -C1 C1 -é¾” é¾” -é¾– NULL -é¾— NULL +C1 +é¾” +é¾– +é¾— SELECT * FROM `T12a` LEFT JOIN `T12b` ON (`T12a`.`C1` = `T12b`.`C1`); C1 C1 é¾” é¾” é¾– NULL é¾— NULL SELECT * FROM `T12b` RIGHT JOIN `T12a` USING (`C1`); -C1 C1 -é¾” é¾” -NULL é¾– -NULL é¾— +C1 +é¾” +é¾– +é¾— SELECT * FROM `T12b` RIGHT JOIN `T12a` ON (`T12a`.`C1` = `T12b`.`C1`); C1 C1 é¾” é¾” diff --git a/mysql-test/suite/jp/r/jp_select_sjis.result b/mysql-test/suite/jp/r/jp_select_sjis.result index d48d08d745f..652b538fb88 100644 --- a/mysql-test/suite/jp/r/jp_select_sjis.result +++ b/mysql-test/suite/jp/r/jp_select_sjis.result @@ -118,6 +118,7 @@ SELECT * FROM ` êê‘ê’ê“ê”ê•ê–ê—ê˜ê™êšê›êœêêžEEEEE SELECT * FROM `‚s‚R`; ‚b‚P + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT * FROM `‚s‚S`; ‚b‚P @@ -201,6 +202,7 @@ SELECT * FROM ` êê‘ê’ê“ê”ê•ê–ê—ê˜ê™êšê›êœêêžEEEEE SELECT * FROM `‚s‚U`; ‚b‚P + ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ SELECT * FROM `‚s‚V`; ‚b‚P @@ -285,6 +287,7 @@ SELECT * FROM ` SELECT * FROM `‚s‚X`; ‚b‚P ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + SELECT * FROM `‚s‚P‚O`; ‚b‚P !"#$%&'()*+,-./ @@ -368,6 +371,7 @@ SELECT * FROM ` SELECT * FROM `‚s‚P‚Q`; ‚b‚P ƒ\\•\—\\‰\Ž\\“\”\–\˜\‘\’\™\š\›\œ\\ž\ + drop table `‚s‚P`; drop table `‚s‚Q`; drop table `‚s‚R`; diff --git a/mysql-test/suite/jp/t/jp_alter_sjis.test b/mysql-test/suite/jp/t/jp_alter_sjis.test index b7b31862599..f250afcf5dd 100644 --- a/mysql-test/suite/jp/t/jp_alter_sjis.test +++ b/mysql-test/suite/jp/t/jp_alter_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis SET NAMES sjis; SET character_set_database = sjis; diff --git a/mysql-test/suite/jp/t/jp_alter_ucs2.test b/mysql-test/suite/jp/t/jp_alter_ucs2.test index 6c5b3132edf..27cf5b72839 100644 --- a/mysql-test/suite/jp/t/jp_alter_ucs2.test +++ b/mysql-test/suite/jp/t/jp_alter_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_alter_ujis.test b/mysql-test/suite/jp/t/jp_alter_ujis.test index d388d20c49b..b817f608446 100644 --- a/mysql-test/suite/jp/t/jp_alter_ujis.test +++ b/mysql-test/suite/jp/t/jp_alter_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_alter_utf8.test b/mysql-test/suite/jp/t/jp_alter_utf8.test index 6771343f38f..60a67485ba5 100644 --- a/mysql-test/suite/jp/t/jp_alter_utf8.test +++ b/mysql-test/suite/jp/t/jp_alter_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings DROP TABLE IF EXISTS `アアア`; DROP TABLE IF EXISTS `イイイ`; diff --git a/mysql-test/suite/jp/t/jp_charlength_sjis.test b/mysql-test/suite/jp/t/jp_charlength_sjis.test index 5f3543bb7a6..350605450da 100644 --- a/mysql-test/suite/jp/t/jp_charlength_sjis.test +++ b/mysql-test/suite/jp/t/jp_charlength_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_charlength_ucs2.test b/mysql-test/suite/jp/t/jp_charlength_ucs2.test index 2db9db7cfc6..714ced47ff8 100644 --- a/mysql-test/suite/jp/t/jp_charlength_ucs2.test +++ b/mysql-test/suite/jp/t/jp_charlength_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_charlength_ujis.test b/mysql-test/suite/jp/t/jp_charlength_ujis.test index 08973231f27..923bffef540 100644 --- a/mysql-test/suite/jp/t/jp_charlength_ujis.test +++ b/mysql-test/suite/jp/t/jp_charlength_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_charlength_utf8.test b/mysql-test/suite/jp/t/jp_charlength_utf8.test index a3f74db27ee..bc099caf74a 100644 --- a/mysql-test/suite/jp/t/jp_charlength_utf8.test +++ b/mysql-test/suite/jp/t/jp_charlength_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_charset_sjis.test b/mysql-test/suite/jp/t/jp_charset_sjis.test index 3a9f264bdfe..276be86cd9d 100644 --- a/mysql-test/suite/jp/t/jp_charset_sjis.test +++ b/mysql-test/suite/jp/t/jp_charset_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_charset_ucs2.test b/mysql-test/suite/jp/t/jp_charset_ucs2.test index 5183071033b..f7971095fa6 100644 --- a/mysql-test/suite/jp/t/jp_charset_ucs2.test +++ b/mysql-test/suite/jp/t/jp_charset_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_charset_ujis.test b/mysql-test/suite/jp/t/jp_charset_ujis.test index de9ef318530..a8a6544537a 100644 --- a/mysql-test/suite/jp/t/jp_charset_ujis.test +++ b/mysql-test/suite/jp/t/jp_charset_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_charset_utf8.test b/mysql-test/suite/jp/t/jp_charset_utf8.test index 2d73daba42a..7d8311c2f72 100644 --- a/mysql-test/suite/jp/t/jp_charset_utf8.test +++ b/mysql-test/suite/jp/t/jp_charset_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_convert_sjis.test b/mysql-test/suite/jp/t/jp_convert_sjis.test index 93fa33029bf..835328c92eb 100644 --- a/mysql-test/suite/jp/t/jp_convert_sjis.test +++ b/mysql-test/suite/jp/t/jp_convert_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis SET NAMES sjis; SET character_set_database = sjis; diff --git a/mysql-test/suite/jp/t/jp_convert_ucs2.test b/mysql-test/suite/jp/t/jp_convert_ucs2.test index 88b0d0c9cba..3ed4efe158d 100644 --- a/mysql-test/suite/jp/t/jp_convert_ucs2.test +++ b/mysql-test/suite/jp/t/jp_convert_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_convert_ujis.test b/mysql-test/suite/jp/t/jp_convert_ujis.test index d6303b66f34..4409b6cad90 100644 --- a/mysql-test/suite/jp/t/jp_convert_ujis.test +++ b/mysql-test/suite/jp/t/jp_convert_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_convert_utf8.test b/mysql-test/suite/jp/t/jp_convert_utf8.test index a687b0f06cb..e7c180e72fc 100644 --- a/mysql-test/suite/jp/t/jp_convert_utf8.test +++ b/mysql-test/suite/jp/t/jp_convert_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_create_tbl_sjis.test b/mysql-test/suite/jp/t/jp_create_tbl_sjis.test index 45c0b24388b..93f3ac3c4a3 100644 --- a/mysql-test/suite/jp/t/jp_create_tbl_sjis.test +++ b/mysql-test/suite/jp/t/jp_create_tbl_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis SET NAMES sjis; SET character_set_database = sjis; diff --git a/mysql-test/suite/jp/t/jp_create_tbl_ucs2.test b/mysql-test/suite/jp/t/jp_create_tbl_ucs2.test index 519697e3530..553ef8a4dad 100644 --- a/mysql-test/suite/jp/t/jp_create_tbl_ucs2.test +++ b/mysql-test/suite/jp/t/jp_create_tbl_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_create_tbl_ujis.test b/mysql-test/suite/jp/t/jp_create_tbl_ujis.test index ac70facdce9..1106ddc1417 100644 --- a/mysql-test/suite/jp/t/jp_create_tbl_ujis.test +++ b/mysql-test/suite/jp/t/jp_create_tbl_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_create_tbl_utf8.test b/mysql-test/suite/jp/t/jp_create_tbl_utf8.test index 5c816eb169a..9b0ece77e34 100644 --- a/mysql-test/suite/jp/t/jp_create_tbl_utf8.test +++ b/mysql-test/suite/jp/t/jp_create_tbl_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings DROP TABLE IF EXISTS `アアア`; DROP TABLE IF EXISTS `イイイ`; diff --git a/mysql-test/suite/jp/t/jp_enum_sjis.test b/mysql-test/suite/jp/t/jp_enum_sjis.test index 2ea1bf320e0..c433e0bcac4 100644 --- a/mysql-test/suite/jp/t/jp_enum_sjis.test +++ b/mysql-test/suite/jp/t/jp_enum_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_enum_ucs2.test b/mysql-test/suite/jp/t/jp_enum_ucs2.test index 2239ebab478..79f5952cf97 100644 --- a/mysql-test/suite/jp/t/jp_enum_ucs2.test +++ b/mysql-test/suite/jp/t/jp_enum_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc # half-with kana is not handled correctly in 4.1 diff --git a/mysql-test/suite/jp/t/jp_enum_ujis.test b/mysql-test/suite/jp/t/jp_enum_ujis.test index da41165aad0..f48d176ec6b 100644 --- a/mysql-test/suite/jp/t/jp_enum_ujis.test +++ b/mysql-test/suite/jp/t/jp_enum_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_enum_utf8.test b/mysql-test/suite/jp/t/jp_enum_utf8.test index 4ce3576b604..64fe2129164 100644 --- a/mysql-test/suite/jp/t/jp_enum_utf8.test +++ b/mysql-test/suite/jp/t/jp_enum_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_insert_sjis.test b/mysql-test/suite/jp/t/jp_insert_sjis.test index 0266ad1eaca..a940eeb5782 100644 --- a/mysql-test/suite/jp/t/jp_insert_sjis.test +++ b/mysql-test/suite/jp/t/jp_insert_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_insert_ucs2.test b/mysql-test/suite/jp/t/jp_insert_ucs2.test index 9b0a02e57d8..443f6f1107b 100644 --- a/mysql-test/suite/jp/t/jp_insert_ucs2.test +++ b/mysql-test/suite/jp/t/jp_insert_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_insert_ujis.test b/mysql-test/suite/jp/t/jp_insert_ujis.test index 7b6d2838386..ab82db59326 100644 --- a/mysql-test/suite/jp/t/jp_insert_ujis.test +++ b/mysql-test/suite/jp/t/jp_insert_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_insert_utf8.test b/mysql-test/suite/jp/t/jp_insert_utf8.test index ef6acb90063..e8c41bab4ea 100644 --- a/mysql-test/suite/jp/t/jp_insert_utf8.test +++ b/mysql-test/suite/jp/t/jp_insert_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_instr_sjis.test b/mysql-test/suite/jp/t/jp_instr_sjis.test index c19b5f2b14c..83480ea0267 100644 --- a/mysql-test/suite/jp/t/jp_instr_sjis.test +++ b/mysql-test/suite/jp/t/jp_instr_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_instr_ucs2.test b/mysql-test/suite/jp/t/jp_instr_ucs2.test index b8f83961e90..7b442d09a3d 100644 --- a/mysql-test/suite/jp/t/jp_instr_ucs2.test +++ b/mysql-test/suite/jp/t/jp_instr_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_instr_ujis.test b/mysql-test/suite/jp/t/jp_instr_ujis.test index 696e1147372..d0373ba73ce 100644 --- a/mysql-test/suite/jp/t/jp_instr_ujis.test +++ b/mysql-test/suite/jp/t/jp_instr_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_instr_utf8.test b/mysql-test/suite/jp/t/jp_instr_utf8.test index b25b72bc8d0..c7491101872 100644 --- a/mysql-test/suite/jp/t/jp_instr_utf8.test +++ b/mysql-test/suite/jp/t/jp_instr_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_join_sjis.test b/mysql-test/suite/jp/t/jp_join_sjis.test index 30b23913929..77d1dc15c5c 100644 --- a/mysql-test/suite/jp/t/jp_join_sjis.test +++ b/mysql-test/suite/jp/t/jp_join_sjis.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_join_ucs2.test b/mysql-test/suite/jp/t/jp_join_ucs2.test index 27e49203dd2..276af80f7af 100644 --- a/mysql-test/suite/jp/t/jp_join_ucs2.test +++ b/mysql-test/suite/jp/t/jp_join_ucs2.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_join_ujis.test b/mysql-test/suite/jp/t/jp_join_ujis.test index 079f260cc26..5716ee12e60 100644 --- a/mysql-test/suite/jp/t/jp_join_ujis.test +++ b/mysql-test/suite/jp/t/jp_join_ujis.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_join_utf8.test b/mysql-test/suite/jp/t/jp_join_utf8.test index 0b2f033f8bb..36f8e930bc3 100644 --- a/mysql-test/suite/jp/t/jp_join_utf8.test +++ b/mysql-test/suite/jp/t/jp_join_utf8.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_left_sjis.test b/mysql-test/suite/jp/t/jp_left_sjis.test index 5d69d9892e2..e93e92493a1 100644 --- a/mysql-test/suite/jp/t/jp_left_sjis.test +++ b/mysql-test/suite/jp/t/jp_left_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_left_ucs2.test b/mysql-test/suite/jp/t/jp_left_ucs2.test index 59d10b7d736..2c1be4a7e6a 100644 --- a/mysql-test/suite/jp/t/jp_left_ucs2.test +++ b/mysql-test/suite/jp/t/jp_left_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_left_ujis.test b/mysql-test/suite/jp/t/jp_left_ujis.test index 718639cd8a4..f639bf643df 100644 --- a/mysql-test/suite/jp/t/jp_left_ujis.test +++ b/mysql-test/suite/jp/t/jp_left_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_left_utf8.test b/mysql-test/suite/jp/t/jp_left_utf8.test index f9c99718e0f..63d9061a879 100644 --- a/mysql-test/suite/jp/t/jp_left_utf8.test +++ b/mysql-test/suite/jp/t/jp_left_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_length_sjis.test b/mysql-test/suite/jp/t/jp_length_sjis.test index 7023891b7f0..81121a4432e 100644 --- a/mysql-test/suite/jp/t/jp_length_sjis.test +++ b/mysql-test/suite/jp/t/jp_length_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_length_ucs2.test b/mysql-test/suite/jp/t/jp_length_ucs2.test index 9951c9b6cd1..1dcc975d868 100644 --- a/mysql-test/suite/jp/t/jp_length_ucs2.test +++ b/mysql-test/suite/jp/t/jp_length_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_length_ujis.test b/mysql-test/suite/jp/t/jp_length_ujis.test index ac3aef2c768..ad41c7a7113 100644 --- a/mysql-test/suite/jp/t/jp_length_ujis.test +++ b/mysql-test/suite/jp/t/jp_length_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_length_utf8.test b/mysql-test/suite/jp/t/jp_length_utf8.test index 5c5021f37be..7bfe1896034 100644 --- a/mysql-test/suite/jp/t/jp_length_utf8.test +++ b/mysql-test/suite/jp/t/jp_length_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_like_sjis.test b/mysql-test/suite/jp/t/jp_like_sjis.test index 5c41b9ff7ef..1cb7aadb876 100644 --- a/mysql-test/suite/jp/t/jp_like_sjis.test +++ b/mysql-test/suite/jp/t/jp_like_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_like_ucs2.test b/mysql-test/suite/jp/t/jp_like_ucs2.test index feae40de49e..1f9b7c09b9d 100644 --- a/mysql-test/suite/jp/t/jp_like_ucs2.test +++ b/mysql-test/suite/jp/t/jp_like_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_like_ujis.test b/mysql-test/suite/jp/t/jp_like_ujis.test index 29ef7c5d48b..56c4fa8a8b0 100644 --- a/mysql-test/suite/jp/t/jp_like_ujis.test +++ b/mysql-test/suite/jp/t/jp_like_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_like_utf8.test b/mysql-test/suite/jp/t/jp_like_utf8.test index 4247242029d..f6cc895d814 100644 --- a/mysql-test/suite/jp/t/jp_like_utf8.test +++ b/mysql-test/suite/jp/t/jp_like_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_locate_sjis.test b/mysql-test/suite/jp/t/jp_locate_sjis.test index 92c671199b6..a015109e2a3 100644 --- a/mysql-test/suite/jp/t/jp_locate_sjis.test +++ b/mysql-test/suite/jp/t/jp_locate_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_locate_ucs2.test b/mysql-test/suite/jp/t/jp_locate_ucs2.test index d00ad67235a..111caefb02e 100644 --- a/mysql-test/suite/jp/t/jp_locate_ucs2.test +++ b/mysql-test/suite/jp/t/jp_locate_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_locate_ujis.test b/mysql-test/suite/jp/t/jp_locate_ujis.test index 5375fad75db..872555a4532 100644 --- a/mysql-test/suite/jp/t/jp_locate_ujis.test +++ b/mysql-test/suite/jp/t/jp_locate_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_locate_utf8.test b/mysql-test/suite/jp/t/jp_locate_utf8.test index cbf6714e322..85d2e69fd60 100644 --- a/mysql-test/suite/jp/t/jp_locate_utf8.test +++ b/mysql-test/suite/jp/t/jp_locate_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_lpad_sjis.test b/mysql-test/suite/jp/t/jp_lpad_sjis.test index 7038112cbc8..4b18402473d 100644 --- a/mysql-test/suite/jp/t/jp_lpad_sjis.test +++ b/mysql-test/suite/jp/t/jp_lpad_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_lpad_ucs2.test b/mysql-test/suite/jp/t/jp_lpad_ucs2.test index e3bead0855a..95dd088abce 100644 --- a/mysql-test/suite/jp/t/jp_lpad_ucs2.test +++ b/mysql-test/suite/jp/t/jp_lpad_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_lpad_ujis.test b/mysql-test/suite/jp/t/jp_lpad_ujis.test index eea4877ec3a..c1149a67207 100644 --- a/mysql-test/suite/jp/t/jp_lpad_ujis.test +++ b/mysql-test/suite/jp/t/jp_lpad_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_lpad_utf8.test b/mysql-test/suite/jp/t/jp_lpad_utf8.test index 599bf5eba28..42aa2fd860b 100644 --- a/mysql-test/suite/jp/t/jp_lpad_utf8.test +++ b/mysql-test/suite/jp/t/jp_lpad_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_ltrim_sjis.test b/mysql-test/suite/jp/t/jp_ltrim_sjis.test index 864238df07c..7b5e20ec9a4 100644 --- a/mysql-test/suite/jp/t/jp_ltrim_sjis.test +++ b/mysql-test/suite/jp/t/jp_ltrim_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_ltrim_ucs2.test b/mysql-test/suite/jp/t/jp_ltrim_ucs2.test index 0ae647f5222..25a6eaabc60 100644 --- a/mysql-test/suite/jp/t/jp_ltrim_ucs2.test +++ b/mysql-test/suite/jp/t/jp_ltrim_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_ltrim_ujis.test b/mysql-test/suite/jp/t/jp_ltrim_ujis.test index 64363aa330b..fbba90a38b5 100644 --- a/mysql-test/suite/jp/t/jp_ltrim_ujis.test +++ b/mysql-test/suite/jp/t/jp_ltrim_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_ltrim_utf8.test b/mysql-test/suite/jp/t/jp_ltrim_utf8.test index 846ce11163b..b33d22e459d 100644 --- a/mysql-test/suite/jp/t/jp_ltrim_utf8.test +++ b/mysql-test/suite/jp/t/jp_ltrim_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_ps_sjis.test b/mysql-test/suite/jp/t/jp_ps_sjis.test index cc93dca2a79..2e09c51cf7a 100644 --- a/mysql-test/suite/jp/t/jp_ps_sjis.test +++ b/mysql-test/suite/jp/t/jp_ps_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/jp/t/jp_ps_ujis.test b/mysql-test/suite/jp/t/jp_ps_ujis.test index 7d61c12e496..ab64fcf5216 100644 --- a/mysql-test/suite/jp/t/jp_ps_ujis.test +++ b/mysql-test/suite/jp/t/jp_ps_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_replace_sjis.test b/mysql-test/suite/jp/t/jp_replace_sjis.test index 811d3350a34..91996ba83e9 100644 --- a/mysql-test/suite/jp/t/jp_replace_sjis.test +++ b/mysql-test/suite/jp/t/jp_replace_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_replace_ucs2.test b/mysql-test/suite/jp/t/jp_replace_ucs2.test index 7739a30cd9c..3043115ef62 100644 --- a/mysql-test/suite/jp/t/jp_replace_ucs2.test +++ b/mysql-test/suite/jp/t/jp_replace_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_replace_ujis.test b/mysql-test/suite/jp/t/jp_replace_ujis.test index 3d8724e63d5..1ba29426010 100644 --- a/mysql-test/suite/jp/t/jp_replace_ujis.test +++ b/mysql-test/suite/jp/t/jp_replace_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_replace_utf8.test b/mysql-test/suite/jp/t/jp_replace_utf8.test index 1d89a43648b..81b892a5df7 100644 --- a/mysql-test/suite/jp/t/jp_replace_utf8.test +++ b/mysql-test/suite/jp/t/jp_replace_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_reverse_sjis.test b/mysql-test/suite/jp/t/jp_reverse_sjis.test index c1e2b2a17ca..5d9014dc3a6 100644 --- a/mysql-test/suite/jp/t/jp_reverse_sjis.test +++ b/mysql-test/suite/jp/t/jp_reverse_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_reverse_ucs2.test b/mysql-test/suite/jp/t/jp_reverse_ucs2.test index d91ec7f70e8..95afeeda570 100644 --- a/mysql-test/suite/jp/t/jp_reverse_ucs2.test +++ b/mysql-test/suite/jp/t/jp_reverse_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_reverse_ujis.test b/mysql-test/suite/jp/t/jp_reverse_ujis.test index d37d363f59a..0d66201c367 100644 --- a/mysql-test/suite/jp/t/jp_reverse_ujis.test +++ b/mysql-test/suite/jp/t/jp_reverse_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_reverse_utf8.test b/mysql-test/suite/jp/t/jp_reverse_utf8.test index 4e53d4be049..ee323b64ada 100644 --- a/mysql-test/suite/jp/t/jp_reverse_utf8.test +++ b/mysql-test/suite/jp/t/jp_reverse_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_right_sjis.test b/mysql-test/suite/jp/t/jp_right_sjis.test index f481ec532ec..edf3795c510 100644 --- a/mysql-test/suite/jp/t/jp_right_sjis.test +++ b/mysql-test/suite/jp/t/jp_right_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_right_ucs2.test b/mysql-test/suite/jp/t/jp_right_ucs2.test index 23ca2fa4fae..d3132b3e11f 100644 --- a/mysql-test/suite/jp/t/jp_right_ucs2.test +++ b/mysql-test/suite/jp/t/jp_right_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_right_ujis.test b/mysql-test/suite/jp/t/jp_right_ujis.test index b5284489c7e..92cd7ed83dc 100644 --- a/mysql-test/suite/jp/t/jp_right_ujis.test +++ b/mysql-test/suite/jp/t/jp_right_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_right_utf8.test b/mysql-test/suite/jp/t/jp_right_utf8.test index 863755c1dcf..6d884e55771 100644 --- a/mysql-test/suite/jp/t/jp_right_utf8.test +++ b/mysql-test/suite/jp/t/jp_right_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_rpad_sjis.test b/mysql-test/suite/jp/t/jp_rpad_sjis.test index cc008631548..1bf752020bb 100644 --- a/mysql-test/suite/jp/t/jp_rpad_sjis.test +++ b/mysql-test/suite/jp/t/jp_rpad_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_rpad_ucs2.test b/mysql-test/suite/jp/t/jp_rpad_ucs2.test index ca5059497d3..f3876dafe2f 100644 --- a/mysql-test/suite/jp/t/jp_rpad_ucs2.test +++ b/mysql-test/suite/jp/t/jp_rpad_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_rpad_ujis.test b/mysql-test/suite/jp/t/jp_rpad_ujis.test index d7725b80af7..6ace7442b8d 100644 --- a/mysql-test/suite/jp/t/jp_rpad_ujis.test +++ b/mysql-test/suite/jp/t/jp_rpad_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_rpad_utf8.test b/mysql-test/suite/jp/t/jp_rpad_utf8.test index b5a335bc6ce..6c075e20cb9 100644 --- a/mysql-test/suite/jp/t/jp_rpad_utf8.test +++ b/mysql-test/suite/jp/t/jp_rpad_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_rtrim_sjis.test b/mysql-test/suite/jp/t/jp_rtrim_sjis.test index c80cf9410f9..1a9511698ce 100644 --- a/mysql-test/suite/jp/t/jp_rtrim_sjis.test +++ b/mysql-test/suite/jp/t/jp_rtrim_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_rtrim_ucs2.test b/mysql-test/suite/jp/t/jp_rtrim_ucs2.test index 0fac38d12d1..2132eaa5cbe 100644 --- a/mysql-test/suite/jp/t/jp_rtrim_ucs2.test +++ b/mysql-test/suite/jp/t/jp_rtrim_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_rtrim_ujis.test b/mysql-test/suite/jp/t/jp_rtrim_ujis.test index 46cda84dd55..07b42b96dfd 100644 --- a/mysql-test/suite/jp/t/jp_rtrim_ujis.test +++ b/mysql-test/suite/jp/t/jp_rtrim_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_rtrim_utf8.test b/mysql-test/suite/jp/t/jp_rtrim_utf8.test index 4880a42db3e..48f863d891c 100644 --- a/mysql-test/suite/jp/t/jp_rtrim_utf8.test +++ b/mysql-test/suite/jp/t/jp_rtrim_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_select_sjis.test b/mysql-test/suite/jp/t/jp_select_sjis.test index d84ed7a4b2c..fc80ce01471 100644 --- a/mysql-test/suite/jp/t/jp_select_sjis.test +++ b/mysql-test/suite/jp/t/jp_select_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_select_ucs2.test b/mysql-test/suite/jp/t/jp_select_ucs2.test index 2e4602e7ea4..6cebdb65db1 100644 --- a/mysql-test/suite/jp/t/jp_select_ucs2.test +++ b/mysql-test/suite/jp/t/jp_select_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_select_ujis.test b/mysql-test/suite/jp/t/jp_select_ujis.test index 4ad9e581a92..0e4d1ffc771 100644 --- a/mysql-test/suite/jp/t/jp_select_ujis.test +++ b/mysql-test/suite/jp/t/jp_select_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_select_utf8.test b/mysql-test/suite/jp/t/jp_select_utf8.test index e614b9ccfb0..88fd6677f7c 100644 --- a/mysql-test/suite/jp/t/jp_select_utf8.test +++ b/mysql-test/suite/jp/t/jp_select_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_subquery_sjis.test b/mysql-test/suite/jp/t/jp_subquery_sjis.test index 5292c7a2519..b6aa3e52f51 100644 --- a/mysql-test/suite/jp/t/jp_subquery_sjis.test +++ b/mysql-test/suite/jp/t/jp_subquery_sjis.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_subquery_ucs2.test b/mysql-test/suite/jp/t/jp_subquery_ucs2.test index 311433438f4..d2c1fd29358 100644 --- a/mysql-test/suite/jp/t/jp_subquery_ucs2.test +++ b/mysql-test/suite/jp/t/jp_subquery_ucs2.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_subquery_ujis.test b/mysql-test/suite/jp/t/jp_subquery_ujis.test index 67c9f00fd85..2fd0427481c 100644 --- a/mysql-test/suite/jp/t/jp_subquery_ujis.test +++ b/mysql-test/suite/jp/t/jp_subquery_ujis.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_subquery_utf8.test b/mysql-test/suite/jp/t/jp_subquery_utf8.test index 97c2df8ce30..460f1c1a903 100644 --- a/mysql-test/suite/jp/t/jp_subquery_utf8.test +++ b/mysql-test/suite/jp/t/jp_subquery_utf8.test @@ -1,3 +1,4 @@ +-- source include/have_innodb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_substring_sjis.test b/mysql-test/suite/jp/t/jp_substring_sjis.test index ac929114880..a6c9496a873 100644 --- a/mysql-test/suite/jp/t/jp_substring_sjis.test +++ b/mysql-test/suite/jp/t/jp_substring_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_substring_ucs2.test b/mysql-test/suite/jp/t/jp_substring_ucs2.test index f3cd5550072..71c0f903aa8 100644 --- a/mysql-test/suite/jp/t/jp_substring_ucs2.test +++ b/mysql-test/suite/jp/t/jp_substring_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_substring_ujis.test b/mysql-test/suite/jp/t/jp_substring_ujis.test index c201c7148da..c93ab761352 100644 --- a/mysql-test/suite/jp/t/jp_substring_ujis.test +++ b/mysql-test/suite/jp/t/jp_substring_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_substring_utf8.test b/mysql-test/suite/jp/t/jp_substring_utf8.test index 9f88115c899..3bd1bbbb491 100644 --- a/mysql-test/suite/jp/t/jp_substring_utf8.test +++ b/mysql-test/suite/jp/t/jp_substring_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_trim_sjis.test b/mysql-test/suite/jp/t/jp_trim_sjis.test index 0f6821605ed..04dc832d49f 100644 --- a/mysql-test/suite/jp/t/jp_trim_sjis.test +++ b/mysql-test/suite/jp/t/jp_trim_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_trim_ucs2.test b/mysql-test/suite/jp/t/jp_trim_ucs2.test index 1d8a12650e0..7c82c249dcc 100644 --- a/mysql-test/suite/jp/t/jp_trim_ucs2.test +++ b/mysql-test/suite/jp/t/jp_trim_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_trim_ujis.test b/mysql-test/suite/jp/t/jp_trim_ujis.test index de401217fcf..bcd9942f0ae 100644 --- a/mysql-test/suite/jp/t/jp_trim_ujis.test +++ b/mysql-test/suite/jp/t/jp_trim_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_trim_utf8.test b/mysql-test/suite/jp/t/jp_trim_utf8.test index 0777de15c36..f6f487254bc 100644 --- a/mysql-test/suite/jp/t/jp_trim_utf8.test +++ b/mysql-test/suite/jp/t/jp_trim_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_union_ujis.test b/mysql-test/suite/jp/t/jp_union_ujis.test index e36d18c85c0..c1252b9f5a2 100644 --- a/mysql-test/suite/jp/t/jp_union_ujis.test +++ b/mysql-test/suite/jp/t/jp_union_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_update_sjis.test b/mysql-test/suite/jp/t/jp_update_sjis.test index 0dc7372ae92..4b3733cff76 100644 --- a/mysql-test/suite/jp/t/jp_update_sjis.test +++ b/mysql-test/suite/jp/t/jp_update_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_update_ucs2.test b/mysql-test/suite/jp/t/jp_update_ucs2.test index 7a3c1233210..6ad7db9c5a0 100644 --- a/mysql-test/suite/jp/t/jp_update_ucs2.test +++ b/mysql-test/suite/jp/t/jp_update_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_update_ujis.test b/mysql-test/suite/jp/t/jp_update_ujis.test index 852e45b9eeb..14ca6580f04 100644 --- a/mysql-test/suite/jp/t/jp_update_ujis.test +++ b/mysql-test/suite/jp/t/jp_update_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_update_utf8.test b/mysql-test/suite/jp/t/jp_update_utf8.test index b4b3d18ecab..135f6e6981c 100644 --- a/mysql-test/suite/jp/t/jp_update_utf8.test +++ b/mysql-test/suite/jp/t/jp_update_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; diff --git a/mysql-test/suite/jp/t/jp_where_sjis.test b/mysql-test/suite/jp/t/jp_where_sjis.test index 452d137f643..890a4c28f3c 100644 --- a/mysql-test/suite/jp/t/jp_where_sjis.test +++ b/mysql-test/suite/jp/t/jp_where_sjis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --character_set sjis --disable_warnings drop table if exists `‚s‚P`; diff --git a/mysql-test/suite/jp/t/jp_where_ucs2.test b/mysql-test/suite/jp/t/jp_where_ucs2.test index 3b82eacd615..7d90faaaa89 100644 --- a/mysql-test/suite/jp/t/jp_where_ucs2.test +++ b/mysql-test/suite/jp/t/jp_where_ucs2.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ucs2.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_where_ujis.test b/mysql-test/suite/jp/t/jp_where_ujis.test index e96404fbb17..2f0924e8c8e 100644 --- a/mysql-test/suite/jp/t/jp_where_ujis.test +++ b/mysql-test/suite/jp/t/jp_where_ujis.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --source include/have_ujis.inc --disable_warnings diff --git a/mysql-test/suite/jp/t/jp_where_utf8.test b/mysql-test/suite/jp/t/jp_where_utf8.test index 7280bc33f21..231553e8819 100644 --- a/mysql-test/suite/jp/t/jp_where_utf8.test +++ b/mysql-test/suite/jp/t/jp_where_utf8.test @@ -1,3 +1,5 @@ +-- source include/have_innodb.inc +-- source include/have_bdb.inc --disable_warnings drop table if exists `T1`; drop table if exists `ï¼´ï¼’`; -- cgit v1.2.1 From 3228a2be669f5d92a607b8212c9c3260a02fd47f Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 9 Sep 2009 14:38:50 +0500 Subject: BUG#45638 - Create temporary table with engine innodb fails Create temporary InnoDB table fails on case insensitive filesystems, when lower_case_table_names is 2 (e.g. OS X) and temporary directory path contains upper case letters. The problem was that tmpdir prefix was converted to lower case when table was created, but was passed as is when table was opened. Fixed by leaving tmpdir prefix part intact. mysql-test/r/lowercase_mixed_tmpdir_innodb.result: A test case for BUG#45638. mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt: A test case for BUG#45638. mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh: A test case for BUG#45638. mysql-test/t/lowercase_mixed_tmpdir_innodb.test: A test case for BUG#45638. sql/handler.cc: Fixed get_canonical_filename() to not lowercase filesystem path prefix for temporary tables. --- mysql-test/r/lowercase_mixed_tmpdir_innodb.result | 6 ++++++ mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt | 2 ++ mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh | 6 ++++++ mysql-test/t/lowercase_mixed_tmpdir_innodb.test | 12 ++++++++++++ 4 files changed, 26 insertions(+) create mode 100755 mysql-test/r/lowercase_mixed_tmpdir_innodb.result create mode 100644 mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt create mode 100644 mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh create mode 100644 mysql-test/t/lowercase_mixed_tmpdir_innodb.test (limited to 'mysql-test') diff --git a/mysql-test/r/lowercase_mixed_tmpdir_innodb.result b/mysql-test/r/lowercase_mixed_tmpdir_innodb.result new file mode 100755 index 00000000000..a478b49cfda --- /dev/null +++ b/mysql-test/r/lowercase_mixed_tmpdir_innodb.result @@ -0,0 +1,6 @@ +drop table if exists t1; +create table t1 (id int) engine=InnoDB; +insert into t1 values (1); +create temporary table t2 engine=InnoDB select * from t1; +drop temporary table t2; +drop table t1; diff --git a/mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt b/mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt new file mode 100644 index 00000000000..272f91d629c --- /dev/null +++ b/mysql-test/t/lowercase_mixed_tmpdir_innodb-master.opt @@ -0,0 +1,2 @@ +--lower-case-table-names=2 +--tmpdir=$MYSQLTEST_VARDIR/tmp/MixedCase diff --git a/mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh b/mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh new file mode 100644 index 00000000000..95c26e3aa02 --- /dev/null +++ b/mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh @@ -0,0 +1,6 @@ +# This test requires a non-lowercase tmpdir directory on a case-sensitive +# filesystem. + +d="$MYSQLTEST_VARDIR/tmp/MixedCase" +test -d "$d" || mkdir "$d" +rm -f "$d"/* diff --git a/mysql-test/t/lowercase_mixed_tmpdir_innodb.test b/mysql-test/t/lowercase_mixed_tmpdir_innodb.test new file mode 100644 index 00000000000..e3b9b7b2a32 --- /dev/null +++ b/mysql-test/t/lowercase_mixed_tmpdir_innodb.test @@ -0,0 +1,12 @@ +--source include/have_lowercase2.inc +--source include/have_innodb.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t1 (id int) engine=InnoDB; +insert into t1 values (1); +create temporary table t2 engine=InnoDB select * from t1; +drop temporary table t2; +drop table t1; -- cgit v1.2.1 From 04ed3c9d94de3f426c97c7f193dbcfdd73886206 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 9 Sep 2009 14:42:12 +0500 Subject: BUG#29203 - archive tables have weird values in show table status Archive engine returns wrong values for average record length and max data length. With this fix they're calculated as following: - max data length is 2 ^ 63 where large files are supported and INT_MAX32 where this is not supported; - average record length is data length / records in data file. mysql-test/r/archive.result: A test case for BUG#29203. mysql-test/t/archive.test: A test case for BUG#29203. storage/archive/ha_archive.cc: Better estimation for average row length and maximal data file length. --- mysql-test/r/archive.result | 11 +++++++++++ mysql-test/t/archive.test | 11 +++++++++++ 2 files changed, 22 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index 8c26ea1ff82..3271e2f46d4 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12695,3 +12695,14 @@ a b 1 NULL 2 NULL DROP TABLE t1; +CREATE TABLE t1(a INT, b BLOB) ENGINE=archive; +SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM +INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; +DATA_LENGTH AVG_ROW_LENGTH +8666 15 +INSERT INTO t1 VALUES(1, 'sampleblob1'),(2, 'sampleblob2'); +SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM +INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; +DATA_LENGTH AVG_ROW_LENGTH +8700 4350 +DROP TABLE t1; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 7139d95ab49..afb8e413b2c 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1599,3 +1599,14 @@ INSERT INTO t1 VALUES (NULL, NULL),(NULL, NULL); FLUSH TABLE t1; SELECT * FROM t1 ORDER BY a; DROP TABLE t1; + +# +# BUG#29203 - archive tables have weird values in show table status +# +CREATE TABLE t1(a INT, b BLOB) ENGINE=archive; +SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM + INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; +INSERT INTO t1 VALUES(1, 'sampleblob1'),(2, 'sampleblob2'); +SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM + INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test'; +DROP TABLE t1; -- cgit v1.2.1 From 104d9ce76a68fd3da2f9217514a4c61454802c1d Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 10 Sep 2009 13:49:49 +0500 Subject: Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table partial backport of bug43138 fix mysql-test/r/warnings.result: test result mysql-test/t/warnings.test: test case sql/sql_class.cc: partial backport of bug43138 fix sql/sql_class.h: partial backport of bug43138 fix sql/sql_table.cc: partial backport of bug43138 fix --- mysql-test/r/warnings.result | 5 +++++ mysql-test/t/warnings.test | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 2e393aea9e4..8a87852d582 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -313,4 +313,9 @@ ERROR 22001: Data too long for column 'c_tinytext' at row 1 insert into t2 values(@q); ERROR 22001: Data too long for column 'c_tinyblob' at row 1 drop table t1, t2; +DROP TABLE t1; +ERROR 42S02: Unknown table 't1' +SHOW ERRORS; +Level Code Message +Error 1051 Unknown table 't1' End of 5.0 tests diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index 12421170eba..176f320e390 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -225,4 +225,11 @@ insert into t2 values(@q); drop table t1, t2; +# +# Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table +# +--error ER_BAD_TABLE_ERROR +DROP TABLE t1; +SHOW ERRORS; + --echo End of 5.0 tests -- cgit v1.2.1 From 63e56390a3f1a4f80642932a790ab74f28de8010 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 10 Sep 2009 03:18:29 -0600 Subject: WL#2110 (SIGNAL) WL#2265 (RESIGNAL) Manual merge of SIGNAL and RESIGNAL to mysql-trunk-signal, plus required dependencies. --- mysql-test/r/bigint.result | 4 +- mysql-test/r/cast.result | 2 +- mysql-test/r/ctype_utf8.result | 14 +- mysql-test/r/date_formats.result | 64 +- mysql-test/r/func_compress.result | 14 +- mysql-test/r/func_encrypt.result | 8 +- mysql-test/r/func_gconcat.result | 64 +- mysql-test/r/func_math.result | 10 +- mysql-test/r/func_str.result | 256 +- mysql-test/r/join_outer.result | 12 +- mysql-test/r/merge.result | 2 +- mysql-test/r/myisam-system.result | 2 +- mysql-test/r/partition.result | 1 - mysql-test/r/ps.result | 4 + mysql-test/r/query_cache.result | 8 +- mysql-test/r/signal.result | 2362 +++++++++++++++++ mysql-test/r/signal_code.result | 35 + mysql-test/r/signal_demo1.result | 270 ++ mysql-test/r/signal_demo2.result | 197 ++ mysql-test/r/signal_demo3.result | 143 ++ mysql-test/r/signal_sqlmode.result | 86 + mysql-test/r/sp-dynamic.result | 8 - mysql-test/r/sp-vars.result | 70 - mysql-test/r/sp.result | 51 +- mysql-test/r/sp_notembedded.result | 2 + mysql-test/r/strict.result | 52 +- mysql-test/r/trigger.result | 14 +- mysql-test/r/type_newdecimal.result | 76 +- mysql-test/r/view.result | 20 +- mysql-test/suite/binlog/r/binlog_index.result | 2 +- mysql-test/suite/binlog/r/binlog_unsafe.result | 27 - mysql-test/suite/innodb/r/innodb-zip.result | 26 - mysql-test/suite/ndb/r/ndb_bitfield.result | 4 +- mysql-test/suite/ndb/r/ndb_dd_basic.result | 6 +- mysql-test/suite/ndb/r/ndb_dd_ddl.result | 2 +- mysql-test/suite/ndb/r/ndb_gis.result | 4 +- mysql-test/suite/ndb/r/ndb_partition_error.result | 2 +- mysql-test/suite/ndb/r/ndb_row_format.result | 2 +- mysql-test/suite/ndb/r/ndb_single_user.result | 10 +- mysql-test/suite/rpl/r/rpl_EE_err.result | 2 +- mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result | 2 - mysql-test/t/func_gconcat.test | 32 + mysql-test/t/signal.test | 2685 ++++++++++++++++++++ mysql-test/t/signal_code.test | 57 + mysql-test/t/signal_demo1.test | 345 +++ mysql-test/t/signal_demo2.test | 207 ++ mysql-test/t/signal_demo3.test | 159 ++ mysql-test/t/signal_sqlmode.test | 123 + 48 files changed, 7056 insertions(+), 492 deletions(-) create mode 100644 mysql-test/r/signal.result create mode 100644 mysql-test/r/signal_code.result create mode 100644 mysql-test/r/signal_demo1.result create mode 100644 mysql-test/r/signal_demo2.result create mode 100644 mysql-test/r/signal_demo3.result create mode 100644 mysql-test/r/signal_sqlmode.result create mode 100644 mysql-test/t/signal.test create mode 100644 mysql-test/t/signal_code.test create mode 100644 mysql-test/t/signal_demo1.test create mode 100644 mysql-test/t/signal_demo2.test create mode 100644 mysql-test/t/signal_demo3.test create mode 100644 mysql-test/t/signal_sqlmode.test (limited to 'mysql-test') diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 4a5b8fcf4aa..7c23f1267c2 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -362,12 +362,12 @@ select cast(19999999999999999999 as signed); cast(19999999999999999999 as signed) 9223372036854775807 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select cast(-19999999999999999999 as signed); cast(-19999999999999999999 as signed) -9223372036854775808 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select -9223372036854775808; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def -9223372036854775808 8 20 20 N 32897 0 63 diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index dd61396e485..c53de220b60 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -380,7 +380,7 @@ select cast(s1 as decimal(7,2)) from t1; cast(s1 as decimal(7,2)) 99999.99 Warnings: -Error 1264 Out of range value for column 'cast(s1 as decimal(7,2))' at row 1 +Warning 1264 Out of range value for column 'cast(s1 as decimal(7,2))' at row 1 drop table t1; CREATE TABLE t1 (v varchar(10), tt tinytext, t text, mt mediumtext, lt longtext); diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 6f4ae965ca0..70f976ee9a7 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1631,27 +1631,27 @@ select char(0xff,0x8f using utf8); char(0xff,0x8f using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' select char(195 using utf8); char(195 using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'C3' +Warning 1300 Invalid utf8 character string: 'C3' select char(196 using utf8); char(196 using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'C4' +Warning 1300 Invalid utf8 character string: 'C4' select char(2557 using utf8); char(2557 using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FD' +Warning 1300 Invalid utf8 character string: 'FD' select convert(char(0xff,0x8f) using utf8); convert(char(0xff,0x8f) using utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' select hex(convert(char(2557 using latin1) using utf8)); hex(convert(char(2557 using latin1) using utf8)) 09C3BD @@ -1815,12 +1815,12 @@ select hex(char(0xFF using utf8)); hex(char(0xFF using utf8)) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF' +Warning 1300 Invalid utf8 character string: 'FF' select hex(convert(0xFF using utf8)); hex(convert(0xFF using utf8)) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF' +Warning 1300 Invalid utf8 character string: 'FF' select hex(_utf8 0x616263FF); ERROR HY000: Invalid utf8 character string: 'FF' select hex(_utf8 X'616263FF'); diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 7e185daa668..b0b8316fe33 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -89,7 +89,7 @@ select STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T'); STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T') NULL Warnings: -Error 1411 Incorrect time value: '22.30.61' for function str_to_date +Warning 1411 Incorrect time value: '22.30.61' for function str_to_date create table t1 (date char(30), format char(30) not null); insert into t1 values ('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'), @@ -361,21 +361,21 @@ Tuesday 52 2001 %W %u %x NULL 7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL Warnings: -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date -Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date -Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date -Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date -Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date +Warning 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '7 53 1998' for function str_to_date select date,format,concat(str_to_date(date, format),'') as con from t1; date format con 2003-01-02 10:11:12 PM %Y-%m-%d %H:%i:%S %p NULL @@ -395,21 +395,21 @@ Tuesday 52 2001 %W %u %x NULL 7 53 1998 %w %u %Y NULL NULL %m.%d.%Y NULL Warnings: -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date -Error 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date -Error 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date -Error 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date -Error 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date -Error 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date -Error 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date -Error 1411 Incorrect datetime value: '7 53 1998' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date +Warning 1411 Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date +Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Septembei 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '15 Ju 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sund 15 MA' for function str_to_date +Warning 1411 Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date +Warning 1411 Incorrect datetime value: 'Sunday 01 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date +Warning 1411 Incorrect datetime value: '7 53 1998' for function str_to_date truncate table t1; insert into t1 values ('10:20:10AM', '%h:%i:%s'), @@ -449,7 +449,7 @@ select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')); str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')) NULL Warnings: -Error 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date +Warning 1411 Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date explain extended select makedate(1997,1), addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM"),cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME), maketime(23,11,12),microsecond("1997-12-31 23:59:59.000001"); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result index b4e61d0e4fc..650cc9c2c70 100644 --- a/mysql-test/r/func_compress.result +++ b/mysql-test/r/func_compress.result @@ -65,8 +65,8 @@ NULL 50000 NULL Warnings: -Error 1259 ZLIB: Input data corrupted -Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted) +Warning 1259 ZLIB: Input data corrupted +Warning 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted) drop table t1; set @@global.max_allowed_packet=1048576*100; select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null; @@ -96,12 +96,12 @@ explain select * from t1 where uncompress(a) is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 Warnings: -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted select * from t1 where uncompress(a) is null; a foo Warnings: -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted explain select *, uncompress(a) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 @@ -109,13 +109,13 @@ select *, uncompress(a) from t1; a uncompress(a) foo NULL Warnings: -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted select *, uncompress(a), uncompress(a) is null from t1; a uncompress(a) uncompress(a) is null foo NULL 1 Warnings: -Error 1259 ZLIB: Input data corrupted -Error 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted +Warning 1259 ZLIB: Input data corrupted drop table t1; CREATE TABLE t1 (c1 INT); INSERT INTO t1 VALUES (1), (1111), (11111); diff --git a/mysql-test/r/func_encrypt.result b/mysql-test/r/func_encrypt.result index 8fbf36b45b9..91ff4e218fb 100644 --- a/mysql-test/r/func_encrypt.result +++ b/mysql-test/r/func_encrypt.result @@ -124,7 +124,7 @@ select des_encrypt("hello",10); des_encrypt("hello",10) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_encrypt' +Warning 1108 Incorrect parameters to procedure 'des_encrypt' select des_encrypt(NULL); des_encrypt(NULL) NULL @@ -138,12 +138,12 @@ select des_encrypt(10, NULL); des_encrypt(10, NULL) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_encrypt' +Warning 1108 Incorrect parameters to procedure 'des_encrypt' select des_encrypt("hello", NULL); des_encrypt("hello", NULL) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_encrypt' +Warning 1108 Incorrect parameters to procedure 'des_encrypt' select des_decrypt("hello",10); des_decrypt("hello",10) hello @@ -177,7 +177,7 @@ select hex(des_decrypt(des_encrypt("hello","hidden"))); hex(des_decrypt(des_encrypt("hello","hidden"))) NULL Warnings: -Error 1108 Incorrect parameters to procedure 'des_decrypt' +Warning 1108 Incorrect parameters to procedure 'des_decrypt' explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden")); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 3b78851a1b9..ebec186591d 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -153,10 +153,10 @@ grp group_concat(c) 4 5 NULL Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() show warnings; Level Code Message -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() set group_concat_max_len = 1024; select group_concat(sum(c)) from t1 group by grp; ERROR HY000: Invalid use of group function @@ -380,25 +380,29 @@ group_concat(b) bb,c BB,C Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() select group_concat(distinct b) from t1 group by a; group_concat(distinct b) bb,c BB,C Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() select group_concat(b order by b) from t1 group by a; group_concat(b order by b) a,bb A,BB Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 3 was cut by GROUP_CONCAT() +Warning 1260 Row 6 was cut by GROUP_CONCAT() select group_concat(distinct b order by b) from t1 group by a; group_concat(distinct b order by b) a,bb A,BB Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 3 was cut by GROUP_CONCAT() +Warning 1260 Row 6 was cut by GROUP_CONCAT() insert into t1 values (1, concat(repeat('1', 300), '2')), (1, concat(repeat('1', 300), '2')), (1, concat(repeat('0', 300), '1')), (2, concat(repeat('1', 300), '2')), (2, concat(repeat('1', 300), '2')), @@ -426,25 +430,29 @@ group_concat(b) bb,ccc,a,bb,ccc,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,1111111111111111111111111111111111111111111111111111111111111111111111111111111111 BB,CCC,A,BB,CCC,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,1111111111111111111111111111111111111111111111111111111111111111111111111111111111 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 7 was cut by GROUP_CONCAT() +Warning 1260 Row 14 was cut by GROUP_CONCAT() select group_concat(distinct b) from t1 group by a; group_concat(distinct b) bb,ccc,a,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 BB,CCC,A,1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112,00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 5 was cut by GROUP_CONCAT() +Warning 1260 Row 10 was cut by GROUP_CONCAT() select group_concat(b order by b) from t1 group by a; group_concat(b order by b) 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() select group_concat(distinct b order by b) from t1 group by a; group_concat(distinct b order by b) 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 4 was cut by GROUP_CONCAT() drop table t1; create table t1 (a varchar(255) character set cp1250 collate cp1250_general_ci, b varchar(255) character set koi8r); @@ -751,22 +759,22 @@ SELECT GROUP_CONCAT( a ) FROM t1; GROUP_CONCAT( a ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SELECT GROUP_CONCAT( DISTINCT a ) FROM t1; GROUP_CONCAT( DISTINCT a ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SELECT GROUP_CONCAT( a ORDER BY b ) FROM t1; GROUP_CONCAT( a ORDER BY b ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SELECT GROUP_CONCAT( DISTINCT a ORDER BY b ) FROM t1; GROUP_CONCAT( DISTINCT a ORDER BY b ) aaaaaaaaaa,bbbbbbbbb Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() SET group_concat_max_len = DEFAULT; DROP TABLE t1; SET group_concat_max_len= 65535; @@ -979,3 +987,31 @@ GROUP BY t1.a 1 DROP TABLE t1, t2; End of 5.0 tests +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a VARCHAR(6), b INT); +CREATE TABLE t2 (a VARCHAR(6), b INT); +INSERT INTO t1 VALUES ('111111', 1); +INSERT INTO t1 VALUES ('222222', 2); +INSERT INTO t1 VALUES ('333333', 3); +INSERT INTO t1 VALUES ('444444', 4); +INSERT INTO t1 VALUES ('555555', 5); +SET group_concat_max_len = 5; +SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; +SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; +GROUP_CONCAT(a) b +11111 1 +22222 2 +33333 3 +Warnings: +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() +Warning 1260 Row 3 was cut by GROUP_CONCAT() +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +ERROR HY000: Row 1 was cut by GROUP_CONCAT() +UPDATE t1 SET a = '11111' WHERE b = 1; +UPDATE t1 SET a = '22222' WHERE b = 2; +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +ERROR HY000: Row 3 was cut by GROUP_CONCAT() +SET group_concat_max_len = DEFAULT; +SET @@sql_mode = @old_sql_mode; +DROP TABLE t1, t2; diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index fd7ef72409e..d8b8a14afc6 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -225,27 +225,27 @@ select ln(-1); ln(-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log10(-1); log10(-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log2(-1); log2(-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log(2,-1); log(2,-1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select log(-2,1); log(-2,1) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 set sql_mode=''; select round(111,-10); round(111,-10) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index a0c3935fde0..47fd4f2cdad 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1433,7 +1433,7 @@ select benchmark(-1, 1); benchmark(-1, 1) NULL Warnings: -Error 1411 Incorrect count value: '-1' for function benchmark +Warning 1411 Incorrect count value: '-1' for function benchmark set @password="password"; set @my_data="clear text to encode"; select md5(encode(@my_data, "password")); @@ -1533,7 +1533,7 @@ select locate('lo','hello',-18446744073709551615); locate('lo','hello',-18446744073709551615) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',18446744073709551615); locate('lo','hello',18446744073709551615) 0 @@ -1541,22 +1541,22 @@ select locate('lo','hello',-18446744073709551616); locate('lo','hello',-18446744073709551616) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',18446744073709551616); locate('lo','hello',18446744073709551616) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',-18446744073709551617); locate('lo','hello',-18446744073709551617) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select locate('lo','hello',18446744073709551617); locate('lo','hello',18446744073709551617) 0 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 10); left('hello', 10) hello @@ -1588,8 +1588,8 @@ select left('hello', -18446744073709551615); left('hello', -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 18446744073709551615); left('hello', 18446744073709551615) hello @@ -1597,26 +1597,26 @@ select left('hello', -18446744073709551616); left('hello', -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 18446744073709551616); left('hello', 18446744073709551616) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', -18446744073709551617); left('hello', -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select left('hello', 18446744073709551617); left('hello', 18446744073709551617) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 10); right('hello', 10) hello @@ -1648,8 +1648,8 @@ select right('hello', -18446744073709551615); right('hello', -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 18446744073709551615); right('hello', 18446744073709551615) hello @@ -1657,26 +1657,26 @@ select right('hello', -18446744073709551616); right('hello', -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 18446744073709551616); right('hello', 18446744073709551616) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', -18446744073709551617); right('hello', -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select right('hello', 18446744073709551617); right('hello', 18446744073709551617) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 2, -1); substring('hello', 2, -1) @@ -1708,8 +1708,8 @@ select substring('hello', -18446744073709551615, 1); substring('hello', -18446744073709551615, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551615, 1); substring('hello', 18446744073709551615, 1) @@ -1717,26 +1717,26 @@ select substring('hello', -18446744073709551616, 1); substring('hello', -18446744073709551616, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551616, 1); substring('hello', 18446744073709551616, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', -18446744073709551617, 1); substring('hello', -18446744073709551617, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551617, 1); substring('hello', 18446744073709551617, 1) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, -1); substring('hello', 1, -1) @@ -1762,8 +1762,8 @@ select substring('hello', 1, -18446744073709551615); substring('hello', 1, -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, 18446744073709551615); substring('hello', 1, 18446744073709551615) hello @@ -1771,26 +1771,26 @@ select substring('hello', 1, -18446744073709551616); substring('hello', 1, -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, 18446744073709551616); substring('hello', 1, 18446744073709551616) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, -18446744073709551617); substring('hello', 1, -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 1, 18446744073709551617); substring('hello', 1, 18446744073709551617) hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', -1, -1); substring('hello', -1, -1) @@ -1816,10 +1816,10 @@ select substring('hello', -18446744073709551615, -18446744073709551615); substring('hello', -18446744073709551615, -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551615, 18446744073709551615); substring('hello', 18446744073709551615, 18446744073709551615) @@ -1827,34 +1827,34 @@ select substring('hello', -18446744073709551616, -18446744073709551616); substring('hello', -18446744073709551616, -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551616, 18446744073709551616); substring('hello', 18446744073709551616, 18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', -18446744073709551617, -18446744073709551617); substring('hello', -18446744073709551617, -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select substring('hello', 18446744073709551617, 18446744073709551617); substring('hello', 18446744073709551617, 18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -1, 1, 'hi'); insert('hello', -1, 1, 'hi') hello @@ -1880,7 +1880,7 @@ select insert('hello', -18446744073709551615, 1, 'hi'); insert('hello', -18446744073709551615, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551615, 1, 'hi'); insert('hello', 18446744073709551615, 1, 'hi') hello @@ -1888,22 +1888,22 @@ select insert('hello', -18446744073709551616, 1, 'hi'); insert('hello', -18446744073709551616, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551616, 1, 'hi'); insert('hello', 18446744073709551616, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -18446744073709551617, 1, 'hi'); insert('hello', -18446744073709551617, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551617, 1, 'hi'); insert('hello', 18446744073709551617, 1, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, -1, 'hi'); insert('hello', 1, -1, 'hi') hi @@ -1929,7 +1929,7 @@ select insert('hello', 1, -18446744073709551615, 'hi'); insert('hello', 1, -18446744073709551615, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, 18446744073709551615, 'hi'); insert('hello', 1, 18446744073709551615, 'hi') hi @@ -1937,22 +1937,22 @@ select insert('hello', 1, -18446744073709551616, 'hi'); insert('hello', 1, -18446744073709551616, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, 18446744073709551616, 'hi'); insert('hello', 1, 18446744073709551616, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, -18446744073709551617, 'hi'); insert('hello', 1, -18446744073709551617, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 1, 18446744073709551617, 'hi'); insert('hello', 1, 18446744073709551617, 'hi') hi Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -1, -1, 'hi'); insert('hello', -1, -1, 'hi') hello @@ -1978,8 +1978,8 @@ select insert('hello', -18446744073709551615, -18446744073709551615, 'hi'); insert('hello', -18446744073709551615, -18446744073709551615, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551615, 18446744073709551615, 'hi'); insert('hello', 18446744073709551615, 18446744073709551615, 'hi') hello @@ -1987,26 +1987,26 @@ select insert('hello', -18446744073709551616, -18446744073709551616, 'hi'); insert('hello', -18446744073709551616, -18446744073709551616, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551616, 18446744073709551616, 'hi'); insert('hello', 18446744073709551616, 18446744073709551616, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', -18446744073709551617, -18446744073709551617, 'hi'); insert('hello', -18446744073709551617, -18446744073709551617, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select insert('hello', 18446744073709551617, 18446744073709551617, 'hi'); insert('hello', 18446744073709551617, 18446744073709551617, 'hi') hello Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', -1); repeat('hello', -1) @@ -2038,8 +2038,8 @@ select repeat('hello', -18446744073709551615); repeat('hello', -18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', 18446744073709551615); repeat('hello', 18446744073709551615) NULL @@ -2049,27 +2049,27 @@ select repeat('hello', -18446744073709551616); repeat('hello', -18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', 18446744073709551616); repeat('hello', 18446744073709551616) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select repeat('hello', -18446744073709551617); repeat('hello', -18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select repeat('hello', 18446744073709551617); repeat('hello', 18446744073709551617) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select space(-1); space(-1) @@ -2102,8 +2102,8 @@ select space(-18446744073709551615); space(-18446744073709551615) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select space(18446744073709551615); space(18446744073709551615) NULL @@ -2113,27 +2113,27 @@ select space(-18446744073709551616); space(-18446744073709551616) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select space(18446744073709551616); space(18446744073709551616) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select space(-18446744073709551617); space(-18446744073709551617) Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select space(18446744073709551617); space(18446744073709551617) NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated select rpad('hello', -1, '1'); rpad('hello', -1, '1') @@ -2166,8 +2166,8 @@ select rpad('hello', -18446744073709551615, '1'); rpad('hello', -18446744073709551615, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select rpad('hello', 18446744073709551615, '1'); rpad('hello', 18446744073709551615, '1') NULL @@ -2177,27 +2177,27 @@ select rpad('hello', -18446744073709551616, '1'); rpad('hello', -18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select rpad('hello', 18446744073709551616, '1'); rpad('hello', 18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of rpad() was larger than max_allowed_packet (1048576) - truncated select rpad('hello', -18446744073709551617, '1'); rpad('hello', -18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select rpad('hello', 18446744073709551617, '1'); rpad('hello', 18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of rpad() was larger than max_allowed_packet (1048576) - truncated select lpad('hello', -1, '1'); lpad('hello', -1, '1') @@ -2230,8 +2230,8 @@ select lpad('hello', -18446744073709551615, '1'); lpad('hello', -18446744073709551615, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select lpad('hello', 18446744073709551615, '1'); lpad('hello', 18446744073709551615, '1') NULL @@ -2241,27 +2241,27 @@ select lpad('hello', -18446744073709551616, '1'); lpad('hello', -18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select lpad('hello', 18446744073709551616, '1'); lpad('hello', 18446744073709551616, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of lpad() was larger than max_allowed_packet (1048576) - truncated select lpad('hello', -18446744073709551617, '1'); lpad('hello', -18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select lpad('hello', 18446744073709551617, '1'); lpad('hello', 18446744073709551617, '1') NULL Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1301 Result of lpad() was larger than max_allowed_packet (1048576) - truncated SET @orig_sql_mode = @@SQL_MODE; SET SQL_MODE=traditional; @@ -2269,12 +2269,12 @@ SELECT CHAR(0xff,0x8f USING utf8); CHAR(0xff,0x8f USING utf8) NULL Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' SELECT CHAR(0xff,0x8f USING utf8) IS NULL; CHAR(0xff,0x8f USING utf8) IS NULL 1 Warnings: -Error 1300 Invalid utf8 character string: 'FF8F' +Warning 1300 Invalid utf8 character string: 'FF8F' SET SQL_MODE=@orig_sql_mode; select substring('abc', cast(2 as unsigned int)); substring('abc', cast(2 as unsigned int)) diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 1e4fc91b8bd..bc77072f67a 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -942,25 +942,29 @@ group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a; group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a; group_concat(t1.b,t2.c) aaaaa bbbbb Warnings: -Warning 1260 2 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() +Warning 1260 Row 2 was cut by GROUP_CONCAT() drop table t1, t2; set group_concat_max_len=default; create table t1 (gid smallint(5) unsigned not null, x int(11) not null, y int(11) not null, art int(11) not null, primary key (gid,x,y)); diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 893ea5acf88..a2248d3d878 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -914,7 +914,7 @@ SELECT * FROM tm1; ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist CHECK TABLE tm1; Table Op Msg_type Msg_text -test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist +test.tm1 check Warning Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist test.tm1 check error Corrupt ALTER TABLE t2 MODIFY a INT; diff --git a/mysql-test/r/myisam-system.result b/mysql-test/r/myisam-system.result index e0629d955ae..b3ba8066f5c 100644 --- a/mysql-test/r/myisam-system.result +++ b/mysql-test/r/myisam-system.result @@ -2,7 +2,7 @@ drop table if exists t1,t2; create table t1 (a int) engine=myisam; drop table if exists t1; Warnings: -Error 2 Can't find file: 't1' (errno: 2) +Warning 2 Can't find file: 't1' (errno: 2) create table t1 (a int) engine=myisam; drop table t1; Got one of the listed errors diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 2d54a66fe11..a76cb2ba225 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1226,7 +1226,6 @@ COMMIT; END| CALL test.p1(12); Warnings: -Note 1051 Unknown table 't1' Warning 1196 Some non-transactional changed tables couldn't be rolled back CALL test.p1(13); Warnings: diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 1f8a077af40..06e6b8167fd 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -2748,17 +2748,21 @@ Warnings: Note 1051 Unknown table 't1' call proc_1(); Level Code Message +Note 1051 Unknown table 't1' drop table if exists t2; Warnings: Note 1051 Unknown table 't2' call proc_1(); Level Code Message +Note 1051 Unknown table 't2' drop table if exists t1, t2; Warnings: Note 1051 Unknown table 't1' Note 1051 Unknown table 't2' call proc_1(); Level Code Message +Note 1051 Unknown table 't1' +Note 1051 Unknown table 't2' drop procedure proc_1; create function func_1() returns int begin show warnings; return 1; end| ERROR 0A000: Not allowed to return a result set from a function diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 6cabc24d0eb..89057603c3d 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -889,7 +889,7 @@ select group_concat(a) FROM t1 group by b; group_concat(a) 1234567890 Warnings: -Warning 1260 1 line(s) were cut by GROUP_CONCAT() +Warning 1260 Row 1 was cut by GROUP_CONCAT() set group_concat_max_len=1024; select group_concat(a) FROM t1 group by b; group_concat(a) @@ -992,19 +992,19 @@ COUNT(*) 0 Warnings: Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 -Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 0 +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid'; COUNT(*) 0 Warnings: Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1 -Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 0 +Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1 SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid'; COUNT(*) 0 Warnings: Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 -Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 0 +Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result new file mode 100644 index 00000000000..56140733c33 --- /dev/null +++ b/mysql-test/r/signal.result @@ -0,0 +1,2362 @@ +# +# PART 1: syntax +# +# +# Test every new reserved and non reserved keywords +# +drop table if exists signal_non_reserved; +create table signal_non_reserved ( +class_origin int, +subclass_origin int, +constraint_catalog int, +constraint_schema int, +constraint_name int, +catalog_name int, +schema_name int, +table_name int, +column_name int, +cursor_name int, +message_text int, +sqlcode int +); +drop table signal_non_reserved; +drop table if exists diag_non_reserved; +create table diag_non_reserved ( +diagnostics int, +current int, +stacked int, +exception int +); +drop table diag_non_reserved; +drop table if exists diag_cond_non_reserved; +create table diag_cond_non_reserved ( +condition_identifier int, +condition_number int, +condition_name int, +connection_name int, +message_length int, +message_octet_length int, +parameter_mode int, +parameter_name int, +parameter_ordinal_position int, +returned_sqlstate int, +routine_catalog int, +routine_name int, +routine_schema int, +server_name int, +specific_name int, +trigger_catalog int, +trigger_name int, +trigger_schema int +); +drop table diag_cond_non_reserved; +drop table if exists diag_stmt_non_reserved; +create table diag_stmt_non_reserved ( +number int, +more int, +command_function int, +command_function_code int, +dynamic_function int, +dynamic_function_code int, +row_count int, +transactions_committed int, +transactions_rolled_back int, +transaction_active int +); +drop table diag_stmt_non_reserved; +drop table if exists test_reserved; +create table test_reserved (signal int); +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 'signal int)' at line 1 +create table test_reserved (resignal int); +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 'resignal int)' at line 1 +create table test_reserved (condition int); +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 'condition int)' at line 1 +# +# Test the SIGNAL syntax +# +drop procedure if exists test_invalid; +drop procedure if exists test_signal_syntax; +drop function if exists test_signal_func; +create procedure test_invalid() +begin +SIGNAL; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL foo; +end $$ +ERROR 42000: Undefined CONDITION: foo +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR 1234; +SIGNAL foo; +end $$ +ERROR HY000: SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +SIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +SIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'CLASS_ORIGIN' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MESSAGE_TEXT' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MYSQL_ERRNO' +create procedure test_signal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET +CLASS_ORIGIN = 'foo', +SUBCLASS_ORIGIN = 'foo', +CONSTRAINT_CATALOG = 'foo', +CONSTRAINT_SCHEMA = 'foo', +CONSTRAINT_NAME = 'foo', +CATALOG_NAME = 'foo', +SCHEMA_NAME = 'foo', +TABLE_NAME = 'foo', +COLUMN_NAME = 'foo', +CURSOR_NAME = 'foo', +MESSAGE_TEXT = 'foo', +MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ +SIGNAL SQLSTATE '00000' $$ +ERROR 42000: Bad SQLSTATE: '00000' +SIGNAL SQLSTATE '00001' $$ +ERROR 42000: Bad SQLSTATE: '00001' +create procedure test_invalid() +begin +SIGNAL SQLSTATE '00000'; +end $$ +ERROR 42000: Bad SQLSTATE: '00000' +create procedure test_invalid() +begin +SIGNAL SQLSTATE '00001'; +end $$ +ERROR 42000: Bad SQLSTATE: '00001' +# +# Test conditions information that SIGNAL can not set +# +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET bla_bla = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bla_bla = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET CONDITION_IDENTIFIER = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONDITION_IDENTIFIER = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET CONDITION_NUMBER = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONDITION_NUMBER = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET CONNECTION_NAME = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONNECTION_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET MESSAGE_LENGTH = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MESSAGE_LENGTH = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET MESSAGE_OCTET_LENGTH = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MESSAGE_OCTET_LENGTH = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET PARAMETER_MODE = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARAMETER_MODE = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET PARAMETER_NAME = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARAMETER_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET PARAMETER_ORDINAL_POSITION = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARAMETER_ORDINAL_POSITION = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET RETURNED_SQLSTATE = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RETURNED_SQLSTATE = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET ROUTINE_CATALOG = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ROUTINE_CATALOG = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET ROUTINE_NAME = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ROUTINE_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET ROUTINE_SCHEMA = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ROUTINE_SCHEMA = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET SERVER_NAME = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SERVER_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET SPECIFIC_NAME = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SPECIFIC_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET TRIGGER_CATALOG = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER_CATALOG = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET TRIGGER_NAME = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER_NAME = 'foo'; +end' at line 3 +create procedure test_invalid() +begin +SIGNAL SQLSTATE '12345' SET TRIGGER_SCHEMA = 'foo'; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER_SCHEMA = 'foo'; +end' at line 3 +# +# Test the RESIGNAL syntax +# +drop procedure if exists test_invalid; +drop procedure if exists test_resignal_syntax; +create procedure test_invalid() +begin +RESIGNAL foo; +end $$ +ERROR 42000: Undefined CONDITION: foo +create procedure test_resignal_syntax() +begin +RESIGNAL; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR 1234; +RESIGNAL foo; +end $$ +ERROR HY000: SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +RESIGNAL SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'CLASS_ORIGIN' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MESSAGE_TEXT' +create procedure test_invalid() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ +ERROR 42000: Duplicate condition information item 'MYSQL_ERRNO' +create procedure test_resignal_syntax() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +RESIGNAL foo SET +CLASS_ORIGIN = 'foo', +SUBCLASS_ORIGIN = 'foo', +CONSTRAINT_CATALOG = 'foo', +CONSTRAINT_SCHEMA = 'foo', +CONSTRAINT_NAME = 'foo', +CATALOG_NAME = 'foo', +SCHEMA_NAME = 'foo', +TABLE_NAME = 'foo', +COLUMN_NAME = 'foo', +CURSOR_NAME = 'foo', +MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ +create procedure test_invalid() +begin +RESIGNAL SQLSTATE '00000'; +end $$ +ERROR 42000: Bad SQLSTATE: '00000' +create procedure test_invalid() +begin +RESIGNAL SQLSTATE '00001'; +end $$ +ERROR 42000: Bad SQLSTATE: '00001' +# +# PART 2: non preparable statements +# +prepare stmt from 'SIGNAL SQLSTATE \'23000\''; +ERROR HY000: This command is not supported in the prepared statement protocol yet +prepare stmt from 'RESIGNAL SQLSTATE \'23000\''; +ERROR HY000: This command is not supported in the prepared statement protocol yet +# +# PART 3: runtime execution +# +drop procedure if exists test_signal; +drop procedure if exists test_resignal; +drop table if exists t_warn; +drop table if exists t_cursor; +create table t_warn(a integer(2)); +create table t_cursor(a integer); +# +# SIGNAL can also appear in a query +# +SIGNAL foo; +ERROR 42000: Undefined CONDITION: foo +SIGNAL SQLSTATE '01000'; +Warnings: +Warning 1640 Unhandled user-defined warning condition +SIGNAL SQLSTATE '02000'; +ERROR 02000: Unhandled user-defined not found condition +SIGNAL SQLSTATE '23000'; +ERROR 23000: Unhandled user-defined exception condition +SIGNAL SQLSTATE VALUE '23000'; +ERROR 23000: Unhandled user-defined exception condition +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65536; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '65536' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 99999; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '99999' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 4294967295; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '4294967295' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 0; +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '0' +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = -1; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1 +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65535; +ERROR HY000: Unhandled user-defined exception condition +# +# RESIGNAL can also appear in a query +# +RESIGNAL; +ERROR 0K000: RESIGNAL when handler not active +RESIGNAL foo; +ERROR 42000: Undefined CONDITION: foo +RESIGNAL SQLSTATE '12345'; +ERROR 0K000: RESIGNAL when handler not active +RESIGNAL SQLSTATE VALUE '12345'; +ERROR 0K000: RESIGNAL when handler not active +# +# Different kind of SIGNAL conditions +# +create procedure test_signal() +begin +# max range +DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; +SIGNAL foo SET MYSQL_ERRNO = 65535; +end $$ +call test_signal() $$ +ERROR AABBB: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# max range +DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; +SIGNAL foo SET MYSQL_ERRNO = 65536; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '65536' +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error +DECLARE foo CONDITION FOR SQLSTATE '99999'; +SIGNAL foo SET MYSQL_ERRNO = 9999; +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# warning +DECLARE too_few_records CONDITION FOR SQLSTATE '01000'; +SIGNAL too_few_records SET MYSQL_ERRNO = 1261; +end $$ +call test_signal() $$ +Warnings: +Warning 1261 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Not found +DECLARE sp_fetch_no_data CONDITION FOR SQLSTATE '02000'; +SIGNAL sp_fetch_no_data SET MYSQL_ERRNO = 1329; +end $$ +call test_signal() $$ +ERROR 02000: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error +DECLARE sp_cursor_already_open CONDITION FOR SQLSTATE '24000'; +SIGNAL sp_cursor_already_open SET MYSQL_ERRNO = 1325; +end $$ +call test_signal() $$ +ERROR 24000: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Severe error +DECLARE lock_deadlock CONDITION FOR SQLSTATE '40001'; +SIGNAL lock_deadlock SET MYSQL_ERRNO = 1213; +end $$ +call test_signal() $$ +ERROR 40001: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Unknown -> error +DECLARE foo CONDITION FOR SQLSTATE "99999"; +SIGNAL foo; +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# warning, no subclass +DECLARE warn CONDITION FOR SQLSTATE "01000"; +SIGNAL warn; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# warning, with subclass +DECLARE warn CONDITION FOR SQLSTATE "01123"; +SIGNAL warn; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Not found, no subclass +DECLARE not_found CONDITION FOR SQLSTATE "02000"; +SIGNAL not_found; +end $$ +call test_signal() $$ +ERROR 02000: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Not found, with subclass +DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; +SIGNAL not_found; +end $$ +call test_signal() $$ +ERROR 02XXX: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error, no subclass +DECLARE error CONDITION FOR SQLSTATE "12000"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 12000: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Error, with subclass +DECLARE error CONDITION FOR SQLSTATE "12ABC"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 12ABC: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Severe error, no subclass +DECLARE error CONDITION FOR SQLSTATE "40000"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 40000: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +# Severe error, with subclass +DECLARE error CONDITION FOR SQLSTATE "40001"; +SIGNAL error; +end $$ +call test_signal() $$ +ERROR 40001: Unhandled user-defined exception condition +drop procedure test_signal $$ +# +# Test the scope of condition +# +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '99999'; +begin +DECLARE foo CONDITION FOR 8888; +end; +SIGNAL foo SET MYSQL_ERRNO=9999; /* outer */ +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR 9999; +begin +DECLARE foo CONDITION FOR SQLSTATE '88888'; +SIGNAL foo SET MYSQL_ERRNO=8888; /* inner */ +end; +end $$ +call test_signal() $$ +ERROR 88888: Unhandled user-defined exception condition +drop procedure test_signal $$ +# +# Test SET MYSQL_ERRNO +# +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '99999'; +SIGNAL foo SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +ERROR 99999: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01000"; +SIGNAL warn SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +Warnings: +Warning 1111 Unhandled user-defined warning condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02000"; +SIGNAL not_found SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +ERROR 02000: Unhandled user-defined not found condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55000"; +SIGNAL error SET MYSQL_ERRNO = 1111; +end $$ +call test_signal() $$ +ERROR 55000: Unhandled user-defined exception condition +drop procedure test_signal $$ +# +# Test SET MESSAGE_TEXT +# +SIGNAL SQLSTATE '77777' SET MESSAGE_TEXT='' $$ +ERROR 77777: +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '77777'; +SIGNAL foo SET +MESSAGE_TEXT = "", +MYSQL_ERRNO=5678; +end $$ +call test_signal() $$ +ERROR 77777: +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '99999'; +SIGNAL foo SET +MESSAGE_TEXT = "Something bad happened", +MYSQL_ERRNO=9999; +end $$ +call test_signal() $$ +ERROR 99999: Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01000"; +SIGNAL warn SET MESSAGE_TEXT = "Something bad happened"; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02000"; +SIGNAL not_found SET MESSAGE_TEXT = "Something bad happened"; +end $$ +call test_signal() $$ +ERROR 02000: Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55000"; +SIGNAL error SET MESSAGE_TEXT = "Something bad happened"; +end $$ +call test_signal() $$ +ERROR 55000: Something bad happened +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE "01000"; +SIGNAL something SET MESSAGE_TEXT = _utf8 "This is a UTF8 text"; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 This is a UTF8 text +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE "01000"; +SIGNAL something SET MESSAGE_TEXT = ""; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +SIGNAL warn SET MESSAGE_TEXT = "á a"; +end $$ +call test_signal() $$ +Warnings: +Warning 1640 á a +show warnings $$ +Level Code Message +Warning 1640 á a +drop procedure test_signal $$ +# +# Test SET complex expressions +# +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +MYSQL_ERRNO = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CLASS_ORIGIN = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CLASS_ORIGIN' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +SUBCLASS_ORIGIN = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'SUBCLASS_ORIGIN' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CONSTRAINT_CATALOG = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CONSTRAINT_CATALOG' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CONSTRAINT_SCHEMA = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CONSTRAINT_SCHEMA' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CONSTRAINT_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CONSTRAINT_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CATALOG_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CATALOG_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +SCHEMA_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'SCHEMA_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +TABLE_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'TABLE_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +COLUMN_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'COLUMN_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +CURSOR_NAME = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'CURSOR_NAME' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE '99999'; +SIGNAL error SET +MESSAGE_TEXT = NULL; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE '99999'; +DECLARE message_text VARCHAR(64) DEFAULT "Local string variable"; +DECLARE sqlcode INTEGER DEFAULT 1234; +SIGNAL something SET +MESSAGE_TEXT = message_text, +MYSQL_ERRNO = sqlcode; +end $$ +call test_signal() $$ +ERROR 99999: Local string variable +drop procedure test_signal $$ +create procedure test_signal(message_text VARCHAR(64), sqlcode INTEGER) +begin +DECLARE something CONDITION FOR SQLSTATE "12345"; +SIGNAL something SET +MESSAGE_TEXT = message_text, +MYSQL_ERRNO = sqlcode; +end $$ +call test_signal("Parameter string", NULL) $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'NULL' +call test_signal(NULL, 1234) $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +call test_signal("Parameter string", 5678) $$ +ERROR 12345: Parameter string +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE something CONDITION FOR SQLSTATE "AABBB"; +SIGNAL something SET +MESSAGE_TEXT = @message_text, +MYSQL_ERRNO = @sqlcode; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +set @sqlcode= 12 $$ +call test_signal() $$ +ERROR 42000: Variable 'MESSAGE_TEXT' can't be set to the value of 'NULL' +set @message_text= "User variable" $$ +call test_signal() $$ +ERROR AABBB: User variable +drop procedure test_signal $$ +create procedure test_invalid() +begin +DECLARE something CONDITION FOR SQLSTATE "AABBB"; +SIGNAL something SET +MESSAGE_TEXT = @message_text := 'illegal', +MYSQL_ERRNO = @sqlcode := 1234; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' +MYSQL_ERRNO = @sqlcode := 1234; +end' at line 5 +create procedure test_signal() +begin +DECLARE aaa VARCHAR(64); +DECLARE bbb VARCHAR(64); +DECLARE ccc VARCHAR(64); +DECLARE ddd VARCHAR(64); +DECLARE eee VARCHAR(64); +DECLARE fff VARCHAR(64); +DECLARE ggg VARCHAR(64); +DECLARE hhh VARCHAR(64); +DECLARE iii VARCHAR(64); +DECLARE jjj VARCHAR(64); +DECLARE kkk VARCHAR(64); +DECLARE warn CONDITION FOR SQLSTATE "01234"; +set aaa= repeat("A", 64); +set bbb= repeat("B", 64); +set ccc= repeat("C", 64); +set ddd= repeat("D", 64); +set eee= repeat("E", 64); +set fff= repeat("F", 64); +set ggg= repeat("G", 64); +set hhh= repeat("H", 64); +set iii= repeat("I", 64); +set jjj= repeat("J", 64); +set kkk= repeat("K", 64); +SIGNAL warn SET +CLASS_ORIGIN = aaa, +SUBCLASS_ORIGIN = bbb, +CONSTRAINT_CATALOG = ccc, +CONSTRAINT_SCHEMA = ddd, +CONSTRAINT_NAME = eee, +CATALOG_NAME = fff, +SCHEMA_NAME = ggg, +TABLE_NAME = hhh, +COLUMN_NAME = iii, +CURSOR_NAME = jjj, +MESSAGE_TEXT = kkk, +MYSQL_ERRNO = 65535; +end $$ +call test_signal() $$ +Warnings: +Warning 65535 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +SIGNAL warn SET +MYSQL_ERRNO = 999999999999999999999999999999999999999999999999999; +end $$ +call test_signal() $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '999999999999999999999999999999999999999999999999999' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE aaax VARCHAR(65); +DECLARE bbbx VARCHAR(65); +DECLARE cccx VARCHAR(65); +DECLARE dddx VARCHAR(65); +DECLARE eeex VARCHAR(65); +DECLARE fffx VARCHAR(65); +DECLARE gggx VARCHAR(65); +DECLARE hhhx VARCHAR(65); +DECLARE iiix VARCHAR(65); +DECLARE jjjx VARCHAR(65); +DECLARE kkkx VARCHAR(65); +DECLARE lllx VARCHAR(129); +DECLARE warn CONDITION FOR SQLSTATE "01234"; +set aaax= concat(repeat("A", 64), "X"); +set bbbx= concat(repeat("B", 64), "X"); +set cccx= concat(repeat("C", 64), "X"); +set dddx= concat(repeat("D", 64), "X"); +set eeex= concat(repeat("E", 64), "X"); +set fffx= concat(repeat("F", 64), "X"); +set gggx= concat(repeat("G", 64), "X"); +set hhhx= concat(repeat("H", 64), "X"); +set iiix= concat(repeat("I", 64), "X"); +set jjjx= concat(repeat("J", 64), "X"); +set kkkx= concat(repeat("K", 64), "X"); +set lllx= concat(repeat("1", 100), +repeat("2", 20), +repeat("8", 8), +"X"); +SIGNAL warn SET +CLASS_ORIGIN = aaax, +SUBCLASS_ORIGIN = bbbx, +CONSTRAINT_CATALOG = cccx, +CONSTRAINT_SCHEMA = dddx, +CONSTRAINT_NAME = eeex, +CATALOG_NAME = fffx, +SCHEMA_NAME = gggx, +TABLE_NAME = hhhx, +COLUMN_NAME = iiix, +CURSOR_NAME = jjjx, +MESSAGE_TEXT = lllx, +MYSQL_ERRNO = 10000; +end $$ +call test_signal() $$ +Warnings: +Warning 1645 Data truncated for condition item 'CLASS_ORIGIN' +Warning 1645 Data truncated for condition item 'SUBCLASS_ORIGIN' +Warning 1645 Data truncated for condition item 'CONSTRAINT_CATALOG' +Warning 1645 Data truncated for condition item 'CONSTRAINT_SCHEMA' +Warning 1645 Data truncated for condition item 'CONSTRAINT_NAME' +Warning 1645 Data truncated for condition item 'CATALOG_NAME' +Warning 1645 Data truncated for condition item 'SCHEMA_NAME' +Warning 1645 Data truncated for condition item 'TABLE_NAME' +Warning 1645 Data truncated for condition item 'COLUMN_NAME' +Warning 1645 Data truncated for condition item 'CURSOR_NAME' +Warning 1645 Data truncated for condition item 'MESSAGE_TEXT' +Warning 10000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222288888888 +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for SQLSTATE "01234" + begin +select "Caught by SQLSTATE"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLSTATE +Caught by SQLSTATE +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "Caught by number"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by number +Caught by number +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for SQLWARNING +begin +select "Caught by SQLWARNING"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLWARNING +Caught by SQLWARNING +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for SQLSTATE "02ABC" + begin +select "Caught by SQLSTATE"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLSTATE +Caught by SQLSTATE +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "Caught by number"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by number +Caught by number +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for NOT FOUND +begin +select "Caught by NOT FOUND"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by NOT FOUND +Caught by NOT FOUND +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for SQLSTATE "55555" + begin +select "Caught by SQLSTATE"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLSTATE +Caught by SQLSTATE +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "Caught by number"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by number +Caught by number +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for SQLEXCEPTION +begin +select "Caught by SQLEXCEPTION"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_signal() $$ +Caught by SQLEXCEPTION +Caught by SQLEXCEPTION +drop procedure test_signal $$ +# +# Test where SIGNAL can be used +# +create function test_signal_func() returns integer +begin +DECLARE warn CONDITION FOR SQLSTATE "01XXX"; +SIGNAL warn SET +MESSAGE_TEXT = "This function SIGNAL a warning", +MYSQL_ERRNO = 1012; +return 5; +end $$ +select test_signal_func() $$ +test_signal_func() +5 +Warnings: +Warning 1012 This function SIGNAL a warning +drop function test_signal_func $$ +create function test_signal_func() returns integer +begin +DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; +SIGNAL not_found SET +MESSAGE_TEXT = "This function SIGNAL not found", +MYSQL_ERRNO = 1012; +return 5; +end $$ +select test_signal_func() $$ +ERROR 02XXX: This function SIGNAL not found +drop function test_signal_func $$ +create function test_signal_func() returns integer +begin +DECLARE error CONDITION FOR SQLSTATE "50000"; +SIGNAL error SET +MESSAGE_TEXT = "This function SIGNAL an error", +MYSQL_ERRNO = 1012; +return 5; +end $$ +select test_signal_func() $$ +ERROR 50000: This function SIGNAL an error +drop function test_signal_func $$ +drop table if exists t1 $$ +create table t1 (a integer) $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE msg VARCHAR(128); +DECLARE warn CONDITION FOR SQLSTATE "01XXX"; +set msg= concat("This trigger SIGNAL a warning, a=", NEW.a); +SIGNAL warn SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 1012; +end $$ +insert into t1 values (1), (2) $$ +Warnings: +Warning 1012 This trigger SIGNAL a warning, a=1 +Warning 1012 This trigger SIGNAL a warning, a=2 +drop trigger t1_ai $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE msg VARCHAR(128); +DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; +set msg= concat("This trigger SIGNAL a not found, a=", NEW.a); +SIGNAL not_found SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 1012; +end $$ +insert into t1 values (3), (4) $$ +ERROR 02XXX: This trigger SIGNAL a not found, a=3 +drop trigger t1_ai $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE msg VARCHAR(128); +DECLARE error CONDITION FOR SQLSTATE "03XXX"; +set msg= concat("This trigger SIGNAL an error, a=", NEW.a); +SIGNAL error SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 1012; +end $$ +insert into t1 values (5), (6) $$ +ERROR 03XXX: This trigger SIGNAL an error, a=5 +drop table t1 $$ +create table t1 (errno integer, msg varchar(128)) $$ +create trigger t1_ai after insert on t1 for each row +begin +DECLARE warn CONDITION FOR SQLSTATE "01XXX"; +SIGNAL warn SET +MESSAGE_TEXT = NEW.msg, +MYSQL_ERRNO = NEW.errno; +end $$ +insert into t1 set errno=1012, msg='Warning message 1 in trigger' $$ +Warnings: +Warning 1012 Warning message 1 in trigger +insert into t1 set errno=1013, msg='Warning message 2 in trigger' $$ +Warnings: +Warning 1013 Warning message 2 in trigger +drop table t1 $$ +drop table if exists t1 $$ +drop procedure if exists p1 $$ +drop function if exists f1 $$ +create table t1 (s1 int) $$ +insert into t1 values (1) $$ +create procedure p1() +begin +declare a int; +declare c cursor for select f1() from t1; +declare continue handler for sqlstate '03000' + select "caught 03000"; +declare continue handler for 1326 +select "caught cursor is not open"; +select "Before open"; +open c; +select "Before fetch"; +fetch c into a; +select "Before close"; +close c; +end $$ +create function f1() returns int +begin +signal sqlstate '03000'; +return 5; +end $$ +drop table t1 $$ +drop procedure p1 $$ +drop function f1 $$ +# +# Test the RESIGNAL runtime +# +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1012 Raising a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02222"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: Raising a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "55555"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 55555: Raising an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02000: No data - zero rows fetched, selected, or processed +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 42S02: Unknown table 'no_such_table' +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01234"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 5555 RESIGNAL of a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02111: RESIGNAL of a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "33333"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL of an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 5555 RESIGNAL of a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02000: RESIGNAL of not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SET +MESSAGE_TEXT = "RESIGNAL of an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 42S02: RESIGNAL of an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01222" SET +MESSAGE_TEXT = "RESIGNAL to warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1012 Raising a warning +Warning 5555 RESIGNAL to warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02222" SET +MESSAGE_TEXT = "RESIGNAL to not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: RESIGNAL to not found +show warnings $$ +Level Code Message +Warning 1012 Raising a warning +Error 5555 RESIGNAL to not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE warn CONDITION FOR SQLSTATE "01111"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "33333" SET +MESSAGE_TEXT = "RESIGNAL to error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL warn SET +MESSAGE_TEXT = "Raising a warning", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL to error +show warnings $$ +Level Code Message +Warning 1012 Raising a warning +Error 5555 RESIGNAL to error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01222" SET +MESSAGE_TEXT = "RESIGNAL to warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1012 Raising a not found +Warning 5555 RESIGNAL to warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02222" SET +MESSAGE_TEXT = "RESIGNAL to not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: RESIGNAL to not found +show warnings $$ +Level Code Message +Error 1012 Raising a not found +Error 5555 RESIGNAL to not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "33333" SET +MESSAGE_TEXT = "RESIGNAL to error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL not_found SET +MESSAGE_TEXT = "Raising a not found", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL to error +show warnings $$ +Level Code Message +Error 1012 Raising a not found +Error 5555 RESIGNAL to error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "AAAAA"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01222" SET +MESSAGE_TEXT = "RESIGNAL to warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1012 Raising an error +Warning 5555 RESIGNAL to warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "AAAAA"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02222" SET +MESSAGE_TEXT = "RESIGNAL to not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02222: RESIGNAL to not found +show warnings $$ +Level Code Message +Error 1012 Raising an error +Error 5555 RESIGNAL to not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE error CONDITION FOR SQLSTATE "AAAAA"; +DECLARE CONTINUE HANDLER for 1012 +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "33333" SET +MESSAGE_TEXT = "RESIGNAL to error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +SIGNAL error SET +MESSAGE_TEXT = "Raising an error", +MYSQL_ERRNO = 1012; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 33333: RESIGNAL to error +show warnings $$ +Level Code Message +Error 1012 Raising an error +Error 5555 RESIGNAL to error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01111" SET +MESSAGE_TEXT = "RESIGNAL to a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +Warning 5555 RESIGNAL to a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02444" SET +MESSAGE_TEXT = "RESIGNAL to a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02444: RESIGNAL to a not found +show warnings $$ +Level Code Message +Warning 1264 Out of range value for column 'a' at row 1 +Error 5555 RESIGNAL to a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlwarning +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "44444" SET +MESSAGE_TEXT = "RESIGNAL to an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +insert into t_warn set a= 9999999999999999; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 44444: RESIGNAL to an error +show warnings $$ +Level Code Message +Warning 1264 Out of range value for column 'a' at row 1 +Error 5555 RESIGNAL to an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01111" SET +MESSAGE_TEXT = "RESIGNAL to a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1329 No data - zero rows fetched, selected, or processed +Warning 5555 RESIGNAL to a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02444" SET +MESSAGE_TEXT = "RESIGNAL to a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02444: RESIGNAL to a not found +show warnings $$ +Level Code Message +Error 1329 No data - zero rows fetched, selected, or processed +Error 5555 RESIGNAL to a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE x integer; +DECLARE c cursor for select * from t_cursor; +DECLARE CONTINUE HANDLER for not found +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "44444" SET +MESSAGE_TEXT = "RESIGNAL to an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +open c; +fetch c into x; +close c; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 44444: RESIGNAL to an error +show warnings $$ +Level Code Message +Error 1329 No data - zero rows fetched, selected, or processed +Error 5555 RESIGNAL to an error +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "01111" SET +MESSAGE_TEXT = "RESIGNAL to a warning", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +after RESIGNAL +after RESIGNAL +Warnings: +Error 1051 Unknown table 'no_such_table' +Warning 5555 RESIGNAL to a warning +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "02444" SET +MESSAGE_TEXT = "RESIGNAL to a not found", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 02444: RESIGNAL to a not found +show warnings $$ +Level Code Message +Error 1051 Unknown table 'no_such_table' +Error 5555 RESIGNAL to a not found +drop procedure test_resignal $$ +create procedure test_resignal() +begin +DECLARE CONTINUE HANDLER for sqlexception +begin +select "before RESIGNAL"; +RESIGNAL SQLSTATE "44444" SET +MESSAGE_TEXT = "RESIGNAL to an error", +MYSQL_ERRNO = 5555 ; +select "after RESIGNAL"; +end; +drop table no_such_table; +end $$ +call test_resignal() $$ +before RESIGNAL +before RESIGNAL +ERROR 44444: RESIGNAL to an error +show warnings $$ +Level Code Message +Error 1051 Unknown table 'no_such_table' +Error 5555 RESIGNAL to an error +drop procedure test_resignal $$ +# +# More complex cases +# +drop procedure if exists peter_p1 $$ +drop procedure if exists peter_p2 $$ +CREATE PROCEDURE peter_p1 () +BEGIN +DECLARE x CONDITION FOR 1231; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '2'; +RESIGNAL SET MYSQL_ERRNO = 9999; +END; +BEGIN +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '1'; +RESIGNAL SET SCHEMA_NAME = 'test'; +END; +SET @@sql_mode=NULL; +END; +END +$$ +CREATE PROCEDURE peter_p2 () +BEGIN +DECLARE x CONDITION for 9999; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '3'; +RESIGNAL SET MESSAGE_TEXT = 'Hi, I am a useless error message'; +END; +CALL peter_p1(); +END +$$ +CALL peter_p2() $$ +1 +1 +2 +2 +3 +3 +ERROR 42000: Hi, I am a useless error message +show warnings $$ +Level Code Message +Error 9999 Hi, I am a useless error message +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ +CREATE PROCEDURE peter_p1 () +BEGIN +DECLARE x CONDITION FOR SQLSTATE '42000'; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '2'; +RESIGNAL x SET MYSQL_ERRNO = 9999; +END; +BEGIN +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '1'; +RESIGNAL x SET +SCHEMA_NAME = 'test', +MYSQL_ERRNO= 1231; +END; +/* Raises ER_WRONG_VALUE_FOR_VAR : 1231, SQLSTATE 42000 */ +SET @@sql_mode=NULL; +END; +END +$$ +CREATE PROCEDURE peter_p2 () +BEGIN +DECLARE x CONDITION for SQLSTATE '42000'; +DECLARE EXIT HANDLER FOR x +BEGIN +SELECT '3'; +RESIGNAL x SET +MESSAGE_TEXT = 'Hi, I am a useless error message', +MYSQL_ERRNO = 9999; +END; +CALL peter_p1(); +END +$$ +CALL peter_p2() $$ +1 +1 +2 +2 +3 +3 +ERROR 42000: Hi, I am a useless error message +show warnings $$ +Level Code Message +Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL' +Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL' +Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL' +Error 9999 Hi, I am a useless error message +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ +drop procedure if exists peter_p3 $$ +Warnings: +Note 1305 PROCEDURE peter_p3 does not exist +create procedure peter_p3() +begin +declare continue handler for sqlexception +resignal sqlstate '99002' set mysql_errno = 2; +signal sqlstate '99001' set mysql_errno = 1, message_text = "Original"; +end $$ +call peter_p3() $$ +ERROR 99002: Original +show warnings $$ +Level Code Message +Error 1 Original +Error 2 Original +drop procedure peter_p3 $$ +drop table t_warn; +drop table t_cursor; +# +# Miscelaneous test cases +# +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 0x12; /* 18 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 0b00010010; /* 18 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = '65'; /* 65 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 'A'; /* illegal */ +end $$ +call test_signal $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'A' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = "65"; /* 65 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = "A"; /* illegal */ +end $$ +call test_signal $$ +ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of 'A' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */ +end $$ +call test_signal $$ +ERROR 42S22: Unknown column '65' in 'field list' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */ +end $$ +call test_signal $$ +ERROR 42S22: Unknown column 'A' in 'field list' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 3.141592; /* 3 */ +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT= 0x41; /* A */ +end $$ +call test_signal $$ +ERROR 12345: A +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT= 0b01000001; /* A */ +end $$ +call test_signal $$ +ERROR 12345: A +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = "Hello"; +end $$ +call test_signal $$ +ERROR 12345: Hello +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 'Hello'; +end $$ +call test_signal $$ +ERROR 12345: Hello +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = `Hello`; +end $$ +call test_signal $$ +ERROR 42S22: Unknown column 'Hello' in 'field list' +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo SET MYSQL_ERRNO = 1000, +MESSAGE_TEXT = 65.4321; +end $$ +call test_signal $$ +ERROR 12345: 65.4321 +drop procedure test_signal $$ +create procedure test_signal() +begin +DECLARE céèçà foo CONDITION FOR SQLSTATE '12345'; +SIGNAL céèçà SET MYSQL_ERRNO = 1000; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '©Ã¨Ã§Ã  foo CONDITION FOR SQLSTATE '12345'; +SIGNAL céèçà SET MYSQL_ERRNO = 1' at line 3 +create procedure test_signal() +begin +DECLARE "céèçà" CONDITION FOR SQLSTATE '12345'; +SIGNAL "céèçà" SET MYSQL_ERRNO = 1000; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"céèçà" CONDITION FOR SQLSTATE '12345'; +SIGNAL "céèçà" SET MYSQL_ERRNO =' at line 3 +create procedure test_signal() +begin +DECLARE 'céèçà' CONDITION FOR SQLSTATE '12345'; +SIGNAL 'céèçà' SET MYSQL_ERRNO = 1000; +end $$ +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''céèçà' CONDITION FOR SQLSTATE '12345'; +SIGNAL 'céèçà' SET MYSQL_ERRNO =' at line 3 +create procedure test_signal() +begin +DECLARE `céèçà` CONDITION FOR SQLSTATE '12345'; +SIGNAL `céèçà` SET MYSQL_ERRNO = 1000; +end $$ +call test_signal $$ +ERROR 12345: Unhandled user-defined exception condition +drop procedure test_signal $$ +create procedure test_signal() +begin +SIGNAL SQLSTATE '77777' SET MYSQL_ERRNO = 1000, MESSAGE_TEXT='ÃÂÃÅÄ'; +end $$ +drop procedure test_signal $$ diff --git a/mysql-test/r/signal_code.result b/mysql-test/r/signal_code.result new file mode 100644 index 00000000000..63db6656636 --- /dev/null +++ b/mysql-test/r/signal_code.result @@ -0,0 +1,35 @@ +use test; +drop procedure if exists signal_proc; +drop function if exists signal_func; +create procedure signal_proc() +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo; +SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +RESIGNAL foo; +RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +end $$ +create function signal_func() returns int +begin +DECLARE foo CONDITION FOR SQLSTATE '12345'; +SIGNAL foo; +SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +RESIGNAL foo; +RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +return 0; +end $$ +show procedure code signal_proc; +Pos Instruction +0 stmt 136 "SIGNAL foo" +1 stmt 136 "SIGNAL foo SET MESSAGE_TEXT = "This i..." +2 stmt 137 "RESIGNAL foo" +3 stmt 137 "RESIGNAL foo SET MESSAGE_TEXT = "This..." +drop procedure signal_proc; +show function code signal_func; +Pos Instruction +0 stmt 136 "SIGNAL foo" +1 stmt 136 "SIGNAL foo SET MESSAGE_TEXT = "This i..." +2 stmt 137 "RESIGNAL foo" +3 stmt 137 "RESIGNAL foo SET MESSAGE_TEXT = "This..." +4 freturn 3 0 +drop function signal_func; diff --git a/mysql-test/r/signal_demo1.result b/mysql-test/r/signal_demo1.result new file mode 100644 index 00000000000..752f23a48d6 --- /dev/null +++ b/mysql-test/r/signal_demo1.result @@ -0,0 +1,270 @@ +drop database if exists demo; +create database demo; +use demo; +create table ab_physical_person ( +person_id integer, +first_name VARCHAR(50), +middle_initial CHAR, +last_name VARCHAR(50), +primary key (person_id)); +create table ab_moral_person ( +company_id integer, +name VARCHAR(100), +primary key (company_id)); +create table in_inventory ( +item_id integer, +descr VARCHAR(50), +stock integer, +primary key (item_id)); +create table po_order ( +po_id integer auto_increment, +cust_type char, /* arc relationship, see cust_id */ +cust_id integer, /* FK to ab_physical_person *OR* ab_moral_person */ +primary key (po_id)); +create table po_order_line ( +po_id integer, /* FK to po_order.po_id */ +line_no integer, +item_id integer, /* FK to in_inventory.item_id */ +qty integer); +# +# Schema integrity enforcement +# +create procedure check_pk_person(in person_type char, in id integer) +begin +declare x integer; +declare msg varchar(128); +/* +Test integrity constraints for an 'arc' relationship. +Based on 'person_type', 'id' points to either a +physical person, or a moral person. +*/ +case person_type +when 'P' then +begin +select count(person_id) from ab_physical_person +where ab_physical_person.person_id = id +into x; +if (x != 1) +then +set msg= concat('No such physical person, PK:', id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end; +when 'M' then +begin +select count(company_id) from ab_moral_person +where ab_moral_person.company_id = id +into x; +if (x != 1) +then +set msg= concat('No such moral person, PK:', id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end; +else +begin +set msg= concat('No such person type:', person_type); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 20000; +end; +end case; +end +$$ +create procedure check_pk_inventory(in id integer) +begin +declare x integer; +declare msg varchar(128); +select count(item_id) from in_inventory +where in_inventory.item_id = id +into x; +if (x != 1) +then +set msg= concat('Failed integrity constraint, table in_inventory, PK:', +id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end +$$ +create procedure check_pk_order(in id integer) +begin +declare x integer; +declare msg varchar(128); +select count(po_id) from po_order +where po_order.po_id = id +into x; +if (x != 1) +then +set msg= concat('Failed integrity constraint, table po_order, PK:', id); +SIGNAL SQLSTATE '45000' SET +MESSAGE_TEXT = msg, +MYSQL_ERRNO = 10000; +end if; +end +$$ +create trigger po_order_bi before insert on po_order +for each row +begin +call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ +create trigger po_order_bu before update on po_order +for each row +begin +call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ +create trigger po_order_line_bi before insert on po_order_line +for each row +begin +call check_pk_order(NEW.po_id); +call check_pk_inventory(NEW.item_id); +end +$$ +create trigger po_order_line_bu before update on po_order_line +for each row +begin +call check_pk_order(NEW.po_id); +call check_pk_inventory(NEW.item_id); +end +$$ +# +# Application helpers +# +create procedure po_create_order( +in p_cust_type char, +in p_cust_id integer, +out id integer) +begin +insert into po_order set cust_type = p_cust_type, cust_id = p_cust_id; +set id = last_insert_id(); +end +$$ +create procedure po_add_order_line( +in po integer, +in line integer, +in item integer, +in q integer) +begin +insert into po_order_line set +po_id = po, line_no = line, item_id = item, qty = q; +end +$$ +# +# Create sample data +# +insert into ab_physical_person values +( 1, "John", "A", "Doe"), +( 2, "Marry", "B", "Smith") +; +insert into ab_moral_person values +( 3, "ACME real estate, INC"), +( 4, "Local school") +; +insert into in_inventory values +( 100, "Table, dinner", 5), +( 101, "Chair", 20), +( 200, "Table, coffee", 3), +( 300, "School table", 25), +( 301, "School chairs", 50) +; +select * from ab_physical_person order by person_id; +person_id first_name middle_initial last_name +1 John A Doe +2 Marry B Smith +select * from ab_moral_person order by company_id; +company_id name +3 ACME real estate, INC +4 Local school +select * from in_inventory order by item_id; +item_id descr stock +100 Table, dinner 5 +101 Chair 20 +200 Table, coffee 3 +300 School table 25 +301 School chairs 50 +# +# Entering an order +# +set @my_po = 0; +/* John Doe wants 1 table and 4 chairs */ +call po_create_order("P", 1, @my_po); +call po_add_order_line (@my_po, 1, 100, 1); +call po_add_order_line (@my_po, 2, 101, 4); +/* Marry Smith wants a coffee table */ +call po_create_order("P", 2, @my_po); +call po_add_order_line (@my_po, 1, 200, 1); +# +# Entering bad data in an order +# +call po_add_order_line (@my_po, 1, 999, 1); +ERROR 45000: Failed integrity constraint, table in_inventory, PK:999 +# +# Entering bad data in an unknown order +# +call po_add_order_line (99, 1, 100, 1); +ERROR 45000: Failed integrity constraint, table po_order, PK:99 +# +# Entering an order for an unknown company +# +call po_create_order("M", 7, @my_po); +ERROR 45000: No such moral person, PK:7 +# +# Entering an order for an unknown person type +# +call po_create_order("X", 1, @my_po); +ERROR 45000: No such person type:X +/* The local school wants 10 class tables and 20 chairs */ +call po_create_order("M", 4, @my_po); +call po_add_order_line (@my_po, 1, 300, 10); +call po_add_order_line (@my_po, 2, 301, 20); +select * from po_order; +po_id cust_type cust_id +1 P 1 +2 P 2 +3 M 4 +select * from po_order_line; +po_id line_no item_id qty +1 1 100 1 +1 2 101 4 +2 1 200 1 +3 1 300 10 +3 2 301 20 +select po_id as "PO#", +( case cust_type +when "P" then concat (pp.first_name, +" ", +pp.middle_initial, +" ", +pp.last_name) +when "M" then mp.name +end ) as "Sold to" + from po_order po +left join ab_physical_person pp on po.cust_id = pp.person_id +left join ab_moral_person mp on po.cust_id = company_id +; +PO# Sold to +1 John A Doe +2 Marry B Smith +3 Local school +select po_id as "PO#", +ol.line_no as "Line", +ol.item_id as "Item", +inv.descr as "Description", +ol.qty as "Quantity" + from po_order_line ol, in_inventory inv +where inv.item_id = ol.item_id +order by ol.item_id, ol.line_no; +PO# Line Item Description Quantity +1 1 100 Table, dinner 1 +1 2 101 Chair 4 +2 1 200 Table, coffee 1 +3 1 300 School table 10 +3 2 301 School chairs 20 +drop database demo; diff --git a/mysql-test/r/signal_demo2.result b/mysql-test/r/signal_demo2.result new file mode 100644 index 00000000000..223030b0624 --- /dev/null +++ b/mysql-test/r/signal_demo2.result @@ -0,0 +1,197 @@ +drop database if exists demo; +create database demo; +use demo; +create procedure proc_top_a(p1 integer) +begin +## DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND +begin +end; +select "Starting ..."; +call proc_middle_a(p1); +select "The end"; +end +$$ +create procedure proc_middle_a(p1 integer) +begin +DECLARE l integer; +# without RESIGNAL: +# Should be: DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND +DECLARE EXIT HANDLER for 1 /* not sure how to handle exceptions */ +begin +select "Oops ... now what ?"; +end; +select "In prod_middle()"; +create temporary table t1(a integer, b integer); +select GET_LOCK("user_mutex", 10) into l; +insert into t1 set a = p1, b = p1; +call proc_bottom_a(p1); +select RELEASE_LOCK("user_mutex") into l; +drop temporary table t1; +end +$$ +create procedure proc_bottom_a(p1 integer) +begin +select "In proc_bottom()"; +if (p1 = 1) then +begin +select "Doing something that works ..."; +select * from t1; +end; +end if; +if (p1 = 2) then +begin +select "Doing something that fail (simulate an error) ..."; +drop table no_such_table; +end; +end if; +if (p1 = 3) then +begin +select "Doing something that *SHOULD* works ..."; +select * from t1; +end; +end if; +end +$$ +call proc_top_a(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that works ... +Doing something that works ... +a b +1 1 +The end +The end +call proc_top_a(2); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that fail (simulate an error) ... +Doing something that fail (simulate an error) ... +ERROR 42S02: Unknown table 'no_such_table' +call proc_top_a(3); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +ERROR 42S01: Table 't1' already exists +call proc_top_a(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +ERROR 42S01: Table 't1' already exists +drop temporary table if exists t1; +create procedure proc_top_b(p1 integer) +begin +select "Starting ..."; +call proc_middle_b(p1); +select "The end"; +end +$$ +create procedure proc_middle_b(p1 integer) +begin +DECLARE l integer; +DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND +begin +begin +DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND +begin +/* Ignore errors from the cleanup code */ +end; +select "Doing cleanup !"; +select RELEASE_LOCK("user_mutex") into l; +drop temporary table t1; +end; +RESIGNAL; +end; +select "In prod_middle()"; +create temporary table t1(a integer, b integer); +select GET_LOCK("user_mutex", 10) into l; +insert into t1 set a = p1, b = p1; +call proc_bottom_b(p1); +select RELEASE_LOCK("user_mutex") into l; +drop temporary table t1; +end +$$ +create procedure proc_bottom_b(p1 integer) +begin +select "In proc_bottom()"; +if (p1 = 1) then +begin +select "Doing something that works ..."; +select * from t1; +end; +end if; +if (p1 = 2) then +begin +select "Doing something that fail (simulate an error) ..."; +drop table no_such_table; +end; +end if; +if (p1 = 3) then +begin +select "Doing something that *SHOULD* works ..."; +select * from t1; +end; +end if; +end +$$ +call proc_top_b(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that works ... +Doing something that works ... +a b +1 1 +The end +The end +call proc_top_b(2); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that fail (simulate an error) ... +Doing something that fail (simulate an error) ... +Doing cleanup ! +Doing cleanup ! +ERROR 42S02: Unknown table 'no_such_table' +call proc_top_b(3); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that *SHOULD* works ... +Doing something that *SHOULD* works ... +a b +3 3 +The end +The end +call proc_top_b(1); +Starting ... +Starting ... +In prod_middle() +In prod_middle() +In proc_bottom() +In proc_bottom() +Doing something that works ... +Doing something that works ... +a b +1 1 +The end +The end +drop database demo; diff --git a/mysql-test/r/signal_demo3.result b/mysql-test/r/signal_demo3.result new file mode 100644 index 00000000000..fea41ec2ef9 --- /dev/null +++ b/mysql-test/r/signal_demo3.result @@ -0,0 +1,143 @@ +SET @start_global_value = @@global.max_error_count; +SELECT @start_global_value; +@start_global_value +64 +SET @start_session_value = @@session.max_error_count; +SELECT @start_session_value; +@start_session_value +64 +drop database if exists demo; +create database demo; +use demo; +create procedure proc_1() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_1'; +call proc_2(); +end +$$ +create procedure proc_2() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_2'; +call proc_3(); +end +$$ +create procedure proc_3() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_3'; +call proc_4(); +end +$$ +create procedure proc_4() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_4'; +call proc_5(); +end +$$ +create procedure proc_5() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_5'; +call proc_6(); +end +$$ +create procedure proc_6() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_6'; +call proc_7(); +end +$$ +create procedure proc_7() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_7'; +call proc_8(); +end +$$ +create procedure proc_8() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_8'; +call proc_9(); +end +$$ +create procedure proc_9() +begin +declare exit handler for sqlexception +resignal sqlstate '45000' set message_text='Oops in proc_9'; +## Do something that fails, to see how errors are reported +drop table oops_it_is_not_here; +end +$$ +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1051 Unknown table 'oops_it_is_not_here' +Error 1642 Oops in proc_9 +Error 1642 Oops in proc_8 +Error 1642 Oops in proc_7 +Error 1642 Oops in proc_6 +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +SET @@session.max_error_count = 5; +SELECT @@session.max_error_count; +@@session.max_error_count +5 +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +SET @@session.max_error_count = 7; +SELECT @@session.max_error_count; +@@session.max_error_count +7 +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1642 Oops in proc_7 +Error 1642 Oops in proc_6 +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +SET @@session.max_error_count = 9; +SELECT @@session.max_error_count; +@@session.max_error_count +9 +call proc_1(); +ERROR 45000: Oops in proc_1 +show warnings; +Level Code Message +Error 1642 Oops in proc_9 +Error 1642 Oops in proc_8 +Error 1642 Oops in proc_7 +Error 1642 Oops in proc_6 +Error 1642 Oops in proc_5 +Error 1642 Oops in proc_4 +Error 1642 Oops in proc_3 +Error 1642 Oops in proc_2 +Error 1642 Oops in proc_1 +drop database demo; +SET @@global.max_error_count = @start_global_value; +SELECT @@global.max_error_count; +@@global.max_error_count +64 +SET @@session.max_error_count = @start_session_value; +SELECT @@session.max_error_count; +@@session.max_error_count +64 diff --git a/mysql-test/r/signal_sqlmode.result b/mysql-test/r/signal_sqlmode.result new file mode 100644 index 00000000000..8fed85eb4a9 --- /dev/null +++ b/mysql-test/r/signal_sqlmode.result @@ -0,0 +1,86 @@ +SET @save_sql_mode=@@sql_mode; +SET sql_mode=''; +drop procedure if exists p; +drop procedure if exists p2; +drop procedure if exists p3; +create procedure p() +begin +declare utf8_var VARCHAR(128) CHARACTER SET UTF8; +set utf8_var = concat(repeat('A', 128), 'X'); +select length(utf8_var), utf8_var; +end +$$ +create procedure p2() +begin +declare msg VARCHAR(129) CHARACTER SET UTF8; +set msg = concat(repeat('A', 128), 'X'); +select length(msg), msg; +signal sqlstate '55555' set message_text = msg; +end +$$ +create procedure p3() +begin +declare name VARCHAR(65) CHARACTER SET UTF8; +set name = concat(repeat('A', 64), 'X'); +select length(name), name; +signal sqlstate '55555' set +message_text = 'Message', +table_name = name; +end +$$ +call p; +length(utf8_var) utf8_var +128 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +Warnings: +Warning 1265 Data truncated for column 'utf8_var' at row 1 +call p2; +length(msg) msg +129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR 55555: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +call p3; +length(name) name +65 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR 55555: Message +drop procedure p; +drop procedure p2; +drop procedure p3; +SET sql_mode='STRICT_ALL_TABLES'; +create procedure p() +begin +declare utf8_var VARCHAR(128) CHARACTER SET UTF8; +set utf8_var = concat(repeat('A', 128), 'X'); +select length(utf8_var), utf8_var; +end +$$ +create procedure p2() +begin +declare msg VARCHAR(129) CHARACTER SET UTF8; +set msg = concat(repeat('A', 128), 'X'); +select length(msg), msg; +signal sqlstate '55555' set message_text = msg; +end +$$ +create procedure p3() +begin +declare name VARCHAR(65) CHARACTER SET UTF8; +set name = concat(repeat('A', 64), 'X'); +select length(name), name; +signal sqlstate '55555' set +message_text = 'Message', +table_name = name; +end +$$ +call p; +ERROR 22001: Data too long for column 'utf8_var' at row 1 +call p2; +length(msg) msg +129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR HY000: Data too long for condition item 'MESSAGE_TEXT' +call p3; +length(name) name +65 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX +ERROR HY000: Data too long for condition item 'TABLE_NAME' +drop procedure p; +drop procedure p2; +drop procedure p3; +SET @@sql_mode=@save_sql_mode; diff --git a/mysql-test/r/sp-dynamic.result b/mysql-test/r/sp-dynamic.result index 34b76a9424f..cdfeb8ab020 100644 --- a/mysql-test/r/sp-dynamic.result +++ b/mysql-test/r/sp-dynamic.result @@ -97,8 +97,6 @@ end| call p1()| a 1 -Warnings: -Note 1051 Unknown table 't1' call p1()| a 1 @@ -371,9 +369,6 @@ call p1(@a)| create table t1 (a int) @rsql create table t2 (a int) -Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' select @a| @a 0 @@ -382,9 +377,6 @@ call p1(@a)| create table t1 (a int) @rsql create table t2 (a int) -Warnings: -Note 1051 Unknown table 't1' -Note 1051 Unknown table 't2' select @a| @a 0 diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result index f5420a62f63..f532a5284a9 100644 --- a/mysql-test/r/sp-vars.result +++ b/mysql-test/r/sp-vars.result @@ -110,24 +110,6 @@ v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 12.00 12.12 12.00 12.12 Warnings: -Warning 1264 Out of range value for column 'v1' at row 1 -Warning 1264 Out of range value for column 'v1u' at row 1 -Warning 1264 Out of range value for column 'v2' at row 1 -Warning 1264 Out of range value for column 'v2u' at row 1 -Warning 1264 Out of range value for column 'v3' at row 1 -Warning 1264 Out of range value for column 'v3u' at row 1 -Warning 1264 Out of range value for column 'v4' at row 1 -Warning 1264 Out of range value for column 'v4u' at row 1 -Warning 1264 Out of range value for column 'v5' at row 1 -Warning 1264 Out of range value for column 'v5u' at row 1 -Warning 1264 Out of range value for column 'v6' at row 1 -Warning 1264 Out of range value for column 'v6u' at row 1 -Warning 1366 Incorrect integer value: 'String 10 ' for column 'v10' at row 1 -Warning 1366 Incorrect integer value: 'String10' for column 'v11' at row 1 -Warning 1265 Data truncated for column 'v12' at row 1 -Warning 1265 Data truncated for column 'v13' at row 1 -Warning 1366 Incorrect integer value: 'Hello, world' for column 'v16' at row 1 -Note 1265 Data truncated for column 'v18' at row 1 Note 1265 Data truncated for column 'v20' at row 1 CALL sp_vars_check_assignment(); i1 i2 i3 i4 @@ -143,21 +125,6 @@ d1 d2 d3 d1 d2 d3 1234.00 1234.12 1234.12 Warnings: -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Warning 1264 Out of range value for column 'u3' at row 1 -Warning 1264 Out of range value for column 'u4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Note 1265 Data truncated for column 'd3' at row 1 Note 1265 Data truncated for column 'd3' at row 1 SELECT sp_vars_check_ret1(); sp_vars_check_ret1() @@ -198,24 +165,6 @@ v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18 v19 v20 12.00 12.12 12.00 12.12 Warnings: -Warning 1264 Out of range value for column 'v1' at row 1 -Warning 1264 Out of range value for column 'v1u' at row 1 -Warning 1264 Out of range value for column 'v2' at row 1 -Warning 1264 Out of range value for column 'v2u' at row 1 -Warning 1264 Out of range value for column 'v3' at row 1 -Warning 1264 Out of range value for column 'v3u' at row 1 -Warning 1264 Out of range value for column 'v4' at row 1 -Warning 1264 Out of range value for column 'v4u' at row 1 -Warning 1264 Out of range value for column 'v5' at row 1 -Warning 1264 Out of range value for column 'v5u' at row 1 -Warning 1264 Out of range value for column 'v6' at row 1 -Warning 1264 Out of range value for column 'v6u' at row 1 -Warning 1366 Incorrect integer value: 'String 10 ' for column 'v10' at row 1 -Warning 1366 Incorrect integer value: 'String10' for column 'v11' at row 1 -Warning 1265 Data truncated for column 'v12' at row 1 -Warning 1265 Data truncated for column 'v13' at row 1 -Warning 1366 Incorrect integer value: 'Hello, world' for column 'v16' at row 1 -Note 1265 Data truncated for column 'v18' at row 1 Note 1265 Data truncated for column 'v20' at row 1 CALL sp_vars_check_assignment(); i1 i2 i3 i4 @@ -231,21 +180,6 @@ d1 d2 d3 d1 d2 d3 1234.00 1234.12 1234.12 Warnings: -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'i1' at row 1 -Warning 1264 Out of range value for column 'i2' at row 1 -Warning 1264 Out of range value for column 'i3' at row 1 -Warning 1264 Out of range value for column 'i4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Warning 1264 Out of range value for column 'u3' at row 1 -Warning 1264 Out of range value for column 'u4' at row 1 -Warning 1264 Out of range value for column 'u1' at row 1 -Warning 1264 Out of range value for column 'u2' at row 1 -Note 1265 Data truncated for column 'd3' at row 1 Note 1265 Data truncated for column 'd3' at row 1 SELECT sp_vars_check_ret1(); sp_vars_check_ret1() @@ -451,10 +385,6 @@ FF HEX(v10) FF Warnings: -Warning 1264 Out of range value for column 'v8' at row 1 -Warning 1264 Out of range value for column 'v9' at row 1 -Warning 1264 Out of range value for column 'v10' at row 1 -Warning 1264 Out of range value for column 'v1' at row 1 Warning 1264 Out of range value for column 'v5' at row 1 DROP PROCEDURE p1; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 3ad556b8c30..6f4755fcf37 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -526,8 +526,6 @@ end| delete from t1| create table t3 ( s char(16), d int)| call into_test4()| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from t3| s d into4 NULL @@ -1120,8 +1118,6 @@ end| select f9()| f9() 6 -Warnings: -Note 1051 Unknown table 't3' select f9() from t1 limit 1| f9() 6 @@ -1162,8 +1158,6 @@ drop temporary table t3| select f12_1()| f12_1() 3 -Warnings: -Note 1051 Unknown table 't3' select f12_1() from t1 limit 1| f12_1() 3 @@ -2069,12 +2063,7 @@ end if; insert into t4 values (2, rc, t3); end| call bug1863(10)| -Warnings: -Note 1051 Unknown table 'temp_t1' -Warning 1329 No data - zero rows fetched, selected, or processed call bug1863(10)| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed select * from t4| f1 rc t3 2 0 NULL @@ -2339,11 +2328,7 @@ begin end| call bug4579_1()| call bug4579_1()| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed call bug4579_1()| -Warnings: -Warning 1329 No data - zero rows fetched, selected, or processed drop procedure bug4579_1| drop procedure bug4579_2| drop table t3| @@ -3736,9 +3721,6 @@ Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( `spv1` decimal(3,3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -Warnings: -Warning 1264 Out of range value for column 'spv1' at row 1 -Warning 1366 Incorrect decimal value: 'test' for column 'spv1' at row 1 call bug12589_2()| Table Create Table tm1 CREATE TEMPORARY TABLE `tm1` ( @@ -6106,35 +6088,6 @@ bug5274_f2() x Warnings: Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 -Warning 1265 Data truncated for column 'bug5274_f1' at row 1 DROP FUNCTION bug5274_f1| DROP FUNCTION bug5274_f2| drop procedure if exists proc_21513| @@ -6229,20 +6182,17 @@ f1(2) 0 Warnings: Warning 1329 No data - zero rows fetched, selected, or processed -Warning 1329 No data - zero rows fetched, selected, or processed PREPARE s1 FROM 'SELECT f1(2)'; EXECUTE s1; f1(2) 0 Warnings: Warning 1329 No data - zero rows fetched, selected, or processed -Warning 1329 No data - zero rows fetched, selected, or processed EXECUTE s1; f1(2) 0 Warnings: Warning 1329 No data - zero rows fetched, selected, or processed -Warning 1329 No data - zero rows fetched, selected, or processed DROP PROCEDURE p1; DROP PROCEDURE p2; DROP FUNCTION f1; @@ -6254,6 +6204,7 @@ create procedure mysqltest_db1.sp_bug28551() begin end; call mysqltest_db1.sp_bug28551(); show warnings; Level Code Message +Note 1008 Can't drop database 'mysqltest_db1'; database doesn't exist drop database mysqltest_db1; drop database if exists mysqltest_db1; drop table if exists test.t1; diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 831616f491b..228fe008447 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -21,9 +21,11 @@ end| call bug4902_2()| show warnings| Level Code Message +Note 1305 PROCEDURE bug4902_2 does not exist call bug4902_2()| show warnings| Level Code Message +Note 1305 PROCEDURE bug4902_2 does not exist drop procedure bug4902_2| drop table if exists t1| create table t1 ( diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 241f4198bf7..a9e0d7f457d 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -315,8 +315,8 @@ MOD(col1,0) NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT INTO t1 (col1) VALUES(-129); ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(128); @@ -343,7 +343,7 @@ SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 1; MOD(col1,0) NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0; ERROR 22003: Out of range value for column 'col1' at row 1 UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0; @@ -353,16 +353,16 @@ ERROR 22012: Division by 0 set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO'; INSERT INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 set @@sql_mode='ansi,traditional'; SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2; MOD(col1,0) NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT INTO t1 (col1) VALUES (''); ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES ('a59b'); @@ -374,8 +374,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 set @@sql_mode='ansi'; INSERT INTO t1 values (1/0,1/0); set @@sql_mode='ansi,traditional'; @@ -457,8 +457,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -541,8 +541,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -625,8 +625,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -707,8 +707,8 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0,1/0); Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -794,7 +794,7 @@ Warnings: Note 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0); Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(1000),(-1000); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -861,7 +861,7 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 (col1) VALUES (1/0); Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES (+3.4E+39,-3.4E+39); Warnings: Warning 1264 Out of range value for column 'col1' at row 1 @@ -910,7 +910,7 @@ Warnings: Warning 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 (col1) values (1/0); Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309); ERROR 22007: Illegal double '1.9E+309' value found during parsing INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309'); @@ -1080,13 +1080,13 @@ Warnings: Warning 1292 Truncated incorrect datetime value: '31.10.2004 15.30 abc' insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i')); Warnings: -Error 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_date +Warning 1411 Incorrect datetime value: '32.10.2004 15.30' for function str_to_date insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r')); Warnings: -Error 1411 Incorrect time value: '22:22:33 AM' for function str_to_date +Warning 1411 Incorrect time value: '22:22:33 AM' for function str_to_date insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T')); Warnings: -Error 1411 Incorrect time value: 'abc' for function str_to_date +Warning 1411 Incorrect time value: 'abc' for function str_to_date insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i')); insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r')); insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T')); @@ -1104,9 +1104,9 @@ select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') I count(*) 7 Warnings: -Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date -Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date -Error 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date +Warning 1411 Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date drop table t1; create table t1 (col1 char(3), col2 integer); insert into t1 (col1) values (cast(1000 as char(3))); diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index 4476735735c..000b08113c1 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1073,7 +1073,7 @@ NULL SET @x=2; UPDATE t1 SET i1 = @x; Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 SELECT @x; @x NULL @@ -1086,8 +1086,8 @@ NULL SET @x=4; UPDATE t1 SET i1 = @x; Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 SELECT @x; @x NULL @@ -1190,16 +1190,16 @@ create trigger t4_bu before update on t4 for each row set @t4_bu_called:=1| insert into t1 values(10, 10)| set @a:=1/0| Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select 1/0 from t1| 1/0 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 create trigger t1_bi before insert on t1 for each row set @a:=1/0| insert into t1 values(20, 20)| Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 drop trigger t1_bi| create trigger t1_bi before insert on t1 for each row begin @@ -1219,7 +1219,7 @@ end| set @check=0, @t4_bi_called=0, @t4_bu_called=0| insert into t1 values(30, 30)| Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select @check, @t4_bi_called, @t4_bu_called| @check @t4_bi_called @t4_bu_called 2 1 1 diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index c3d1e400b23..1ad46821bb7 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -185,7 +185,7 @@ select 1e10/0e0; 1e10/0e0 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 create table wl1612 (col1 int, col2 decimal(38,10), col3 numeric(38,10)); insert into wl1612 values(1,12345678901234567890.1234567890,12345678901234567890.1234567890); select * from wl1612; @@ -205,27 +205,27 @@ NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select col2/0 from wl1612; col2/0 NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 select col3/0 from wl1612; col3/0 NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 insert into wl1612 values(5,5000.0005,5000.0005); insert into wl1612 values(6,5000.0005,5000.0005); select sum(col2),sum(col3) from wl1612; @@ -788,12 +788,12 @@ select 1 / 1E-500; 1 / 1E-500 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 select 1 / 0; 1 / 0 NULL Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 set sql_mode='ansi,traditional'; CREATE TABLE Sow6_2f (col1 NUMERIC(4,2)); INSERT INTO Sow6_2f VALUES (10.55); @@ -819,11 +819,11 @@ NULL NULL NULL Warnings: -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 -Error 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 +Warning 1365 Division by 0 INSERT INTO Sow6_2f VALUES ('a59b'); ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1 drop table Sow6_2f; @@ -838,12 +838,12 @@ select 9999999999999999999999999999999999999999999999999999999999999999999999999 x 99999999999999999999999999999999999999999999999999999999999999999 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x; x 100000000000000000000000000000000000000000000000000000000000000000 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' select 0.190287977636363637 + 0.040372670 * 0 - 0; 0.190287977636363637 + 0.040372670 * 0 - 0 0.190287977636363637 @@ -1380,15 +1380,15 @@ create table t1 (c1 decimal(64)); insert into t1 values( 89000000000000000000000000000000000000000000000000000000000000000000000000000000000000000); Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1264 Out of range value for column 'c1' at row 1 insert into t1 values( 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 * 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999); Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1264 Out of range value for column 'c1' at row 1 insert into t1 values(1e100); Warnings: @@ -1432,7 +1432,7 @@ select cast(19999999999999999999 as unsigned); cast(19999999999999999999 as unsigned) 18446744073709551615 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' create table t1(a decimal(18)); insert into t1 values(123456789012345678); alter table t1 modify column a decimal(19); @@ -1444,12 +1444,12 @@ select cast(11.1234 as DECIMAL(3,2)); cast(11.1234 as DECIMAL(3,2)) 9.99 Warnings: -Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 select * from (select cast(11.1234 as DECIMAL(3,2))) t; cast(11.1234 as DECIMAL(3,2)) 9.99 Warnings: -Error 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1 select cast(a as DECIMAL(3,2)) from (select 11.1233 as a UNION select 11.1234 @@ -1460,9 +1460,9 @@ cast(a as DECIMAL(3,2)) 9.99 9.99 Warnings: -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 select cast(a as DECIMAL(3,2)), count(*) from (select 11.1233 as a UNION select 11.1234 @@ -1471,10 +1471,10 @@ UNION select 12.1234 cast(a as DECIMAL(3,2)) count(*) 9.99 3 Warnings: -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 -Error 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 +Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1 create table t1 (s varchar(100)); insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875); drop table t1; @@ -1560,7 +1560,7 @@ select cast(143.481 as decimal(2,1)); cast(143.481 as decimal(2,1)) 9.9 Warnings: -Error 1264 Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1 +Warning 1264 Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1 select cast(-3.4 as decimal(2,1)); cast(-3.4 as decimal(2,1)) -3.4 @@ -1568,12 +1568,12 @@ select cast(99.6 as decimal(2,0)); cast(99.6 as decimal(2,0)) 99 Warnings: -Error 1264 Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1 +Warning 1264 Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1 select cast(-13.4 as decimal(2,1)); cast(-13.4 as decimal(2,1)) -9.9 Warnings: -Error 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1 +Warning 1264 Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1 select cast(98.6 as decimal(2,0)); cast(98.6 as decimal(2,0)) 99 @@ -1674,7 +1674,7 @@ CREATE TABLE t1 SELECT /* 82 */ 1000000000000000000000000000000000000000000000000000000000000000000000000000000001 AS c1; Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DESC t1; Field Type Null Key Default Extra c1 decimal(65,0) NO 0 @@ -1797,7 +1797,7 @@ CREATE TABLE t1 (a DECIMAL(30,30)); INSERT INTO t1 VALUES (0.1),(0.2),(0.3); CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1; Warnings: -Note 1265 Data truncated for column 'c1' at row 3 +Note 1265 Data truncated for column 'c1' at row 4 DESC t2; Field Type Null Key Default Extra c1 decimal(32,30) YES NULL diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index b5e374aaf8c..e23e8930ddb 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1111,8 +1111,8 @@ insert into v1 values(3); ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 values (2),(3),(0); Warnings: -Error 1369 CHECK OPTION failed 'test.v1' -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a 1 @@ -1125,8 +1125,8 @@ create table t2 (a int); insert into t2 values (2),(3),(0); insert ignore into v1 SELECT a from t2; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1 order by a desc; a 1 @@ -1148,7 +1148,7 @@ a update v1 set a=a+1; update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a 1 @@ -1182,7 +1182,7 @@ insert into v1 values (1) on duplicate key update a=2; ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 values (1) on duplicate key update a=2; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; a 1 @@ -1283,7 +1283,7 @@ insert ignore into v1 values (6); ERROR HY000: CHECK OPTION failed 'test.v1' insert ignore into v1 values (6),(3); Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1; s1 3 @@ -1328,9 +1328,9 @@ delete from t1; load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3 -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 4 -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' select * from t1 order by a,b; a b 1 row 1 @@ -1354,7 +1354,7 @@ concat('|',a,'|') concat('|',b,'|') delete from t1; load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; Warnings: -Error 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CHECK OPTION failed 'test.v1' Warning 1261 Row 2 doesn't contain data for all columns select concat('|',a,'|'), concat('|',b,'|') from t1; concat('|',a,'|') concat('|',b,'|') diff --git a/mysql-test/suite/binlog/r/binlog_index.result b/mysql-test/suite/binlog/r/binlog_index.result index d49ceb00501..69d877c5adc 100644 --- a/mysql-test/suite/binlog/r/binlog_index.result +++ b/mysql-test/suite/binlog/r/binlog_index.result @@ -34,7 +34,7 @@ purge binary logs TO 'master-bin.000002'; ERROR HY000: Fatal error during log purge show warnings; Level Code Message -Error 1377 a problem with deleting master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files +Warning 1377 a problem with deleting master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files Error 1377 Fatal error during log purge reset master; End of tests diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 4c2c32ad8f1..3047ff54cf0 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -43,12 +43,6 @@ END| CALL proc(); Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ---- Insert from stored function ---- CREATE FUNCTION func() RETURNS INT @@ -67,12 +61,6 @@ func() 0 Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ---- Insert from trigger ---- CREATE TRIGGER trig BEFORE INSERT ON trigger_table @@ -90,12 +78,6 @@ INSERT INTO trigger_table VALUES ('bye.'); Warnings: Note 1592 Statement may not be safe to log in statement format. Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ---- Insert from prepared statement ---- PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)'; PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)'; @@ -155,12 +137,6 @@ func5() 0 Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. ==== Variables that should *not* be unsafe ==== INSERT INTO t1 VALUES (@@session.pseudo_thread_id); INSERT INTO t1 VALUES (@@session.pseudo_thread_id); @@ -215,9 +191,6 @@ END| CALL p1(); Warnings: Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. -Note 1592 Statement may not be safe to log in statement format. DROP PROCEDURE p1; DROP TABLE t1; DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result index b26c4112826..a59758c8673 100644 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ b/mysql-test/suite/innodb/r/innodb-zip.result @@ -198,13 +198,11 @@ create table t1 (id int primary key) engine = innodb key_block_size = 0; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 1; create table t4 (id int primary key) engine = innodb key_block_size = 2; @@ -235,28 +233,24 @@ key_block_size = 8 row_format = redundant; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 8 row_format = compact; ERROR HY000: Can't create table 'test.t3' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8 row_format = dynamic; ERROR HY000: Can't create table 'test.t4' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 8 row_format = default; ERROR HY000: Can't create table 'test.t5' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t5' (errno: 1478) SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -268,24 +262,18 @@ key_block_size = 9 row_format = redundant; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = compact; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = dynamic; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -295,43 +283,36 @@ create table t1 (id int primary key) engine = innodb key_block_size = 1; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table 'test.t3' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8; ERROR HY000: Can't create table 'test.t4' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 16; ERROR HY000: Can't create table 'test.t5' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t5' (errno: 1478) create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table 'test.t6' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1005 Can't create table 'test.t6' (errno: 1478) create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table 'test.t7' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. Error 1005 Can't create table 'test.t7' (errno: 1478) create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; @@ -347,43 +328,36 @@ create table t1 (id int primary key) engine = innodb key_block_size = 1; ERROR HY000: Can't create table 'test.t1' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table 'test.t2' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table 'test.t3' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8; ERROR HY000: Can't create table 'test.t4' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 16; ERROR HY000: Can't create table 'test.t5' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t5' (errno: 1478) create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table 'test.t6' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t6' (errno: 1478) create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table 'test.t7' (errno: 1478) show errors; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t7' (errno: 1478) create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; diff --git a/mysql-test/suite/ndb/r/ndb_bitfield.result b/mysql-test/suite/ndb/r/ndb_bitfield.result index 59c4d420b22..826f3a98348 100644 --- a/mysql-test/suite/ndb/r/ndb_bitfield.result +++ b/mysql-test/suite/ndb/r/ndb_bitfield.result @@ -204,7 +204,7 @@ b int ERROR HY000: Can't create table 'test.t1' (errno: 906) show warnings; Level Code Message -Error 1296 Got error 906 'Unsupported attribute type in index' from NDB +Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB Error 1005 Can't create table 'test.t1' (errno: 906) create table t1 ( pk1 int not null primary key, @@ -214,7 +214,7 @@ key(b) ERROR HY000: Can't create table 'test.t1' (errno: 906) show warnings; Level Code Message -Error 1296 Got error 906 'Unsupported attribute type in index' from NDB +Warning 1296 Got error 906 'Unsupported attribute type in index' from NDB Error 1005 Can't create table 'test.t1' (errno: 906) create table t1 ( pk1 int primary key, diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result index 41e3d10fe5b..b956d3b0047 100644 --- a/mysql-test/suite/ndb/r/ndb_dd_basic.result +++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result @@ -8,20 +8,20 @@ INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 1M ENGINE=MYISAM; Warnings: -Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undofile02.dat' INITIAL_SIZE = 4M ENGINE=XYZ; Warnings: Warning 1286 Unknown table engine 'XYZ' -Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 12M; Warnings: -Error 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' +Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TABLESPACE or LOGFILE GROUP' set storage_engine=ndb; CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' diff --git a/mysql-test/suite/ndb/r/ndb_dd_ddl.result b/mysql-test/suite/ndb/r/ndb_dd_ddl.result index d8d9e8631d5..2bf30f5c7fc 100644 --- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result +++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result @@ -15,7 +15,7 @@ ENGINE NDB; ERROR HY000: Failed to create LOGFILE GROUP SHOW WARNINGS; Level Code Message -Error 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB +Warning 1296 Got error 1514 'Currently there is a limit of one logfile group' from NDB Error 1528 Failed to create LOGFILE GROUP CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undofile.dat' diff --git a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result index 374d702c408..61d15b7cb98 100644 --- a/mysql-test/suite/ndb/r/ndb_gis.result +++ b/mysql-test/suite/ndb/r/ndb_gis.result @@ -463,7 +463,7 @@ drop table t1; End of 4.1 tests CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); Warnings: -Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); @@ -1013,7 +1013,7 @@ drop table t1; End of 4.1 tests CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); Warnings: -Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); diff --git a/mysql-test/suite/ndb/r/ndb_partition_error.result b/mysql-test/suite/ndb/r/ndb_partition_error.result index d86dc382185..df2db5c5f06 100644 --- a/mysql-test/suite/ndb/r/ndb_partition_error.result +++ b/mysql-test/suite/ndb/r/ndb_partition_error.result @@ -14,7 +14,7 @@ partition x3 values less than (20) nodegroup 14); ERROR HY000: Can't create table 'test.t1' (errno: 140) show warnings; Level Code Message -Error 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB +Warning 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB Error 1005 Can't create table 'test.t1' (errno: 140) CREATE TABLE t1 ( a int not null, diff --git a/mysql-test/suite/ndb/r/ndb_row_format.result b/mysql-test/suite/ndb/r/ndb_row_format.result index eea0692dd92..48a314c2fe9 100644 --- a/mysql-test/suite/ndb/r/ndb_row_format.result +++ b/mysql-test/suite/ndb/r/ndb_row_format.result @@ -8,7 +8,7 @@ ENGINE=NDB; ERROR HY000: Can't create table 'test.t1' (errno: 138) SHOW WARNINGS; Level Code Message -Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' +Warning 1478 Table storage engine 'ndbcluster' does not support the create option 'Row format FIXED incompatible with variable sized attribute' Error 1005 Can't create table 'test.t1' (errno: 138) CREATE TABLE t1 ( a INT KEY, diff --git a/mysql-test/suite/ndb/r/ndb_single_user.result b/mysql-test/suite/ndb/r/ndb_single_user.result index 8133e540d71..1d5f3041adb 100644 --- a/mysql-test/suite/ndb/r/ndb_single_user.result +++ b/mysql-test/suite/ndb/r/ndb_single_user.result @@ -9,7 +9,7 @@ ENGINE=NDB; ERROR HY000: Failed to create LOGFILE GROUP show warnings; Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1528 Failed to create LOGFILE GROUP create table t1 (a int key, b int unique, c int) engine ndb; CREATE LOGFILE GROUP lg1 @@ -25,14 +25,14 @@ ENGINE NDB; ERROR HY000: Failed to create TABLESPACE show warnings; Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1528 Failed to create TABLESPACE DROP LOGFILE GROUP lg1 ENGINE =NDB; ERROR HY000: Failed to drop LOGFILE GROUP show warnings; Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1529 Failed to drop LOGFILE GROUP CREATE TABLESPACE ts1 ADD DATAFILE 'datafile.dat' @@ -45,7 +45,7 @@ ENGINE NDB; ERROR HY000: Failed to alter: DROP DATAFILE show warnings; Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1533 Failed to alter: DROP DATAFILE ALTER TABLESPACE ts1 DROP DATAFILE 'datafile.dat' @@ -55,7 +55,7 @@ ENGINE NDB; ERROR HY000: Failed to drop TABLESPACE show warnings; Level Code Message -Error 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB +Warning 1296 Got error 299 'Operation not allowed or aborted due to single user mode' from NDB Error 1529 Failed to drop TABLESPACE DROP TABLESPACE ts1 ENGINE NDB; diff --git a/mysql-test/suite/rpl/r/rpl_EE_err.result b/mysql-test/suite/rpl/r/rpl_EE_err.result index 16fa931e303..8c1277445b2 100644 --- a/mysql-test/suite/rpl/r/rpl_EE_err.result +++ b/mysql-test/suite/rpl/r/rpl_EE_err.result @@ -8,4 +8,4 @@ create table t1 (a int) engine=myisam; flush tables; drop table if exists t1; Warnings: -Error 2 Can't find file: 't1' (errno: 2) +Warning 2 Can't find file: 't1' (errno: 2) diff --git a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result index 9a2822835f8..5a6a9ace4c5 100644 --- a/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result @@ -22,8 +22,6 @@ END| < ---- Master selects-- > ------------------------- CALL test.p1(12); -Warnings: -Note 1051 Unknown table 't1' SELECT * FROM test.t1; num 12 diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index e92f3e96303..71d3d5a140b 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -694,3 +694,35 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN DROP TABLE t1, t2; --echo End of 5.0 tests + +# +# Bug#36785: Wrong error message when group_concat() exceeds max length +# + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +--enable_warnings + +CREATE TABLE t1 (a VARCHAR(6), b INT); +CREATE TABLE t2 (a VARCHAR(6), b INT); + +INSERT INTO t1 VALUES ('111111', 1); +INSERT INTO t1 VALUES ('222222', 2); +INSERT INTO t1 VALUES ('333333', 3); +INSERT INTO t1 VALUES ('444444', 4); +INSERT INTO t1 VALUES ('555555', 5); + +SET group_concat_max_len = 5; +SET @old_sql_mode = @@sql_mode, @@sql_mode = 'traditional'; + +SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b LIMIT 3; +--error ER_CUT_VALUE_GROUP_CONCAT +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; +UPDATE t1 SET a = '11111' WHERE b = 1; +UPDATE t1 SET a = '22222' WHERE b = 2; +--error ER_CUT_VALUE_GROUP_CONCAT +INSERT INTO t2 SELECT GROUP_CONCAT(a), b FROM t1 GROUP BY b; + +SET group_concat_max_len = DEFAULT; +SET @@sql_mode = @old_sql_mode; +DROP TABLE t1, t2; diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test new file mode 100644 index 00000000000..bdb6625ba32 --- /dev/null +++ b/mysql-test/t/signal.test @@ -0,0 +1,2685 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Tests for SIGNAL and RESIGNAL + +--echo # +--echo # PART 1: syntax +--echo # + +--echo # +--echo # Test every new reserved and non reserved keywords +--echo # + +--disable_warnings +drop table if exists signal_non_reserved; +--enable_warnings + +create table signal_non_reserved ( + class_origin int, + subclass_origin int, + constraint_catalog int, + constraint_schema int, + constraint_name int, + catalog_name int, + schema_name int, + table_name int, + column_name int, + cursor_name int, + message_text int, + sqlcode int +); + +drop table signal_non_reserved; + +--disable_warnings +drop table if exists diag_non_reserved; +--enable_warnings + +create table diag_non_reserved ( + diagnostics int, + current int, + stacked int, + exception int +); + +drop table diag_non_reserved; + +--disable_warnings +drop table if exists diag_cond_non_reserved; +--enable_warnings + +create table diag_cond_non_reserved ( + condition_identifier int, + condition_number int, + condition_name int, + connection_name int, + message_length int, + message_octet_length int, + parameter_mode int, + parameter_name int, + parameter_ordinal_position int, + returned_sqlstate int, + routine_catalog int, + routine_name int, + routine_schema int, + server_name int, + specific_name int, + trigger_catalog int, + trigger_name int, + trigger_schema int +); + +drop table diag_cond_non_reserved; + +--disable_warnings +drop table if exists diag_stmt_non_reserved; +--enable_warnings + +create table diag_stmt_non_reserved ( + number int, + more int, + command_function int, + command_function_code int, + dynamic_function int, + dynamic_function_code int, + row_count int, + transactions_committed int, + transactions_rolled_back int, + transaction_active int +); + +drop table diag_stmt_non_reserved; + +--disable_warnings +drop table if exists test_reserved; +--enable_warnings + +--error ER_PARSE_ERROR +create table test_reserved (signal int); + +--error ER_PARSE_ERROR +create table test_reserved (resignal int); + +--error ER_PARSE_ERROR +create table test_reserved (condition int); + +--echo # +--echo # Test the SIGNAL syntax +--echo # + +--disable_warnings +drop procedure if exists test_invalid; +drop procedure if exists test_signal_syntax; +drop function if exists test_signal_func; +--enable_warnings + +delimiter $$; + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL; +end $$ + +--error ER_SP_COND_MISMATCH +create procedure test_invalid() +begin + SIGNAL foo; +end $$ + +--error ER_SIGNAL_BAD_CONDITION_TYPE +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR 1234; + SIGNAL foo; +end $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + SIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + SIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ + +create procedure test_signal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET + CLASS_ORIGIN = 'foo', + SUBCLASS_ORIGIN = 'foo', + CONSTRAINT_CATALOG = 'foo', + CONSTRAINT_SCHEMA = 'foo', + CONSTRAINT_NAME = 'foo', + CATALOG_NAME = 'foo', + SCHEMA_NAME = 'foo', + TABLE_NAME = 'foo', + COLUMN_NAME = 'foo', + CURSOR_NAME = 'foo', + MESSAGE_TEXT = 'foo', + MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_signal_syntax $$ + +--error ER_SP_BAD_SQLSTATE +SIGNAL SQLSTATE '00000' $$ + +--error ER_SP_BAD_SQLSTATE +SIGNAL SQLSTATE '00001' $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + SIGNAL SQLSTATE '00000'; +end $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + SIGNAL SQLSTATE '00001'; +end $$ + +--echo # +--echo # Test conditions information that SIGNAL can not set +--echo # + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET bla_bla = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET CONDITION_IDENTIFIER = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET CONDITION_NUMBER = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET CONNECTION_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET MESSAGE_LENGTH = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET MESSAGE_OCTET_LENGTH = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET PARAMETER_MODE = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET PARAMETER_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET PARAMETER_ORDINAL_POSITION = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET RETURNED_SQLSTATE = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET ROUTINE_CATALOG = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET ROUTINE_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET ROUTINE_SCHEMA = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET SERVER_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET SPECIFIC_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET TRIGGER_CATALOG = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET TRIGGER_NAME = 'foo'; +end $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + SIGNAL SQLSTATE '12345' SET TRIGGER_SCHEMA = 'foo'; +end $$ + +delimiter ;$$ + +--echo # +--echo # Test the RESIGNAL syntax +--echo # + +--disable_warnings +drop procedure if exists test_invalid; +drop procedure if exists test_resignal_syntax; +--enable_warnings + +delimiter $$; + +--error ER_SP_COND_MISMATCH +create procedure test_invalid() +begin + RESIGNAL foo; +end $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL; +end $$ +drop procedure test_resignal_syntax $$ + +--error ER_SIGNAL_BAD_CONDITION_TYPE +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR 1234; + RESIGNAL foo; +end $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SQLSTATE '23000'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SQLSTATE VALUE '23000'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET SUBCLASS_ORIGIN = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CONSTRAINT_CATALOG = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CONSTRAINT_SCHEMA = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CONSTRAINT_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CATALOG_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET SCHEMA_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET TABLE_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET COLUMN_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CURSOR_NAME = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + RESIGNAL SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MYSQL_ERRNO = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET CLASS_ORIGIN = 'foo', CLASS_ORIGIN = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MESSAGE_TEXT = 'foo', MESSAGE_TEXT = 'bar'; +end $$ + +--error ER_DUP_SIGNAL_SET +create procedure test_invalid() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET MYSQL_ERRNO = 'foo', MYSQL_ERRNO = 'bar'; +end $$ + +create procedure test_resignal_syntax() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + RESIGNAL foo SET + CLASS_ORIGIN = 'foo', + SUBCLASS_ORIGIN = 'foo', + CONSTRAINT_CATALOG = 'foo', + CONSTRAINT_SCHEMA = 'foo', + CONSTRAINT_NAME = 'foo', + CATALOG_NAME = 'foo', + SCHEMA_NAME = 'foo', + TABLE_NAME = 'foo', + COLUMN_NAME = 'foo', + CURSOR_NAME = 'foo', + MESSAGE_TEXT = 'foo'; +end $$ +drop procedure test_resignal_syntax $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + RESIGNAL SQLSTATE '00000'; +end $$ + +--error ER_SP_BAD_SQLSTATE +create procedure test_invalid() +begin + RESIGNAL SQLSTATE '00001'; +end $$ + +delimiter ;$$ + +--echo # +--echo # PART 2: non preparable statements +--echo # + +--error ER_UNSUPPORTED_PS +prepare stmt from 'SIGNAL SQLSTATE \'23000\''; + +--error ER_UNSUPPORTED_PS +prepare stmt from 'RESIGNAL SQLSTATE \'23000\''; + +--echo # +--echo # PART 3: runtime execution +--echo # + +--disable_warnings +drop procedure if exists test_signal; +drop procedure if exists test_resignal; +drop table if exists t_warn; +drop table if exists t_cursor; +--enable_warnings + +# Helper tables +create table t_warn(a integer(2)); +create table t_cursor(a integer); + +--echo # +--echo # SIGNAL can also appear in a query +--echo # + +--error ER_SP_COND_MISMATCH +SIGNAL foo; + +SIGNAL SQLSTATE '01000'; + +--error ER_SIGNAL_NOT_FOUND +SIGNAL SQLSTATE '02000'; + +--error ER_SIGNAL_EXCEPTION +SIGNAL SQLSTATE '23000'; + +--error ER_SIGNAL_EXCEPTION +SIGNAL SQLSTATE VALUE '23000'; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65536; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 99999; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 4294967295; + +--error ER_WRONG_VALUE_FOR_VAR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 0; + +--error ER_PARSE_ERROR +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = -1; + +--error 65535 +SIGNAL SQLSTATE 'HY000' SET MYSQL_ERRNO = 65535; + +--echo # +--echo # RESIGNAL can also appear in a query +--echo # + +--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER +RESIGNAL; + +--error ER_SP_COND_MISMATCH +RESIGNAL foo; + +--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER +RESIGNAL SQLSTATE '12345'; + +--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER +RESIGNAL SQLSTATE VALUE '12345'; + +--echo # +--echo # Different kind of SIGNAL conditions +--echo # + +delimiter $$; + +create procedure test_signal() +begin + # max range + DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; + SIGNAL foo SET MYSQL_ERRNO = 65535; +end $$ + +--error 65535 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # max range + DECLARE foo CONDITION FOR SQLSTATE 'AABBB'; + SIGNAL foo SET MYSQL_ERRNO = 65536; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error + DECLARE foo CONDITION FOR SQLSTATE '99999'; + SIGNAL foo SET MYSQL_ERRNO = 9999; +end $$ + +--error 9999 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # warning + DECLARE too_few_records CONDITION FOR SQLSTATE '01000'; + SIGNAL too_few_records SET MYSQL_ERRNO = 1261; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Not found + DECLARE sp_fetch_no_data CONDITION FOR SQLSTATE '02000'; + SIGNAL sp_fetch_no_data SET MYSQL_ERRNO = 1329; +end $$ + +--error ER_SP_FETCH_NO_DATA +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error + DECLARE sp_cursor_already_open CONDITION FOR SQLSTATE '24000'; + SIGNAL sp_cursor_already_open SET MYSQL_ERRNO = 1325; +end $$ + +--error ER_SP_CURSOR_ALREADY_OPEN +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Severe error + DECLARE lock_deadlock CONDITION FOR SQLSTATE '40001'; + SIGNAL lock_deadlock SET MYSQL_ERRNO = 1213; +end $$ + +--error ER_LOCK_DEADLOCK +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Unknown -> error + DECLARE foo CONDITION FOR SQLSTATE "99999"; + SIGNAL foo; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # warning, no subclass + DECLARE warn CONDITION FOR SQLSTATE "01000"; + SIGNAL warn; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # warning, with subclass + DECLARE warn CONDITION FOR SQLSTATE "01123"; + SIGNAL warn; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Not found, no subclass + DECLARE not_found CONDITION FOR SQLSTATE "02000"; + SIGNAL not_found; +end $$ + +--error ER_SIGNAL_NOT_FOUND +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Not found, with subclass + DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; + SIGNAL not_found; +end $$ + +--error ER_SIGNAL_NOT_FOUND +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error, no subclass + DECLARE error CONDITION FOR SQLSTATE "12000"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Error, with subclass + DECLARE error CONDITION FOR SQLSTATE "12ABC"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Severe error, no subclass + DECLARE error CONDITION FOR SQLSTATE "40000"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + # Severe error, with subclass + DECLARE error CONDITION FOR SQLSTATE "40001"; + SIGNAL error; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test the scope of condition +--echo # + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '99999'; + begin + DECLARE foo CONDITION FOR 8888; + end; + SIGNAL foo SET MYSQL_ERRNO=9999; /* outer */ +end $$ + +--error 9999 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR 9999; + begin + DECLARE foo CONDITION FOR SQLSTATE '88888'; + SIGNAL foo SET MYSQL_ERRNO=8888; /* inner */ + end; +end $$ + +--error 8888 +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test SET MYSQL_ERRNO +--echo # + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '99999'; + SIGNAL foo SET MYSQL_ERRNO = 1111; +end $$ + +--error 1111 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01000"; + SIGNAL warn SET MYSQL_ERRNO = 1111; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02000"; + SIGNAL not_found SET MYSQL_ERRNO = 1111; +end $$ + +--error 1111 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55000"; + SIGNAL error SET MYSQL_ERRNO = 1111; +end $$ + +--error 1111 +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test SET MESSAGE_TEXT +--echo # + +--error ER_SIGNAL_EXCEPTION +SIGNAL SQLSTATE '77777' SET MESSAGE_TEXT='' $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '77777'; + SIGNAL foo SET + MESSAGE_TEXT = "", + MYSQL_ERRNO=5678; +end $$ + +--error 5678 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '99999'; + SIGNAL foo SET + MESSAGE_TEXT = "Something bad happened", + MYSQL_ERRNO=9999; +end $$ + +--error 9999 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01000"; + SIGNAL warn SET MESSAGE_TEXT = "Something bad happened"; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02000"; + SIGNAL not_found SET MESSAGE_TEXT = "Something bad happened"; +end $$ + +--error ER_SIGNAL_NOT_FOUND +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55000"; + SIGNAL error SET MESSAGE_TEXT = "Something bad happened"; +end $$ + +--error ER_SIGNAL_EXCEPTION +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE "01000"; + SIGNAL something SET MESSAGE_TEXT = _utf8 "This is a UTF8 text"; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE "01000"; + SIGNAL something SET MESSAGE_TEXT = ""; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + SIGNAL warn SET MESSAGE_TEXT = "á a"; +end $$ + +call test_signal() $$ +show warnings $$ +drop procedure test_signal $$ + +--echo # +--echo # Test SET complex expressions +--echo # + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + MYSQL_ERRNO = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CLASS_ORIGIN = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + SUBCLASS_ORIGIN = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CONSTRAINT_CATALOG = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CONSTRAINT_SCHEMA = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CONSTRAINT_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CATALOG_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + SCHEMA_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + TABLE_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + COLUMN_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + CURSOR_NAME = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE '99999'; + SIGNAL error SET + MESSAGE_TEXT = NULL; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE '99999'; + DECLARE message_text VARCHAR(64) DEFAULT "Local string variable"; + DECLARE sqlcode INTEGER DEFAULT 1234; + + SIGNAL something SET + MESSAGE_TEXT = message_text, + MYSQL_ERRNO = sqlcode; +end $$ + +--error 1234 +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal(message_text VARCHAR(64), sqlcode INTEGER) +begin + DECLARE something CONDITION FOR SQLSTATE "12345"; + + SIGNAL something SET + MESSAGE_TEXT = message_text, + MYSQL_ERRNO = sqlcode; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal("Parameter string", NULL) $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal(NULL, 1234) $$ + +--error 5678 +call test_signal("Parameter string", 5678) $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE something CONDITION FOR SQLSTATE "AABBB"; + + SIGNAL something SET + MESSAGE_TEXT = @message_text, + MYSQL_ERRNO = @sqlcode; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ + +set @sqlcode= 12 $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ + +set @message_text= "User variable" $$ + +--error 12 +call test_signal() $$ +drop procedure test_signal $$ + +--error ER_PARSE_ERROR +create procedure test_invalid() +begin + DECLARE something CONDITION FOR SQLSTATE "AABBB"; + + SIGNAL something SET + MESSAGE_TEXT = @message_text := 'illegal', + MYSQL_ERRNO = @sqlcode := 1234; +end $$ + +create procedure test_signal() +begin + DECLARE aaa VARCHAR(64); + DECLARE bbb VARCHAR(64); + DECLARE ccc VARCHAR(64); + DECLARE ddd VARCHAR(64); + DECLARE eee VARCHAR(64); + DECLARE fff VARCHAR(64); + DECLARE ggg VARCHAR(64); + DECLARE hhh VARCHAR(64); + DECLARE iii VARCHAR(64); + DECLARE jjj VARCHAR(64); + DECLARE kkk VARCHAR(64); + + DECLARE warn CONDITION FOR SQLSTATE "01234"; + + set aaa= repeat("A", 64); + set bbb= repeat("B", 64); + set ccc= repeat("C", 64); + set ddd= repeat("D", 64); + set eee= repeat("E", 64); + set fff= repeat("F", 64); + set ggg= repeat("G", 64); + set hhh= repeat("H", 64); + set iii= repeat("I", 64); + set jjj= repeat("J", 64); + set kkk= repeat("K", 64); + + SIGNAL warn SET + CLASS_ORIGIN = aaa, + SUBCLASS_ORIGIN = bbb, + CONSTRAINT_CATALOG = ccc, + CONSTRAINT_SCHEMA = ddd, + CONSTRAINT_NAME = eee, + CATALOG_NAME = fff, + SCHEMA_NAME = ggg, + TABLE_NAME = hhh, + COLUMN_NAME = iii, + CURSOR_NAME = jjj, + MESSAGE_TEXT = kkk, + MYSQL_ERRNO = 65535; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + + SIGNAL warn SET + MYSQL_ERRNO = 999999999999999999999999999999999999999999999999999; +end $$ + +--error ER_WRONG_VALUE_FOR_VAR +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE aaax VARCHAR(65); + DECLARE bbbx VARCHAR(65); + DECLARE cccx VARCHAR(65); + DECLARE dddx VARCHAR(65); + DECLARE eeex VARCHAR(65); + DECLARE fffx VARCHAR(65); + DECLARE gggx VARCHAR(65); + DECLARE hhhx VARCHAR(65); + DECLARE iiix VARCHAR(65); + DECLARE jjjx VARCHAR(65); + DECLARE kkkx VARCHAR(65); + DECLARE lllx VARCHAR(129); + + DECLARE warn CONDITION FOR SQLSTATE "01234"; + + set aaax= concat(repeat("A", 64), "X"); + set bbbx= concat(repeat("B", 64), "X"); + set cccx= concat(repeat("C", 64), "X"); + set dddx= concat(repeat("D", 64), "X"); + set eeex= concat(repeat("E", 64), "X"); + set fffx= concat(repeat("F", 64), "X"); + set gggx= concat(repeat("G", 64), "X"); + set hhhx= concat(repeat("H", 64), "X"); + set iiix= concat(repeat("I", 64), "X"); + set jjjx= concat(repeat("J", 64), "X"); + set kkkx= concat(repeat("K", 64), "X"); + set lllx= concat(repeat("1", 100), + repeat("2", 20), + repeat("8", 8), + "X"); + + SIGNAL warn SET + CLASS_ORIGIN = aaax, + SUBCLASS_ORIGIN = bbbx, + CONSTRAINT_CATALOG = cccx, + CONSTRAINT_SCHEMA = dddx, + CONSTRAINT_NAME = eeex, + CATALOG_NAME = fffx, + SCHEMA_NAME = gggx, + TABLE_NAME = hhhx, + COLUMN_NAME = iiix, + CURSOR_NAME = jjjx, + MESSAGE_TEXT = lllx, + MYSQL_ERRNO = 10000; +end $$ + +#NOTE: the warning text for ER_TRUNCATED_WRONG_VALUE contains +# value: '%-.128s', so the warning printed truncates the value too, +# which affects MESSAGE_TEXT (the X is missing) + +call test_signal() $$ +drop procedure test_signal $$ + +# Test that HANDLER can catch conditions raised by SIGNAL + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for SQLSTATE "01234" + begin + select "Caught by SQLSTATE"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "Caught by number"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for SQLWARNING + begin + select "Caught by SQLWARNING"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for SQLSTATE "02ABC" + begin + select "Caught by SQLSTATE"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "Caught by number"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for NOT FOUND + begin + select "Caught by NOT FOUND"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for SQLSTATE "55555" + begin + select "Caught by SQLSTATE"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "Caught by number"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for SQLEXCEPTION + begin + select "Caught by SQLEXCEPTION"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_signal() $$ +drop procedure test_signal $$ + +--echo # +--echo # Test where SIGNAL can be used +--echo # + +create function test_signal_func() returns integer +begin + DECLARE warn CONDITION FOR SQLSTATE "01XXX"; + + SIGNAL warn SET + MESSAGE_TEXT = "This function SIGNAL a warning", + MYSQL_ERRNO = 1012; + + return 5; +end $$ + +select test_signal_func() $$ +drop function test_signal_func $$ + +create function test_signal_func() returns integer +begin + DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; + + SIGNAL not_found SET + MESSAGE_TEXT = "This function SIGNAL not found", + MYSQL_ERRNO = 1012; + + return 5; +end $$ + +--error 1012 +select test_signal_func() $$ +drop function test_signal_func $$ + +create function test_signal_func() returns integer +begin + DECLARE error CONDITION FOR SQLSTATE "50000"; + + SIGNAL error SET + MESSAGE_TEXT = "This function SIGNAL an error", + MYSQL_ERRNO = 1012; + + return 5; +end $$ + +--error 1012 +select test_signal_func() $$ +drop function test_signal_func $$ + +--disable_warnings +drop table if exists t1 $$ +--enable_warnings + +create table t1 (a integer) $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE msg VARCHAR(128); + DECLARE warn CONDITION FOR SQLSTATE "01XXX"; + + set msg= concat("This trigger SIGNAL a warning, a=", NEW.a); + SIGNAL warn SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 1012; +end $$ + +insert into t1 values (1), (2) $$ + +drop trigger t1_ai $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE msg VARCHAR(128); + DECLARE not_found CONDITION FOR SQLSTATE "02XXX"; + + set msg= concat("This trigger SIGNAL a not found, a=", NEW.a); + SIGNAL not_found SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +insert into t1 values (3), (4) $$ + +drop trigger t1_ai $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE msg VARCHAR(128); + DECLARE error CONDITION FOR SQLSTATE "03XXX"; + + set msg= concat("This trigger SIGNAL an error, a=", NEW.a); + SIGNAL error SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +insert into t1 values (5), (6) $$ + +drop table t1 $$ + +create table t1 (errno integer, msg varchar(128)) $$ + +create trigger t1_ai after insert on t1 for each row +begin + DECLARE warn CONDITION FOR SQLSTATE "01XXX"; + + SIGNAL warn SET + MESSAGE_TEXT = NEW.msg, + MYSQL_ERRNO = NEW.errno; +end $$ + +insert into t1 set errno=1012, msg='Warning message 1 in trigger' $$ +insert into t1 set errno=1013, msg='Warning message 2 in trigger' $$ + +drop table t1 $$ + +--disable_warnings +drop table if exists t1 $$ +drop procedure if exists p1 $$ +drop function if exists f1 $$ +--enable_warnings + +create table t1 (s1 int) $$ +insert into t1 values (1) $$ + +create procedure p1() +begin + declare a int; + declare c cursor for select f1() from t1; + declare continue handler for sqlstate '03000' + select "caught 03000"; + declare continue handler for 1326 + select "caught cursor is not open"; + + select "Before open"; + open c; + select "Before fetch"; + fetch c into a; + select "Before close"; + close c; +end $$ + +create function f1() returns int +begin + signal sqlstate '03000'; + return 5; +end $$ + +## FIXME : MEMORY plugin warning, valgrind leak, bug#36518 +## call p1() $$ + +drop table t1 $$ +drop procedure p1 $$ +drop function f1 $$ + +--echo # +--echo # Test the RESIGNAL runtime +--echo # + +# 6 tests: +# {Signaled warning, Signaled Not Found, Signaled Error, +# warning, not found, error} --> RESIGNAL + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02222"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "55555"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 1012 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error ER_SP_FETCH_NO_DATA +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error ER_BAD_TABLE_ERROR +call test_resignal() $$ +drop procedure test_resignal $$ + +# 6 tests: +# {Signaled warning, Signaled Not Found, Signaled Error, +# warning, not found, error} --> RESIGNAL SET ... + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01234"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "33333"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SET + MESSAGE_TEXT = "RESIGNAL of an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error 5555 +call test_resignal() $$ +drop procedure test_resignal $$ + +######################################################### + +# 3 tests: +# {Signaled warning} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01222" SET + MESSAGE_TEXT = "RESIGNAL to warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02222" SET + MESSAGE_TEXT = "RESIGNAL to not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE warn CONDITION FOR SQLSTATE "01111"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "33333" SET + MESSAGE_TEXT = "RESIGNAL to error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL warn SET + MESSAGE_TEXT = "Raising a warning", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {Signaled not found} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01222" SET + MESSAGE_TEXT = "RESIGNAL to warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02222" SET + MESSAGE_TEXT = "RESIGNAL to not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE not_found CONDITION FOR SQLSTATE "02ABC"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "33333" SET + MESSAGE_TEXT = "RESIGNAL to error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL not_found SET + MESSAGE_TEXT = "Raising a not found", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {Signaled error} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "AAAAA"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01222" SET + MESSAGE_TEXT = "RESIGNAL to warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "AAAAA"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02222" SET + MESSAGE_TEXT = "RESIGNAL to not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE error CONDITION FOR SQLSTATE "AAAAA"; + DECLARE CONTINUE HANDLER for 1012 + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "33333" SET + MESSAGE_TEXT = "RESIGNAL to error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + SIGNAL error SET + MESSAGE_TEXT = "Raising an error", + MYSQL_ERRNO = 1012; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {warning} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01111" SET + MESSAGE_TEXT = "RESIGNAL to a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02444" SET + MESSAGE_TEXT = "RESIGNAL to a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlwarning + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "44444" SET + MESSAGE_TEXT = "RESIGNAL to an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + insert into t_warn set a= 9999999999999999; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {not found} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01111" SET + MESSAGE_TEXT = "RESIGNAL to a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02444" SET + MESSAGE_TEXT = "RESIGNAL to a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE x integer; + DECLARE c cursor for select * from t_cursor; + DECLARE CONTINUE HANDLER for not found + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "44444" SET + MESSAGE_TEXT = "RESIGNAL to an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + open c; + fetch c into x; + close c; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +# 3 tests: +# {error} +# --> RESIGNAL SQLSTATE {warning, not found, error} SET ... + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "01111" SET + MESSAGE_TEXT = "RESIGNAL to a warning", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +call test_resignal() $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "02444" SET + MESSAGE_TEXT = "RESIGNAL to a not found", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +create procedure test_resignal() +begin + DECLARE CONTINUE HANDLER for sqlexception + begin + select "before RESIGNAL"; + RESIGNAL SQLSTATE "44444" SET + MESSAGE_TEXT = "RESIGNAL to an error", + MYSQL_ERRNO = 5555 ; + select "after RESIGNAL"; + end; + + drop table no_such_table; +end $$ + +--error 5555 +call test_resignal() $$ +show warnings $$ +drop procedure test_resignal $$ + +--echo # +--echo # More complex cases +--echo # + +--disable_warnings +drop procedure if exists peter_p1 $$ +drop procedure if exists peter_p2 $$ +--enable_warnings + +CREATE PROCEDURE peter_p1 () +BEGIN + DECLARE x CONDITION FOR 1231; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '2'; + RESIGNAL SET MYSQL_ERRNO = 9999; + END; + + BEGIN + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '1'; + RESIGNAL SET SCHEMA_NAME = 'test'; + END; + SET @@sql_mode=NULL; + END; +END +$$ + +CREATE PROCEDURE peter_p2 () +BEGIN + DECLARE x CONDITION for 9999; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '3'; + RESIGNAL SET MESSAGE_TEXT = 'Hi, I am a useless error message'; + END; + CALL peter_p1(); +END +$$ + +# +# Here, RESIGNAL only modifies the condition caught, +# so there is only 1 condition at the end +# The final SQLSTATE is 42000 (it comes from the error 1231), +# since the condition attributes are preserved. +# +--error 9999 +CALL peter_p2() $$ +show warnings $$ + +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ + +CREATE PROCEDURE peter_p1 () +BEGIN + DECLARE x CONDITION FOR SQLSTATE '42000'; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '2'; + RESIGNAL x SET MYSQL_ERRNO = 9999; + END; + + BEGIN + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '1'; + RESIGNAL x SET + SCHEMA_NAME = 'test', + MYSQL_ERRNO= 1231; + END; + /* Raises ER_WRONG_VALUE_FOR_VAR : 1231, SQLSTATE 42000 */ + SET @@sql_mode=NULL; + END; +END +$$ + +CREATE PROCEDURE peter_p2 () +BEGIN + DECLARE x CONDITION for SQLSTATE '42000'; + DECLARE EXIT HANDLER FOR x + BEGIN + SELECT '3'; + RESIGNAL x SET + MESSAGE_TEXT = 'Hi, I am a useless error message', + MYSQL_ERRNO = 9999; + END; + CALL peter_p1(); +END +$$ + +# +# Here, "RESIGNAL " create a new condition in the diagnostics +# area, so that there are 4 conditions at the end. +# +--error 9999 +CALL peter_p2() $$ +show warnings $$ + +drop procedure peter_p1 $$ +drop procedure peter_p2 $$ + +# +# Test the value of MESSAGE_TEXT in RESIGNAL when no SET MESSAGE_TEXT clause +# is provided (the expected result is the text from the SIGNALed condition) +# + +drop procedure if exists peter_p3 $$ + +create procedure peter_p3() +begin + declare continue handler for sqlexception + resignal sqlstate '99002' set mysql_errno = 2; + + signal sqlstate '99001' set mysql_errno = 1, message_text = "Original"; +end $$ + +--error 2 +call peter_p3() $$ + +# Expecting 2 conditions, both with the text "Original" +show warnings $$ + +drop procedure peter_p3 $$ + +delimiter ;$$ + +drop table t_warn; +drop table t_cursor; + +--echo # +--echo # Miscelaneous test cases +--echo # + +delimiter $$; + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 0x12; /* 18 */ +end $$ + +-- error 18 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 0b00010010; /* 18 */ +end $$ + +-- error 18 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = '65'; /* 65 */ +end $$ + +-- error 65 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 'A'; /* illegal */ +end $$ + +-- error ER_WRONG_VALUE_FOR_VAR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = "65"; /* 65 */ +end $$ + +-- error 65 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = "A"; /* illegal */ +end $$ + +-- error ER_WRONG_VALUE_FOR_VAR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */ +end $$ + +-- error ER_BAD_FIELD_ERROR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */ +end $$ + +-- error ER_BAD_FIELD_ERROR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 3.141592; /* 3 */ +end $$ + +-- error 3 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT= 0x41; /* A */ +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT= 0b01000001; /* A */ +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = "Hello"; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = 'Hello'; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = `Hello`; +end $$ + +-- error ER_BAD_FIELD_ERROR +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + SIGNAL foo SET MYSQL_ERRNO = 1000, + MESSAGE_TEXT = 65.4321; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +-- error ER_PARSE_ERROR +create procedure test_signal() +begin + DECLARE céèçà foo CONDITION FOR SQLSTATE '12345'; + SIGNAL céèçà SET MYSQL_ERRNO = 1000; +end $$ + +-- error ER_PARSE_ERROR +create procedure test_signal() +begin + DECLARE "céèçà" CONDITION FOR SQLSTATE '12345'; + SIGNAL "céèçà" SET MYSQL_ERRNO = 1000; +end $$ + +-- error ER_PARSE_ERROR +create procedure test_signal() +begin + DECLARE 'céèçà' CONDITION FOR SQLSTATE '12345'; + SIGNAL 'céèçà' SET MYSQL_ERRNO = 1000; +end $$ + +create procedure test_signal() +begin + DECLARE `céèçà` CONDITION FOR SQLSTATE '12345'; + SIGNAL `céèçà` SET MYSQL_ERRNO = 1000; +end $$ + +-- error 1000 +call test_signal $$ +drop procedure test_signal $$ + +create procedure test_signal() +begin + SIGNAL SQLSTATE '77777' SET MYSQL_ERRNO = 1000, MESSAGE_TEXT='ÃÂÃÅÄ'; +end $$ + +# Commented until WL#751 is implemented in this version +# -- error 1000 +# call test_signal $$ +drop procedure test_signal $$ + +delimiter ; $$ + diff --git a/mysql-test/t/signal_code.test b/mysql-test/t/signal_code.test new file mode 100644 index 00000000000..d2f65647c81 --- /dev/null +++ b/mysql-test/t/signal_code.test @@ -0,0 +1,57 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Tests for SIGNAL and RESIGNAL + +-- source include/have_debug.inc + +use test; + +--disable_warnings +drop procedure if exists signal_proc; +drop function if exists signal_func; +--enable_warnings + +delimiter $$; + +create procedure signal_proc() +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + + SIGNAL foo; + SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; + RESIGNAL foo; + RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; +end $$ + +create function signal_func() returns int +begin + DECLARE foo CONDITION FOR SQLSTATE '12345'; + + SIGNAL foo; + SIGNAL foo SET MESSAGE_TEXT = "This is an error message"; + RESIGNAL foo; + RESIGNAL foo SET MESSAGE_TEXT = "This is an error message"; + return 0; +end $$ + +delimiter ;$$ + +show procedure code signal_proc; +drop procedure signal_proc; + +show function code signal_func; +drop function signal_func; + diff --git a/mysql-test/t/signal_demo1.test b/mysql-test/t/signal_demo1.test new file mode 100644 index 00000000000..5de847ba0ba --- /dev/null +++ b/mysql-test/t/signal_demo1.test @@ -0,0 +1,345 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Demonstrate how SIGNAL can be used to enforce integrity constraints. +# + +# Naming: +# - PO: Purchase Order +# - AB: Address Book +# - IN: Inventory + +# Simplified schema: +# +# Relation 1: +# PO_ORDER (PK: po_id) 1:1 <---> 0:N (FK: po_id) PO_ORDER_LINE +# +# Relation 2: +# IN_INVENTORY (PK: item_id) 1:1 <---> 0:N (FK: item_id) PO_ORDER_LINE +# +# Relation 3: +# +--> 0:1 (PK: person_id) AB_PHYSICAL_PERSON +# PO_ORDER (FK: cust_id) 1:1 <--| +# +--> 0:1 (PK: company_id) AB_MORAL_PERSON +# This is an 'arc' relationship :) +# + + +--disable_warnings +drop database if exists demo; +--enable_warnings + +create database demo; + +use demo; + +create table ab_physical_person ( + person_id integer, + first_name VARCHAR(50), + middle_initial CHAR, + last_name VARCHAR(50), + primary key (person_id)); + +create table ab_moral_person ( + company_id integer, + name VARCHAR(100), + primary key (company_id)); + +create table in_inventory ( + item_id integer, + descr VARCHAR(50), + stock integer, + primary key (item_id)); + +create table po_order ( + po_id integer auto_increment, + cust_type char, /* arc relationship, see cust_id */ + cust_id integer, /* FK to ab_physical_person *OR* ab_moral_person */ + primary key (po_id)); + +create table po_order_line ( + po_id integer, /* FK to po_order.po_id */ + line_no integer, + item_id integer, /* FK to in_inventory.item_id */ + qty integer); + +delimiter $$; + +--echo # +--echo # Schema integrity enforcement +--echo # + +create procedure check_pk_person(in person_type char, in id integer) +begin + declare x integer; + declare msg varchar(128); + + /* + Test integrity constraints for an 'arc' relationship. + Based on 'person_type', 'id' points to either a + physical person, or a moral person. + */ + case person_type + when 'P' then + begin + select count(person_id) from ab_physical_person + where ab_physical_person.person_id = id + into x; + + if (x != 1) + then + set msg= concat('No such physical person, PK:', id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; + end; + + when 'M' then + begin + select count(company_id) from ab_moral_person + where ab_moral_person.company_id = id + into x; + + if (x != 1) + then + set msg= concat('No such moral person, PK:', id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; + end; + + else + begin + set msg= concat('No such person type:', person_type); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 20000; + end; + end case; +end +$$ + +create procedure check_pk_inventory(in id integer) +begin + declare x integer; + declare msg varchar(128); + + select count(item_id) from in_inventory + where in_inventory.item_id = id + into x; + + if (x != 1) + then + set msg= concat('Failed integrity constraint, table in_inventory, PK:', + id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; +end +$$ + +create procedure check_pk_order(in id integer) +begin + declare x integer; + declare msg varchar(128); + + select count(po_id) from po_order + where po_order.po_id = id + into x; + + if (x != 1) + then + set msg= concat('Failed integrity constraint, table po_order, PK:', id); + SIGNAL SQLSTATE '45000' SET + MESSAGE_TEXT = msg, + MYSQL_ERRNO = 10000; + end if; +end +$$ + +create trigger po_order_bi before insert on po_order +for each row +begin + call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ + +create trigger po_order_bu before update on po_order +for each row +begin + call check_pk_person(NEW.cust_type, NEW.cust_id); +end +$$ + +create trigger po_order_line_bi before insert on po_order_line +for each row +begin + call check_pk_order(NEW.po_id); + call check_pk_inventory(NEW.item_id); +end +$$ + +create trigger po_order_line_bu before update on po_order_line +for each row +begin + call check_pk_order(NEW.po_id); + call check_pk_inventory(NEW.item_id); +end +$$ + +--echo # +--echo # Application helpers +--echo # + +create procedure po_create_order( + in p_cust_type char, + in p_cust_id integer, + out id integer) +begin + insert into po_order set cust_type = p_cust_type, cust_id = p_cust_id; + set id = last_insert_id(); +end +$$ + +create procedure po_add_order_line( + in po integer, + in line integer, + in item integer, + in q integer) +begin + insert into po_order_line set + po_id = po, line_no = line, item_id = item, qty = q; +end +$$ + +delimiter ;$$ + +--echo # +--echo # Create sample data +--echo # + +insert into ab_physical_person values + ( 1, "John", "A", "Doe"), + ( 2, "Marry", "B", "Smith") +; + +insert into ab_moral_person values + ( 3, "ACME real estate, INC"), + ( 4, "Local school") +; + +insert into in_inventory values + ( 100, "Table, dinner", 5), + ( 101, "Chair", 20), + ( 200, "Table, coffee", 3), + ( 300, "School table", 25), + ( 301, "School chairs", 50) +; + +select * from ab_physical_person order by person_id; +select * from ab_moral_person order by company_id; +select * from in_inventory order by item_id; + +--echo # +--echo # Entering an order +--echo # + +set @my_po = 0; + +/* John Doe wants 1 table and 4 chairs */ +call po_create_order("P", 1, @my_po); + +call po_add_order_line (@my_po, 1, 100, 1); +call po_add_order_line (@my_po, 2, 101, 4); + +/* Marry Smith wants a coffee table */ +call po_create_order("P", 2, @my_po); + +call po_add_order_line (@my_po, 1, 200, 1); + +--echo # +--echo # Entering bad data in an order +--echo # + +# There is no item 999 in in_inventory +--error 10000 +call po_add_order_line (@my_po, 1, 999, 1); + +--echo # +--echo # Entering bad data in an unknown order +--echo # + +# There is no order 99 in po_order +--error 10000 +call po_add_order_line (99, 1, 100, 1); + +--echo # +--echo # Entering an order for an unknown company +--echo # + +# There is no moral person of id 7 +--error 10000 +call po_create_order("M", 7, @my_po); + +--echo # +--echo # Entering an order for an unknown person type +--echo # + +# There is no person of type X +--error 20000 +call po_create_order("X", 1, @my_po); + +/* The local school wants 10 class tables and 20 chairs */ +call po_create_order("M", 4, @my_po); + +call po_add_order_line (@my_po, 1, 300, 10); +call po_add_order_line (@my_po, 2, 301, 20); + +# Raw data +select * from po_order; +select * from po_order_line; + +# Creative reporting ... + +select po_id as "PO#", + ( case cust_type + when "P" then concat (pp.first_name, + " ", + pp.middle_initial, + " ", + pp.last_name) + when "M" then mp.name + end ) as "Sold to" + from po_order po + left join ab_physical_person pp on po.cust_id = pp.person_id + left join ab_moral_person mp on po.cust_id = company_id +; + +select po_id as "PO#", + ol.line_no as "Line", + ol.item_id as "Item", + inv.descr as "Description", + ol.qty as "Quantity" + from po_order_line ol, in_inventory inv + where inv.item_id = ol.item_id + order by ol.item_id, ol.line_no; + +drop database demo; + + diff --git a/mysql-test/t/signal_demo2.test b/mysql-test/t/signal_demo2.test new file mode 100644 index 00000000000..fc909cb926c --- /dev/null +++ b/mysql-test/t/signal_demo2.test @@ -0,0 +1,207 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Demonstrate how RESIGNAL can be used to 'catch' and 're-throw' an error +# + +--disable_warnings +drop database if exists demo; +--enable_warnings + +create database demo; + +use demo; + +delimiter $$; + +create procedure proc_top_a(p1 integer) +begin + ## DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND + begin + end; + + select "Starting ..."; + call proc_middle_a(p1); + select "The end"; +end +$$ + +create procedure proc_middle_a(p1 integer) +begin + DECLARE l integer; + # without RESIGNAL: + # Should be: DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND + DECLARE EXIT HANDLER for 1 /* not sure how to handle exceptions */ + begin + select "Oops ... now what ?"; + end; + + select "In prod_middle()"; + + create temporary table t1(a integer, b integer); + select GET_LOCK("user_mutex", 10) into l; + + insert into t1 set a = p1, b = p1; + + call proc_bottom_a(p1); + + select RELEASE_LOCK("user_mutex") into l; + drop temporary table t1; +end +$$ + +create procedure proc_bottom_a(p1 integer) +begin + select "In proc_bottom()"; + + if (p1 = 1) then + begin + select "Doing something that works ..."; + select * from t1; + end; + end if; + + if (p1 = 2) then + begin + select "Doing something that fail (simulate an error) ..."; + drop table no_such_table; + end; + end if; + + if (p1 = 3) then + begin + select "Doing something that *SHOULD* works ..."; + select * from t1; + end; + end if; + +end +$$ + +delimiter ;$$ + +# +# Code without RESIGNAL: +# errors are apparent to the caller, +# but there is no cleanup code, +# so that the environment (get_lock(), temporary table) is polluted ... +# +call proc_top_a(1); + +# Expected +--error ER_BAD_TABLE_ERROR +call proc_top_a(2); + +# Dirty state +--error ER_TABLE_EXISTS_ERROR +call proc_top_a(3); + +# Dirty state +--error ER_TABLE_EXISTS_ERROR +call proc_top_a(1); + +drop temporary table if exists t1; + +delimiter $$; + +create procedure proc_top_b(p1 integer) +begin + select "Starting ..."; + call proc_middle_b(p1); + select "The end"; +end +$$ + +create procedure proc_middle_b(p1 integer) +begin + DECLARE l integer; + DECLARE EXIT HANDLER for SQLEXCEPTION, NOT FOUND + begin + begin + DECLARE CONTINUE HANDLER for SQLEXCEPTION, NOT FOUND + begin + /* Ignore errors from the cleanup code */ + end; + + select "Doing cleanup !"; + select RELEASE_LOCK("user_mutex") into l; + drop temporary table t1; + end; + + RESIGNAL; + end; + + select "In prod_middle()"; + + create temporary table t1(a integer, b integer); + select GET_LOCK("user_mutex", 10) into l; + + insert into t1 set a = p1, b = p1; + + call proc_bottom_b(p1); + + select RELEASE_LOCK("user_mutex") into l; + drop temporary table t1; +end +$$ + +create procedure proc_bottom_b(p1 integer) +begin + select "In proc_bottom()"; + + if (p1 = 1) then + begin + select "Doing something that works ..."; + select * from t1; + end; + end if; + + if (p1 = 2) then + begin + select "Doing something that fail (simulate an error) ..."; + drop table no_such_table; + end; + end if; + + if (p1 = 3) then + begin + select "Doing something that *SHOULD* works ..."; + select * from t1; + end; + end if; + +end +$$ + +delimiter ;$$ + +# +# Code with RESIGNAL: +# errors are apparent to the caller, +# the but cleanup code did get a chance to act ... +# + +call proc_top_b(1); + +--error ER_BAD_TABLE_ERROR +call proc_top_b(2); + +call proc_top_b(3); + +call proc_top_b(1); + +drop database demo; + diff --git a/mysql-test/t/signal_demo3.test b/mysql-test/t/signal_demo3.test new file mode 100644 index 00000000000..347f1b75a79 --- /dev/null +++ b/mysql-test/t/signal_demo3.test @@ -0,0 +1,159 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# +# Demonstrate how RESIGNAL can be used to print a stack trace +# + +# Save defaults + +SET @start_global_value = @@global.max_error_count; +SELECT @start_global_value; +SET @start_session_value = @@session.max_error_count; +SELECT @start_session_value; + +--disable_warnings +drop database if exists demo; +--enable_warnings + +create database demo; + +use demo; + +delimiter $$; + +create procedure proc_1() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_1'; + + call proc_2(); +end +$$ + +create procedure proc_2() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_2'; + + call proc_3(); +end +$$ + +create procedure proc_3() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_3'; + + call proc_4(); +end +$$ + +create procedure proc_4() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_4'; + + call proc_5(); +end +$$ + +create procedure proc_5() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_5'; + + call proc_6(); +end +$$ + +create procedure proc_6() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_6'; + + call proc_7(); +end +$$ + +create procedure proc_7() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_7'; + + call proc_8(); +end +$$ + +create procedure proc_8() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_8'; + + call proc_9(); +end +$$ + +create procedure proc_9() +begin + declare exit handler for sqlexception + resignal sqlstate '45000' set message_text='Oops in proc_9'; + + ## Do something that fails, to see how errors are reported + drop table oops_it_is_not_here; +end +$$ + +delimiter ;$$ + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); + +# This is the interesting part: +# the complete call stack from the origin of failure (proc_9) +# to the top level caller (proc_1) is available ... + +show warnings; + +SET @@session.max_error_count = 5; +SELECT @@session.max_error_count; + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); +show warnings; + +SET @@session.max_error_count = 7; +SELECT @@session.max_error_count; + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); +show warnings; + +SET @@session.max_error_count = 9; +SELECT @@session.max_error_count; + +-- error ER_SIGNAL_EXCEPTION +call proc_1(); +show warnings; + +drop database demo; + +# Restore defaults + +SET @@global.max_error_count = @start_global_value; +SELECT @@global.max_error_count; +SET @@session.max_error_count = @start_session_value; +SELECT @@session.max_error_count; + diff --git a/mysql-test/t/signal_sqlmode.test b/mysql-test/t/signal_sqlmode.test new file mode 100644 index 00000000000..860c145a361 --- /dev/null +++ b/mysql-test/t/signal_sqlmode.test @@ -0,0 +1,123 @@ +# Copyright (C) 2008 Sun Microsystems, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# Tests for SIGNAL, RESIGNAL and GET DIAGNOSTICS + +SET @save_sql_mode=@@sql_mode; + +SET sql_mode=''; + +--disable_warnings +drop procedure if exists p; +drop procedure if exists p2; +drop procedure if exists p3; +--enable_warnings + +delimiter $$; + +create procedure p() +begin + declare utf8_var VARCHAR(128) CHARACTER SET UTF8; + set utf8_var = concat(repeat('A', 128), 'X'); + select length(utf8_var), utf8_var; +end +$$ + +create procedure p2() +begin + declare msg VARCHAR(129) CHARACTER SET UTF8; + set msg = concat(repeat('A', 128), 'X'); + select length(msg), msg; + + signal sqlstate '55555' set message_text = msg; +end +$$ + +create procedure p3() +begin + declare name VARCHAR(65) CHARACTER SET UTF8; + set name = concat(repeat('A', 64), 'X'); + select length(name), name; + + signal sqlstate '55555' set + message_text = 'Message', + table_name = name; +end +$$ +delimiter ;$$ + +call p; + +--error ER_SIGNAL_EXCEPTION +call p2; + +--error ER_SIGNAL_EXCEPTION +call p3; + +drop procedure p; +drop procedure p2; +drop procedure p3; + +SET sql_mode='STRICT_ALL_TABLES'; + +delimiter $$; + +create procedure p() +begin + declare utf8_var VARCHAR(128) CHARACTER SET UTF8; + set utf8_var = concat(repeat('A', 128), 'X'); + select length(utf8_var), utf8_var; +end +$$ + +create procedure p2() +begin + declare msg VARCHAR(129) CHARACTER SET UTF8; + set msg = concat(repeat('A', 128), 'X'); + select length(msg), msg; + + signal sqlstate '55555' set message_text = msg; +end +$$ + +create procedure p3() +begin + declare name VARCHAR(65) CHARACTER SET UTF8; + set name = concat(repeat('A', 64), 'X'); + select length(name), name; + + signal sqlstate '55555' set + message_text = 'Message', + table_name = name; +end +$$ + +delimiter ;$$ + +--error ER_DATA_TOO_LONG +call p; + +--error ER_COND_ITEM_TOO_LONG +call p2; + +--error ER_COND_ITEM_TOO_LONG +call p3; + +drop procedure p; +drop procedure p2; +drop procedure p3; + +SET @@sql_mode=@save_sql_mode; + -- cgit v1.2.1 From e436b8866be640b2160f0b756f85559437cff67d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Sep 2009 18:05:53 +0800 Subject: BUG#45999 Row based replication fails when auto_increment field = 0 In RBR, There is an inconsistency between slaves and master. When INSERT statement which includes an auto_increment field is executed, Store engine of master will check the value of the auto_increment field. It will generate a sequence number and then replace the value, if its value is NULL or empty. if the field's value is 0, the store engine will do like encountering the NULL values unless NO_AUTO_VALUE_ON_ZERO is set into SQL_MODE. In contrast, if the field's value is 0, Store engine of slave always generates a new sequence number whether or not NO_AUTO_VALUE_ON_ZERO is set into SQL_MODE. SQL MODE of slave sql thread is always consistency with master's. Another variable is related to this bug. If generateing a sequence number is decided by the values of table->auto_increment_field_not_null and SQL_MODE(if includes MODE_NO_AUTO_VALUE_ON_ZERO) The table->auto_increment_is_not_null is FALSE, which causes this bug to appear. .. --- mysql-test/extra/rpl_tests/rpl_auto_increment.test | 76 ++++++++++++++++++++++ mysql-test/suite/rpl/r/rpl_auto_increment.result | 68 +++++++++++++++++++ 2 files changed, 144 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index 24448a38408..abf3b4ec676 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -163,5 +163,81 @@ show create table t1; connection master; drop table t1; +# +# BUG#45999 Row based replication fails when auto_increment field = 0. +# Store engine of Slaves auto-generates new sequence numbers for +# auto_increment fields if the values of them are 0. There is an inconsistency +# between slave and master. When MODE_NO_AUTO_VALUE_ON_ZERO are masters treat +# +source include/master-slave-reset.inc; + +connection master; +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +--enable_warnings + +eval CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=$engine_type; +eval CREATE TABLE t2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=$engine_type2; +SET SQL_MODE=''; +# Value of the id will be 1; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t2 VALUES(NULL); +SELECT * FROM t1; +SELECT * FROM t2; +# Value of the id will be 2; +INSERT INTO t1 VALUES(); +INSERT INTO t2 VALUES(); +SELECT * FROM t1; +SELECT * FROM t2; +# Value of the id will be 3. The master treats 0 as NULL or empty because +# NO_AUTO_VALUE_ON_ZERO is not assign to SQL_MODE. +INSERT INTO t1 VALUES(0); +INSERT INTO t2 VALUES(0); +SELECT * FROM t1; +SELECT * FROM t2; + +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +# Value of the id will be 0. The master does not treat 0 as NULL or empty +# because NO_AUTO_VALUE_ON_ZERO has assigned to SQL_MODE. +INSERT INTO t1 VALUES(0); +INSERT INTO t2 VALUES(0); +SELECT * FROM t1; +SELECT * FROM t2; + +INSERT INTO t1 VALUES(4); +INSERT INTO t2 VALUES(4); +FLUSH LOGS; +sync_slave_with_master; + +let $diff_table_1= master:test.t1; +let $diff_table_2= slave:test.t1; +source include/diff_tables.inc; + +let $diff_table_1= master:test.t2; +let $diff_table_2= slave:test.t2; +source include/diff_tables.inc; + +connection master; +DROP TABLE t1; +DROP TABLE t2; +sync_slave_with_master; + +connection master; +let $MYSQLD_DATADIR= `SELECT @@DATADIR`; +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL test +sync_slave_with_master; + +let $diff_table_1= master:test.t1; +let $diff_table_2= slave:test.t1; +source include/diff_tables.inc; + +let $diff_table_1= master:test.t2; +let $diff_table_2= slave:test.t2; +source include/diff_tables.inc; + # End cleanup +DROP TABLE t1; +DROP TABLE t2; +SET SQL_MODE=''; sync_slave_with_master; diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 2a4c3a09361..fdd94264041 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -244,3 +244,71 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 drop table t1; +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE t2 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam; +SET SQL_MODE=''; +INSERT INTO t1 VALUES(NULL); +INSERT INTO t2 VALUES(NULL); +SELECT * FROM t1; +id +1 +SELECT * FROM t2; +id +1 +INSERT INTO t1 VALUES(); +INSERT INTO t2 VALUES(); +SELECT * FROM t1; +id +1 +2 +SELECT * FROM t2; +id +1 +2 +INSERT INTO t1 VALUES(0); +INSERT INTO t2 VALUES(0); +SELECT * FROM t1; +id +1 +2 +3 +SELECT * FROM t2; +id +1 +2 +3 +SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +INSERT INTO t1 VALUES(0); +INSERT INTO t2 VALUES(0); +SELECT * FROM t1; +id +0 +1 +2 +3 +SELECT * FROM t2; +id +0 +1 +2 +3 +INSERT INTO t1 VALUES(4); +INSERT INTO t2 VALUES(4); +FLUSH LOGS; +Comparing tables master:test.t1 and slave:test.t1 +Comparing tables master:test.t2 and slave:test.t2 +DROP TABLE t1; +DROP TABLE t2; +Comparing tables master:test.t1 and slave:test.t1 +Comparing tables master:test.t2 and slave:test.t2 +DROP TABLE t1; +DROP TABLE t2; +SET SQL_MODE=''; -- cgit v1.2.1 From 10406ae65871de074e807e626f9ede686e9321d4 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 10 Sep 2009 15:24:07 +0500 Subject: Bug#46815 CONCAT_WS returning wrong data The problem is that argument buffer can be used as result buffer and it leads to argument value change. The fix is to use 'old buffer' as result buffer only if first argument is not constant item. mysql-test/r/func_str.result: test result mysql-test/t/func_str.test: test case sql/item_strfunc.cc: The problem is that argument buffer can be used as result buffer and it leads to argument value change. The fix is to use 'old buffer' as result buffer only if first argument is not constant item. --- mysql-test/r/func_str.result | 9 +++++++++ mysql-test/t/func_str.test | 13 +++++++++++++ 2 files changed, 22 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 75f8983e838..bf2a9ca8901 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2196,4 +2196,13 @@ SELECT LOAD_FILE(a) FROM t1; LOAD_FILE(a) NULL DROP TABLE t1; +CREATE TABLE t1 (f2 VARCHAR(20)); +CREATE TABLE t2 (f2 VARCHAR(20)); +INSERT INTO t1 VALUES ('MIN'),('MAX'); +INSERT INTO t2 VALUES ('LOAD'); +SELECT CONCAT_WS('_', (SELECT t2.f2 FROM t2), t1.f2) AS concat_name FROM t1; +concat_name +LOAD_MIN +LOAD_MAX +DROP TABLE t1, t2; End of 5.0 tests diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 4b0f91e4408..e396fbcebd8 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1177,5 +1177,18 @@ INSERT INTO t1 VALUES ('aaaaaaaa'); SELECT LOAD_FILE(a) FROM t1; DROP TABLE t1; +# +# Bug#46815 CONCAT_WS returning wrong data +# +CREATE TABLE t1 (f2 VARCHAR(20)); +CREATE TABLE t2 (f2 VARCHAR(20)); + +INSERT INTO t1 VALUES ('MIN'),('MAX'); +INSERT INTO t2 VALUES ('LOAD'); + +SELECT CONCAT_WS('_', (SELECT t2.f2 FROM t2), t1.f2) AS concat_name FROM t1; + +DROP TABLE t1, t2; + --echo End of 5.0 tests -- cgit v1.2.1 From ea0d4516ed796179ef97a791bb04a646ac98610b Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Fri, 11 Sep 2009 01:15:41 -0600 Subject: Post merge fixes --- mysql-test/r/func_encrypt_nossl.result | 42 +++++----- mysql-test/suite/funcs_1/r/innodb_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/innodb_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/memory_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/memory_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/myisam_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/myisam_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/ndb_func_view.result | 92 +++++++++++----------- .../suite/funcs_1/r/ndb_storedproc_02.result | 3 - mysql-test/suite/funcs_1/r/storedproc.result | 73 +---------------- mysql-test/suite/ndb/r/ndb_multi_row.result | 6 +- 11 files changed, 210 insertions(+), 291 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/func_encrypt_nossl.result b/mysql-test/r/func_encrypt_nossl.result index d0df2335afa..fc003eec226 100644 --- a/mysql-test/r/func_encrypt_nossl.result +++ b/mysql-test/r/func_encrypt_nossl.result @@ -2,83 +2,83 @@ select des_encrypt("test", 'akeystr'); des_encrypt("test", 'akeystr') NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", 1); des_encrypt("test", 1) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", 9); des_encrypt("test", 9) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", 100); des_encrypt("test", 100) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt("test", NULL); des_encrypt("test", NULL) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_encrypt(NULL, NULL); des_encrypt(NULL, NULL) NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt("test", 'anotherkeystr'); des_decrypt("test", 'anotherkeystr') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(1, 1); des_decrypt(1, 1) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("test", 'thekey')); des_decrypt(des_encrypt("test", 'thekey')) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello")); hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello")) NULL NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello",4)); des_decrypt(des_encrypt("hello",4)) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello",'test'),'test'); des_decrypt(des_encrypt("hello",'test'),'test') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password')); hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password')) NULL NULL NULL Warnings: -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working -Error 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_encrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello"),'default_password'); des_decrypt(des_encrypt("hello"),'default_password') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select des_decrypt(des_encrypt("hello",4),'password4'); des_decrypt(des_encrypt("hello",4),'password4') NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working SET @a=des_decrypt(des_encrypt("hello")); Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working flush des_key_file; select @a = des_decrypt(des_encrypt("hello")); @a = des_decrypt(des_encrypt("hello")) @@ -90,9 +90,9 @@ select hex(des_decrypt(des_encrypt("hello",4),'password2')); hex(des_decrypt(des_encrypt("hello",4),'password2')) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working select hex(des_decrypt(des_encrypt("hello","hidden"))); hex(des_decrypt(des_encrypt("hello","hidden"))) NULL Warnings: -Error 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working +Warning 1289 The 'des_decrypt' feature is disabled; you need MySQL built with '--with-openssl' to have it working diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 4beb0c8aaf2..172f410b949 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -945,8 +945,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -960,8 +960,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2587,9 +2587,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2603,9 +2603,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2955,8 +2955,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2970,8 +2970,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3282,10 +3282,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3300,10 +3300,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3372,9 +3372,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3389,9 +3389,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3408,11 +3408,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3430,11 +3430,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3454,9 +3454,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3471,9 +3471,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3490,11 +3490,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3510,11 +3510,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 65fc5b5afc9..3e2d084aa0c 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -550,9 +550,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 4e48d9412d1..a386272b8ab 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -946,8 +946,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -961,8 +961,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2588,9 +2588,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2604,9 +2604,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2956,8 +2956,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2971,8 +2971,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3283,10 +3283,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3301,10 +3301,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3373,9 +3373,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3390,9 +3390,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3409,11 +3409,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3431,11 +3431,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3455,9 +3455,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3472,9 +3472,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3491,11 +3491,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3511,11 +3511,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index 6b474621685..16dde71400e 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -551,9 +551,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 4e48d9412d1..a386272b8ab 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -946,8 +946,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -961,8 +961,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2588,9 +2588,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2604,9 +2604,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2956,8 +2956,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2971,8 +2971,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3283,10 +3283,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3301,10 +3301,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3373,9 +3373,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3390,9 +3390,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3409,11 +3409,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3431,11 +3431,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3455,9 +3455,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3472,9 +3472,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3491,11 +3491,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3511,11 +3511,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index 6b474621685..16dde71400e 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -551,9 +551,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/ndb_func_view.result b/mysql-test/suite/funcs_1/r/ndb_func_view.result index 4beb0c8aaf2..172f410b949 100644 --- a/mysql-test/suite/funcs_1/r/ndb_func_view.result +++ b/mysql-test/suite/funcs_1/r/ndb_func_view.result @@ -945,8 +945,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö',`t1_values`.`my_decimal`) AS `LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', my_decimal)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -960,8 +960,8 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9999999999999999999999999999999999.999999999999 0.000000000000000000000000000000 4 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2587,9 +2587,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as unsigned) AS `CAST(my_decimal AS UNSIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2603,9 +2603,9 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 0 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -2955,8 +2955,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as signed) AS `CAST(my_decimal AS SIGNED INTEGER)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -2970,8 +2970,8 @@ NULL NULL 1 0 0.000000000000000000000000000000 4 -1 -1.000000000000000000000000000000 5 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1292 Truncated incorrect DECIMAL value: '' DROP VIEW v1; @@ -3282,10 +3282,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3300,10 +3300,10 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 30 Warnings: -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 -Error 1292 Truncated incorrect DECIMAL value: '' -Error 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 +Warning 1292 Truncated incorrect DECIMAL value: '' +Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1 DROP VIEW v1; @@ -3372,9 +3372,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3389,9 +3389,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 29 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3408,11 +3408,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3430,11 +3430,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 28 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: '-1' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333' @@ -3454,9 +3454,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3471,9 +3471,9 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 27 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 DROP VIEW v1; @@ -3490,11 +3490,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection @@ -3510,11 +3510,11 @@ NULL NULL 1 -1.00 -1 5 -3333.33 -3333.3333 26 Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' -Error 1366 Incorrect decimal value: '' for column '' at row -1 +Warning 1366 Incorrect decimal value: '' for column '' at row -1 Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result index 65fc5b5afc9..3e2d084aa0c 100644 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_02.result @@ -550,9 +550,6 @@ exit handler 2 exit handler 2 exit handler 1 exit handler 1 -Warnings: -Note 1051 Unknown table 'tqq' -Note 1051 Unknown table 'tqq' create table res_t1(w char unique, x char); insert into res_t1 values ('a', 'b'); CREATE PROCEDURE h1 () diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 3efb361dc82..ab917fce339 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -7128,8 +7128,6 @@ CALL sp1(); x y z 000 000 000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7168,8 +7166,6 @@ CALL sp1(); x y z 00000 00000 00000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7208,8 +7204,6 @@ CALL sp1(); x y z 00000000 00000000 00000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7248,8 +7242,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7288,8 +7280,6 @@ CALL sp1(); x y z 00000000000000000000 00000000000000000000 00000000000000000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7310,8 +7300,6 @@ CALL sp1(); x y z -9999999999 -9999999999 -9999999999 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7323,8 +7311,6 @@ CALL sp1(); x y z 0 0 0 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7336,8 +7322,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Warning 1264 Out of range value for column 'x' at row 1 -Warning 1264 Out of range value for column 'y' at row 1 Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7349,8 +7333,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7362,8 +7344,6 @@ CALL sp1(); x y z 0 0 0 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7375,8 +7355,6 @@ CALL sp1(); x y z 0 0 0 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7388,8 +7366,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -7401,8 +7377,6 @@ CALL sp1(); x y z 0000000000 0000000000 0000000000 Warnings: -Note 1265 Data truncated for column 'x' at row 1 -Note 1265 Data truncated for column 'y' at row 1 Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) @@ -13782,9 +13756,6 @@ END// CALL sp1(); x y @x NULL a 3 -Warnings: -Warning 1265 Data truncated for column 'y' at row 3 -Warning 1265 Data truncated for column 'y' at row 1 SELECT @v1, @v2; @v1 @v2 4 a @@ -15465,14 +15436,6 @@ count done 10 1 Warnings: Warning 1265 Data truncated for column 'name' at row 1 -Warning 1265 Data truncated for column 'name' at row 2 -Warning 1265 Data truncated for column 'name' at row 3 -Warning 1265 Data truncated for column 'name' at row 4 -Warning 1265 Data truncated for column 'name' at row 5 -Warning 1265 Data truncated for column 'name' at row 6 -Warning 1265 Data truncated for column 'name' at row 7 -Warning 1265 Data truncated for column 'name' at row 8 -Warning 1265 Data truncated for column 'name' at row 9 DROP PROCEDURE sp3; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; @@ -16387,7 +16350,6 @@ fn7(99999999999) 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn8; CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill @@ -16432,7 +16394,6 @@ fn11(99999999999) 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn12; CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill @@ -16533,7 +16494,6 @@ SELECT fn21_d_z(1.00e+00); fn21_d_z(1.00e+00) 0000000000000000000000000000000000000000000000000000000000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn22; CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned @@ -16545,7 +16505,6 @@ SELECT fn22(1.00e+00); fn22(1.00e+00) 10 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn23; CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill @@ -16557,7 +16516,6 @@ SELECT fn23(1.00e+00); fn23(1.00e+00) 0000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn24; CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill @@ -16903,7 +16861,6 @@ fn56(-8388601) Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn57; CREATE FUNCTION fn57( f1 numeric) returns numeric BEGIN @@ -16936,7 +16893,6 @@ SELECT fn59(9999999999); fn59(9999999999) 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn60; CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill @@ -16982,7 +16938,6 @@ SELECT fn63(9999999999); fn63(9999999999) 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn64; CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill @@ -17018,8 +16973,6 @@ fn66(-1e+36) -999999999999999999999999999999989.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn67; CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned @@ -17032,7 +16985,6 @@ fn67(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn68; CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill @@ -17045,7 +16997,6 @@ fn68(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn69; CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill @@ -17213,7 +17164,6 @@ fn84(-32601) Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn85; CREATE FUNCTION fn85( f1 tinyint) returns tinyint BEGIN @@ -17253,7 +17203,6 @@ fn88(-101) Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn89; CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN @@ -17511,7 +17460,6 @@ f1 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp8; CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill) @@ -17556,7 +17504,6 @@ f1 9999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp12; CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill) @@ -17678,7 +17625,6 @@ CALL sp21(1.00e+00); f1 0000000000000000000000000000000000000000000000000000000000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp22; CREATE PROCEDURE sp22( f1 decimal unsigned) @@ -17690,7 +17636,6 @@ CALL sp22(1.00e+00); f1 10 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp23; CREATE PROCEDURE sp23( f1 decimal unsigned zerofill) @@ -17702,7 +17647,6 @@ CALL sp23(1.00e+00); f1 0000000010 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp24; CREATE PROCEDURE sp24( f1 decimal zerofill) @@ -18048,7 +17992,6 @@ f1 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp57; CREATE PROCEDURE sp57( f1 numeric) BEGIN @@ -18081,7 +18024,6 @@ CALL sp59(9999999999); f1 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp60; CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill) @@ -18127,7 +18069,6 @@ CALL sp63(9999999999); f1 9999999999 Warnings: -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp64; CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill) @@ -18163,16 +18104,12 @@ f1 -999999999999999999999999999999989.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 CALL sp66_n( -1000000000000000000000000000000000000 ); f1 -999999999999999999999999999999989.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp67_nu; CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned) @@ -18185,14 +18122,12 @@ f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 CALL sp67_nu( 1000000000000000000000000000000000000 ); f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp68_nuz; CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill) @@ -18205,14 +18140,12 @@ f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 CALL sp68_nuz( 1000000000000000000000000000000000000 ); f1 999999999999999999999999999999999.999999999999999999999999999999 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 -Note 1265 Data truncated for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp69_n_z; CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill) @@ -18395,7 +18328,6 @@ f1 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp85; CREATE PROCEDURE sp85( f1 tinyint) BEGIN @@ -18435,7 +18367,6 @@ f1 Warnings: Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 1 -Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp89; CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) BEGIN @@ -22263,9 +22194,9 @@ END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp4(); Level Code Message -Error 1365 Division by 0 +Warning 1365 Division by 0 Warnings: -Error 1365 Division by 0 +Warning 1365 Division by 0 DROP PROCEDURE sp4; set @@sql_mode=''; diff --git a/mysql-test/suite/ndb/r/ndb_multi_row.result b/mysql-test/suite/ndb/r/ndb_multi_row.result index 3d34b16a1a8..96986490d23 100644 --- a/mysql-test/suite/ndb/r/ndb_multi_row.result +++ b/mysql-test/suite/ndb/r/ndb_multi_row.result @@ -63,6 +63,6 @@ t4 drop table t1, t2, t3, t4; drop table if exists t1, t3, t4; Warnings: -Error 155 Table 'test.t1' doesn't exist -Error 155 Table 'test.t3' doesn't exist -Error 155 Table 'test.t4' doesn't exist +Warning 155 Table 'test.t1' doesn't exist +Warning 155 Table 'test.t3' doesn't exist +Warning 155 Table 'test.t4' doesn't exist -- cgit v1.2.1 From 716099e07cd1a1726ad026281fdff3ef21b446f5 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 11 Sep 2009 22:26:35 +0200 Subject: This is the downport of Bug#24509 - 2048 file descriptor limit on windows needs increasing, also WL#3049 - improved Windows I/O The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open file is stored in the my_file_info struct, along with a flag for append mode because the Windows API does not support opening files in append mode in all cases) The default max open files has been increased to 16384 and can be increased further by setting --max-open-files= during the server start. Another major change in this patch that almost all Windows specific file IO code has been moved to a new file my_winfile.c, greatly reducing the amount of code in #ifdef blocks within mysys, thus improving readability. Minor enhancements: - my_(f)stat() is changed to use __stati64 structure with 64 file size and timestamps. It will return correct file size now (C runtime implementation used to report outdated information) - my_lock on Windows is prepared to handle additional timeout parameter - after review : changed __WIN__ to _WIN32 in the new and changed code. client/mysqlbinlog.cc: fileno -> my_fileno client/readline.cc: fileno -> my_fileno include/config-win.h: Increase OS_FILE_LIMIT for Windows. Remove O_SHARE - Windows does not support it. Its definition conflicts with O_SHORT_LIVED, that has different semantics. include/my_dir.h: Use stat64 for stat() family of functions on Windows, because of 64 bit file size. include/my_global.h: Increased default value for open file limit to 16K include/my_sys.h: - my_file_info got new structure members - file handle and open flags - 2 new Windows-only mysys functions : my_get_osfhandle and my_osmaperr, modelled after Windows C runtime functions _get_osfhandle and _dosmaperr libmysql/CMakeLists.txt: new files my_winfile.c and my_winerr.c mysql-test/suite/large_tests/r/lock_tables_big.result: test for more then 2048 open file descriptors on Windows mysql-test/suite/large_tests/t/lock_tables_big.test: test for more then 2048 open file descriptors on Windows mysys/CMakeLists.txt: new files my_winfile.c and my_winerr.c mysys/Makefile.am: new files my_winfile.c and my_winerr.c mysys/default_modify.c: fileno -> my_fileno mysys/my_chsize.c: implementation of chsize on Windows now moved to my_winfile.c mysys/my_create.c: - my_sopen->my_win_open - close open file before removing (won't generally work on Windows otherwise) mysys/my_file.c: On Windows, files returned by my_open will not start with 0, but 2048 (making it simple to detect incompatible mix of CRT and mysys io functions) mysys/my_fopen.c: fileno->my_win_fileno , fclose->my_win_fclose, fdopen->my_win_fdopen Check for legal filename is done by my_win_[f]open functions mysys/my_fstream.c: fileno->my_fileno mysys/my_lib.c: Windows stat() functions are moved to my_winfile.c mysys/my_lock.c: Move Windows code under #ifdef to a separate function win_lock(). Add a parameter for lock wait timeout mysys/my_mmap.c: _get_osfhandle->my_get_osfhandle mysys/my_open.c: my_sopen->my_win_open (simpler interface) mysys/my_pread.c: moved most windows specific code to my_win_file.c Use my_win_pread mysys/my_quick.c: Use my_win_read/my_win_write mysys/my_read.c: Moved most of windows specific code to my_win_file.c Use my_win_read() mysys/my_seek.c: On Windows, use my_win_lseek() in my_seek()/my_tell() Removed dead code (synchronization of lseeks) Improved DBUG tracing (file position is ulonglong, not ulong) mysys/my_static.c: Removed array initialization. my_file_info_default is global variable thus it is initialized with all zeros anyway mysys/my_sync.c: _commit->my_win_fsync mysys/my_winerr.c: New file my_winerr.c Exports my_osmaperr modelled after undocumented C runtime function _dosmaperr(). The problem with _dosmaperr() used previously is that 1) it is nowhere documented and thus code relying on it is not guaranteed to work in subsequent releases on the C runtime 2) it is present only in static C runtime (mysqld does not link if compiled with /MD) mysys/my_winfile.c: New file my_winfile.c Implements ANSI/Posix file IO routines, when possible using native Windows IO, without C runtime (C runtime dropped because of the 2048 file descriptor limit). mysys/my_write.c: write->my_win_write mysys/mysys_priv.h: Declaration of Windows Posix functions (private to mysys, shall not be visible outside) storage/innobase/handler/ha_innodb.cc: mysys native Windows IO : correct innodb tmp file handling mysql_tmpfile does not return valid CRT file descriptor, thus it is not possible to dup() it. Instead, the native file handle has to be duplicated and then converted to CRT descriptor. storage/myisam/mi_locking.c: _commit->my_sync --- .../suite/large_tests/r/lock_tables_big.result | 1 + .../suite/large_tests/t/lock_tables_big.test | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 mysql-test/suite/large_tests/r/lock_tables_big.result create mode 100644 mysql-test/suite/large_tests/t/lock_tables_big.test (limited to 'mysql-test') diff --git a/mysql-test/suite/large_tests/r/lock_tables_big.result b/mysql-test/suite/large_tests/r/lock_tables_big.result new file mode 100644 index 00000000000..de639143055 --- /dev/null +++ b/mysql-test/suite/large_tests/r/lock_tables_big.result @@ -0,0 +1 @@ +all done diff --git a/mysql-test/suite/large_tests/t/lock_tables_big.test b/mysql-test/suite/large_tests/t/lock_tables_big.test new file mode 100644 index 00000000000..41dcff3577c --- /dev/null +++ b/mysql-test/suite/large_tests/t/lock_tables_big.test @@ -0,0 +1,32 @@ +# +# Bug#24509 cannot use more than 2048 file descriptors on windows +# +--disable_query_log +create database many_tables; +use many_tables; +let $max_tables=3000; +let $i=$max_tables; + +--disable_warnings +create table t (i int); +let $table_list=t READ; + +while ($i) +{ + eval create table t$i (i int); + let $table_list= $table_list ,t$i READ; + dec $i; +} + +#lock all tables we just created (resembles mysqldump startup is doing with --all-databases operation) +#There will be 3 descriptors for each table (table.FRM, table.MYI and table.MYD files) means 9000 files +#descriptors altogether. For Microsoft C runtime, this is way too many. + +eval LOCK TABLES $table_list; +unlock tables; + +drop database many_tables; +--disable_query_log +--echo all done + + -- cgit v1.2.1 From 3c916057ad772fe613c294fb654f9a70b65b1b5a Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Sun, 13 Sep 2009 21:52:14 +0100 Subject: BUG#47014: rpl_drop_temp fails on PB-2 with results mismatch The test case creates two temporary tables, then closes the connection, waits for it to disconnect, then syncs the slave with the master, checks for remaining opened temporary tables on slave (which should be 0) and finally drops the used database (mysqltest). Unfortunately, sometimes, the test fails with one open table on the slave. This seems to be caused by the fact that waiting for the connection to be closed is not sufficient. The test needs to wait for the DROP event to be logged and only then synchronize the slave with the master and proceed with the check. This is caused by the asynchronous nature of the disconnect wrt binlogging of the DROP temporary table statement. We fix this by deploying a call to wait_for_binlog_event.inc on the test case, which makes execution to wait for the DROP temp tables event before synchronizing master and slave. --- mysql-test/suite/rpl/t/rpl_drop_temp.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test index df162d3b244..7827e16e45f 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_temp.test +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -23,6 +23,8 @@ disconnect con_temp; --source include/wait_until_disconnected.inc connection master; +-- let $wait_binlog_event= DROP +-- source include/wait_for_binlog_event.inc sync_slave_with_master; connection slave; -- cgit v1.2.1 From 63a81c09946be5f008eb3423e24db93dc72a3fe8 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Sun, 13 Sep 2009 22:43:47 +0100 Subject: BUG#47016: rpl_do_grant fails on PB-2 with a failing connect The test case rpl_do_grant fails sporadically on PB2 with "Access denied for user 'create_rout_db'@'localhost' ...". Inspecting the test case, one may find that if issues a GRANT on the master connection and immediately after it creates two new connections (one to the master and one to the slave) using the credentials set with the GRANT. Unfortunately, there is no synchronization between master and slave after the grant and before the connections are established. This can result in slave not having executed the GRANT by the time the connection is attempted. This patch fixes this by deploying a sync_slave_with_master between the grant and the connections attempt. --- mysql-test/suite/rpl/t/rpl_do_grant.test | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 806de780086..fc793c03649 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -129,6 +129,9 @@ CREATE DATABASE bug42217_db; GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost' IDENTIFIED BY 'create_rout_db' WITH GRANT OPTION; +-- sync_slave_with_master +-- connection master + connect (create_rout_db_master, localhost, create_rout_db, create_rout_db, bug42217_db,$MASTER_MYPORT,); connect (create_rout_db_slave, localhost, create_rout_db, create_rout_db, bug42217_db, $SLAVE_MYPORT,); -- cgit v1.2.1 From 7cf8f7a4bb465eca331fb08568127eadb709a4a2 Mon Sep 17 00:00:00 2001 From: Satya B Date: Thu, 17 Sep 2009 11:59:43 +0530 Subject: Applying InnoDB snapshot 5.1-ss5282, Fixes BUG#44030 1. Fixes BUG#44030 - Error: (1500) Couldn't read the MAX(ID) autoinc value from the index (PRIMARY) 2. Disables the innodb-autoinc test for innodb plugin temporarily. The testcase for this bug has different result file for InnoDB plugin. Should add the testcase to Innodb suite with a different result file. Detailed revision comments: r5243 | sunny | 2009-06-04 03:17:14 +0300 (Thu, 04 Jun 2009) | 14 lines branches/5.1: When the InnoDB and MySQL data dictionaries go out of sync, before the bug fix we would assert on missing autoinc columns. With this fix we allow MySQL to open the table but set the next autoinc value for the column to the MAX value. This effectively disables the next value generation. INSERTs will fail with a generic AUTOINC failure. However, the user should be able to read/dump the table, set the column values explicitly, use ALTER TABLE to set the next autoinc value and/or sync the two data dictionaries to resume normal operations. Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value from the index (PRIMARY) rb://118 r5252 | sunny | 2009-06-04 10:16:24 +0300 (Thu, 04 Jun 2009) | 2 lines branches/5.1: The version of the result file checked in was broken in r5243. r5259 | vasil | 2009-06-05 10:29:16 +0300 (Fri, 05 Jun 2009) | 7 lines branches/5.1: Remove the word "Error" from the printout because the mysqltest suite interprets it as an error and thus the innodb-autoinc test fails. Approved by: Sunny (via IM) r5466 | vasil | 2009-07-02 10:46:45 +0300 (Thu, 02 Jul 2009) | 6 lines branches/5.1: Adjust the failing innodb-autoinc test to conform to the latest behavior of the MySQL code. The idea and the comment in innodb-autoinc.test come from Sunny. --- mysql-test/lib/mtr_cases.pm | 1 + mysql-test/r/innodb-autoinc.result | 22 ++++++++++++++++++++++ mysql-test/t/innodb-autoinc.test | 24 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 873339166b3..efd9980eb7a 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -495,6 +495,7 @@ sub collect_one_suite($) # Exceptions next if ($test->{'name'} eq 'main.innodb'); # Failed with wrong errno (fk) next if ($test->{'name'} eq 'main.index_merge_innodb'); # Explain diff + next if ($test->{'name'} eq 'main.innodb-autoinc'); # Need dfrnt result file # innodb_file_per_table is rw with innodb_plugin next if ($test->{'name'} eq 'sys_vars.innodb_file_per_table_basic'); # innodb_lock_wait_timeout is rw with innodb_plugin diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index ade4db35ce6..76575ae4160 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -867,3 +867,25 @@ INSERT INTO t2 SELECT NULL FROM t1; Got one of the listed errors DROP TABLE t1; DROP TABLE t2; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +d1 +1 +3 +SELECT * FROM t1; +d1 +1 +3 +INSERT INTO t1 VALUES(null); +ALTER TABLE t1 AUTO_INCREMENT = 3; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +d1 +1 +3 +4 +5 +DROP TABLE t1; diff --git a/mysql-test/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index d76b29a7dc8..b51014ef4b3 100644 --- a/mysql-test/t/innodb-autoinc.test +++ b/mysql-test/t/innodb-autoinc.test @@ -478,3 +478,27 @@ INSERT INTO t2 SELECT c1 FROM t1; INSERT INTO t2 SELECT NULL FROM t1; DROP TABLE t1; DROP TABLE t2; +# +# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from +# the index (PRIMARY) +# This test requires a restart of the server +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +# Restart the server +-- source include/restart_mysqld.inc +# The MySQL and InnoDB data dictionaries should now be out of sync. +# The select should print message to the error log +SELECT * FROM t1; +# MySQL have made a change (http://lists.mysql.com/commits/75268) that no +# longer results in the two data dictionaries being out of sync. If they +# revert their changes then this check for ER_AUTOINC_READ_FAILED will need +# to be enabled. +# -- error ER_AUTOINC_READ_FAILED,1467 +INSERT INTO t1 VALUES(null); +ALTER TABLE t1 AUTO_INCREMENT = 3; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +DROP TABLE t1; -- cgit v1.2.1 From 2535ede7138cb4d1e8986d18b4154c377ba37f3f Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 17 Sep 2009 16:33:23 +0500 Subject: Bug#42364 SHOW ERRORS returns empty resultset after dropping non existent table additional backport of of bug43138 fix mysql-test/t/myisam-system.test: additional backport of of bug43138 fix sql/sql_db.cc: additional backport of of bug43138 fix --- mysql-test/r/trigger_notembedded.result | 2 -- mysql-test/t/myisam-system.test | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index 335e6910a3a..d66308a9bd7 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -180,8 +180,6 @@ NULL mysqltest_db1 trg5 DELETE NULL mysqltest_db1 t1 0 NULL SET @a = 5 ROW BEFOR DROP USER mysqltest_dfn@localhost; DROP USER mysqltest_inv@localhost; DROP DATABASE mysqltest_db1; -Warnings: -Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger. DELETE FROM mysql.user WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.db WHERE User LIKE 'mysqltest_%'; DELETE FROM mysql.tables_priv WHERE User LIKE 'mysqltest_%'; diff --git a/mysql-test/t/myisam-system.test b/mysql-test/t/myisam-system.test index dc5bb58b6a2..d908e639a4e 100644 --- a/mysql-test/t/myisam-system.test +++ b/mysql-test/t/myisam-system.test @@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`; drop table if exists t1; create table t1 (a int) engine=myisam; --remove_file $MYSQLD_DATADIR/test/t1.MYI ---error 1051,6 +--error ER_BAD_TABLE_ERROR,6 drop table t1; create table t1 (a int) engine=myisam; --remove_file $MYSQLD_DATADIR/test/t1.MYD ---error 1105,6,29 +--error ER_BAD_TABLE_ERROR,6,29 drop table t1; ---error 1051 +--error ER_BAD_TABLE_ERROR drop table t1; -- cgit v1.2.1 From 9d8c02385926ba0878ef9d52bdaaf4825a3580bf Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sat, 19 Sep 2009 13:37:22 +0400 Subject: Mark some tests experimental. --- mysql-test/collections/default.experimental | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 8bec38a373b..8ad0d8a41cd 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -1,6 +1,17 @@ funcs_1.charset_collation_1 # depends on compile-time decisions + binlog.binlog_tmp_table # Bug#45578: Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2' + +innodb.innodb_information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically + main.ctype_gbk_binlog # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists +main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically +main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically + rpl.rpl_row_create_table # Bug#45576: rpl_row_create_table fails on PB2 rpl_ndb.rpl_ndb_log # Bug#38998 rpl.rpl_innodb_bug28430 # Bug#46029 +rpl.rpl_get_master_version_and_clock # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31 + +ndb.* # Consider all NDB tests experimental. +rpl_ndb.* # Consider all NDB tests experimental. -- cgit v1.2.1 From 18f7dd0fad8479007d9618bfd570be72cae90277 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sun, 20 Sep 2009 01:09:02 +0400 Subject: Update default.experimental. --- mysql-test/collections/default.experimental | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 8ad0d8a41cd..42e68759580 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -13,5 +13,5 @@ rpl_ndb.rpl_ndb_log # Bug#38998 rpl.rpl_innodb_bug28430 # Bug#46029 rpl.rpl_get_master_version_and_clock # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31 -ndb.* # Consider all NDB tests experimental. -rpl_ndb.* # Consider all NDB tests experimental. +ndb.n* # Consider all NDB tests experimental. +rpl_ndb.r* # Consider all NDB tests experimental. -- cgit v1.2.1 From 4a75d269cedf201a6a5f46a936c4db7c960f3be3 Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 21 Sep 2009 11:28:49 +0200 Subject: tiny suppression fix: avoid / --- mysql-test/include/mtr_warnings.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 02e8d68263f..47b1d9b10bb 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -162,7 +162,7 @@ INSERT INTO global_suppressions VALUES ("Slave: Unknown column 'c7' in 't15' Error_code: 1054"), ("Slave: Can't DROP 'c7'.* 1091"), ("Slave: Key column 'c6'.* 1072"), - ("Slave I/O: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."), + ("Slave I.O: The slave I.O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."), (".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"), /* Test case for Bug#31590 in order_by.test produces the following error */ -- cgit v1.2.1 From 41a8a638576183f4e426adaa70d064593ecce273 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Wed, 23 Sep 2009 22:50:13 +0400 Subject: Update disabled.def files. --- mysql-test/suite/funcs_1/t/disabled.def | 2 +- mysql-test/suite/innodb/t/disabled.def | 2 +- mysql-test/suite/parts/t/disabled.def | 2 +- mysql-test/suite/rpl/t/disabled.def | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 3f260ca49ba..23f15b78103 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,4 +10,4 @@ # ############################################################################## -ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL +ndb_trig_1011ext: Bug#47564 diff --git a/mysql-test/suite/innodb/t/disabled.def b/mysql-test/suite/innodb/t/disabled.def index baf8c89f539..195fd1c0758 100644 --- a/mysql-test/suite/innodb/t/disabled.def +++ b/mysql-test/suite/innodb/t/disabled.def @@ -1 +1 @@ -innodb-index: InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal +innodb-index : Bug#47563 2009-06-11 svoj InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 518a3c90422..8a1dafe59a2 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -1,3 +1,3 @@ -partition_basic_ndb : Bug#19899 Crashing the server +partition_basic_ndb : Bug#44919 parts-suite in mtr tries to use features not supported by ndb # http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html partition_syntax_ndb : Bug#36735 Not supported diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 38fc9e21322..85747264b6f 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -10,4 +10,4 @@ # ############################################################################## -rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx +rpl_cross_version : Bug#43913 2009-03-27 joro rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm -- cgit v1.2.1 From 45921153db55119eb7a9ad4f991fe067085a3269 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Thu, 24 Sep 2009 16:29:29 +0400 Subject: Mark some tests experimental. Update default.conf. --- mysql-test/collections/default.experimental | 58 +++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 85c14c6f67a..edc6df26ce0 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -2,18 +2,68 @@ # in alphabetical order. This also helps with merge conflict resolution. binlog.binlog_tmp_table* # Bug#45578:2009-07-10 alik Test binlog_tmp_table fails ramdonly on PB2: Unknown table 't2' + funcs_1.charset_collation_1 # depends on compile-time decisions + innodb.innodb_information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically + main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically +main.innodb-autoinc # Bug#44030 2009-09-24 alik Marking innodb-autoinc experimental while waiting for the patch to be merged main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically -main.plugin* @solaris # Bug#47146 Linking problem with example plugin when dtrace enabled -main.plugin_load @solaris # Bug#47146 +main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled +main.plugin_load # Bug#47146 + rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31 rpl.rpl_innodb_bug28430* @solaris # Bug#46029 rpl.rpl_plugin_load* @solaris # Bug#47146 rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2 + rpl_ndb.rpl_ndb_log # Bug#38998 -ndb.n* # Consider all NDB tests experimental. -rpl_ndb.r* # Consider all NDB tests experimental. +# Declare all NDB-tests in other test suites experimental. + +stress.ddl_ndb + +sys_vars.ndb_log_update_as_write_basic +sys_vars.have_ndbcluster_basic +sys_vars.ndb_log_updated_only_basic + +funcs_1.ndb_storedproc_10 +funcs_1.ndb_bitdata +funcs_1.ndb_trig_03 +funcs_1.ndb_trig_0102 +funcs_1.is_tables_ndb +funcs_1.is_columns_ndb +funcs_1.ndb_trig_0407 +funcs_1.ndb_trig_1011ext +funcs_1.ndb_storedproc_06 +funcs_1.ndb_views +funcs_1.is_cml_ndb +funcs_1.ndb_storedproc_02 +funcs_1.ndb_storedproc_03 +funcs_1.ndb_trig_03e +funcs_1.is_engines_ndb +funcs_1.ndb_trig_08 +funcs_1.ndb_storedproc_07 +funcs_1.ndb_storedproc_08 +funcs_1.ndb_func_view +funcs_1.ndb_trig_09 +funcs_1.ndb_cursors + +funcs_2.ndb_charset + +parts.partition_engine_ndb +parts.ndb_dd_backuprestore +parts.partition_value_ndb +parts.partition_mgm_lc2_ndb +parts.partition_alter1_2_ndb +parts.partition_alter1_1_ndb +parts.part_supported_sql_func_ndb +parts.partition_int_ndb +parts.partition_mgm_lc1_ndb +parts.partition_auto_increment_ndb +parts.partition_syntax_ndb +parts.partition_alter1_1_2_ndb +parts.partition_basic_ndb +parts.partition_mgm_lc0_ndb -- cgit v1.2.1 From b893cc510c69f2098ac751e5350e171c21c2bfa8 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Thu, 24 Sep 2009 16:30:13 +0400 Subject: Disable ndb and rpl_ndb test suites from regular tests. --- mysql-test/collections/mysql-trunk.push | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 mysql-test/collections/mysql-trunk.push (limited to 'mysql-test') diff --git a/mysql-test/collections/mysql-trunk.push b/mysql-test/collections/mysql-trunk.push new file mode 100644 index 00000000000..99ff6f21673 --- /dev/null +++ b/mysql-test/collections/mysql-trunk.push @@ -0,0 +1,5 @@ +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=n_mix --mysqld=--binlog-format=mixed --suite=main,binlog,innodb,federated,rpl +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --suite=main,binlog,innodb,federated,rpl +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=embedded --embedded --suite=main,binlog,innodb,federated,rpl +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=rpl_binlog_row --mysqld=--binlog-format=row --suite=rpl,binlog +perl mysql-test-run.pl --timer --force --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --suite=funcs_1 -- cgit v1.2.1 From 350fad0e46be5bc103451bce9978f46712cb93fe Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Fri, 25 Sep 2009 13:21:49 +0400 Subject: Mark rpl.rpl_trigger experimental. --- mysql-test/collections/default.experimental | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index edc6df26ce0..872b8f29101 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -18,6 +18,7 @@ rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get rpl.rpl_innodb_bug28430* @solaris # Bug#46029 rpl.rpl_plugin_load* @solaris # Bug#47146 rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2 +rpl.rpl_trigger* # Bug#46656 2009-09-25 alik InnoDB plugin: memory leaks (Valgrind) rpl_ndb.rpl_ndb_log # Bug#38998 -- cgit v1.2.1 From 3f0caab6e596a453d9667e489bf5bf381f81456a Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Fri, 25 Sep 2009 13:40:25 +0400 Subject: Mark rpl.rpl_innodb_bug30888 experimental. --- mysql-test/collections/default.experimental | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 872b8f29101..fc057256147 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -16,6 +16,7 @@ main.plugin_load # Bug#47146 rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31 rpl.rpl_innodb_bug28430* @solaris # Bug#46029 +rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris rpl.rpl_plugin_load* @solaris # Bug#47146 rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2 rpl.rpl_trigger* # Bug#46656 2009-09-25 alik InnoDB plugin: memory leaks (Valgrind) -- cgit v1.2.1