Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä 2022-07-27 17:17:24 +03:00
commit 098c0f2634
278 changed files with 17690 additions and 7421 deletions

View File

@ -25,6 +25,6 @@ test_script:
- set PATH=C:\Strawberry\perl\bin;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 - set PATH=C:\Strawberry\perl\bin;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
- cd %APPVEYOR_BUILD_FOLDER%\_build\mysql-test - cd %APPVEYOR_BUILD_FOLDER%\_build\mysql-test
- set /A parallel=4*%NUMBER_OF_PROCESSORS% - set /A parallel=4*%NUMBER_OF_PROCESSORS%
- perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 -parallel=%parallel% --testcase-timeout=4 --suite=main --skip-test-list=unstable-tests --mysqld=--loose-innodb-flush-log-at-trx-commit=2 - perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=%parallel% --testcase-timeout=4 --suite=main --skip-test-list=unstable-tests --mysqld=--loose-innodb-flush-log-at-trx-commit=2
image: Visual Studio 2022 image: Visual Studio 2022

View File

@ -42,7 +42,7 @@
#include <violite.h> #include <violite.h>
#include <my_sys.h> #include <my_sys.h>
#include <source_revision.h> #include <source_revision.h>
#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H) #if defined(HAVE_LOCALE_H)
#include <locale.h> #include <locale.h>
#endif #endif
@ -2686,6 +2686,9 @@ static void initialize_readline ()
/* Allow conditional parsing of the ~/.inputrc file. */ /* Allow conditional parsing of the ~/.inputrc file. */
rl_readline_name= (char *) "mysql"; rl_readline_name= (char *) "mysql";
rl_terminal_name= getenv("TERM"); rl_terminal_name= getenv("TERM");
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL,"");
#endif
/* Tell the completer that we want a crack first. */ /* Tell the completer that we want a crack first. */
#if defined(USE_NEW_READLINE_INTERFACE) #if defined(USE_NEW_READLINE_INTERFACE)
@ -2694,9 +2697,6 @@ static void initialize_readline ()
rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1); rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
#elif defined(USE_LIBEDIT_INTERFACE) #elif defined(USE_LIBEDIT_INTERFACE)
#ifdef HAVE_LOCALE_H
setlocale(LC_ALL,""); /* so as libedit use isprint */
#endif
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion; rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
rl_completion_entry_function= &no_completion; rl_completion_entry_function= &no_completion;
rl_add_defun("magic-space", (Function*)&fake_magic_space, -1); rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);

View File

@ -28,7 +28,3 @@ SET(EXECINFO_ROOT /usr/local CACHE INTERNAL "Where to find execinfo library and
INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include) INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include)
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include) SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include)
SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib") SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib")
FIND_LIBRARY(EXECINFO NAMES execinfo)
IF(EXECINFO)
SET(LIBEXECINFO ${EXECINFO})
ENDIF()

View File

@ -1,22 +0,0 @@
# Copyright (C) 2012 Monty Program Ab, 2021 Brad Smith
#
# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
# This file includes OpenBSD specific options and quirks, related to system checks
# Find libexecinfo (library that contains backtrace_symbols etc)
FIND_LIBRARY(EXECINFO NAMES execinfo)
IF(EXECINFO)
SET(LIBEXECINFO ${EXECINFO})
ENDIF()

View File

@ -296,6 +296,11 @@ SET(HAVE_SOCKPEERCRED CACHE INTERNAL "")
SET(HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL "") SET(HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL "")
SET(HAVE_GCC_C11_ATOMICS CACHE INTERNAL "") SET(HAVE_GCC_C11_ATOMICS CACHE INTERNAL "")
SET(HAVE_VISIBILITY_HIDDEN CACHE INTERNAL "") SET(HAVE_VISIBILITY_HIDDEN CACHE INTERNAL "")
SET(HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC CACHE INTERNAL "")
SET(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC CACHE INTERNAL "")
SET(HAVE_MPROTECT CACHE INTERNAL "")
SET(HAVE_C__Werror CACHE INTERNAL "")
SET(HAVE_NANOSLEEP CACHE INTERNAL "")
SET(HAVE_ACCEPT4 CACHE INTERNAL "") SET(HAVE_ACCEPT4 CACHE INTERNAL "")
SET(HAVE_LINK_H CACHE INTERNAL "") SET(HAVE_LINK_H CACHE INTERNAL "")
SET(HAVE_DLADDR CACHE INTERNAL "") SET(HAVE_DLADDR CACHE INTERNAL "")
@ -319,7 +324,6 @@ SET(HAVE_BZLIB2_DECOMPRESS CACHE INTERNAL "")
SET(HAVE_BZLIB2_H CACHE INTERNAL "") SET(HAVE_BZLIB2_H CACHE INTERNAL "")
SET(HAVE_SNAPPY_H CACHE INTERNAL "") SET(HAVE_SNAPPY_H CACHE INTERNAL "")
SET(HAVE_SCHED_GETCPU CACHE INTERNAL "") SET(HAVE_SCHED_GETCPU CACHE INTERNAL "")
SET(HAVE_NANOSLEEP CACHE INTERNAL "")
SET(HAVE_PTHREAD_THREADID_NP CACHE INTERNAL "") SET(HAVE_PTHREAD_THREADID_NP CACHE INTERNAL "")
SET(HAVE_SYS_GETTID CACHE INTERNAL "") SET(HAVE_SYS_GETTID CACHE INTERNAL "")
SET(HAVE_GETTID CACHE INTERNAL "") SET(HAVE_GETTID CACHE INTERNAL "")

View File

@ -134,6 +134,8 @@ IF(UNIX)
IF(NOT LIBRT) IF(NOT LIBRT)
MY_SEARCH_LIBS(clock_gettime rt LIBRT) MY_SEARCH_LIBS(clock_gettime rt LIBRT)
ENDIF() ENDIF()
MY_SEARCH_LIBS(backtrace_symbols_fd execinfo LIBEXECINFO)
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
FIND_PACKAGE(Threads) FIND_PACKAGE(Threads)

View File

@ -35,6 +35,7 @@ typedef struct {
uint num; uint num;
pthread_mutex_t data_mutex; pthread_mutex_t data_mutex;
pthread_cond_t data_cond; pthread_cond_t data_cond;
pthread_cond_t done_cond;
my_bool data_avail; my_bool data_avail;
my_bool cancelled; my_bool cancelled;
const char *from; const char *from;
@ -229,25 +230,24 @@ compress_write(ds_file_t *file, const uchar *buf, size_t len)
thd = threads + i; thd = threads + i;
pthread_mutex_lock(&thd->data_mutex); pthread_mutex_lock(&thd->data_mutex);
while (thd->data_avail == TRUE) { while (!thd->to_len) {
pthread_cond_wait(&thd->data_cond, pthread_cond_wait(&thd->done_cond,
&thd->data_mutex); &thd->data_mutex);
} }
xb_a(threads[i].to_len > 0);
bool fail = ds_write(dest_file, "NEWBNEWB", 8) || bool fail = ds_write(dest_file, "NEWBNEWB", 8) ||
write_uint64_le(dest_file, write_uint64_le(dest_file,
comp_file->bytes_processed); comp_file->bytes_processed);
comp_file->bytes_processed += threads[i].from_len; comp_file->bytes_processed += thd->from_len;
if (!fail) { if (!fail) {
fail = write_uint32_le(dest_file, threads[i].adler) || fail = write_uint32_le(dest_file, thd->adler) ||
ds_write(dest_file, threads[i].to, ds_write(dest_file, thd->to,
threads[i].to_len); thd->to_len);
} }
pthread_mutex_unlock(&threads[i].data_mutex); thd->to_len = 0;
pthread_mutex_unlock(&thd->data_mutex);
if (fail) { if (fail) {
msg("compress: write to the destination stream " msg("compress: write to the destination stream "
@ -335,6 +335,7 @@ destroy_worker_thread(comp_thread_ctxt_t *thd)
pthread_join(thd->id, NULL); pthread_join(thd->id, NULL);
pthread_cond_destroy(&thd->data_cond); pthread_cond_destroy(&thd->data_cond);
pthread_cond_destroy(&thd->done_cond);
pthread_mutex_destroy(&thd->data_mutex); pthread_mutex_destroy(&thd->data_mutex);
my_free(thd->to); my_free(thd->to);
@ -347,22 +348,24 @@ create_worker_threads(uint n)
comp_thread_ctxt_t *threads; comp_thread_ctxt_t *threads;
uint i; uint i;
threads = (comp_thread_ctxt_t *) my_malloc(PSI_NOT_INSTRUMENTED, threads = static_cast<comp_thread_ctxt_t*>
sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE)); (my_malloc(PSI_NOT_INSTRUMENTED, n * sizeof *threads,
MYF(MY_ZEROFILL|MY_FAE)));
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
comp_thread_ctxt_t *thd = threads + i; comp_thread_ctxt_t *thd = threads + i;
thd->num = i + 1; thd->num = i + 1;
thd->cancelled = FALSE; thd->to = static_cast<char*>
thd->data_avail = FALSE; (my_malloc(PSI_NOT_INSTRUMENTED,
COMPRESS_CHUNK_SIZE +
thd->to = (char *) my_malloc(PSI_NOT_INSTRUMENTED, MY_QLZ_COMPRESS_OVERHEAD,
COMPRESS_CHUNK_SIZE + MY_QLZ_COMPRESS_OVERHEAD, MYF(MY_FAE)); MYF(MY_FAE)));
/* Initialize and data mutex and condition var */ /* Initialize and data mutex and condition var */
if (pthread_mutex_init(&thd->data_mutex, NULL) || if (pthread_mutex_init(&thd->data_mutex, NULL) ||
pthread_cond_init(&thd->data_cond, NULL)) { pthread_cond_init(&thd->data_cond, NULL) ||
pthread_cond_init(&thd->done_cond, NULL)) {
goto err; goto err;
} }
@ -413,7 +416,7 @@ compress_worker_thread_func(void *arg)
if (thd->cancelled) if (thd->cancelled)
break; break;
thd->data_avail = FALSE;
thd->to_len = qlz_compress(thd->from, thd->to, thd->from_len, thd->to_len = qlz_compress(thd->from, thd->to, thd->from_len,
&thd->state); &thd->state);
@ -428,6 +431,7 @@ compress_worker_thread_func(void *arg)
thd->adler = adler32(0x00000001, (uchar *) thd->to, thd->adler = adler32(0x00000001, (uchar *) thd->to,
(uInt)thd->to_len); (uInt)thd->to_len);
pthread_cond_signal(&thd->done_cond);
} }
pthread_mutex_unlock(&thd->data_mutex); pthread_mutex_unlock(&thd->data_mutex);

View File

@ -0,0 +1,72 @@
#
# Helper file to ensure that a binary log file properly writes the expected
# fields based on the binlog_row_image value.
#
# ==== Usage ====
#
# --let $expected_columns= (COLUMN_IDS)
# --let $binlog_filename= FILENAME
# --source include/count_binlog_row_event_columns.inc
#
# Parameters:
# expected_columns (list<uint>, in) : A list of positive integers which
# correspond to the column numbers that should be output in a binary
# log's write_rows event
# binlog_filename (string, in) : Name of the binary log file to analyze
#
if (!$expected_columns)
{
--die expected_columns parameter is required but was not set
}
if (!$binlog_filename)
{
--die binlog_filename parameter is required but was not set
}
--let $include_filename= ensure_binlog_row_event_columns.inc [$expected_columns]
--source include/begin_include_file.inc
--let $assert_file=$MYSQLTEST_VARDIR/tmp/binlog_decoded.out
--let mysqld_datadir=`select @@datadir`
--echo # MYSQL_BINLOG mysqld_datadir/binlog_filename -vv > assert_file
--exec $MYSQL_BINLOG $mysqld_datadir/$binlog_filename -vv > $assert_file
--echo # Verifying all expected column ids appear in binlog event output..
--let num_cols_found=0
--let last_expected_col= `SELECT GREATEST $expected_columns`
--let i= 1
while($i <= $last_expected_col)
{
# By default, assume the column is not expected to be in the binary log.
# If the column id is set in expected_columns, then override assertion
# parameters.
--let assert_count= 0
--let assert_text= Column @$i should not be in binary log
if (`SELECT $i IN $expected_columns`)
{
--let assert_count= 1
--let assert_text= Column @$i should be in binary log
--inc $num_cols_found
}
--let assert_select= @$i
--source include/assert_grep.inc
--inc $i
}
--echo # ..success
--echo # Verifying only expected column ids appear in binlog event output..
--let assert_count= $num_cols_found
--let assert_text= The binlog event should only have $num_cols_found columns
--let assert_select= @[\d]+
--source include/assert_grep.inc
--echo # ..success
--let $include_filename= ensure_binlog_row_event_columns.inc [$expected_columns]
--source include/end_include_file.inc

View File

@ -157,6 +157,10 @@ INSERT INTO global_suppressions VALUES
("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"), ("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"),
("InnoDB: Warning: semaphore wait:"), ("InnoDB: Warning: semaphore wait:"),
/* MDEV-28976: Tests that kill the server do not ensure that the
old process has terminated before starting a new one */
("InnoDB: Unable to lock"),
/* /*
BUG#32080 - Excessive warnings on Solaris: setrlimit could not BUG#32080 - Excessive warnings on Solaris: setrlimit could not
change the size of core files change the size of core files

View File

@ -19,9 +19,143 @@ package My::CoreDump;
use strict; use strict;
use Carp; use Carp;
use My::Platform; use My::Platform;
use Text::Wrap;
use Data::Dumper;
use File::Temp qw/ tempfile tempdir /; use File::Temp qw/ tempfile tempdir /;
use File::Find;
use File::Basename;
use mtr_results; use mtr_results;
use mtr_report;
my %opts;
my %config;
my $help = "\n\nOptions for printing core dumps\n\n";
sub register_opt($$$) {
my ($name, $format, $msg)= @_;
my @names= split(/\|/, $name);
my $option_name= $names[0];
$option_name=~ s/-/_/;
$opts{$name. $format}= \$config{$option_name};
$help.= wrap(sprintf(" %-23s", join(', ', @names)), ' 'x25, "$msg\n");
}
# To preserve order we use array instead of hash
my @print_formats= (
short => {
description => "Failing stack trace",
codes => {}
},
medium => {
description => "All stack traces",
codes => {}
},
detailed => {
description => "All stack traces with debug context",
codes => {}
},
custom => {
description => "Custom debugger script for printing stack"
},
# 'no' must be last (check generated help)
no => {
description => "Skip stack trace printing"
}
);
# TODO: make class for each {method, get_code}
my @print_methods= (IS_WINDOWS) ? (cdb => { method => \&_cdb }) : (
gdb => {
method => \&_gdb,
get_code => \&_gdb_format,
},
dbx => {
method => \&_dbx
},
lldb => {
method => \&_lldb
},
# 'auto' must be last (check generated help)
auto => {
method => \&_auto
}
);
# But we also use hash
my %print_formats= @print_formats;
my %print_methods= @print_methods;
# and scalar
my $x= 0;
my $print_formats= join(', ', grep { ++$x % 2 } @print_formats);
$x= 0;
my $print_methods= join(', ', grep { ++$x % 2 } @print_methods);
# Fill 'short' and 'detailed' formats per each print_method
# that has interface for that
for my $f (keys %print_formats)
{
next unless exists $print_formats{$f}->{codes};
for my $m (keys %print_methods)
{
next unless exists $print_methods{$m}->{get_code};
# That calls f.ex. _gdb_format('short')
# and assigns { gdb => value-of-_gdb_format } into $print_formats{short}->{format}:
$print_formats{$f}->{codes}->{$m}= $print_methods{$m}->{get_code}->($f);
}
}
register_opt('print-core|C', ':s',
"Print core dump format: ". $print_formats. " (for not printing cores). ".
"Defaults to value of MTR_PRINT_CORE or 'short'");
if (!IS_WINDOWS)
{
register_opt('print-method', '=s',
"Print core method: ". join(', ', $print_methods). " (try each method until success). ".
"Defaults to 'auto'");
}
sub options() { %opts }
sub help() { $help }
sub env_or_default($$) {
my ($default, $env)= @_;
if (exists $ENV{$env}) {
my $f= $ENV{$env};
$f= 'custom'
if $f =~ m/^custom:/;
return $ENV{$env}
if exists $print_formats{$f};
mtr_verbose("$env value ignored: $ENV{$env}");
}
return $default;
}
sub pre_setup() {
$config{print_core}= env_or_default('short', 'MTR_PRINT_CORE')
if not defined $config{print_core};
$config{print_method}= (IS_WINDOWS) ? 'cdb' : 'auto'
if not defined $config{print_method};
# If the user has specified 'custom' we fill appropriate print_format
# and that will be used automatically
# Note: this can assign 'custom' to method 'auto'.
if ($config{print_core} =~ m/^custom:(.+)$/) {
$config{print_core}= 'custom';
$print_formats{'custom'}= {
$config{print_method} => $1
}
}
mtr_error "Wrong value for --print-core: $config{print_core}"
if not exists $print_formats{$config{print_core}};
mtr_error "Wrong value for --print-method: $config{print_method}"
if not exists $print_methods{$config{print_method}};
mtr_debug(Data::Dumper->Dump(
[\%config, \%print_formats, \%print_methods],
[qw(config print_formats print_methods)]));
}
my $hint_mysqld; # Last resort guess for executable path my $hint_mysqld; # Last resort guess for executable path
@ -50,8 +184,38 @@ sub _verify_binpath {
return $binpath; return $binpath;
} }
# Returns GDB code according to specified format
# Note: this is like simple hash, separate interface was made
# in advance for implementing below TODO
# TODO: _gdb_format() and _gdb() should be separate class
# (like the other printing methods)
sub _gdb_format($) {
my ($format)= @_;
my %formats= (
short => "bt\n",
medium => "thread apply all bt\n",
detailed =>
"bt\n".
"set print sevenbit on\n".
"set print static-members off\n".
"set print frame-arguments all\n".
"thread apply all bt full\n".
"quit\n"
);
confess "Unknown format: ". $format
unless exists $formats{$format};
return $formats{$format};
}
sub _gdb { sub _gdb {
my ($core_name)= @_; my ($core_name, $code)= @_;
confess "Undefined format"
unless defined $code;
# Check that gdb exists # Check that gdb exists
`gdb --version`; `gdb --version`;
@ -61,7 +225,7 @@ sub _gdb {
} }
if (-f $core_name) { if (-f $core_name) {
print "\nTrying 'gdb' to get a backtrace from coredump $core_name\n"; mtr_verbose("Trying 'gdb' to get a backtrace from coredump $core_name");
} else { } else {
print "\nCoredump $core_name does not exist, cannot run 'gdb'\n"; print "\nCoredump $core_name does not exist, cannot run 'gdb'\n";
return; return;
@ -76,13 +240,7 @@ sub _gdb {
# Create tempfile containing gdb commands # Create tempfile containing gdb commands
my ($tmp, $tmp_name) = tempfile(); my ($tmp, $tmp_name) = tempfile();
print $tmp print $tmp $code;
"bt\n",
"set print sevenbit on\n",
"set print static-members off\n",
"set print frame-arguments all\n",
"thread apply all bt full\n",
"quit\n";
close $tmp or die "Error closing $tmp_name: $!"; close $tmp or die "Error closing $tmp_name: $!";
# Run gdb # Run gdb
@ -105,7 +263,7 @@ EOF
sub _dbx { sub _dbx {
my ($core_name)= @_; my ($core_name, $format)= @_;
print "\nTrying 'dbx' to get a backtrace\n"; print "\nTrying 'dbx' to get a backtrace\n";
@ -167,7 +325,7 @@ sub cdb_check {
sub _cdb { sub _cdb {
my ($core_name)= @_; my ($core_name, $format)= @_;
print "\nTrying 'cdb' to get a backtrace\n"; print "\nTrying 'cdb' to get a backtrace\n";
return unless -f $core_name; return unless -f $core_name;
@ -304,38 +462,82 @@ EOF
} }
sub _auto
sub show { {
my ($class, $core_name, $exe_mysqld, $parallel)= @_; my ($core_name, $code, $rest)= @_;
$hint_mysqld= $exe_mysqld; # We use ordered array @print_methods and omit auto itself
my @valid_methods= @print_methods[0 .. $#print_methods - 2];
# On Windows, rely on cdb to be there... my $x= 0;
if (IS_WINDOWS) my @methods= grep { ++$x % 2} @valid_methods;
my $f= $config{print_core};
foreach my $m (@methods)
{ {
_cdb($core_name); my $debugger= $print_methods{$m};
return; confess "Broken @print_methods"
} if $debugger->{method} == \&_auto;
# If we didn't find format for 'auto' (that is only possible for 'custom')
# We try dbx first; gdb itself may coredump if run on a Sun Studio # we get format for specific debugger
# compiled binary on Solaris. if (not defined $code && defined $print_formats{$f} and
exists $print_formats{$f}->{codes}->{$m})
my @debuggers = {
( $code= $print_formats{$f}->{codes}->{$m};
\&_dbx, }
\&_gdb, mtr_verbose2("Trying to print with method ${m}:${f}");
\&_lldb, if ($debugger->{method}->($core_name, $code)) {
# TODO...
);
# Try debuggers until one succeeds
foreach my $debugger (@debuggers){
if ($debugger->($core_name)){
return; return;
} }
} }
}
sub show {
my ($core_name, $exe_mysqld, $parallel)= @_;
if ($config{print_core} ne 'no') {
my $f= $config{print_core};
my $m= $config{print_method};
my $code= undef;
if (exists $print_formats{$f}->{codes} and
exists $print_formats{$f}->{codes}->{$m}) {
$code= $print_formats{$f}->{codes}->{$m};
}
mtr_verbose2("Printing core with method ${m}:${f}");
mtr_debug("code: ${code}");
$print_methods{$m}->{method}->($core_name, $code);
}
return; return;
} }
sub core_wanted($$$$$) {
my ($num_saved_cores, $opt_max_save_core, $compress,
$exe_mysqld, $opt_parallel)= @_;
my $core_file= $File::Find::name;
my $core_name= basename($core_file);
# Name beginning with core, not ending in .gz
if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
or (IS_WINDOWS and $core_name =~ /\.dmp$/))
{
# Ending with .dmp
mtr_report(" - found '$core_name'",
"($$num_saved_cores/$opt_max_save_core)");
show($core_file, $exe_mysqld, $opt_parallel);
# Limit number of core files saved
if ($$num_saved_cores >= $opt_max_save_core)
{
mtr_report(" - deleting it, already saved",
"$opt_max_save_core");
unlink("$core_file");
}
else
{
main::mtr_compress_file($core_file) if $compress;
++$$num_saved_cores;
}
}
}
1; 1;

View File

@ -5,6 +5,7 @@ use warnings;
use Text::Wrap; use Text::Wrap;
use Cwd; use Cwd;
use My::Platform; use My::Platform;
use mtr_report;
# 1. options to support: # 1. options to support:
# --xxx[=ARGS] # --xxx[=ARGS]
@ -105,6 +106,10 @@ EEE
my %opts; my %opts;
my %opt_vals; my %opt_vals;
my $debugger;
my $boot_debugger;
my $client_debugger;
my $help = "\n\nOptions for running debuggers\n\n"; my $help = "\n\nOptions for running debuggers\n\n";
for my $k (sort keys %debuggers) { for my $k (sort keys %debuggers) {
@ -161,7 +166,7 @@ sub do_args($$$$$) {
if ($v->{script}) { if ($v->{script}) {
::mtr_tonewfile($vars{script}, subst($v->{script}, %vars)."\n".$script); ::mtr_tonewfile($vars{script}, subst($v->{script}, %vars)."\n".$script);
} elsif ($script) { } elsif ($script) {
die "$k is not using a script file, nowhere to write the script \n---\n$script\n---\n"; mtr_error "$k is not using a script file, nowhere to write the script \n---\n$script\n---";
} }
my $options = subst($v->{options}, %vars); my $options = subst($v->{options}, %vars);
@ -186,24 +191,61 @@ sub help() { $help }
sub fix_options(@) { sub fix_options(@) {
my $re=join '|', keys %opts; my $re=join '|', keys %opts;
$re =~ s/=s//g; $re =~ s/=s//g;
# FIXME: what is '=;'? What about ':s' to denote optional argument in register_opt()
map { $_ . (/^--($re)$/ and '=;') } @_; map { $_ . (/^--($re)$/ and '=;') } @_;
} }
sub pre_setup() { sub pre_setup() {
my $used; my $used;
my %options;
my %client_options;
my %boot_options;
my $embedded= $::opt_embedded_server ? ' with --embedded' : '';
for my $k (keys %debuggers) { for my $k (keys %debuggers) {
for my $opt ($k, "manual-$k", "boot-$k", "client-$k") { for my $opt ($k, "manual-$k", "boot-$k", "client-$k") {
if ($opt_vals{$opt}) my $val= $opt_vals{$opt};
{ if ($val) {
$used = 1; $used = 1;
if ($debuggers{$k}->{pre}) { if ($debuggers{$k}->{pre}) {
$debuggers{$k}->{pre}->(); $debuggers{$k}->{pre}->();
delete $debuggers{$k}->{pre}; delete $debuggers{$k}->{pre};
} }
if ($opt eq $k) {
$options{$opt}= $val;
$client_options{$opt}= $val
if $embedded;
} elsif ($opt eq "manual-$k") {
$options{$opt}= $val;
} elsif ($opt eq "boot-$k") {
$boot_options{$opt}= $val;
} elsif ($opt eq "client-$k") {
$client_options{$opt}= $val;
}
} }
} }
} }
if ((keys %options) > 1) {
mtr_error "Multiple debuggers specified: ",
join (" ", map { "--$_" } keys %options);
}
if ((keys %boot_options) > 1) {
mtr_error "Multiple boot debuggers specified: ",
join (" ", map { "--$_" } keys %boot_options);
}
if ((keys %client_options) > 1) {
mtr_error "Multiple client debuggers specified: ",
join (" ", map { "--$_" } keys %client_options);
}
$debugger= (keys %options)[0];
$boot_debugger= (keys %boot_options)[0];
$client_debugger= (keys %client_options)[0];
if ($used) { if ($used) {
$ENV{ASAN_OPTIONS}= 'abort_on_error=1:'.($ENV{ASAN_OPTIONS} || ''); $ENV{ASAN_OPTIONS}= 'abort_on_error=1:'.($ENV{ASAN_OPTIONS} || '');
::mtr_error("Can't use --extern when using debugger") if $ENV{USE_RUNNING_SERVER}; ::mtr_error("Can't use --extern when using debugger") if $ENV{USE_RUNNING_SERVER};
@ -219,49 +261,20 @@ sub pre_setup() {
sub setup_boot_args($$$) { sub setup_boot_args($$$) {
my ($args, $exe, $input) = @_; my ($args, $exe, $input) = @_;
my $found; do_args($args, $exe, $input, 'bootstrap', $boot_debugger)
if defined $boot_debugger;
for my $k (keys %debuggers) {
if ($opt_vals{"boot-$k"}) {
die "--boot-$k and --$found cannot be used at the same time\n" if $found;
$found="boot-$k";
do_args($args, $exe, $input, 'bootstrap', $found);
}
}
} }
sub setup_client_args($$) { sub setup_client_args($$) {
my ($args, $exe) = @_; my ($args, $exe) = @_;
my $found; do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', 'client', $client_debugger)
my $embedded = $::opt_embedded_server ? ' with --embedded' : ''; if defined $client_debugger;
for my $k (keys %debuggers) {
my @opt_names=("client-$k");
push @opt_names, $k if $embedded;
for my $opt (@opt_names) {
if ($opt_vals{$opt}) {
die "--$opt and --$found cannot be used at the same time$embedded\n" if $found;
$found=$opt;
do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', 'client', $found);
}
}
}
} }
sub setup_args($$$) { sub setup_args($$$) {
my ($args, $exe, $type) = @_; my ($args, $exe, $type) = @_;
my $found; do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', $type, $debugger)
if defined $debugger;
for my $k (keys %debuggers) {
for my $opt ($k, "manual-$k") {
if ($opt_vals{$opt}) {
die "--$opt and --$found cannot be used at the same time\n" if $found;
$found=$opt;
do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', $type, $found);
}
}
}
} }
1; 1;

View File

@ -87,7 +87,7 @@ sub init_pattern {
# separator betwen suite and testname), make the pattern match # separator betwen suite and testname), make the pattern match
# beginning of string # beginning of string
$from= "^$from"; $from= "^$from";
mtr_verbose("$what='$from'"); mtr_verbose2("$what='$from'");
} }
# Check that pattern is a valid regex # Check that pattern is a valid regex
eval { "" =~/$from/; 1 } or eval { "" =~/$from/; 1 } or
@ -293,7 +293,7 @@ sub combinations_from_file($$)
return () if @::opt_combinations or not -f $filename; return () if @::opt_combinations or not -f $filename;
return () if ::using_extern(); return () if ::using_extern();
# Read combinations file in my.cnf format # Read combinations file in my.cnf format
mtr_verbose("Read combinations file $filename"); mtr_verbose2("Read combinations file $filename");
my $config= My::Config->new($filename); my $config= My::Config->new($filename);
foreach my $group ($config->option_groups()) { foreach my $group ($config->option_groups()) {
my $comb= { name => $group->name(), comb_opt => [] }; my $comb= { name => $group->name(), comb_opt => [] };
@ -427,9 +427,9 @@ sub collect_suite_name($$)
sub collect_one_suite { sub collect_one_suite {
my ($opt_cases, $suitename, $over, $suitedir, @overlays) = @_; my ($opt_cases, $suitename, $over, $suitedir, @overlays) = @_;
mtr_verbose("Collecting: $suitename"); mtr_verbose2("Collecting: $suitename");
mtr_verbose("suitedir: $suitedir"); mtr_verbose2("suitedir: $suitedir");
mtr_verbose("overlays: @overlays") if @overlays; mtr_verbose2("overlays: @overlays") if @overlays;
# we always need to process the parent suite, even if we won't use any # we always need to process the parent suite, even if we won't use any
# test from it. # test from it.
@ -501,8 +501,8 @@ sub process_suite {
$suite->{rdir} = -d $rdir ? $rdir : $suite->{tdir}; $suite->{rdir} = -d $rdir ? $rdir : $suite->{tdir};
} }
mtr_verbose("testdir: " . $suite->{tdir}); mtr_verbose2("testdir: " . $suite->{tdir});
mtr_verbose( "resdir: " . $suite->{rdir}); mtr_verbose2( "resdir: " . $suite->{rdir});
# disabled.def # disabled.def
parse_disabled($suite->{dir} .'/disabled.def', $suitename); parse_disabled($suite->{dir} .'/disabled.def', $suitename);
@ -512,7 +512,7 @@ sub process_suite {
if (@::opt_combinations) if (@::opt_combinations)
{ {
# take the combination from command-line # take the combination from command-line
mtr_verbose("Take the combination from command line"); mtr_verbose2("Take the combination from command line");
foreach my $combination (@::opt_combinations) { foreach my $combination (@::opt_combinations) {
my $comb= {}; my $comb= {};
$comb->{name}= $combination; $comb->{name}= $combination;

View File

@ -46,7 +46,7 @@ sub mtr_ping_port ($);
sub mtr_ping_port ($) { sub mtr_ping_port ($) {
my $port= shift; my $port= shift;
mtr_verbose("mtr_ping_port: $port"); mtr_verbose2("mtr_ping_port: $port");
if (IS_WINDOWS && USE_NETPING) if (IS_WINDOWS && USE_NETPING)
{ {
@ -56,12 +56,12 @@ sub mtr_ping_port ($) {
$ping->port_number($port); $ping->port_number($port);
if ($ping->ping("localhost",0.1)) if ($ping->ping("localhost",0.1))
{ {
mtr_verbose("USED"); mtr_verbose2("USED");
return 1; return 1;
} }
else else
{ {
mtr_verbose("FREE"); mtr_verbose2("FREE");
return 0; return 0;
} }
} }
@ -84,12 +84,12 @@ sub mtr_ping_port ($) {
if ( connect(SOCK, $paddr) ) if ( connect(SOCK, $paddr) )
{ {
close(SOCK); # FIXME check error? close(SOCK); # FIXME check error?
mtr_verbose("USED"); mtr_verbose2("USED");
return 1; return 1;
} }
else else
{ {
mtr_verbose("FREE"); mtr_verbose2("FREE");
return 0; return 0;
} }
} }

View File

@ -27,7 +27,7 @@ use Sys::Hostname;
use base qw(Exporter); use base qw(Exporter);
our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
mtr_print_header mtr_report mtr_report_stats mtr_print_header mtr_report mtr_report_stats
mtr_warning mtr_error mtr_debug mtr_verbose mtr_warning mtr_error mtr_debug mtr_verbose mtr_verbose2
mtr_verbose_restart mtr_report_test_passed mtr_verbose_restart mtr_report_test_passed
mtr_report_test_skipped mtr_print mtr_report_test_skipped mtr_print
mtr_report_test isotime); mtr_report_test isotime);
@ -716,6 +716,15 @@ sub mtr_verbose (@) {
} }
sub mtr_verbose2 (@) {
if ( $verbose > 1 )
{
print STDERR _name(). _timestamp().
"> ".join(" ", @_)."\n";
}
}
sub mtr_verbose_restart (@) { sub mtr_verbose_restart (@) {
my ($server, @args)= @_; my ($server, @args)= @_;
my $proc= $server->{proc}; my $proc= $server->{proc};

View File

@ -126,19 +126,19 @@ sub collect_test_cases ($) {
{ {
my $base_name= $1; my $base_name= $1;
my $idx= $2; my $idx= $2;
mtr_verbose("$test_name => $base_name idx=$idx"); mtr_verbose2("$test_name => $base_name idx=$idx");
if ( $idx > 1 ) if ( $idx > 1 )
{ {
$idx-= 1; $idx-= 1;
$base_name= "$base_name$idx"; $base_name= "$base_name$idx";
mtr_verbose("New basename $base_name"); mtr_verbose2("New basename $base_name");
} }
foreach my $tinfo2 (@$cases) foreach my $tinfo2 (@$cases)
{ {
if ( $tinfo2->{'name'} eq $base_name ) if ( $tinfo2->{'name'} eq $base_name )
{ {
mtr_verbose("found dependent test $tinfo2->{'name'}"); mtr_verbose2("found dependent test $tinfo2->{'name'}");
$depend_on_test_name=$base_name; $depend_on_test_name=$base_name;
} }
} }
@ -146,7 +146,7 @@ sub collect_test_cases ($) {
if ( defined $depend_on_test_name ) if ( defined $depend_on_test_name )
{ {
mtr_verbose("Giving $test_name same critera as $depend_on_test_name"); mtr_verbose2("Giving $test_name same critera as $depend_on_test_name");
$sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name}; $sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name};
} }
else else
@ -224,14 +224,14 @@ sub collect_one_suite($)
my $suite= shift; # Test suite name my $suite= shift; # Test suite name
my @cases; # Array of hash my @cases; # Array of hash
mtr_verbose("Collecting: $suite"); mtr_verbose2("Collecting: $suite");
my $suitedir= "$::glob_mysql_test_dir"; # Default my $suitedir= "$::glob_mysql_test_dir"; # Default
if ( $suite ne "main" ) if ( $suite ne "main" )
{ {
$suitedir= mtr_path_exists("$suitedir/suite/$suite", $suitedir= mtr_path_exists("$suitedir/suite/$suite",
"$suitedir/$suite"); "$suitedir/$suite");
mtr_verbose("suitedir: $suitedir"); mtr_verbose2("suitedir: $suitedir");
} }
my $testdir= "$suitedir/t"; my $testdir= "$suitedir/t";
@ -363,7 +363,7 @@ sub collect_one_suite($)
if (@::opt_combinations) if (@::opt_combinations)
{ {
# take the combination from command-line # take the combination from command-line
mtr_verbose("Take the combination from command line"); mtr_verbose2("Take the combination from command line");
foreach my $combination (@::opt_combinations) { foreach my $combination (@::opt_combinations) {
my $comb= {}; my $comb= {};
$comb->{name}= $combination; $comb->{name}= $combination;
@ -374,7 +374,7 @@ sub collect_one_suite($)
elsif (-f $combination_file ) elsif (-f $combination_file )
{ {
# Read combinations file in my.cnf format # Read combinations file in my.cnf format
mtr_verbose("Read combinations file"); mtr_verbose2("Read combinations file");
my $config= My::Config->new($combination_file); my $config= My::Config->new($combination_file);
foreach my $group ($config->groups()) { foreach my $group ($config->groups()) {
@ -605,7 +605,7 @@ sub collect_one_test_case($$$$$$$$$) {
# Add suite opts # Add suite opts
foreach my $opt ( @$suite_opts ) foreach my $opt ( @$suite_opts )
{ {
mtr_verbose($opt); mtr_verbose2($opt);
push(@{$tinfo->{'master_opt'}}, $opt); push(@{$tinfo->{'master_opt'}}, $opt);
push(@{$tinfo->{'slave_opt'}}, $opt); push(@{$tinfo->{'slave_opt'}}, $opt);
} }

View File

@ -80,7 +80,7 @@ sub mtr_timer_start($$$) {
if ( $tpid ) if ( $tpid )
{ {
# Parent, record the information # Parent, record the information
mtr_verbose("Starting timer for '$name',", mtr_verbose2("Starting timer for '$name',",
"duration: $duration, pid: $tpid"); "duration: $duration, pid: $tpid");
$timers->{'timers'}->{$name}->{'pid'}= $tpid; $timers->{'timers'}->{$name}->{'pid'}= $tpid;
$timers->{'timers'}->{$name}->{'duration'}= $duration; $timers->{'timers'}->{$name}->{'duration'}= $duration;
@ -96,13 +96,13 @@ sub mtr_timer_start($$$) {
$SIG{INT}= 'DEFAULT'; $SIG{INT}= 'DEFAULT';
$SIG{TERM}= sub { $SIG{TERM}= sub {
mtr_verbose("timer $$ woke up, exiting!"); mtr_verbose2("timer $$ woke up, exiting!");
exit(0); exit(0);
}; };
$0= "mtr_timer(timers,$name,$duration)"; $0= "mtr_timer(timers,$name,$duration)";
sleep($duration); sleep($duration);
mtr_verbose("timer $$ expired after $duration seconds"); mtr_verbose2("timer $$ expired after $duration seconds");
exit(0); exit(0);
} }
} }

View File

@ -161,32 +161,32 @@ EmployeeID SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(30) NOT NULL CHECK (CHAR_LENGTH(FirstName > 2)) FirstName VARCHAR(30) NOT NULL CHECK (CHAR_LENGTH(FirstName > 2))
); );
INSERT INTO t1 VALUES (NULL, 'Ken'); INSERT INTO t1 VALUES (NULL, 'Ken');
ERROR 22007: Truncated incorrect DOUBLE value: 'Ken' ERROR 22007: Truncated incorrect DECIMAL value: 'Ken'
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Error 1292 Truncated incorrect DOUBLE value: 'Ken' Error 1292 Truncated incorrect DECIMAL value: 'Ken'
Error 4025 CONSTRAINT `t1.FirstName` failed for `test`.`t1` Error 4025 CONSTRAINT `t1.FirstName` failed for `test`.`t1`
INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian'); INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
ERROR 22007: Truncated incorrect DOUBLE value: 'Ken' ERROR 22007: Truncated incorrect DECIMAL value: 'Ken'
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Error 1292 Truncated incorrect DOUBLE value: 'Ken' Error 1292 Truncated incorrect DECIMAL value: 'Ken'
Error 4025 CONSTRAINT `t1.FirstName` failed for `test`.`t1` Error 4025 CONSTRAINT `t1.FirstName` failed for `test`.`t1`
INSERT IGNORE INTO t1 VALUES (NULL, 'Ken'); INSERT IGNORE INTO t1 VALUES (NULL, 'Ken');
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken' Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
INSERT IGNORE INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian'); INSERT IGNORE INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken' Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
Warning 1292 Truncated incorrect DOUBLE value: 'Brian' Warning 1292 Truncated incorrect DECIMAL value: 'Brian'
set sql_mode=""; set sql_mode="";
INSERT INTO t1 VALUES (NULL, 'Ken'); INSERT INTO t1 VALUES (NULL, 'Ken');
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken' Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian'); INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken' Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
Warning 1292 Truncated incorrect DOUBLE value: 'Brian' Warning 1292 Truncated incorrect DECIMAL value: 'Brian'
set sql_mode=default; set sql_mode=default;
select * from t1; select * from t1;
EmployeeID FirstName EmployeeID FirstName
@ -240,13 +240,13 @@ drop table t1;
# #
create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ; create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'x111' Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select * from t1; select * from t1;
v1 v1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'x111' Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select v1 from t1; select v1 from t1;
v1 v1
select * from t1; select * from t1;
@ -260,8 +260,8 @@ flush tables;
select * from t1; select * from t1;
v1 v1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'x111' Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select * from t1; select * from t1;
v1 v1
deallocate prepare stmt; deallocate prepare stmt;

View File

@ -47,11 +47,11 @@ insert into t1 values (0x01,0x01);
select * from t1 where a=b; select * from t1 where a=b;
a b a b
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x01' Warning 1292 Truncated incorrect DECIMAL value: '\x01'
select * from t1 where a=b and b=0x01; select * from t1 where a=b and b=0x01;
a b a b
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x01' Warning 1292 Truncated incorrect DECIMAL value: '\x01'
drop table if exists t1; drop table if exists t1;
CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill); CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill);
INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2); INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2);

View File

@ -0,0 +1,2 @@
create table `...................................................`(i int);
ERROR HY000: Can't create table `test`.`...................................................` (errno: 38 "Filename too long")

View File

@ -0,0 +1,10 @@
--source include/windows.inc
# MDEV-28746 Wrong error code ER_BAD_DB_ERROR for long filenames
# There are 51 dots in the table name below, with every dot encoded with 5
# bytes in "mysql file name encoding", making the filename length 255 byte.
# Adding drive and extension makes it exceed MAX_PATH= 260 bytes
let $t = `SELECT(REPEAT('.',51))`;
--error ER_CANT_CREATE_TABLE
eval create table `$t`(i int);

View File

@ -3373,17 +3373,17 @@ SELECT * FROM t1 WHERE a IN (1,2,3);
a a
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1'; SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1';
a a
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM t1 WHERE a IN (1,2,3,'4') AND a=' 1'; SELECT * FROM t1 WHERE a IN (1,2,3,'4') AND a=' 1';
a a
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1'; EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1';
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where

View File

@ -10291,7 +10291,7 @@ SELECT * FROM t1 WHERE a=10;
a a
1e1 1e1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1é1' Warning 1292 Truncated incorrect DECIMAL value: '1é1'
SELECT * FROM t1 WHERE a='1e1'; SELECT * FROM t1 WHERE a='1e1';
a a
1e1 1e1
@ -10300,12 +10300,12 @@ SELECT * FROM t1 WHERE a=10 AND a='1e1';
a a
1e1 1e1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1é1' Warning 1292 Truncated incorrect DECIMAL value: '1é1'
SELECT * FROM t1 WHERE (a,a)=(10,'1e1'); SELECT * FROM t1 WHERE (a,a)=(10,'1e1');
a a
1e1 1e1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1é1' Warning 1292 Truncated incorrect DECIMAL value: '1é1'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a,a)=(10,'1e1'); EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a,a)=(10,'1e1');
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
@ -10322,17 +10322,17 @@ SELECT * FROM t1 WHERE a IN (1,2);
a a
1ë1 1ë1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1ë1' Warning 1292 Truncated incorrect DECIMAL value: '1ë1'
SELECT * FROM t1 WHERE a IN (1,2) AND a='1ë1'; SELECT * FROM t1 WHERE a IN (1,2) AND a='1ë1';
a a
1ë1 1ë1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1ë1' Warning 1292 Truncated incorrect DECIMAL value: '1ë1'
SELECT * FROM t1 WHERE a IN (1,2,'x') AND a='1ë1'; SELECT * FROM t1 WHERE a IN (1,2,'x') AND a='1ë1';
a a
1ë1 1ë1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1ë1' Warning 1292 Truncated incorrect DECIMAL value: '1ë1'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2) AND a='1ë1'; EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2) AND a='1ë1';
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where

View File

@ -510,3 +510,12 @@ a b
2 2 2 2
3 3 3 3
drop table t1; drop table t1;
#
# MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and
# spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs
# and inline_mysql_mutex_lock)
#
CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM;
INSERT DELAYED INTO t1 VALUES (0);
INSERT DELAYED INTO t1 VALUES (0);
DROP TABLE t1;

View File

@ -642,3 +642,15 @@ insert delayed into t1 values (3,3);
flush tables t1; flush tables t1;
select * from t1; select * from t1;
drop table t1; drop table t1;
--echo #
--echo # MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and
--echo # spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs
--echo # and inline_mysql_mutex_lock)
--echo #
CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM;
INSERT DELAYED INTO t1 VALUES (0);
INSERT DELAYED INTO t1 VALUES (0);
DROP TABLE t1;

View File

@ -677,13 +677,13 @@ a
A A
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A' Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT DISTINCT a FROM t1 WHERE a=0; SELECT DISTINCT a FROM t1 WHERE a=0;
a a
A A
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A' Warning 1292 Truncated incorrect DECIMAL value: 'A'
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a DATE); CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06'); INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06');

View File

@ -774,28 +774,28 @@ SELECT 'a' IN ('a',2);
1 1
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT 'a' IN ('a',2,NULL); SELECT 'a' IN ('a',2,NULL);
'a' IN ('a',2,NULL) 'a' IN ('a',2,NULL)
1 1
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT 'a' NOT IN ('a',2); SELECT 'a' NOT IN ('a',2);
'a' NOT IN ('a',2) 'a' NOT IN ('a',2)
0 0
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT 'a' NOT IN ('a',2,NULL); SELECT 'a' NOT IN ('a',2,NULL);
'a' NOT IN ('a',2,NULL) 'a' NOT IN ('a',2,NULL)
0 0
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT TIME'10:20:30' IN (1,TIME'10:20:30'); SELECT TIME'10:20:30' IN (1,TIME'10:20:30');
TIME'10:20:30' IN (1,TIME'10:20:30') TIME'10:20:30' IN (1,TIME'10:20:30')
@ -999,25 +999,25 @@ SELECT a IN (1,'1') FROM t1;
a IN (1,'1') a IN (1,'1')
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint) Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a IN (1,'1',NULL) FROM t1; SELECT a IN (1,'1',NULL) FROM t1;
a IN (1,'1',NULL) a IN (1,'1',NULL)
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint) Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a NOT IN (1,'1') FROM t1; SELECT a NOT IN (1,'1') FROM t1;
a NOT IN (1,'1') a NOT IN (1,'1')
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint) Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a NOT IN (1,'1',NULL) FROM t1; SELECT a NOT IN (1,'1',NULL) FROM t1;
a NOT IN (1,'1',NULL) a NOT IN (1,'1',NULL)
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint) Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a IN (1,TIME'10:20:30') FROM t1; SELECT a IN (1,TIME'10:20:30') FROM t1;
a IN (1,TIME'10:20:30') a IN (1,TIME'10:20:30')
@ -1197,7 +1197,7 @@ SELECT a IN ('a',1) FROM t1;
a IN ('a',1) a IN ('a',1)
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a IN ('a',TIME'10:20:30') FROM t1; SELECT a IN ('a',TIME'10:20:30') FROM t1;
a IN ('a',TIME'10:20:30') a IN ('a',TIME'10:20:30')
@ -1209,7 +1209,7 @@ SELECT a NOT IN ('a',1) FROM t1;
a NOT IN ('a',1) a NOT IN ('a',1)
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double) Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a NOT IN ('a',TIME'10:20:30') FROM t1; SELECT a NOT IN ('a',TIME'10:20:30') FROM t1;
a NOT IN ('a',TIME'10:20:30') a NOT IN ('a',TIME'10:20:30')
@ -1581,7 +1581,7 @@ A NULL
B NULL B NULL
Warnings: Warnings:
Note 1105 DBUG: [0] arg=2 handler=0 (longblob) Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double) Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN ('A',b,10); SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN ('A',b,10);
a b a b
@ -1589,30 +1589,30 @@ A NULL
B NULL B NULL
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double) Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (b,a,10); SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (b,a,10);
a b a b
A NULL A NULL
Warnings: Warnings:
Note 1105 DBUG: [0] arg=2 handler=0 (longblob) Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double) Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
Note 1105 DBUG: [0] arg=2 handler=0 (longblob) Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double) Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
Warning 1292 Truncated incorrect DOUBLE value: 'A' Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (a,b,10); SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (a,b,10);
a b a b
A NULL A NULL
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double) Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
Note 1105 DBUG: [0] arg=1 handler=0 (longblob) Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double) Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no Note 1105 DBUG: types_compatible=no bisect=no
Warning 1292 Truncated incorrect DOUBLE value: 'A' Warning 1292 Truncated incorrect DECIMAL value: 'A'
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-11497 Wrong result for (int_expr IN (mixture of signed and unsigned expressions)) # MDEV-11497 Wrong result for (int_expr IN (mixture of signed and unsigned expressions))
@ -1930,20 +1930,20 @@ SELECT '0x' IN (0);
'0x' IN (0) '0x' IN (0)
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT '0x' IN (0,1); SELECT '0x' IN (0,1);
'0x' IN (0,1) '0x' IN (0,1)
1 1
Warnings: Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (double) Note 1105 DBUG: [0] arg=1 handler=0 (decimal)
Note 1105 DBUG: [1] arg=2 handler=0 (double) Note 1105 DBUG: [1] arg=2 handler=0 (decimal)
Note 1105 DBUG: types_compatible=yes bisect=yes Note 1105 DBUG: types_compatible=yes bisect=yes
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1)); SELECT ('0x',1) IN ((0,1));
('0x',1) IN ((0,1)) ('0x',1) IN ((0,1))
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1),(1,1)); SELECT ('0x',1) IN ((0,1),(1,1));
('0x',1) IN ((0,1),(1,1)) ('0x',1) IN ((0,1),(1,1))
1 1
@ -1954,13 +1954,13 @@ Note 1105 DBUG: ROW(3 args) level=0
Note 1105 DBUG: [0,0] handler=varchar Note 1105 DBUG: [0,0] handler=varchar
Note 1105 DBUG: [0,1] handler=int Note 1105 DBUG: [0,1] handler=int
Note 1105 DBUG: [0,2] handler=int Note 1105 DBUG: [0,2] handler=int
Note 1105 DBUG: => handler=double Note 1105 DBUG: => handler=decimal
Note 1105 DBUG: [1,0] handler=int Note 1105 DBUG: [1,0] handler=int
Note 1105 DBUG: [1,1] handler=int Note 1105 DBUG: [1,1] handler=int
Note 1105 DBUG: [1,2] handler=int Note 1105 DBUG: [1,2] handler=int
Note 1105 DBUG: => handler=bigint Note 1105 DBUG: => handler=bigint
Note 1105 DBUG: types_compatible=yes bisect=yes Note 1105 DBUG: types_compatible=yes bisect=yes
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SET SESSION debug_dbug="-d,Predicant_to_list_comparator"; SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
SET SESSION debug_dbug="-d,Item_func_in"; SET SESSION debug_dbug="-d,Item_func_in";
SET SESSION debug_dbug="-d,cmp_item"; SET SESSION debug_dbug="-d,cmp_item";

View File

@ -63,7 +63,7 @@ select nullif(1,'test');
nullif(1,'test') nullif(1,'test')
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test' Warning 1292 Truncated incorrect DECIMAL value: 'test'
select NULLIF(NULL,NULL), NULLIF(NULL,1), NULLIF(NULL,1.0), NULLIF(NULL,"test"); select NULLIF(NULL,NULL), NULLIF(NULL,1), NULLIF(NULL,1.0), NULLIF(NULL,"test");
NULLIF(NULL,NULL) NULLIF(NULL,1) NULLIF(NULL,1.0) NULLIF(NULL,"test") NULLIF(NULL,NULL) NULLIF(NULL,1) NULLIF(NULL,1.0) NULLIF(NULL,"test")
NULL NULL NULL NULL NULL NULL NULL NULL

View File

@ -470,7 +470,7 @@ HEX(a)
7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFE
7FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'abc' Warning 1292 Truncated incorrect DECIMAL value: 'abc'
CREATE TABLE t3 (a BIGINT UNSIGNED); CREATE TABLE t3 (a BIGINT UNSIGNED);
INSERT INTO t3 VALUES (9223372036854775551); INSERT INTO t3 VALUES (9223372036854775551);
SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42); SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42);
@ -498,21 +498,21 @@ f1
a a
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
select f1, case f1 when 'a' then '+' when 1 then '-' end from t1; select f1, case f1 when 'a' then '+' when 1 then '-' end from t1;
f1 case f1 when 'a' then '+' when 1 then '-' end f1 case f1 when 'a' then '+' when 1 then '-' end
a + a +
b NULL b NULL
1 - 1 -
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
create index t1f1_idx on t1(f1); create index t1f1_idx on t1(f1);
select f1 from t1 where f1 in ('a',1); select f1 from t1 where f1 in ('a',1);
f1 f1
1 1
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f1 from t1 where f1 in ('a',1); explain select f1 from t1 where f1 in ('a',1);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index 1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
@ -527,8 +527,8 @@ select f1 from t1 where f1 in (2,1);
f1 f1
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f1 from t1 where f1 in (2,1); explain select f1 from t1 where f1 in (2,1);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index 1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
@ -539,9 +539,9 @@ f2
0 0
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
explain select f2 from t2 where f2 in ('a',2); explain select f2 from t2 where f2 in ('a',2);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index 1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
@ -549,21 +549,21 @@ select f2 from t2 where f2 in ('a','b');
f2 f2
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f2 from t2 where f2 in ('a','b'); explain select f2 from t2 where f2 in ('a','b');
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range t2f2 t2f2 5 NULL 1 Using where; Using index 1 SIMPLE t2 range t2f2 t2f2 5 NULL 1 Using where; Using index
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
select f2 from t2 where f2 in (1,'b'); select f2 from t2 where f2 in (1,'b');
f2 f2
0 0
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f2 from t2 where f2 in (1,'b'); explain select f2 from t2 where f2 in (1,'b');
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index 1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
@ -925,22 +925,22 @@ SELECT '0x' IN (0);
'0x' IN (0) '0x' IN (0)
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT '0x' IN (0,1); SELECT '0x' IN (0,1);
'0x' IN (0,1) '0x' IN (0,1)
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1)); SELECT ('0x',1) IN ((0,1));
('0x',1) IN ((0,1)) ('0x',1) IN ((0,1))
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1),(1,1)); SELECT ('0x',1) IN ((0,1),(1,1));
('0x',1) IN ((0,1),(1,1)) ('0x',1) IN ((0,1),(1,1))
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '0x' Warning 1292 Truncated incorrect DECIMAL value: '0x'
# #
# End of 10.4 tests # End of 10.4 tests
# #

View File

@ -425,9 +425,7 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
y y
0 0
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'str1' Warning 1292 Truncated incorrect DECIMAL value: 'str1'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'str2' Warning 1292 Truncated incorrect DECIMAL value: 'str2'
SELECT c DIV 900 y FROM t1 GROUP BY y; SELECT c DIV 900 y FROM t1 GROUP BY y;
y y

View File

@ -303,7 +303,7 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
COALESCE(a) = COALESCE(b) COALESCE(a) = COALESCE(b)
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
DROP TABLE t1; DROP TABLE t1;
# #
# Bug #54461: crash with longblob and union or update with subquery # Bug #54461: crash with longblob and union or update with subquery

View File

@ -377,7 +377,7 @@ select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("
position("0" in "baaa" in (1)) position("0" in "1" in (1,2,3)) position("sql" in ("mysql")) position("0" in "baaa" in (1)) position("0" in "1" in (1,2,3)) position("sql" in ("mysql"))
1 0 3 1 0 3
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'baaa' Warning 1292 Truncated incorrect DECIMAL value: 'baaa'
select position(("1" in (1,2,3)) in "01"); select position(("1" in (1,2,3)) in "01");
position(("1" in (1,2,3)) in "01") position(("1" in (1,2,3)) in "01")
2 2
@ -1189,12 +1189,12 @@ SELECT * FROM t1, t2 WHERE num=str;
str num str num
notnumber 0 notnumber 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'notnumber' Warning 1292 Truncated incorrect DECIMAL value: 'notnumber'
SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6); SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6);
str num str num
notnumber 0 notnumber 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'notnum' Warning 1292 Truncated incorrect DECIMAL value: 'notnum'
DROP TABLE t1,t2; DROP TABLE t1,t2;
CREATE TABLE t1( CREATE TABLE t1(
id int(11) NOT NULL auto_increment, id int(11) NOT NULL auto_increment,

View File

@ -1654,8 +1654,8 @@ SELECT 1 FROM g1 WHERE a >= ANY
(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ; (SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ;
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
DROP TABLE g1; DROP TABLE g1;
# #
# Bug#16451878 GEOMETRY QUERY CRASHES SERVER # Bug#16451878 GEOMETRY QUERY CRASHES SERVER

View File

@ -829,11 +829,11 @@ set sql_mode='';
SELECT a FROM t1 HAVING 'a' > 1; SELECT a FROM t1 HAVING 'a' > 1;
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT a FROM t1 HAVING "a" > 1; SELECT a FROM t1 HAVING "a" > 1;
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT a FROM t1 HAVING `a` > 1; SELECT a FROM t1 HAVING `a` > 1;
a a
2 2
@ -2334,17 +2334,17 @@ field1 field2
2004-10-11 18:13:00 1 2004-10-11 18:13:00 1
2009-02-19 02:05:00 5 2009-02-19 02:05:00 5
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'g' Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1292 Truncated incorrect DOUBLE value: 'o' Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
SELECT alias2.f3 AS field1 , alias2.f1 AS field2 FROM t1 AS alias1 JOIN t1 AS alias2 ON alias2.f1 = alias1.f2 AND alias2.f1 != alias1.f4 GROUP BY field1 , field2 ; SELECT alias2.f3 AS field1 , alias2.f1 AS field2 FROM t1 AS alias1 JOIN t1 AS alias2 ON alias2.f1 = alias1.f2 AND alias2.f1 != alias1.f4 GROUP BY field1 , field2 ;
field1 field2 field1 field2
2004-10-11 18:13:00 1 2004-10-11 18:13:00 1
2009-02-19 02:05:00 5 2009-02-19 02:05:00 5
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'g' Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1292 Truncated incorrect DOUBLE value: 'o' Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
SET SESSION SQL_MODE=default; SET SESSION SQL_MODE=default;
drop table t1; drop table t1;
# #

View File

@ -3309,11 +3309,11 @@ b min(a)
d 7 d 7
f 7 f 7
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'g' Warning 1292 Truncated incorrect DECIMAL value: 'g'
explain explain
SELECT b, min(a) FROM t1 WHERE (a > '0' AND (a > '1' OR b = 'd')) GROUP BY b; SELECT b, min(a) FROM t1 WHERE (a > '0' AND (a > '1' OR b = 'd')) GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra

View File

@ -524,7 +524,7 @@ ORDER BY t1.f2;
MAX(t2.f2) MAX(t2.f2)
NULL NULL
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE t1,t2; DROP TABLE t1,t2;
End of 5.0 tests End of 5.0 tests
# #
@ -858,13 +858,13 @@ bar
SELECT DEFAULT(f) AS h FROM t1 HAVING h > 5; SELECT DEFAULT(f) AS h FROM t1 HAVING h > 5;
h h
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A' Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT DEFAULT(f) AS h FROM t1 HAVING h >= 0; SELECT DEFAULT(f) AS h FROM t1 HAVING h >= 0;
h h
A A
A A
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A' Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT DEFAULT(f) AS h FROM t1 HAVING h >= 'A'; SELECT DEFAULT(f) AS h FROM t1 HAVING h >= 'A';
h h
A A
@ -892,7 +892,7 @@ HAVING t.f != 112 AND t.f = 'x' AND t.f != 'a';
f f
x x
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
DROP TABLE t1,t2; DROP TABLE t1,t2;
# #
# MDEV-20200: AddressSanitizer: use-after-poison in # MDEV-20200: AddressSanitizer: use-after-poison in

View File

@ -4933,11 +4933,11 @@ i
SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0); SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
i i
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0); SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0);
i i
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-28080: HAVING with NOT EXIST predicate in an equality # MDEV-28080: HAVING with NOT EXIST predicate in an equality

View File

@ -726,7 +726,7 @@ SET sql_mode= 'STRICT_ALL_TABLES';
CREATE TABLE t1 (f1 INT DEFAULT 0, f2 INT); CREATE TABLE t1 (f1 INT DEFAULT 0, f2 INT);
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
REPLACE INTO v1 SET f2 = 1; REPLACE INTO v1 SET f2 = 1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x' ERROR 22007: Truncated incorrect DECIMAL value: 'x'
SELECT * from t1; SELECT * from t1;
f1 f2 f1 f2
drop view v1; drop view v1;
@ -739,7 +739,7 @@ drop view v1;
SELECT 0,0 INTO OUTFILE 't1.txt'; SELECT 0,0 INTO OUTFILE 't1.txt';
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION; CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
LOAD DATA INFILE 't1.txt' INTO TABLE v1; LOAD DATA INFILE 't1.txt' INTO TABLE v1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x' ERROR 22007: Truncated incorrect DECIMAL value: 'x'
SELECT * from t1; SELECT * from t1;
f1 f2 f1 f2
drop view v1; drop view v1;
@ -751,7 +751,7 @@ SET @@sql_mode= @save_mode;
CREATE TABLE t1 (f INT); CREATE TABLE t1 (f INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION; CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
REPLACE INTO v1 SET f = NULL; REPLACE INTO v1 SET f = NULL;
ERROR 22007: Truncated incorrect DOUBLE value: 'foo' ERROR 22007: Truncated incorrect DECIMAL value: 'foo'
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
# #

View File

@ -883,4 +883,74 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
Warnings: Warnings:
Warning 1264 Out of range value for column 'a' at row 4 Warning 1264 Out of range value for column 'a' at row 4
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a) SELECT SUM(1);
INSERT INTO t1 (a, b) SELECT AVG(2), MIN(3);
INSERT INTO t1 (b) SELECT AVG('x') OVER ();
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
INSERT INTO t1 SELECT MIN(7) OVER (), MAX(8) OVER();
SELECT * FROM t1;
a b
1 NULL
2 3
7 8
PREPARE stmt FROM 'INSERT INTO t1 (a) SELECT AVG(?)';
EXECUTE stmt USING 9;
EXECUTE stmt USING 10;
PREPARE stmt FROM 'INSERT INTO t1 SELECT MIN(?), MAX(?)';
EXECUTE stmt USING 11, 12;
EXECUTE stmt USING 13, 14;
DEALLOCATE PREPARE stmt;
SELECT * FROM t1;
a b
1 NULL
2 3
7 8
9 NULL
10 NULL
11 12
13 14
CREATE PROCEDURE p1(param_a INT, param_b INT)
BEGIN
INSERT INTO t1 SELECT MIN(param_a) OVER (), MAX(param_b);
END//
CALL p1(21, 22);
CALL p1(23, 24);
SELECT * FROM t1;
a b
1 NULL
2 3
7 8
9 NULL
10 NULL
11 12
13 14
21 22
23 24
CREATE TABLE t2 (
a DECIMAL UNIQUE CHECK (CASE 0 * 27302337.000000 WHEN 34 THEN
+ 'x' LIKE 'x' OR a NOT IN (-1 / TRUE ^ 2) ELSE 7105743.000000 END));
INSERT INTO t2 VALUES (90),( -1),(31152443.000000),(-32768),(NULL),(NULL);
INSERT INTO t2 SELECT AVG('x') OVER (
PARTITION BY ((NOT AVG(76698761.000000))) IS NOT NULL);
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
INSERT IGNORE INTO t2 () VALUES (0),('x'),(3751286.000000),
('x'),((a = 'x' AND 0 AND 0));
Warnings:
Warning 1366 Incorrect decimal value: 'x' for column `test`.`t2`.`a` at row 2
Warning 1062 Duplicate entry '0' for key 'a'
Warning 1366 Incorrect decimal value: 'x' for column `test`.`t2`.`a` at row 4
Warning 1062 Duplicate entry '0' for key 'a'
Warning 1062 Duplicate entry '0' for key 'a'
INSERT INTO t2 VALUES (127);
INSERT INTO t2 SELECT -2147483648 END FROM t2 AS TEXT JOIN t2 JOIN t2 TABLES;
ERROR 23000: Duplicate entry '-2147483648' for key 'a'
ALTER TABLE t2 ADD (
b INT UNIQUE CHECK ((a = 'x' AND ((-(+(BINARY 49730460.000000)))) = 'x'
BETWEEN 'x' AND 'x')));
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
UPDATE t2 SET a = -128 WHERE a IS NULL ORDER BY 78 IN ('x','x'),a;
ERROR 23000: Duplicate entry '-128' for key 'a'
DROP TABLE t1, t2;
DROP PROCEDURE p1;
# End of 10.2 test # End of 10.2 test

View File

@ -459,4 +459,58 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-26427 MariaDB Server SEGV on INSERT .. SELECT
#
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 (a) SELECT SUM(1);
INSERT INTO t1 (a, b) SELECT AVG(2), MIN(3);
--error ER_TRUNCATED_WRONG_VALUE
INSERT INTO t1 (b) SELECT AVG('x') OVER ();
INSERT INTO t1 SELECT MIN(7) OVER (), MAX(8) OVER();
SELECT * FROM t1;
PREPARE stmt FROM 'INSERT INTO t1 (a) SELECT AVG(?)';
EXECUTE stmt USING 9;
EXECUTE stmt USING 10;
PREPARE stmt FROM 'INSERT INTO t1 SELECT MIN(?), MAX(?)';
EXECUTE stmt USING 11, 12;
EXECUTE stmt USING 13, 14;
DEALLOCATE PREPARE stmt;
SELECT * FROM t1;
DELIMITER //;
CREATE PROCEDURE p1(param_a INT, param_b INT)
BEGIN
INSERT INTO t1 SELECT MIN(param_a) OVER (), MAX(param_b);
END//
DELIMITER ;//
CALL p1(21, 22);
CALL p1(23, 24);
SELECT * FROM t1;
CREATE TABLE t2 (
a DECIMAL UNIQUE CHECK (CASE 0 * 27302337.000000 WHEN 34 THEN
+ 'x' LIKE 'x' OR a NOT IN (-1 / TRUE ^ 2) ELSE 7105743.000000 END));
INSERT INTO t2 VALUES (90),( -1),(31152443.000000),(-32768),(NULL),(NULL);
--error ER_TRUNCATED_WRONG_VALUE
INSERT INTO t2 SELECT AVG('x') OVER (
PARTITION BY ((NOT AVG(76698761.000000))) IS NOT NULL);
INSERT IGNORE INTO t2 () VALUES (0),('x'),(3751286.000000),
('x'),((a = 'x' AND 0 AND 0));
INSERT INTO t2 VALUES (127);
--error ER_DUP_ENTRY
INSERT INTO t2 SELECT -2147483648 END FROM t2 AS TEXT JOIN t2 JOIN t2 TABLES;
--error ER_TRUNCATED_WRONG_VALUE
ALTER TABLE t2 ADD (
b INT UNIQUE CHECK ((a = 'x' AND ((-(+(BINARY 49730460.000000)))) = 'x'
BETWEEN 'x' AND 'x')));
--error ER_DUP_ENTRY
UPDATE t2 SET a = -128 WHERE a IS NULL ORDER BY 78 IN ('x','x'),a;
DROP TABLE t1, t2;
DROP PROCEDURE p1;
--echo # End of 10.2 test --echo # End of 10.2 test

View File

@ -3887,8 +3887,8 @@ ORDER BY t2.v;
MAX(t1.i) MAX(t1.i)
NULL NULL
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'y' Warning 1292 Truncated incorrect DECIMAL value: 'y'
EXPLAIN EXPLAIN
SELECT MAX(t1.i) SELECT MAX(t1.i)

View File

@ -0,0 +1,28 @@
#
# Beginning of 10.3 test
# MDEV-28762: recursive call of some json functions without stack control
#
SET @saved_dbug = @@debug_dbug;
SET debug_dbug='+d,json_check_min_stack_requirement';
SET @json1= '{"key1":{"key1":"val1"}}';
SET @json2= '{"key1":{"key1":"val1"}}';
SELECT JSON_CONTAINS(@json1, @json2);
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
SET debug_dbug='+d,temp';
SET @json1= '[1, 2, 3, 4]';
SET @json2= '[5, 6, 7, 8]';
SELECT JSON_MERGE(@json1, @json2);
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
SELECT JSON_MERGE_PATCH(@json1, @json2);
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
SELECT JSON_CONTAINS_PATH('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[2]");
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
SET @j = '["abc", [{"k": "10"}, "def"], {"x":"abc"}, {"y":"bcd"}]';
SELECT JSON_SEARCH(@j, 'all', 'abc', NULL, '$[2]');
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
SELECT JSON_EXTRACT('{"key1":"asd", "key2":[2,3]}', "$.key1", "$.key2");
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
SET @@debug_dbug= @saved_dbug;
#
# End of 10.3 test
#

View File

@ -0,0 +1,47 @@
-- source include/not_embedded.inc
--source include/have_debug.inc
--echo #
--echo # Beginning of 10.3 test
--echo # MDEV-28762: recursive call of some json functions without stack control
--echo #
SET @saved_dbug = @@debug_dbug;
SET debug_dbug='+d,json_check_min_stack_requirement';
SET @json1= '{"key1":{"key1":"val1"}}';
SET @json2= '{"key1":{"key1":"val1"}}';
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--error ER_STACK_OVERRUN_NEED_MORE
SELECT JSON_CONTAINS(@json1, @json2);
SET debug_dbug='+d,temp';
SET @json1= '[1, 2, 3, 4]';
SET @json2= '[5, 6, 7, 8]';
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--error ER_STACK_OVERRUN_NEED_MORE
SELECT JSON_MERGE(@json1, @json2);
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--error ER_STACK_OVERRUN_NEED_MORE
SELECT JSON_MERGE_PATCH(@json1, @json2);
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--error ER_STACK_OVERRUN_NEED_MORE
SELECT JSON_CONTAINS_PATH('{"a":[{"c":[1,{"a":[0,1,2]},3]}], "b":[1,2,3]}', 'one', "$**.a[2]");
SET @j = '["abc", [{"k": "10"}, "def"], {"x":"abc"}, {"y":"bcd"}]';--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--error ER_STACK_OVERRUN_NEED_MORE
SELECT JSON_SEARCH(@j, 'all', 'abc', NULL, '$[2]');
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
--error ER_STACK_OVERRUN_NEED_MORE
SELECT JSON_EXTRACT('{"key1":"asd", "key2":[2,3]}', "$.key1", "$.key2");
SET @@debug_dbug= @saved_dbug;
--echo #
--echo # End of 10.3 test
--echo #

View File

@ -972,10 +972,10 @@ c c b
c NULL NULL c NULL NULL
c NULL NULL c NULL NULL
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SET optimizer_switch=@save_optimizer_switch; SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2,t3,t4; DROP TABLE t1,t2,t3,t4;
# #

View File

@ -442,7 +442,7 @@ NULLIF(1,1e0),
NULLIF(1,'2001-01-01'), NULLIF(1,'2001-01-01'),
NULLIF(1,TIME'00:00:00'); NULLIF(1,TIME'00:00:00');
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '2001-01-01' Warning 1292 Truncated incorrect DECIMAL value: '2001-01-01'
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (

View File

@ -951,7 +951,7 @@ Warnings:
Warning 1366 Incorrect integer value: 'three' for column `test`.`t2`.`b` at row 2 Warning 1366 Incorrect integer value: 'three' for column `test`.`t2`.`b` at row 2
UPDATE v SET a = NULL; UPDATE v SET a = NULL;
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo' Warning 1292 Truncated incorrect DECIMAL value: 'foo'
DROP view v; DROP view v;
DROP TABLE t1, t2; DROP TABLE t1, t2;
SET @save_isp=@@innodb_stats_persistent; SET @save_isp=@@innodb_stats_persistent;

View File

@ -296,12 +296,12 @@ id
2 2
3 3
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'hello' Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello' Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello' Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello' Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello' Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello' Warning 1292 Truncated incorrect DECIMAL value: 'hello'
select @@profiling; select @@profiling;
@@profiling @@profiling
1 1

View File

@ -4398,15 +4398,15 @@ set sql_mode='STRICT_ALL_TABLES';
CREATE TABLE t1 (id int, count int); CREATE TABLE t1 (id int, count int);
insert into t1 values (1,1),(0,2); insert into t1 values (1,1),(0,2);
update t1 set count = count + 1 where id = '1bad'; update t1 set count = count + 1 where id = '1bad';
ERROR 22007: Truncated incorrect DOUBLE value: '1bad' ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
prepare stmt from "update t1 set count = count + 1 where id = '1bad'"; prepare stmt from "update t1 set count = count + 1 where id = '1bad'";
execute stmt; execute stmt;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad' ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt; deallocate prepare stmt;
prepare stmt from 'update t1 set count = count + 1 where id = ?'; prepare stmt from 'update t1 set count = count + 1 where id = ?';
set @a = '1bad'; set @a = '1bad';
execute stmt using @a; execute stmt using @a;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad' ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt; deallocate prepare stmt;
drop table t1; drop table t1;
CREATE TABLE t1 (id decimal(10,5), count int); CREATE TABLE t1 (id decimal(10,5), count int);

View File

@ -282,8 +282,8 @@ SET @arg00=1;
execute stmt4 using @arg00; execute stmt4 using @arg00;
Field Type Null Key Default Extra Field Type Null Key Default Extra
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
prepare stmt4 from ' show columns from t2 from test like ''a%'' '; prepare stmt4 from ' show columns from t2 from test like ''a%'' ';
execute stmt4; execute stmt4;
Field Type Null Key Default Extra Field Type Null Key Default Extra

View File

@ -7,15 +7,15 @@ set sql_mode='STRICT_TRANS_TABLES';
CREATE TABLE t1 (id int, count int) engine=innodb; CREATE TABLE t1 (id int, count int) engine=innodb;
insert into t1 values (1,1),(0,2); insert into t1 values (1,1),(0,2);
update t1 set count = count + 1 where id = '1bad'; update t1 set count = count + 1 where id = '1bad';
ERROR 22007: Truncated incorrect DOUBLE value: '1bad' ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
prepare stmt from "update t1 set count = count + 1 where id = '1bad'"; prepare stmt from "update t1 set count = count + 1 where id = '1bad'";
execute stmt; execute stmt;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad' ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt; deallocate prepare stmt;
prepare stmt from 'update t1 set count = count + 1 where id = ?'; prepare stmt from 'update t1 set count = count + 1 where id = ?';
set @a = '1bad'; set @a = '1bad';
execute stmt using @a; execute stmt using @a;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad' ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt; deallocate prepare stmt;
drop table t1; drop table t1;
CREATE TABLE t1 (id decimal(10,5), count int) engine=innodb; CREATE TABLE t1 (id decimal(10,5), count int) engine=innodb;

View File

@ -18,14 +18,14 @@ Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)); select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3)) row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3))
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)); select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)) row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3))
@ -49,16 +49,16 @@ select row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3)) row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3))
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
select row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3)); select row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3)) row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3))
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
select (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4))); select (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)));
(1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4))) (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)))
1 1

View File

@ -5262,11 +5262,11 @@ SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1 G1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'z' Warning 1292 Truncated incorrect DECIMAL value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'q' Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
DROP TABLE CC; DROP TABLE CC;
# End of test#45227 # End of test#45227
# #

View File

@ -5273,11 +5273,11 @@ SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1 G1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'z' Warning 1292 Truncated incorrect DECIMAL value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'q' Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
DROP TABLE CC; DROP TABLE CC;
# End of test#45227 # End of test#45227
# #

View File

@ -5262,11 +5262,11 @@ SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ; HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1 G1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'z' Warning 1292 Truncated incorrect DECIMAL value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'q' Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
DROP TABLE CC; DROP TABLE CC;
# End of test#45227 # End of test#45227
# #

View File

@ -1242,6 +1242,18 @@ t1 CREATE TABLE `t1` (
`c1` varchar(3) NOT NULL `c1` varchar(3) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-29074 GET_BIT variables crash in SET STATEMENT
#
set statement log_queries_not_using_indexes=1 for select @@log_queries_not_using_indexes;
@@log_queries_not_using_indexes
1
select @@log_queries_not_using_indexes;
@@log_queries_not_using_indexes
0
#
# End of 10.3 tests
#
create table t (a int); create table t (a int);
SET sql_mode=ORACLE; SET sql_mode=ORACLE;
SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t; SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;

View File

@ -1161,6 +1161,16 @@ SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-29074 GET_BIT variables crash in SET STATEMENT
--echo #
set statement log_queries_not_using_indexes=1 for select @@log_queries_not_using_indexes;
select @@log_queries_not_using_indexes;
--echo #
--echo # End of 10.3 tests
--echo #
create table t (a int); create table t (a int);
SET sql_mode=ORACLE; SET sql_mode=ORACLE;
SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t; SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;

View File

@ -353,3 +353,13 @@ drop table _t1;
# #
# End of 10.3 tests # End of 10.3 tests
# #
#
# MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
#
BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR 2 ; END $
BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR (SELECT 2) ; END $
KILL (('x' IN ( SELECT 1)) MOD 44);
ERROR HY000: Unknown thread id: 0
#
# End of 10.4 tests
#

View File

@ -371,3 +371,18 @@ drop table _t1;
--echo # --echo #
--echo # End of 10.3 tests --echo # End of 10.3 tests
--echo # --echo #
--echo #
--echo # MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
--echo #
--delimiter $
BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR 2 ; END $
BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR (SELECT 2) ; END $
--delimiter ;
--error ER_NO_SUCH_THREAD
KILL (('x' IN ( SELECT 1)) MOD 44);
--echo #
--echo # End of 10.4 tests
--echo #

View File

@ -8700,11 +8700,11 @@ RETURN a = timestamp'2038-01-19 03:14:07.999999'
END END
$$ $$
SELECT f1(e) FROM t1; SELECT f1(e) FROM t1;
ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000' ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
SELECT f2(e) FROM t1; SELECT f2(e) FROM t1;
ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000' ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
SELECT f3(e) FROM t1; SELECT f3(e) FROM t1;
ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000' ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
DROP FUNCTION f1; DROP FUNCTION f1;
DROP FUNCTION f2; DROP FUNCTION f2;
DROP FUNCTION f3; DROP FUNCTION f3;

View File

@ -141,7 +141,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a') (SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s) ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b); SELECT 1 as a,(SELECT a+a) b,(SELECT b);
@ -4682,7 +4682,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -5967,7 +5967,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -6348,10 +6348,10 @@ ORDER BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a = SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b = (SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) (SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
@ -6359,10 +6359,10 @@ GROUP BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)

View File

@ -1677,7 +1677,7 @@ WHERE ( alias2.f1 , alias2.f2 ) IN ( SELECT max(f2) , f1 FROM t0 GROUP BY f2 , f
f1 f2 f1 f2
8 8 8 8
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'u' Warning 1292 Truncated incorrect DECIMAL value: 'u'
EXPLAIN EXPLAIN
SELECT * FROM t2 WHERE (f1b, f2b) IN (SELECT max(f1a), f2a FROM t1 GROUP BY f1a, f2a); SELECT * FROM t2 WHERE (f1b, f2b) IN (SELECT max(f1a), f2a FROM t1 GROUP BY f1a, f2a);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
@ -1711,7 +1711,7 @@ WHERE ( alias2.f1 , alias2.f2 ) IN ( SELECT max(f2) , f1 FROM t0 GROUP BY f2 , f
f1 f2 f1 f2
8 8 8 8
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'u' Warning 1292 Truncated incorrect DECIMAL value: 'u'
EXPLAIN EXPLAIN
SELECT * FROM t2 WHERE (f1b, f2b) IN (SELECT max(f1a), f2a FROM t1 GROUP BY f1a, f2a); SELECT * FROM t2 WHERE (f1b, f2b) IN (SELECT max(f1a), f2a FROM t1 GROUP BY f1a, f2a);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
@ -1903,8 +1903,8 @@ WHERE SUBQUERY2_t2.col_varchar_nokey IN
(SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey)); (SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey));
col_int_key col_int_key
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
set @@optimizer_switch='subquery_cache=off,materialization=off,in_to_exists=on,semijoin=off'; set @@optimizer_switch='subquery_cache=off,materialization=off,in_to_exists=on,semijoin=off';
EXPLAIN EXPLAIN
SELECT col_int_key SELECT col_int_key
@ -1928,8 +1928,8 @@ WHERE SUBQUERY2_t2.col_varchar_nokey IN
(SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey)); (SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey));
col_int_key col_int_key
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
drop table t1, t2; drop table t1, t2;
set @@optimizer_switch = @old_optimizer_switch; set @@optimizer_switch = @old_optimizer_switch;
# #
@ -2985,6 +2985,63 @@ ANALYZE
} }
DROP TABLE t1; DROP TABLE t1;
# End of 10.2 tests # End of 10.2 tests
#
# MDEV-29139: Redundannt subquery in GROUP BY clause of ANY/ALL subquery
#
create table t1 (a int);
insert into t1 values (3), (1), (2);
create table t2 (b int not null);
insert into t2 values (4), (2);
create table t3 (c int);
insert into t3 values (7), (1);
explain extended select a from t1
where a >= any (select b from t2 group by (select c from t3 where c = 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t1`.`a`)))
select a from t1
where a >= any (select b from t2 group by (select c from t3 where c = 1));
a
3
2
prepare stmt from "select a from t1
where a >= any (select b from t2 group by (select c from t3 where c = 1))";
execute stmt;
a
3
2
execute stmt;
a
3
2
deallocate prepare stmt;
explain extended select a from t1
where a <= all (select b from t2 group by (select c from t3 where c = 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <not>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) < <cache>(`test`.`t1`.`a`)))
select a from t1
where a <= all (select b from t2 group by (select c from t3 where c = 1));
a
1
2
explain extended select a from t1
where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t1`.`a`)))
select a from t1
where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
a
3
2
drop table t1,t2,t3;
# End of 10.3 tests # End of 10.3 tests
# #
# MDEV-19134: EXISTS() slower if ORDER BY is defined # MDEV-19134: EXISTS() slower if ORDER BY is defined

View File

@ -2440,6 +2440,45 @@ DROP TABLE t1;
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo #
--echo # MDEV-29139: Redundannt subquery in GROUP BY clause of ANY/ALL subquery
--echo #
create table t1 (a int);
insert into t1 values (3), (1), (2);
create table t2 (b int not null);
insert into t2 values (4), (2);
create table t3 (c int);
insert into t3 values (7), (1);
let $q1=
select a from t1
where a >= any (select b from t2 group by (select c from t3 where c = 1));
eval explain extended $q1;
eval $q1;
eval prepare stmt from "$q1";
execute stmt;
execute stmt;
deallocate prepare stmt;
let $q2=
select a from t1
where a <= all (select b from t2 group by (select c from t3 where c = 1));
eval explain extended $q2;
eval $q2;
let $q3=
select a from t1
where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
eval explain extended $q3;
eval $q3;
drop table t1,t2,t3;
--echo # End of 10.3 tests --echo # End of 10.3 tests
--echo # --echo #

View File

@ -2849,70 +2849,70 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL w 1 NULL w
1 NULL y 1 NULL y
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SET @@optimizer_switch='subquery_cache=on'; SET @@optimizer_switch='subquery_cache=on';
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , ( /* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
SELECT SUBQUERY2_t1 .`col_int_key` SELECT SUBQUERY2_t1 .`col_int_key`
@ -2940,32 +2940,32 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL w 1 NULL w
1 NULL y 1 NULL y
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'e' Warning 1292 Truncated incorrect DECIMAL value: 'e'
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'g' Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1292 Truncated incorrect DOUBLE value: 'h' Warning 1292 Truncated incorrect DECIMAL value: 'h'
Warning 1292 Truncated incorrect DOUBLE value: 'i' Warning 1292 Truncated incorrect DECIMAL value: 'i'
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'k' Warning 1292 Truncated incorrect DECIMAL value: 'k'
Warning 1292 Truncated incorrect DOUBLE value: 'l' Warning 1292 Truncated incorrect DECIMAL value: 'l'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'n' Warning 1292 Truncated incorrect DECIMAL value: 'n'
Warning 1292 Truncated incorrect DOUBLE value: 'o' Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: 'p' Warning 1292 Truncated incorrect DECIMAL value: 'p'
Warning 1292 Truncated incorrect DOUBLE value: 'q' Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 's' Warning 1292 Truncated incorrect DECIMAL value: 's'
Warning 1292 Truncated incorrect DOUBLE value: 't' Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DOUBLE value: 'u' Warning 1292 Truncated incorrect DECIMAL value: 'u'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'w' Warning 1292 Truncated incorrect DECIMAL value: 'w'
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'y' Warning 1292 Truncated incorrect DECIMAL value: 'y'
Warning 1292 Truncated incorrect DOUBLE value: 'z' Warning 1292 Truncated incorrect DECIMAL value: 'z'
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
set @@optimizer_switch= default; set @@optimizer_switch= default;
#launchpad BUG#609045 #launchpad BUG#609045
@ -3390,9 +3390,9 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL d 1 NULL d
1 NULL f 1 NULL f
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
SET @@optimizer_switch = 'subquery_cache=on'; SET @@optimizer_switch = 'subquery_cache=on';
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , ( /* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
SELECT SUBQUERY2_t1 .`col_int_key` SELECT SUBQUERY2_t1 .`col_int_key`
@ -3407,9 +3407,9 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL d 1 NULL d
1 NULL f 1 NULL f
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
set @@optimizer_switch= default; set @@optimizer_switch= default;
#launchpad BUG#611625 #launchpad BUG#611625

View File

@ -721,7 +721,7 @@ a
1 1
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
drop table t1; drop table t1;
# #
# End of 10.4 tests # End of 10.4 tests

View File

@ -578,9 +578,9 @@ select * from t1 group by (a1 in (select col from columns));
a1 a2 a1 a2
1 - 00 2 - 00 1 - 00 2 - 00
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1 - 00' Warning 1292 Truncated incorrect DECIMAL value: '1 - 00'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 01' Warning 1292 Truncated incorrect DECIMAL value: '1 - 01'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 02' Warning 1292 Truncated incorrect DECIMAL value: '1 - 02'
/* ORDER BY clause */ /* ORDER BY clause */
explain extended explain extended
select * from t1 order by (select col from columns limit 1); select * from t1 order by (select col from columns limit 1);

View File

@ -209,8 +209,8 @@ WHERE (t1.f1>0 or t1.f1<0) AND alias2.f10
ORDER BY field1 ; ORDER BY field1 ;
field1 field1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
set optimizer_switch=@tmp_optimizer_switch; set optimizer_switch=@tmp_optimizer_switch;
drop table t1,t2; drop table t1,t2;
# #
@ -273,8 +273,8 @@ WHERE alias1.f11 OR alias1.f3 = 50 AND alias1.f10
); );
f12 f13 f12 f13
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
EXPLAIN EXPLAIN
SELECT * FROM t2 SELECT * FROM t2
WHERE ( f12 ) IN ( WHERE ( f12 ) IN (
@ -292,8 +292,8 @@ FROM t1 AS alias1, t1 AS alias2
WHERE (alias2.f10 = alias1.f11) AND (alias1.f11 OR alias1.f3 = 50 AND alias1.f10)); WHERE (alias2.f10 = alias1.f11) AND (alias1.f11 OR alias1.f3 = 50 AND alias1.f10));
f12 f13 f12 f13
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
set @@optimizer_switch=@save_optimizer_switch; set @@optimizer_switch=@save_optimizer_switch;
drop table t1, t2; drop table t1, t2;
# #

View File

@ -145,7 +145,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a') (SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s) ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b); SELECT 1 as a,(SELECT a+a) b,(SELECT b);
@ -4684,7 +4684,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -5967,7 +5967,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -6348,10 +6348,10 @@ ORDER BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a = SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b = (SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) (SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
@ -6359,10 +6359,10 @@ GROUP BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)

View File

@ -148,7 +148,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a') (SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s) ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b); SELECT 1 as a,(SELECT a+a) b,(SELECT b);
@ -4682,7 +4682,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -5964,7 +5964,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -6343,10 +6343,10 @@ ORDER BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a = SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b = (SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) (SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
@ -6354,10 +6354,10 @@ GROUP BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)

View File

@ -144,7 +144,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a') (SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s) ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b); SELECT 1 as a,(SELECT a+a) b,(SELECT b);
@ -4678,7 +4678,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -5960,7 +5960,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -6339,10 +6339,10 @@ ORDER BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a = SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b = (SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) (SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
@ -6350,10 +6350,10 @@ GROUP BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)

View File

@ -147,7 +147,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a') (SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s) ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b); SELECT 1 as a,(SELECT a+a) b,(SELECT b);
@ -4688,7 +4688,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -5973,7 +5973,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -6354,10 +6354,10 @@ ORDER BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a = SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b = (SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) (SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
@ -6365,10 +6365,10 @@ GROUP BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)

View File

@ -144,7 +144,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a') (SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a); SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s) ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b); SELECT 1 as a,(SELECT a+a) b,(SELECT b);
@ -4678,7 +4678,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -5960,7 +5960,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2); SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1 1
1 1
@ -6339,10 +6339,10 @@ ORDER BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a = SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b = (SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2) (SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
@ -6350,10 +6350,10 @@ GROUP BY b
); );
1 1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a' Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b' Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS) # BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)

View File

@ -1705,15 +1705,15 @@ x
m m
c c
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
# #
# BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin # BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
@ -2100,8 +2100,8 @@ f1 f2 f3 f3
4 0 0 0 4 0 0 0
0 NULL NULL NULL 0 NULL NULL NULL
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo' Warning 1292 Truncated incorrect DECIMAL value: 'foo'
Warning 1292 Truncated incorrect DOUBLE value: 'foo' Warning 1292 Truncated incorrect DECIMAL value: 'foo'
DROP TABLE t1, t2, t3, t4; DROP TABLE t1, t2, t3, t4;
set @tmp803457=@@optimizer_switch; set @tmp803457=@@optimizer_switch;
# #
@ -2294,13 +2294,13 @@ PREPARE st1 FROM "SELECT * FROM t2 LEFT JOIN t1 ON t2.a != 0 AND ('j','r') IN (
EXECUTE st1; EXECUTE st1;
a a a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
EXECUTE st1; EXECUTE st1;
a a a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
# #
# BUG#849776: Wrong result with semijoin + "Impossible where" # BUG#849776: Wrong result with semijoin + "Impossible where"
@ -3336,4 +3336,17 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '='
EXECUTE stmt; EXECUTE stmt;
ERROR HY000: Illegal parameter data types geometry and int for operation '=' ERROR HY000: Illegal parameter data types geometry and int for operation '='
DROP TABLE t1, t2; DROP TABLE t1, t2;
#
# MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables with low optimizer_search_depth
#
set @tmp_28871=@@optimizer_search_depth;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t1 VALUES (3),(4);
SET optimizer_search_depth= 1;
SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 JOIN t1);
a
DROP TABLE t1, t2;
set optimizer_search_depth= @tmp_28871;
set optimizer_switch=@subselect_sj_tmp; set optimizer_switch=@subselect_sj_tmp;

View File

@ -3018,5 +3018,22 @@ EXECUTE stmt;
DROP TABLE t1, t2; DROP TABLE t1, t2;
--echo #
--echo # MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables with low optimizer_search_depth
--echo #
set @tmp_28871=@@optimizer_search_depth;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
# Data is optional, fails either way
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t1 VALUES (3),(4);
SET optimizer_search_depth= 1;
SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 JOIN t1);
DROP TABLE t1, t2;
set optimizer_search_depth= @tmp_28871;
# The following command must be the last one the file # The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp; set optimizer_switch=@subselect_sj_tmp;

View File

@ -1716,15 +1716,15 @@ x
m m
c c
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
drop table t1,t2,t3,t4; drop table t1,t2,t3,t4;
# #
# BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin # BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
@ -2111,8 +2111,8 @@ f1 f2 f3 f3
4 0 0 0 4 0 0 0
0 NULL NULL NULL 0 NULL NULL NULL
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo' Warning 1292 Truncated incorrect DECIMAL value: 'foo'
Warning 1292 Truncated incorrect DOUBLE value: 'foo' Warning 1292 Truncated incorrect DECIMAL value: 'foo'
DROP TABLE t1, t2, t3, t4; DROP TABLE t1, t2, t3, t4;
set @tmp803457=@@optimizer_switch; set @tmp803457=@@optimizer_switch;
# #
@ -2305,13 +2305,13 @@ PREPARE st1 FROM "SELECT * FROM t2 LEFT JOIN t1 ON t2.a != 0 AND ('j','r') IN (
EXECUTE st1; EXECUTE st1;
a a a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
EXECUTE st1; EXECUTE st1;
a a a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j' Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
# #
# BUG#849776: Wrong result with semijoin + "Impossible where" # BUG#849776: Wrong result with semijoin + "Impossible where"
@ -3347,6 +3347,19 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '='
EXECUTE stmt; EXECUTE stmt;
ERROR HY000: Illegal parameter data types geometry and int for operation '=' ERROR HY000: Illegal parameter data types geometry and int for operation '='
DROP TABLE t1, t2; DROP TABLE t1, t2;
#
# MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables with low optimizer_search_depth
#
set @tmp_28871=@@optimizer_search_depth;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t1 VALUES (3),(4);
SET optimizer_search_depth= 1;
SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 JOIN t1);
a
DROP TABLE t1, t2;
set optimizer_search_depth= @tmp_28871;
set optimizer_switch=@subselect_sj_tmp; set optimizer_switch=@subselect_sj_tmp;
# #
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off # BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off

View File

@ -604,9 +604,9 @@ select * from t1 group by (a1 in (select col from columns));
a1 a2 a1 a2
1 - 00 2 - 00 1 - 00 2 - 00
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1 - 00' Warning 1292 Truncated incorrect DECIMAL value: '1 - 00'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 01' Warning 1292 Truncated incorrect DECIMAL value: '1 - 01'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 02' Warning 1292 Truncated incorrect DECIMAL value: '1 - 02'
/* ORDER BY clause */ /* ORDER BY clause */
explain extended explain extended
select * from t1 order by (select col from columns limit 1); select * from t1 order by (select col from columns limit 1);

View File

@ -286,6 +286,175 @@ a
127 127
DROP TABLE t1, t2; DROP TABLE t1, t2;
# #
# MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings
#
CREATE TABLE t1 (
id bigint(20) unsigned NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
SELECT * FROM t1 WHERE id IN(97716021308405775);
id
97716021308405775
SELECT * FROM t1 WHERE id IN('97716021308405775');
id
97716021308405775
SELECT * FROM t1 WHERE id IN('1234',97716021308405775);
id
1234
97716021308405775
SELECT * FROM t1 WHERE id IN('1234','97716021308405775');
id
1234
97716021308405775
SELECT * FROM t1 WHERE id = 1234 OR id = '97716021308405775';
id
1234
97716021308405775
SELECT * FROM t1 WHERE id IN(1234,'97716021308405775');
id
1234
97716021308405775
SELECT * FROM t1 WHERE id IN('97716021308405775',1234);
id
1234
97716021308405775
DROP TABLE t1;
CREATE TABLE t1 (id bigint(20) unsigned NOT NULL PRIMARY KEY);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
SELECT
id,
CASE id
WHEN '97716021308405770' THEN '70'
WHEN '97716021308405775' THEN '75'
WHEN '97716021308405780' THEN '80'
END AS c1
FROM t1;
id c1
1234 NULL
97716021308405770 70
97716021308405775 75
97716021308405780 80
SELECT
id,
CASE
WHEN id='97716021308405770' THEN '70'
WHEN id='97716021308405775' THEN '75'
WHEN id='97716021308405780' THEN '80'
END AS c1
FROM t1;
id c1
1234 NULL
97716021308405770 70
97716021308405775 75
97716021308405780 80
SELECT id, id BETWEEN '97716021308405775' AND '97716021308405775' AS c1 FROM t1;
id c1
1234 0
97716021308405770 0
97716021308405775 1
97716021308405780 0
SELECT id, id BETWEEN '97716021308405775' AND 97716021308405775 AS c1 FROM t1;
id c1
1234 0
97716021308405770 0
97716021308405775 1
97716021308405780 0
SELECT id, id BETWEEN 97716021308405775 AND '97716021308405775' AS c1 FROM t1;
id c1
1234 0
97716021308405770 0
97716021308405775 1
97716021308405780 0
DROP TABLE t1;
SELECT '97716021308405770'=97716021308405770;
'97716021308405770'=97716021308405770
1
SELECT 97716021308405770='97716021308405770';
97716021308405770='97716021308405770'
1
SELECT '9e+16'=90000000000000000;
'9e+16'=90000000000000000
1
SELECT 90000000000000000='9e+16';
90000000000000000='9e+16'
1
SELECT '9e+30'>90000000000000000;
'9e+30'>90000000000000000
1
SELECT 90000000000000000<'9e+30';
90000000000000000<'9e+30'
1
SELECT '9e+80'>90000000000000000;
'9e+80'>90000000000000000
1
SELECT 90000000000000000<'9e+80';
90000000000000000<'9e+80'
1
SELECT '9.9999999999999999e+80'>90000000000000000;
'9.9999999999999999e+80'>90000000000000000
1
SELECT 90000000000000000<'9.9999999999999999e+80';
90000000000000000<'9.9999999999999999e+80'
1
SELECT '1e+81'>90000000000000000;
'1e+81'>90000000000000000
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e+81'
SELECT 90000000000000000<'1e+81';
90000000000000000<'1e+81'
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e+81'
SELECT '9e+100'>90000000000000000;
'9e+100'>90000000000000000
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '9e+100'
SELECT 90000000000000000<'9e+100';
90000000000000000<'9e+100'
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '9e+100'
SELECT CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)=18446744073709551615;
CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)=18446744073709551615
1
SELECT 18446744073709551615=CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED);
18446744073709551615=CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)
1
SELECT CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)=9223372036854775807;
CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)=9223372036854775807
1
SELECT 9223372036854775807=CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED);
9223372036854775807=CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)
1
#
# MDEV-25492 BETWEEN clause returns incorrect results on quoted 64-bit ints
#
CREATE TABLE betweentest
(
id int(11) unsigned NOT NULL AUTO_INCREMENT,
range1 bigint(20) DEFAULT NULL,
range2 bigint(20) DEFAULT NULL,
PRIMARY KEY (id)
);
INSERT INTO betweentest VALUES
(1,2739499741191602369,2739499741191602369),
(2,2739499741191602192,2739499741191602192),
(3,2739138623713574912,2739138623730352127);
SELECT * FROM betweentest WHERE '2739499741191602192' BETWEEN range1 AND range2;
id range1 range2
2 2739499741191602192 2739499741191602192
SELECT * FROM betweentest WHERE 2739499741191602192 BETWEEN range1 AND range2;
id range1 range2
2 2739499741191602192 2739499741191602192
DROP TABLE betweentest;
#
# End of 10.3 tests # End of 10.3 tests
# #
# #

View File

@ -220,6 +220,108 @@ INSERT IGNORE INTO t2 SELECT a FROM t1;
SELECT * FROM t2; SELECT * FROM t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;
--echo #
--echo # MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings
--echo #
CREATE TABLE t1 (
id bigint(20) unsigned NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
# OK
SELECT * FROM t1 WHERE id IN(97716021308405775);
SELECT * FROM t1 WHERE id IN('97716021308405775');
SELECT * FROM t1 WHERE id IN('1234',97716021308405775);
SELECT * FROM t1 WHERE id IN('1234','97716021308405775');
SELECT * FROM t1 WHERE id = 1234 OR id = '97716021308405775';
# The following was not OK
SELECT * FROM t1 WHERE id IN(1234,'97716021308405775');
SELECT * FROM t1 WHERE id IN('97716021308405775',1234);
DROP TABLE t1;
CREATE TABLE t1 (id bigint(20) unsigned NOT NULL PRIMARY KEY);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
SELECT
id,
CASE id
WHEN '97716021308405770' THEN '70'
WHEN '97716021308405775' THEN '75'
WHEN '97716021308405780' THEN '80'
END AS c1
FROM t1;
SELECT
id,
CASE
WHEN id='97716021308405770' THEN '70'
WHEN id='97716021308405775' THEN '75'
WHEN id='97716021308405780' THEN '80'
END AS c1
FROM t1;
SELECT id, id BETWEEN '97716021308405775' AND '97716021308405775' AS c1 FROM t1;
SELECT id, id BETWEEN '97716021308405775' AND 97716021308405775 AS c1 FROM t1;
SELECT id, id BETWEEN 97716021308405775 AND '97716021308405775' AS c1 FROM t1;
DROP TABLE t1;
SELECT '97716021308405770'=97716021308405770;
SELECT 97716021308405770='97716021308405770';
SELECT '9e+16'=90000000000000000;
SELECT 90000000000000000='9e+16';
SELECT '9e+30'>90000000000000000;
SELECT 90000000000000000<'9e+30';
SELECT '9e+80'>90000000000000000;
SELECT 90000000000000000<'9e+80';
SELECT '9.9999999999999999e+80'>90000000000000000;
SELECT 90000000000000000<'9.9999999999999999e+80';
SELECT '1e+81'>90000000000000000;
SELECT 90000000000000000<'1e+81';
SELECT '9e+100'>90000000000000000;
SELECT 90000000000000000<'9e+100';
SELECT CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)=18446744073709551615;
SELECT 18446744073709551615=CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED);
SELECT CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)=9223372036854775807;
SELECT 9223372036854775807=CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED);
--echo #
--echo # MDEV-25492 BETWEEN clause returns incorrect results on quoted 64-bit ints
--echo #
CREATE TABLE betweentest
(
id int(11) unsigned NOT NULL AUTO_INCREMENT,
range1 bigint(20) DEFAULT NULL,
range2 bigint(20) DEFAULT NULL,
PRIMARY KEY (id)
);
INSERT INTO betweentest VALUES
(1,2739499741191602369,2739499741191602369),
(2,2739499741191602192,2739499741191602192),
(3,2739138623713574912,2739138623730352127);
SELECT * FROM betweentest WHERE '2739499741191602192' BETWEEN range1 AND range2;
SELECT * FROM betweentest WHERE 2739499741191602192 BETWEEN range1 AND range2;
DROP TABLE betweentest;
--echo # --echo #
--echo # End of 10.3 tests --echo # End of 10.3 tests
--echo # --echo #

View File

@ -550,22 +550,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1 ';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 ' Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE i2='1 '; SELECT COUNT(*) FROM t1 WHERE i2='1 ';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 ' Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE i4='1 '; SELECT COUNT(*) FROM t1 WHERE i4='1 ';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 ' Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE i8='1 '; SELECT COUNT(*) FROM t1 WHERE i8='1 ';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 ' Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE d='1 '; SELECT COUNT(*) FROM t1 WHERE d='1 ';
COUNT(*) COUNT(*)
2 2
@ -585,22 +585,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE i2=''; SELECT COUNT(*) FROM t1 WHERE i2='';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE i4=''; SELECT COUNT(*) FROM t1 WHERE i4='';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE i8=''; SELECT COUNT(*) FROM t1 WHERE i8='';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE d=''; SELECT COUNT(*) FROM t1 WHERE d='';
COUNT(*) COUNT(*)
2 2
@ -620,22 +620,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE i2='x'; SELECT COUNT(*) FROM t1 WHERE i2='x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE i4='x'; SELECT COUNT(*) FROM t1 WHERE i4='x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE i8='x'; SELECT COUNT(*) FROM t1 WHERE i8='x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE d='x'; SELECT COUNT(*) FROM t1 WHERE d='x';
COUNT(*) COUNT(*)
2 2
@ -655,22 +655,22 @@ SELECT COUNT(*) FROM t1 WHERE i1=' x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x' Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE i2=' x'; SELECT COUNT(*) FROM t1 WHERE i2=' x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x' Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE i4=' x'; SELECT COUNT(*) FROM t1 WHERE i4=' x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x' Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE i8=' x'; SELECT COUNT(*) FROM t1 WHERE i8=' x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x' Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE d=' x'; SELECT COUNT(*) FROM t1 WHERE d=' x';
COUNT(*) COUNT(*)
2 2
@ -690,22 +690,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='.';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.' Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE i2='.'; SELECT COUNT(*) FROM t1 WHERE i2='.';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.' Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE i4='.'; SELECT COUNT(*) FROM t1 WHERE i4='.';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.' Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE i8='.'; SELECT COUNT(*) FROM t1 WHERE i8='.';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.' Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE d='.'; SELECT COUNT(*) FROM t1 WHERE d='.';
COUNT(*) COUNT(*)
2 2
@ -725,22 +725,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-' Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE i2='-'; SELECT COUNT(*) FROM t1 WHERE i2='-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-' Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE i4='-'; SELECT COUNT(*) FROM t1 WHERE i4='-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-' Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE i8='-'; SELECT COUNT(*) FROM t1 WHERE i8='-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-' Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE d='-'; SELECT COUNT(*) FROM t1 WHERE d='-';
COUNT(*) COUNT(*)
2 2
@ -760,22 +760,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+' Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE i2='+'; SELECT COUNT(*) FROM t1 WHERE i2='+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+' Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE i4='+'; SELECT COUNT(*) FROM t1 WHERE i4='+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+' Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE i8='+'; SELECT COUNT(*) FROM t1 WHERE i8='+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+' Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE d='+'; SELECT COUNT(*) FROM t1 WHERE d='+';
COUNT(*) COUNT(*)
2 2
@ -795,22 +795,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x' Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE i2='1x'; SELECT COUNT(*) FROM t1 WHERE i2='1x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x' Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE i4='1x'; SELECT COUNT(*) FROM t1 WHERE i4='1x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x' Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE i8='1x'; SELECT COUNT(*) FROM t1 WHERE i8='1x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x' Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE d='1x'; SELECT COUNT(*) FROM t1 WHERE d='1x';
COUNT(*) COUNT(*)
2 2
@ -830,22 +830,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e' Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE i2='1e'; SELECT COUNT(*) FROM t1 WHERE i2='1e';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e' Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE i4='1e'; SELECT COUNT(*) FROM t1 WHERE i4='1e';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e' Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE i8='1e'; SELECT COUNT(*) FROM t1 WHERE i8='1e';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e' Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE d='1e'; SELECT COUNT(*) FROM t1 WHERE d='1e';
COUNT(*) COUNT(*)
2 2
@ -865,22 +865,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+' Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE i2='1e+'; SELECT COUNT(*) FROM t1 WHERE i2='1e+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+' Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE i4='1e+'; SELECT COUNT(*) FROM t1 WHERE i4='1e+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+' Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE i8='1e+'; SELECT COUNT(*) FROM t1 WHERE i8='1e+';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+' Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE d='1e+'; SELECT COUNT(*) FROM t1 WHERE d='1e+';
COUNT(*) COUNT(*)
2 2
@ -900,22 +900,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1E-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-' Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE i2='1E-'; SELECT COUNT(*) FROM t1 WHERE i2='1E-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-' Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE i4='1E-'; SELECT COUNT(*) FROM t1 WHERE i4='1E-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-' Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE i8='1E-'; SELECT COUNT(*) FROM t1 WHERE i8='1E-';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-' Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE d='1E-'; SELECT COUNT(*) FROM t1 WHERE d='1E-';
COUNT(*) COUNT(*)
2 2
@ -935,22 +935,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1Ex';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex' Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE i2='1Ex'; SELECT COUNT(*) FROM t1 WHERE i2='1Ex';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex' Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE i4='1Ex'; SELECT COUNT(*) FROM t1 WHERE i4='1Ex';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex' Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE i8='1Ex'; SELECT COUNT(*) FROM t1 WHERE i8='1Ex';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex' Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE d='1Ex'; SELECT COUNT(*) FROM t1 WHERE d='1Ex';
COUNT(*) COUNT(*)
2 2
@ -970,22 +970,22 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e+x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x' Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE i2='1e+x'; SELECT COUNT(*) FROM t1 WHERE i2='1e+x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x' Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE i4='1e+x'; SELECT COUNT(*) FROM t1 WHERE i4='1e+x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x' Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE i8='1e+x'; SELECT COUNT(*) FROM t1 WHERE i8='1e+x';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x' Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE d='1e+x'; SELECT COUNT(*) FROM t1 WHERE d='1e+x';
COUNT(*) COUNT(*)
2 2
@ -1005,22 +1005,26 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e1000';
COUNT(*) COUNT(*)
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000' Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE i2='1e1000'; SELECT COUNT(*) FROM t1 WHERE i2='1e1000';
COUNT(*) COUNT(*)
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000' Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE i4='1e1000'; SELECT COUNT(*) FROM t1 WHERE i4='1e1000';
COUNT(*) COUNT(*)
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000' Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE i8='1e1000'; SELECT COUNT(*) FROM t1 WHERE i8='1e1000';
COUNT(*) COUNT(*)
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000' Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE d='1e1000'; SELECT COUNT(*) FROM t1 WHERE d='1e1000';
COUNT(*) COUNT(*)
0 0
@ -1056,7 +1060,7 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(i8) WHERE i8='1 ';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 ' Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='1 '; SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='1 ';
COUNT(*) COUNT(*)
2 2
@ -1081,7 +1085,7 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(i8) WHERE i8='';
COUNT(*) COUNT(*)
2 2
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d=''; SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='';
COUNT(*) COUNT(*)
2 2

View File

@ -46,39 +46,22 @@ ALTER TABLE t1 MODIFY a DECIMAL(10,0);
SELECT * FROM t1,t2 WHERE a=d; SELECT * FROM t1,t2 WHERE a=d;
a b c pk d e a b c pk d e
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'f' Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'g' Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'k' Warning 1292 Truncated incorrect DECIMAL value: 'k'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'o' Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'q' Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'u' Warning 1292 Truncated incorrect DECIMAL value: 'u'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'w' Warning 1292 Truncated incorrect DECIMAL value: 'w'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'x' Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'y' Warning 1292 Truncated incorrect DECIMAL value: 'y'
ALTER TABLE t1 MODIFY a DOUBLE; ALTER TABLE t1 MODIFY a DOUBLE;
SELECT * FROM t1,t2 WHERE a=d; SELECT * FROM t1,t2 WHERE a=d;

View File

@ -476,7 +476,6 @@ a (a DIV 2)
t 0 t 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '1a' Warning 1292 Truncated incorrect DECIMAL value: '1a'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 't ' Warning 1292 Truncated incorrect DECIMAL value: 't '
SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a; SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
a CAST(a AS SIGNED) a CAST(a AS SIGNED)
@ -498,8 +497,8 @@ SELECT 5 = a FROM t1;
0 0
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's' Warning 1292 Truncated incorrect DECIMAL value: 's'
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a CHAR(16)); CREATE TABLE t1 (a CHAR(16));
INSERT INTO t1 VALUES ('5'), ('s'), (''); INSERT INTO t1 VALUES ('5'), ('s'), ('');
@ -509,8 +508,8 @@ SELECT 5 = a FROM t1;
0 0
0 0
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's ' Warning 1292 Truncated incorrect DECIMAL value: 's '
Warning 1292 Truncated incorrect DOUBLE value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535 # MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535

View File

@ -210,11 +210,11 @@ SELECT * FROM t2 WHERE yy = 'test';
yy c2 yy c2
00 2000 00 2000
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test' Warning 1292 Truncated incorrect DECIMAL value: 'test'
SELECT * FROM t4 WHERE yyyy = 'test'; SELECT * FROM t4 WHERE yyyy = 'test';
yyyy c4 yyyy c4
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test' Warning 1292 Truncated incorrect DECIMAL value: 'test'
SELECT * FROM t2 WHERE yy = '1999'; SELECT * FROM t2 WHERE yy = '1999';
yy c2 yy c2
99 1999 99 1999

View File

@ -1503,6 +1503,8 @@ execute stmt1 using @a;
set @a= 301; set @a= 301;
execute stmt1 using @a; execute stmt1 using @a;
deallocate prepare stmt1; deallocate prepare stmt1;
insert into v3(a) select sum(302);
insert into v3(a) select sum(303) over ();
select * from v3; select * from v3;
a b a b
100 0 100 0
@ -1521,6 +1523,14 @@ a b
301 10 301 10
301 1000 301 1000
301 2000 301 2000
302 0
302 10
302 1000
302 2000
303 0
303 10
303 1000
303 2000
drop view v3; drop view v3;
drop tables t1,t2; drop tables t1,t2;
create table t1(f1 int); create table t1(f1 int);
@ -6148,11 +6158,11 @@ CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 WHERE a <> 0 AND a = ' 1'; SELECT * FROM t1 WHERE a <> 0 AND a = ' 1';
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM v1 WHERE a <> 0 AND a = ' 1'; SELECT * FROM v1 WHERE a <> 0 AND a = ' 1';
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a ENUM('5','6')); CREATE TABLE t1 (a ENUM('5','6'));
@ -6175,11 +6185,11 @@ CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 WHERE a <> 0 AND a = ' 1'; SELECT * FROM t1 WHERE a <> 0 AND a = ' 1';
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM v1 WHERE a <> 0 AND a = ' 1'; SELECT * FROM v1 WHERE a <> 0 AND a = ' 1';
a a
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1' Warning 1292 Truncated incorrect DECIMAL value: '`1'
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a ENUM('5','6')); CREATE TABLE t1 (a ENUM('5','6'));
@ -6891,4 +6901,17 @@ ERROR 42S22: Unknown column 't1.x' in 'on clause'
CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b; CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
ERROR 42S22: Unknown column 't1.x' in 'on clause' ERROR 42S22: Unknown column 't1.x' in 'on clause'
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
#
# MDEV-29088: view specification contains unknown column in ON condition
#
create table t1 (a int);
create table t2 (b int);
create table t3 (c int);
create view v as
select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
ERROR 42S22: Unknown column 'd' in 'field list'
create algorithm=merge view v as
select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
ERROR 42S22: Unknown column 'd' in 'field list'
drop table t1,t2,t3;
# End of 10.4 tests # End of 10.4 tests

View File

@ -1334,6 +1334,8 @@ execute stmt1 using @a;
set @a= 301; set @a= 301;
execute stmt1 using @a; execute stmt1 using @a;
deallocate prepare stmt1; deallocate prepare stmt1;
insert into v3(a) select sum(302);
insert into v3(a) select sum(303) over ();
--sorted_result --sorted_result
select * from v3; select * from v3;
@ -6614,4 +6616,22 @@ CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
--echo #
--echo # MDEV-29088: view specification contains unknown column in ON condition
--echo #
create table t1 (a int);
create table t2 (b int);
create table t3 (c int);
--error ER_BAD_FIELD_ERROR
create view v as
select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
--error ER_BAD_FIELD_ERROR
create algorithm=merge view v as
select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
drop table t1,t2,t3;
--echo # End of 10.4 tests --echo # End of 10.4 tests

View File

@ -327,7 +327,6 @@ select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
CAST(a AS DECIMAL(13,5)) CAST(a AS DECIMAL(13,5))
0.00000 0.00000
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
create table t1 (a integer unsigned); create table t1 (a integer unsigned);
insert into t1 values (1),(-1),(0),(-2); insert into t1 values (1),(-1),(0),(-2);

View File

@ -435,18 +435,18 @@ SELECT table1 .`col_varchar_key`
FROM t1 table1 STRAIGHT_JOIN ( t1 table3 JOIN t1 table4 ON table4 .`pk` = table3 .`col_int_nokey` ) ON table4 .`col_varchar_nokey` ; FROM t1 table1 STRAIGHT_JOIN ( t1 table3 JOIN t1 table4 ON table4 .`pk` = table3 .`col_int_nokey` ) ON table4 .`col_varchar_nokey` ;
col_varchar_key col_varchar_key
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r' Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
DROP TABLE t1; DROP TABLE t1;
set join_cache_level=@save_join_cache_level; set join_cache_level=@save_join_cache_level;
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;
@ -664,70 +664,70 @@ table3.col_varchar_nokey = table2.col_varchar_key AND table3.pk > table2.col_var
count(*) sum(table1.col_int_key*table2.pk) count(*) sum(table1.col_int_key*table2.pk)
240 185955 240 185955
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v' Warning 1292 Truncated incorrect DECIMAL value: 'v'
set @my_save_join_cache_level= @@join_cache_level; set @my_save_join_cache_level= @@join_cache_level;
set @my_save_join_buffer_size= @@join_buffer_size; set @my_save_join_buffer_size= @@join_buffer_size;
set join_cache_level=6; set join_cache_level=6;

View File

@ -2,7 +2,7 @@
# -*- cperl -*- # -*- cperl -*-
# Copyright (c) 2004, 2014, Oracle and/or its affiliates. # Copyright (c) 2004, 2014, Oracle and/or its affiliates.
# Copyright (c) 2009, 2021, MariaDB Corporation # Copyright (c) 2009, 2022, MariaDB Corporation
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -77,7 +77,8 @@ BEGIN {
use lib "lib"; use lib "lib";
use Cwd ; use Cwd ;
use Getopt::Long; use POSIX ":sys_wait_h";
use Getopt::Long qw(:config bundling);
use My::File::Path; # Patched version of File::Path use My::File::Path; # Patched version of File::Path
use File::Basename; use File::Basename;
use File::Copy; use File::Copy;
@ -143,6 +144,7 @@ my $opt_start_dirty;
my $opt_start_exit; my $opt_start_exit;
my $start_only; my $start_only;
my $file_wsrep_provider; my $file_wsrep_provider;
my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.
our @global_suppressions; our @global_suppressions;
@ -485,7 +487,7 @@ sub main {
mark_time_used('init'); mark_time_used('init');
my ($prefix, $fail, $completed, $extra_warnings)= my ($prefix, $fail, $completed, $extra_warnings)=
run_test_server($server, $tests, $opt_parallel); run_test_server($server, $tests, \%children);
exit(0) if $opt_start_exit; exit(0) if $opt_start_exit;
@ -497,12 +499,16 @@ sub main {
foreach my $pid (keys %children) foreach my $pid (keys %children)
{ {
my $ret_pid= waitpid($pid, 0); my $ret_pid= waitpid($pid, 0);
if ($ret_pid != $pid){ if ($ret_pid == -1) {
mtr_report("Unknown process $ret_pid exited"); # Child was automatically reaped. Probably not possible
} # unless you $SIG{CHLD}= 'IGNORE'
else { mtr_warning("Child ${pid} was automatically reaped (this should never happen)");
delete $children{$ret_pid}; } elsif ($ret_pid != $pid) {
confess("Unexpected PID ${ret_pid} instead of expected ${pid}");
} }
my $exit_status= ($? >> 8);
mtr_verbose2("Child ${pid} exited with status ${exit_status}");
delete $children{$ret_pid};
} }
} }
@ -561,9 +567,8 @@ sub main {
sub run_test_server ($$$) { sub run_test_server ($$$) {
my ($server, $tests, $childs) = @_; my ($server, $tests, $children) = @_;
my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.
my $num_saved_datadir= 0; # Number of datadirs saved in vardir/log/ so far. my $num_saved_datadir= 0; # Number of datadirs saved in vardir/log/ so far.
my $num_failed_test= 0; # Number of tests failed so far my $num_failed_test= 0; # Number of tests failed so far
my $test_failure= 0; # Set true if test suite failed my $test_failure= 0; # Set true if test suite failed
@ -577,6 +582,7 @@ sub run_test_server ($$$) {
my $suite_timeout= start_timer(suite_timeout()); my $suite_timeout= start_timer(suite_timeout());
my $s= IO::Select->new(); my $s= IO::Select->new();
my $childs= 0;
$s->add($server); $s->add($server);
while (1) { while (1) {
if ($opt_stop_file) if ($opt_stop_file)
@ -590,12 +596,14 @@ sub run_test_server ($$$) {
mark_time_used('admin'); mark_time_used('admin');
my @ready = $s->can_read(1); # Wake up once every second my @ready = $s->can_read(1); # Wake up once every second
mtr_debug("Got ". (0 + @ready). " connection(s)");
mark_time_idle(); mark_time_idle();
foreach my $sock (@ready) { foreach my $sock (@ready) {
if ($sock == $server) { if ($sock == $server) {
# New client connected # New client connected
++$childs;
my $child= $sock->accept(); my $child= $sock->accept();
mtr_verbose("Client connected"); mtr_verbose2("Client connected (got ${childs} childs)");
$s->add($child); $s->add($child);
print $child "HELLO\n"; print $child "HELLO\n";
} }
@ -603,12 +611,10 @@ sub run_test_server ($$$) {
my $line= <$sock>; my $line= <$sock>;
if (!defined $line) { if (!defined $line) {
# Client disconnected # Client disconnected
mtr_verbose("Child closed socket"); --$childs;
mtr_verbose2("Child closed socket (left ${childs} childs)");
$s->remove($sock); $s->remove($sock);
$sock->close; $sock->close;
if (--$childs == 0){
return ("Completed", $test_failure, $completed, $extra_warnings);
}
next; next;
} }
chomp($line); chomp($line);
@ -638,32 +644,10 @@ sub run_test_server ($$$) {
no_chdir => 1, no_chdir => 1,
wanted => sub wanted => sub
{ {
my $core_file= $File::Find::name; My::CoreDump::core_wanted(\$num_saved_cores,
my $core_name= basename($core_file); $opt_max_save_core,
@opt_cases == 0,
# Name beginning with core, not ending in .gz $exe_mysqld, $opt_parallel);
if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
or (IS_WINDOWS and $core_name =~ /\.dmp$/))
{
# Ending with .dmp
mtr_report(" - found '$core_name'",
"($num_saved_cores/$opt_max_save_core)");
My::CoreDump->show($core_file, $exe_mysqld, $opt_parallel);
# Limit number of core files saved
if ($num_saved_cores >= $opt_max_save_core)
{
mtr_report(" - deleting it, already saved",
"$opt_max_save_core");
unlink("$core_file");
}
else
{
mtr_compress_file($core_file) unless @opt_cases;
++$num_saved_cores;
}
}
} }
}, },
$worker_savedir); $worker_savedir);
@ -873,6 +857,33 @@ sub run_test_server ($$$) {
} }
} }
if (!IS_WINDOWS) {
foreach my $pid (keys %$children)
{
my $res= waitpid($pid, WNOHANG);
if ($res == $pid || $res == -1) {
if ($res == -1) {
# Child was automatically reaped. Probably not possible
# unless you $SIG{CHLD}= 'IGNORE'
mtr_warning("Child ${pid} was automatically reaped (this should never happen)");
}
my $exit_status= ($? >> 8);
mtr_verbose2("Child ${pid} exited with status ${exit_status}");
delete $children->{$pid};
if (!%$children && $childs) {
mtr_verbose2("${childs} children didn't close socket before dying!");
$childs= 0;
}
} elsif ($res != 0) {
confess("Unexpected result ${res} on waitpid(${pid}, WNOHANG)");
}
}
}
if ($childs == 0){
return ("Completed", $test_failure, $completed, $extra_warnings);
}
# ---------------------------------------------------- # ----------------------------------------------------
# Check if test suite timer expired # Check if test suite timer expired
# ---------------------------------------------------- # ----------------------------------------------------
@ -1148,7 +1159,7 @@ sub command_line_setup {
'force-restart' => \$opt_force_restart, 'force-restart' => \$opt_force_restart,
'reorder!' => \$opt_reorder, 'reorder!' => \$opt_reorder,
'enable-disabled' => \&collect_option, 'enable-disabled' => \&collect_option,
'verbose+' => \$opt_verbose, 'verbose|v+' => \$opt_verbose,
'verbose-restart' => \&report_option, 'verbose-restart' => \&report_option,
'sleep=i' => \$opt_sleep, 'sleep=i' => \$opt_sleep,
'start-dirty' => \$opt_start_dirty, 'start-dirty' => \$opt_start_dirty,
@ -1183,7 +1194,8 @@ sub command_line_setup {
'skip-test-list=s' => \@opt_skip_test_list, 'skip-test-list=s' => \@opt_skip_test_list,
'xml-report=s' => \$opt_xml_report, 'xml-report=s' => \$opt_xml_report,
My::Debugger::options() My::Debugger::options(),
My::CoreDump::options()
); );
# fix options (that take an optional argument and *only* after = sign # fix options (that take an optional argument and *only* after = sign
@ -1612,6 +1624,8 @@ sub command_line_setup {
$opt_debug= 1; $opt_debug= 1;
$debug_d= "d,query,info,error,enter,exit"; $debug_d= "d,query,info,error,enter,exit";
} }
My::CoreDump::pre_setup();
} }
@ -3155,6 +3169,19 @@ sub mysql_install_db {
verbose => $opt_verbose, verbose => $opt_verbose,
) != 0) ) != 0)
{ {
find(
{
no_chdir => 1,
wanted => sub
{
My::CoreDump::core_wanted(\$num_saved_cores,
$opt_max_save_core,
@opt_cases == 0,
$exe_mysqld_bootstrap, $opt_parallel);
}
},
$install_datadir);
my $data= mtr_grab_file($path_bootstrap_log); my $data= mtr_grab_file($path_bootstrap_log);
mtr_error("Error executing mysqld --bootstrap\n" . mtr_error("Error executing mysqld --bootstrap\n" .
"Could not install system database from $bootstrap_sql_file\n" . "Could not install system database from $bootstrap_sql_file\n" .
@ -5667,7 +5694,7 @@ sub usage ($) {
local $"= ','; # for @DEFAULT_SUITES below local $"= ','; # for @DEFAULT_SUITES below
print <<HERE . My::Debugger::help() . <<HERE; print <<HERE . My::Debugger::help() . My::CoreDump::help() . <<HERE;
$0 [ OPTIONS ] [ TESTCASE ] $0 [ OPTIONS ] [ TESTCASE ]

View File

@ -1,3 +1,4 @@
call mtr.add_suppression("Write to binary log failed: Multi-statement transaction required more than .max_binlog_cache_size.*");
SET AUTOCOMMIT=0; SET AUTOCOMMIT=0;
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB; CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;

View File

@ -1,3 +1,4 @@
call mtr.add_suppression("Write to binary log failed: Error writing file*");
# #
# Test injecting binlog write error when executing queries # Test injecting binlog write error when executing queries
# #

View File

@ -6,7 +6,7 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_log_bin.inc --source include/have_log_bin.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
call mtr.add_suppression("Write to binary log failed: Multi-statement transaction required more than .max_binlog_cache_size.*");
SET AUTOCOMMIT=0; SET AUTOCOMMIT=0;
# Create 1st table # Create 1st table

View File

@ -21,6 +21,8 @@
source include/have_debug.inc; source include/have_debug.inc;
source include/have_binlog_format_mixed_or_statement.inc; source include/have_binlog_format_mixed_or_statement.inc;
call mtr.add_suppression("Write to binary log failed: Error writing file*");
--echo # --echo #
--echo # Test injecting binlog write error when executing queries --echo # Test injecting binlog write error when executing queries
--echo # --echo #

View File

@ -1,3 +1,4 @@
call mtr.add_suppression("Write to binary log failed: Error writing file*");
# #
# Test injecting binlog write error when executing queries # Test injecting binlog write error when executing queries
# #

View File

@ -1,6 +1,8 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Write to binary log failed: Multi-row statements required more than .max_binlog_stmt_cache_size");
call mtr.add_suppression("Write to binary log failed: Multi-statement transaction required more than .max_binlog_cache_size");
SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL max_binlog_cache_size = 4096;
SET GLOBAL binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096;
SET GLOBAL max_binlog_stmt_cache_size = 4096; SET GLOBAL max_binlog_stmt_cache_size = 4096;

View File

@ -2224,6 +2224,7 @@ SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
2020 2020 1998-12-16 1998-12-16 11:30:45 2020 2020 1998-12-16 1998-12-16 11:30:45
2020 2040 1998-12-10 1998-12-10 11:30:45 2020 2040 1998-12-10 1998-12-10 11:30:45
2069 2069 1998-12-13 1998-12-13 11:30:45
SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 LIMIT 2; SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
2020 2020 1998-12-16 1998-12-16 11:30:45 2020 2020 1998-12-16 1998-12-16 11:30:45
@ -2369,6 +2370,7 @@ SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
2020 2040 1998-12-10 1998-12-10 11:30:45 2020 2040 1998-12-10 1998-12-10 11:30:45
2020 2020 1998-12-16 1998-12-16 11:30:45 2020 2020 1998-12-16 1998-12-16 11:30:45
2069 2069 1998-12-13 1998-12-13 11:30:45
SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
2020 2040 1998-12-10 1998-12-10 11:30:45 2020 2040 1998-12-10 1998-12-10 11:30:45
@ -4292,8 +4294,12 @@ SELECT * FROM t2 WHERE c2 BETWEEN '1970' AND 2155 ORDER BY c1,c2 LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2; SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
70 70 1998-12-12 1998-12-12 11:30:45
55 55 1998-12-26 1998-12-26 11:30:45
SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2 LIMIT 2; SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2 LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
70 70 1998-12-12 1998-12-12 11:30:45
55 55 1998-12-26 1998-12-26 11:30:45
SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2; SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 LIMIT 2; SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 LIMIT 2;
@ -4429,8 +4435,12 @@ SELECT * FROM t2 WHERE c2 BETWEEN '1970' AND 2155 ORDER BY c1,c2 DESC LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2 DESC; SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
70 70 1998-12-12 1998-12-12 11:30:45
55 55 1998-12-26 1998-12-26 11:30:45
SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t2 WHERE c2 IN ('1970',2155) ORDER BY c1,c2 DESC LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
70 70 1998-12-12 1998-12-12 11:30:45
55 55 1998-12-26 1998-12-26 11:30:45
SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC; SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t2 WHERE c2 >= '1970' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC LIMIT 2;
@ -5212,10 +5222,13 @@ SELECT * FROM t3 WHERE c1 BETWEEN 69 AND '2020' ORDER BY c1,c2 LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2; SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
20 20 1998-12-16 1998-12-16 11:30:45
20 40 1998-12-10 1998-12-10 11:30:45
69 69 1998-12-13 1998-12-13 11:30:45 69 69 1998-12-13 1998-12-13 11:30:45
SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 LIMIT 2; SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
69 69 1998-12-13 1998-12-13 11:30:45 20 20 1998-12-16 1998-12-16 11:30:45
20 40 1998-12-10 1998-12-10 11:30:45
SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2; SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2 LIMIT 2; SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2 LIMIT 2;
@ -5344,10 +5357,13 @@ SELECT * FROM t3 WHERE c1 BETWEEN 69 AND '2020' ORDER BY c1,c2 DESC LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC; SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
20 40 1998-12-10 1998-12-10 11:30:45
20 20 1998-12-16 1998-12-16 11:30:45
69 69 1998-12-13 1998-12-13 11:30:45 69 69 1998-12-13 1998-12-13 11:30:45
SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t3 WHERE c1 IN (69,'2020') ORDER BY c1,c2 DESC LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
69 69 1998-12-13 1998-12-13 11:30:45 20 40 1998-12-10 1998-12-10 11:30:45
20 20 1998-12-16 1998-12-16 11:30:45
SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2 DESC; SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t3 WHERE c1 >= 69 AND c1 < '2020' AND c2 = '2009' ORDER BY c1,c2 DESC LIMIT 2;
@ -5595,8 +5611,14 @@ c1 c2 c3 c4
01 01 1998-12-31 1998-12-31 11:30:45 01 01 1998-12-31 1998-12-31 11:30:45
SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2; SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
00 00 2008-01-08 2008-01-09 00:00:00
00 00 1998-12-29 1998-12-29 11:30:45
00 00 1998-12-26 1998-12-26 11:30:45
55 55 1998-12-26 1998-12-26 11:30:45
SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2 LIMIT 2; SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2 LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
00 00 2008-01-08 2008-01-09 00:00:00
00 00 1998-12-29 1998-12-29 11:30:45
SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2; SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 LIMIT 2; SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 LIMIT 2;
@ -5745,8 +5767,14 @@ c1 c2 c3 c4
01 01 1998-12-31 1998-12-31 11:30:45 01 01 1998-12-31 1998-12-31 11:30:45
SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2 DESC; SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
00 00 2008-01-08 2008-01-09 00:00:00
00 00 1998-12-29 1998-12-29 11:30:45
00 00 1998-12-26 1998-12-26 11:30:45
55 55 1998-12-26 1998-12-26 11:30:45
SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t3 WHERE c2 IN ('2000',2155) ORDER BY c1,c2 DESC LIMIT 2;
c1 c2 c3 c4 c1 c2 c3 c4
00 00 2008-01-08 2008-01-09 00:00:00
00 00 1998-12-29 1998-12-29 11:30:45
SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC; SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC;
c1 c2 c3 c4 c1 c2 c3 c4
SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC LIMIT 2; SELECT * FROM t3 WHERE c2 >= '2000' AND c2 < 2155 AND c1 = '1999' ORDER BY c1,c2 DESC LIMIT 2;

View File

@ -3411,11 +3411,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 29 -3333.33 -3333.3333 29
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3431,11 +3428,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 29 -3333.33 -3333.3333 29
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1; DROP VIEW v1;
@ -3453,11 +3447,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
@ -3475,11 +3466,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
@ -3499,11 +3487,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 27 -3333.33 -3333.3333 27
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3519,11 +3504,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 27 -3333.33 -3333.3333 27
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1; DROP VIEW v1;
@ -3541,11 +3523,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 26 -3333.33 -3333.3333 26
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3561,11 +3540,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 26 -3333.33 -3333.3333 26
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1; DROP VIEW v1;

View File

@ -3412,11 +3412,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 29 -3333.33 -3333.3333 29
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3432,11 +3429,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 29 -3333.33 -3333.3333 29
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1; DROP VIEW v1;
@ -3454,11 +3448,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
@ -3476,11 +3467,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
@ -3500,11 +3488,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 27 -3333.33 -3333.3333 27
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3520,11 +3505,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 27 -3333.33 -3333.3333 27
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1; DROP VIEW v1;
@ -3542,11 +3524,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 26 -3333.33 -3333.3333 26
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3562,11 +3541,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 26 -3333.33 -3333.3333 26
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1; DROP VIEW v1;

View File

@ -3412,11 +3412,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 29 -3333.33 -3333.3333 29
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3432,11 +3429,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 29 -3333.33 -3333.3333 29
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- '
DROP VIEW v1; DROP VIEW v1;
@ -3454,11 +3448,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
@ -3476,11 +3467,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
@ -3500,11 +3488,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 27 -3333.33 -3333.3333 27
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3520,11 +3505,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 27 -3333.33 -3333.3333 27
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...' Warning 1292 Truncated incorrect DECIMAL value: '<---------1000 characters----------------------------------------------------------------------------------------------------...'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1; DROP VIEW v1;
@ -3542,11 +3524,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 26 -3333.33 -3333.3333 26
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
@ -3562,11 +3541,8 @@ NULL NULL 1
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 26 -3333.33 -3333.3333 26
Warnings: Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ' Warning 1292 Truncated incorrect DECIMAL value: ' '
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->' Warning 1292 Truncated incorrect DECIMAL value: '<--------30 characters------->'
Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- ' Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
DROP VIEW v1; DROP VIEW v1;

View File

@ -251,7 +251,7 @@ HAVING x > '2000-02-06'
ORDER BY col_time_nokey, pk; ORDER BY col_time_nokey, pk;
x x
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '2000-02-06' Warning 1292 Truncated incorrect DECIMAL value: '2000-02-06'
DROP TABLE c; DROP TABLE c;
# Bug#21341044: Conditional jump at sort_param::make_sort_key # Bug#21341044: Conditional jump at sort_param::make_sort_key
CREATE TABLE t1 ( CREATE TABLE t1 (

View File

@ -492,11 +492,11 @@ ORDER BY field1, alias1.col_date_key, field1 ASC, field1 DESC,
alias1.col_time_key ASC, field1; alias1.col_time_key ASC, field1;
field1 field1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 't' Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE cc; DROP TABLE cc;
SET sql_mode=@save_old_sql_mode; SET sql_mode=@save_old_sql_mode;
# #

View File

@ -1076,11 +1076,11 @@ ORDER BY field1, alias1.col_date_key, field1 ASC, field1 DESC,
alias1.col_time_key ASC, field1; alias1.col_time_key ASC, field1;
field1 field1
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c' Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 't' Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DOUBLE value: 'm' Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE cc; DROP TABLE cc;
SET sql_mode=@save_old_sql_mode; SET sql_mode=@save_old_sql_mode;
# #
@ -1179,13 +1179,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'cccc' Warning 1292 Truncated incorrect DOUBLE value: 'cccc'
Warning 1292 Truncated incorrect DOUBLE value: 'cccc' Warning 1292 Truncated incorrect DECIMAL value: 'cccc'
SELECT /*+ bka() */ 1 AS c FROM t AS b RIGHT JOIN t AS c ON b.a > c.c SELECT /*+ bka() */ 1 AS c FROM t AS b RIGHT JOIN t AS c ON b.a > c.c
WHERE b.b>c.a; WHERE b.b>c.a;
c c
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'cccc' Warning 1292 Truncated incorrect DOUBLE value: 'cccc'
Warning 1292 Truncated incorrect DOUBLE value: 'cccc' Warning 1292 Truncated incorrect DECIMAL value: 'cccc'
DROP TABLE t; DROP TABLE t;
set @optimizer_switch_save = @@optimizer_switch; set @optimizer_switch_save = @@optimizer_switch;
set optimizer_switch='mrr_cost_based=off'; set optimizer_switch='mrr_cost_based=off';

View File

@ -855,6 +855,20 @@ Error 1296 Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`a`)
DROP TABLE t1; DROP TABLE t1;
FOUND 1 /InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15.*/ in mysqld.1.err FOUND 1 /InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 15.*/ in mysqld.1.err
# End of 10.2 tests # End of 10.2 tests
#
# MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN
#
SET NAMES utf8;
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE DATABASE `db`;
CREATE TABLE `db`.u (
a INT PRIMARY KEY,
CONSTRAINT `††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††††`
FOREIGN KEY (a) REFERENCES test.t (a)) ENGINE=InnoDB;
DROP TABLE `db`.u;
DROP DATABASE `db`;
DROP TABLE t;
# End of 10.3 tests
CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)), CREATE TABLE t1 (a GEOMETRY, INDEX(a(8)),
FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB; FOREIGN KEY (a) REFERENCES x (xx)) ENGINE=InnoDB;
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed") ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")

View File

@ -0,0 +1,16 @@
#
# MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN
#
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE DATABASE `d255`;
CREATE TABLE `d255`.`d255`
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
ERROR HY000: Long database name and identifier for object resulted in path length exceeding 512 characters. Path: './@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023/@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@
CREATE TABLE `d255`.`_##################################################`
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
ERROR HY000: Long database name and identifier for object resulted in path length exceeding 512 characters. Path: './@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023/_@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023@0023
CREATE TABLE `d255`.`##################################################`
(a INT PRIMARY KEY, FOREIGN KEY(a) REFERENCES test.t(a)) ENGINE=InnoDB;
DROP DATABASE `d255`;
DROP TABLE t;
# End of 10.3 tests

Some files were not shown because too many files have changed in this diff Show More