1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.8 into 10.9

This commit is contained in:
Marko Mäkelä
2022-07-28 10:47:33 +03:00
421 changed files with 20471 additions and 8799 deletions

View File

@ -118,8 +118,10 @@ fedora-ninja:
- mkdir builddir; cd builddir - mkdir builddir; cd builddir
- cmake -DRPM=generic $CMAKE_FLAGS -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -G Ninja .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log - cmake -DRPM=generic $CMAKE_FLAGS -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -G Ninja .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
- ninja -t graph > ../dependencies.dot && dot -Tpng -o ../dependencies.png ../dependencies.dot - ninja -t graph > ../dependencies.dot && dot -Tpng -o ../dependencies.png ../dependencies.dot
- eatmydata ninja package --verbose 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log - eatmydata ninja package -j 2 --verbose 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
# Ninja builds are not affected by bug https://jira.mariadb.org/browse/MDEV-25968 # @TODO: Unlike other builds, the Ninja builds using Gitlab.com runners don't get stuck, but they do get
# stuck on runners with more processors, see https://jira.mariadb.org/browse/MDEV-25968.
# Thus, use the same limitation on Ninja builds as well to ensure it never gets stuck due to this bug.
- ninja test - ninja test
- *rpm_listfiles - *rpm_listfiles
- mkdir ../rpm; mv *.rpm ../rpm - mkdir ../rpm; mv *.rpm ../rpm

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=%APPVEYOR_BUILD_FOLDER%\win\appveyor_skip_tests.txt --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=%APPVEYOR_BUILD_FOLDER%\win\appveyor_skip_tests.txt --mysqld=--loose-innodb-flush-log-at-trx-commit=2
image: Visual Studio 2022 image: Visual Studio 2022

View File

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2000, 2018, Oracle and/or its affiliates. Copyright (c) 2000, 2018, 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
@ -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
@ -2857,6 +2857,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)
@ -2865,9 +2868,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);
@ -3791,7 +3791,6 @@ print_table_data(MYSQL_RES *result)
{ {
String separator(256); String separator(256);
MYSQL_ROW cur; MYSQL_ROW cur;
MYSQL_FIELD *field;
bool *num_flag; bool *num_flag;
num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result)); num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
@ -3803,7 +3802,7 @@ print_table_data(MYSQL_RES *result)
mysql_field_seek(result,0); mysql_field_seek(result,0);
} }
separator.copy("+",1,charset_info); separator.copy("+",1,charset_info);
while ((field = mysql_fetch_field(result))) while (MYSQL_FIELD *field= mysql_fetch_field(result))
{ {
uint length= column_names ? field->name_length : 0; uint length= column_names ? field->name_length : 0;
if (quick) if (quick)
@ -3825,7 +3824,7 @@ print_table_data(MYSQL_RES *result)
{ {
mysql_field_seek(result,0); mysql_field_seek(result,0);
(void) tee_fputs("|", PAGER); (void) tee_fputs("|", PAGER);
for (uint off=0; (field = mysql_fetch_field(result)) ; off++) while (MYSQL_FIELD *field= mysql_fetch_field(result))
{ {
size_t name_length= (uint) strlen(field->name); size_t name_length= (uint) strlen(field->name);
size_t numcells= charset_info->numcells(field->name, size_t numcells= charset_info->numcells(field->name,
@ -3867,7 +3866,7 @@ print_table_data(MYSQL_RES *result)
data_length= (uint) lengths[off]; data_length= (uint) lengths[off];
} }
field= mysql_fetch_field(result); MYSQL_FIELD *field= mysql_fetch_field(result);
field_max_length= field->max_length; field_max_length= field->max_length;
/* /*

View File

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2001, 2013, Oracle and/or its affiliates. Copyright (c) 2001, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 2017, MariaDB Copyright (c) 2010, 2012, MariaDB
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
@ -1061,7 +1061,6 @@ static void print_result()
char prev[(NAME_LEN+9)*3+2]; char prev[(NAME_LEN+9)*3+2];
char prev_alter[MAX_ALTER_STR_SIZE]; char prev_alter[MAX_ALTER_STR_SIZE];
size_t length_of_db= strlen(sock->db); size_t length_of_db= strlen(sock->db);
uint i;
my_bool found_error=0, table_rebuild=0; my_bool found_error=0, table_rebuild=0;
DYNAMIC_ARRAY *array4repair= &tables4repair; DYNAMIC_ARRAY *array4repair= &tables4repair;
DBUG_ENTER("print_result"); DBUG_ENTER("print_result");
@ -1070,7 +1069,7 @@ static void print_result()
prev[0] = '\0'; prev[0] = '\0';
prev_alter[0]= 0; prev_alter[0]= 0;
for (i = 0; (row = mysql_fetch_row(res)); i++) while ((row = mysql_fetch_row(res)))
{ {
int changed = strcmp(prev, row[0]); int changed = strcmp(prev, row[0]);
my_bool status = !strcmp(row[2], "status"); my_bool status = !strcmp(row[2], "status");

View File

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2005, 2015, Oracle and/or its affiliates. Copyright (c) 2005, 2015, Oracle and/or its affiliates.
Copyright (c) 2010, 2017, MariaDB Copyright (c) 2010, 2022, MariaDB
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
@ -1897,12 +1897,11 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
pthread_handler_t run_task(void *p) pthread_handler_t run_task(void *p)
{ {
ulonglong counter= 0, queries; ulonglong queries;
ulonglong detach_counter; ulonglong detach_counter;
unsigned int commit_counter; unsigned int commit_counter;
MYSQL *mysql; MYSQL *mysql;
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW row;
statement *ptr; statement *ptr;
thread_context *con= (thread_context *)p; thread_context *con= (thread_context *)p;
@ -2023,8 +2022,7 @@ limit_not_met:
my_progname, mysql_errno(mysql), mysql_error(mysql)); my_progname, mysql_errno(mysql), mysql_error(mysql));
else else
{ {
while ((row= mysql_fetch_row(result))) while (mysql_fetch_row(result)) {}
counter++;
mysql_free_result(result); mysql_free_result(result);
} }
} }
@ -2034,7 +2032,7 @@ limit_not_met:
if (commit_rate && (++commit_counter == commit_rate)) if (commit_rate && (++commit_counter == commit_rate))
{ {
commit_counter= 0; commit_counter= 0;
run_query(mysql, "COMMIT", strlen("COMMIT")); run_query(mysql, C_STRING_WITH_LEN("COMMIT"));
} }
if (con->limit && queries == con->limit) if (con->limit && queries == con->limit)
@ -2046,7 +2044,7 @@ limit_not_met:
end: end:
if (commit_rate) if (commit_rate)
run_query(mysql, "COMMIT", strlen("COMMIT")); run_query(mysql, C_STRING_WITH_LEN("COMMIT"));
mysql_close(mysql); mysql_close(mysql);

View File

@ -1,5 +1,5 @@
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, MariaDB Corporation. # Copyright (c) 2011, 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

View File

@ -154,7 +154,11 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
# (can be a static or shared lib) # (can be a static or shared lib)
IF(LIB_TYPE STREQUAL "STATIC_LIBRARY") IF(LIB_TYPE STREQUAL "STATIC_LIBRARY")
SET(STATIC_TGTS ${STATIC_TGTS} ${LIB}) SET(STATIC_TGTS ${STATIC_TGTS} ${LIB})
SET(STATIC_LIBS ${STATIC_LIBS} $<TARGET_FILE:${LIB}>) IF(MSVC)
TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ${LIB})
ELSE()
SET(STATIC_LIBS ${STATIC_LIBS} $<TARGET_FILE:${LIB}>)
ENDIF()
ADD_DEPENDENCIES(${TARGET} ${LIB}) ADD_DEPENDENCIES(${TARGET} ${LIB})
# Extract dependent OS libraries # Extract dependent OS libraries
GET_DEPENDEND_OS_LIBS(${LIB} LIB_OSLIBS) GET_DEPENDEND_OS_LIBS(${LIB} LIB_OSLIBS)

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 "")

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

@ -7,9 +7,7 @@
#include <my_sys.h> #include <my_sys.h>
#include <my_pthread.h> #include <my_pthread.h>
int main (argc, argv) int main (int argc, char **argv)
int argc;
char *argv[];
{ {
register int result, ix; register int result, ix;
extern int factorial(int); extern int factorial(int);

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

@ -841,7 +841,6 @@ static void backup_file_op(uint32_t space_id, int type,
case FILE_MODIFY: case FILE_MODIFY:
ddl_tracker.insert_defer_id( ddl_tracker.insert_defer_id(
space_id, filename_to_spacename(name, len)); space_id, filename_to_spacename(name, len));
msg("DDL tracking : modify %u \"%.*s\"", space_id, int(len), name);
break; break;
case FILE_RENAME: case FILE_RENAME:
{ {
@ -890,7 +889,6 @@ static void backup_file_op_fail(uint32_t space_id, int type,
filename_to_spacename(name, len).c_str()); filename_to_spacename(name, len).c_str());
break; break;
case FILE_MODIFY: case FILE_MODIFY:
msg("DDL tracking : modify %u \"%.*s\"", space_id, int(len), name);
break; break;
case FILE_RENAME: case FILE_RENAME:
msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"", msg("DDL tracking : rename %u \"%.*s\",\"%.*s\"",
@ -2992,14 +2990,8 @@ static bool xtrabackup_copy_logfile()
const size_t sequence_offset{log_sys.is_encrypted() ? 8U + 5U : 5U}; const size_t sequence_offset{log_sys.is_encrypted() ? 8U + 5U : 5U};
const size_t block_size_1{log_sys.get_block_size() - 1}; const size_t block_size_1{log_sys.get_block_size() - 1};
#ifdef HAVE_PMEM ut_ad(!log_sys.is_pmem());
if (log_sys.is_pmem())
{
recv_sys.offset= size_t(log_sys.calc_lsn_offset(recv_sys.lsn));
recv_sys.len= size_t(log_sys.file_size);
}
else
#endif
{ {
recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) & recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) &
block_size_1; block_size_1;
@ -3011,87 +3003,6 @@ static bool xtrabackup_copy_logfile()
recv_sys_t::parse_mtr_result r; recv_sys_t::parse_mtr_result r;
size_t start_offset{recv_sys.offset}; size_t start_offset{recv_sys.offset};
#ifdef HAVE_PMEM
if (log_sys.is_pmem())
{
if ((ut_d(r=) recv_sys.parse_pmem(STORE_NO)) != recv_sys_t::OK)
{
ut_ad(r == recv_sys_t::GOT_EOF);
goto retry;
}
retry_count= 0;
do
{
const byte seq{log_sys.get_sequence_bit(recv_sys.lsn -
sequence_offset)};
ut_ad(recv_sys.offset >= log_sys.START_OFFSET);
ut_ad(recv_sys.offset < recv_sys.len);
ut_ad(log_sys.buf[recv_sys.offset
>= log_sys.START_OFFSET + sequence_offset
? recv_sys.offset - sequence_offset
: recv_sys.len - sequence_offset +
recv_sys.offset - log_sys.START_OFFSET] ==
seq);
static const byte seq_1{1};
if (UNIV_UNLIKELY(start_offset > recv_sys.offset))
{
const ssize_t so(recv_sys.offset - (log_sys.START_OFFSET +
sequence_offset));
if (so <= 0)
{
if (ds_write(dst_log_file, log_sys.buf + start_offset,
recv_sys.len - start_offset + so) ||
ds_write(dst_log_file, &seq_1, 1))
goto write_error;
if (so < -1 &&
ds_write(dst_log_file, log_sys.buf + recv_sys.len + (1 + so),
-(1 + so)))
goto write_error;
if (ds_write(dst_log_file, log_sys.buf + log_sys.START_OFFSET,
recv_sys.offset - log_sys.START_OFFSET))
goto write_error;
}
else
{
if (ds_write(dst_log_file, log_sys.buf + start_offset,
recv_sys.len - start_offset))
goto write_error;
if (ds_write(dst_log_file, log_sys.buf + log_sys.START_OFFSET, so))
goto write_error;
if (ds_write(dst_log_file, &seq_1, 1))
goto write_error;
if (so > 1 &&
ds_write(dst_log_file, log_sys.buf + recv_sys.offset -
(so - 1), so - 1))
goto write_error;
}
}
else if (seq == 1)
{
if (ds_write(dst_log_file, log_sys.buf + start_offset,
recv_sys.offset - start_offset))
goto write_error;
}
else if (ds_write(dst_log_file, log_sys.buf + start_offset,
recv_sys.offset - start_offset - sequence_offset) ||
ds_write(dst_log_file, &seq_1, 1) ||
ds_write(dst_log_file, log_sys.buf +
recv_sys.offset - sequence_offset + 1,
sequence_offset - 1))
goto write_error;
start_offset= recv_sys.offset;
}
while ((ut_d(r=)recv_sys.parse_pmem(STORE_NO)) == recv_sys_t::OK);
ut_ad(r == recv_sys_t::GOT_EOF);
pthread_cond_broadcast(&scanned_lsn_cond);
break;
}
else
#endif
{ {
{ {
auto source_offset= auto source_offset=
@ -3135,9 +3046,6 @@ static bool xtrabackup_copy_logfile()
if (ds_write(dst_log_file, log_sys.buf + start_offset, if (ds_write(dst_log_file, log_sys.buf + start_offset,
recv_sys.offset - start_offset)) recv_sys.offset - start_offset))
{ {
#ifdef HAVE_PMEM
write_error:
#endif
msg("Error: write to ib_logfile0 failed"); msg("Error: write to ib_logfile0 failed");
return true; return true;
} }
@ -3167,9 +3075,6 @@ static bool xtrabackup_copy_logfile()
else else
{ {
recv_sys.len= recv_sys.offset & ~block_size_1; recv_sys.len= recv_sys.offset & ~block_size_1;
#ifdef HAVE_PMEM
retry:
#endif
if (retry_count == 100) if (retry_count == 100)
break; break;

View File

@ -148,9 +148,7 @@ int main(int argc, char *argv[])
/* reads options */ /* reads options */
/* Initiates DEBUG - but no debugging here ! */ /* Initiates DEBUG - but no debugging here ! */
static int static_get_options(argc,argv) static int static_get_options(int *argc, char***argv)
register int *argc;
register char **argv[];
{ {
int help,version; int help,version;
char *pos; char *pos;
@ -218,10 +216,9 @@ register char **argv[];
} /* static_get_options */ } /* static_get_options */
static int get_replace_strings(argc,argv,from_array,to_array) static int get_replace_strings(int *argc, char ***argv,
register int *argc; POINTER_ARRAY *from_array,
register char **argv[]; POINTER_ARRAY *to_array)
POINTER_ARRAY *from_array,*to_array;
{ {
char *pos; char *pos;
@ -974,9 +971,7 @@ static void free_buffer()
bytes read from disk. bytes read from disk.
*/ */
static int fill_buffer_retaining(fd,n) static int fill_buffer_retaining(File fd, int n)
File fd;
int n;
{ {
int i; int i;
@ -1019,9 +1014,7 @@ int n;
/* Return 0 if convert is ok */ /* Return 0 if convert is ok */
/* Global variable update is set if something was changed */ /* Global variable update is set if something was changed */
static int convert_pipe(rep,in,out) static int convert_pipe(REPLACE *rep, FILE *in, FILE *out)
REPLACE *rep;
FILE *in,*out;
{ {
int retain,error; int retain,error;
uint length; uint length;

View File

@ -1,5 +1,5 @@
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. # Copyright (c) 2006, 2011, Oracle and/or its affiliates.
# Copyright (c) 2009, 2020, 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
@ -154,6 +154,7 @@ ENDIF()
IF(TARGET libfmt) IF(TARGET libfmt)
ADD_DEPENDENCIES(sql_embedded libfmt) ADD_DEPENDENCIES(sql_embedded libfmt)
ENDIF() ENDIF()
TARGET_LINK_LIBRARIES(sql_embedded LINK_PRIVATE tpool ${CRC32_LIBRARY})
# On Windows, static embedded server library is called mysqlserver.lib # On Windows, static embedded server library is called mysqlserver.lib
# On Unix, it is libmysqld.a # On Unix, it is libmysqld.a

View File

@ -496,7 +496,7 @@ MYSQL_METHODS embedded_methods=
char **copy_arguments(int argc, char **argv) char **copy_arguments(int argc, char **argv)
{ {
uint length= 0; size_t length= 0;
char **from, **res, **end= argv+argc; char **from, **res, **end= argv+argc;
for (from=argv ; from != end ; from++) for (from=argv ; from != end ; from++)
@ -1111,11 +1111,11 @@ bool Protocol_text::store_field_metadata(const THD * thd,
client_field->flags= (uint16) server_field.flags; client_field->flags= (uint16) server_field.flags;
client_field->decimals= server_field.decimals; client_field->decimals= server_field.decimals;
client_field->db_length= strlen(client_field->db); client_field->db_length= (uint)strlen(client_field->db);
client_field->table_length= strlen(client_field->table); client_field->table_length= (uint)strlen(client_field->table);
client_field->name_length= strlen(client_field->name); client_field->name_length= (uint)strlen(client_field->name);
client_field->org_name_length= strlen(client_field->org_name); client_field->org_name_length= (uint)strlen(client_field->org_name);
client_field->org_table_length= strlen(client_field->org_table); client_field->org_table_length= (uint)strlen(client_field->org_table);
client_field->catalog= dup_str_aux(field_alloc, "def", 3, cs, thd_cs); client_field->catalog= dup_str_aux(field_alloc, "def", 3, cs, thd_cs);
client_field->catalog_length= 3; client_field->catalog_length= 3;
@ -1389,12 +1389,12 @@ bool Protocol::net_store_data(const uchar *from, size_t length)
if (!(field_buf= (char*) alloc_root(alloc, length + sizeof(uint) + 1))) if (!(field_buf= (char*) alloc_root(alloc, length + sizeof(uint) + 1)))
return TRUE; return TRUE;
*(uint *)field_buf= length; *(uint *)field_buf= (uint)length;
*next_field= field_buf + sizeof(uint); *next_field= field_buf + sizeof(uint);
memcpy((uchar*) *next_field, from, length); memcpy((uchar*) *next_field, from, length);
(*next_field)[length]= 0; (*next_field)[length]= 0;
if (next_mysql_field->max_length < length) if (next_mysql_field->max_length < length)
next_mysql_field->max_length=length; next_mysql_field->max_length=(ulong)length;
++next_field; ++next_field;
++next_mysql_field; ++next_mysql_field;
return FALSE; return FALSE;
@ -1404,7 +1404,7 @@ bool Protocol::net_store_data(const uchar *from, size_t length)
bool Protocol::net_store_data_cs(const uchar *from, size_t length, bool Protocol::net_store_data_cs(const uchar *from, size_t length,
CHARSET_INFO *from_cs, CHARSET_INFO *to_cs) CHARSET_INFO *from_cs, CHARSET_INFO *to_cs)
{ {
uint conv_length= to_cs->mbmaxlen * length / from_cs->mbminlen; size_t conv_length= length * to_cs->mbmaxlen / from_cs->mbminlen;
uint dummy_error; uint dummy_error;
char *field_buf; char *field_buf;
if (!thd->mysql) // bootstrap file handling if (!thd->mysql) // bootstrap file handling
@ -1415,10 +1415,10 @@ bool Protocol::net_store_data_cs(const uchar *from, size_t length,
*next_field= field_buf + sizeof(uint); *next_field= field_buf + sizeof(uint);
length= copy_and_convert(*next_field, conv_length, to_cs, length= copy_and_convert(*next_field, conv_length, to_cs,
(const char*) from, length, from_cs, &dummy_error); (const char*) from, length, from_cs, &dummy_error);
*(uint *) field_buf= length; *(uint *) field_buf= (uint)length;
(*next_field)[length]= 0; (*next_field)[length]= 0;
if (next_mysql_field->max_length < length) if (next_mysql_field->max_length < length)
next_mysql_field->max_length= length; next_mysql_field->max_length= (ulong)length;
++next_field; ++next_field;
++next_mysql_field; ++next_mysql_field;
return false; return false;

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

@ -105,7 +105,6 @@ INSERT INTO global_suppressions VALUES
*/ */
("Got error [0-9]* when reading table"), ("Got error [0-9]* when reading table"),
("Incorrect definition of table"),
("Incorrect information in file"), ("Incorrect information in file"),
("InnoDB: Warning: we did not need to do crash recovery"), ("InnoDB: Warning: we did not need to do crash recovery"),
/*("Invalid \\(old\\?\\) table or database name"),*/ /*("Invalid \\(old\\?\\) table or database name"),*/
@ -157,6 +156,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]
@ -108,6 +109,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) {
@ -164,7 +169,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);
@ -189,16 +194,23 @@ 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 $interactive; my $interactive;
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;
$interactive ||= ($debuggers{$k}->{interactive} || $interactive ||= ($debuggers{$k}->{interactive} ||
$debuggers{$k}->{term} || $debuggers{$k}->{term} ||
@ -207,10 +219,40 @@ sub pre_setup() {
$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};
@ -226,49 +268,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

@ -1,3 +1,7 @@
--source include/windows.inc --source include/windows.inc
--source include/no_utf8_cli.inc --source include/no_utf8_cli.inc
if(!`select $MTR_PARALLEL = 1`)
{
skip race condition with parallel builds;
}
--exec chcp 1257 > NUL && $MYSQL --default-character-set=auto -e "select @@character_set_client" --exec chcp 1257 > NUL && $MYSQL --default-character-set=auto -e "select @@character_set_client"

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

@ -644,3 +644,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

@ -1,5 +1,6 @@
set sql_mode=""; set sql_mode="";
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted"); call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
drop database if exists events_test; drop database if exists events_test;
drop database if exists db_x; drop database if exists db_x;
drop database if exists mysqltest_db2; drop database if exists mysqltest_db2;

View File

@ -8,6 +8,7 @@ set sql_mode="";
--source include/default_charset.inc --source include/default_charset.inc
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted"); call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
--disable_warnings --disable_warnings
drop database if exists events_test; drop database if exists events_test;

View File

@ -21,6 +21,7 @@ insert into event_like select * from mysql.event;
alter table mysql.event alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin; change column body body longtext character set utf8 collate utf8_bin;
"Now we restart the server" "Now we restart the server"
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
# restart # restart
use events_test; use events_test;
select @@event_scheduler; select @@event_scheduler;

View File

@ -45,6 +45,7 @@ alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin; change column body body longtext character set utf8 collate utf8_bin;
--echo "Now we restart the server" --echo "Now we restart the server"
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
use events_test; use events_test;

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

@ -1609,14 +1609,14 @@ def ifnull___a_a 253 10 1 Y 0 39 8
def least____a_a 253 10 1 Y 0 39 8 def least____a_a 253 10 1 Y 0 39 8
def greatest_a_a 253 10 1 Y 0 39 8 def greatest_a_a 253 10 1 Y 0 39 8
def test t1 t1 b ___________b 254 1 1 Y 256 0 8 def test t1 t1 b ___________b 254 1 1 Y 256 0 8
def case_______b 254 1 1 Y 0 39 8 def case_______b 253 1 1 Y 0 39 8
def case_____b_b 254 1 1 Y 0 39 8 def case_____b_b 253 1 1 Y 0 39 8
def coalesce___b 254 1 1 Y 0 39 8 def coalesce___b 253 1 1 Y 0 39 8
def coalesce_b_b 254 1 1 Y 0 39 8 def coalesce_b_b 253 1 1 Y 0 39 8
def if_______b_b 254 1 1 Y 0 39 8 def if_______b_b 253 1 1 Y 0 39 8
def ifnull___b_b 254 1 1 Y 0 39 8 def ifnull___b_b 253 1 1 Y 0 39 8
def least____b_b 254 1 1 Y 0 39 8 def least____b_b 253 1 1 Y 0 39 8
def greatest_b_b 254 1 1 Y 0 39 8 def greatest_b_b 253 1 1 Y 0 39 8
___________a a ___________a a
case_______a a case_______a a
case_____a_a a case_____a_a a

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
@ -916,22 +916,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

@ -317,7 +317,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

@ -1811,14 +1811,14 @@ val2
val4 val4
DELETE FROM t WHERE a = 100; DELETE FROM t WHERE a = 100;
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'val1' Warning 1292 Truncated incorrect DECIMAL value: 'val1'
Warning 1292 Truncated incorrect DOUBLE value: 'val2' Warning 1292 Truncated incorrect DECIMAL value: 'val2'
Warning 1292 Truncated incorrect DOUBLE value: 'val4' Warning 1292 Truncated incorrect DECIMAL value: 'val4'
SHOW WARNINGS; SHOW WARNINGS;
Level Code Message Level Code Message
Warning 1292 Truncated incorrect DOUBLE value: 'val1' Warning 1292 Truncated incorrect DECIMAL value: 'val1'
Warning 1292 Truncated incorrect DOUBLE value: 'val2' Warning 1292 Truncated incorrect DECIMAL value: 'val2'
Warning 1292 Truncated incorrect DOUBLE value: 'val4' Warning 1292 Truncated incorrect DECIMAL value: 'val4'
GET DIAGNOSTICS CONDITION 3 @n = ROW_NUMBER; GET DIAGNOSTICS CONDITION 3 @n = ROW_NUMBER;
SELECT @n; SELECT @n;
@n @n

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
# #
@ -860,13 +860,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
@ -894,7 +894,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

@ -5533,11 +5533,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

@ -37,7 +37,9 @@ SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1;
--eval KILL $conid --eval KILL $conid
--disconnect con1 --disconnect con1
--connection default --connection default
--disable_warnings
DROP VIEW IF EXISTS vv; DROP VIEW IF EXISTS vv;
--enable_warnings
DROP VIEW v; DROP VIEW v;
DROP FUNCTION f; DROP FUNCTION f;
DROP TABLE t; DROP TABLE t;

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

@ -43,3 +43,15 @@ INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
Warnings: Warnings:
Warning 1452 Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`)) Warning 1452 Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
DROP TABLE t2, t1; DROP TABLE t2, t1;
#
# MDEV-26433: assertion: table->get_ref_count() == 0 in dict0dict.cc
# line 1915
#
CREATE TEMPORARY TABLE v0 ( v1 TEXT ( 15 ) CHAR SET BINARY NOT NULL NOT NULL UNIQUE CHECK ( v1 ) ) REPLACE SELECT NULL AS v3 , 74 AS v2 ;
ERROR HY000: Field 'v1' doesn't have a default value
CREATE TEMPORARY TABLE t1 (i TEXT(15) NOT NULL DEFAULT '' UNIQUE CHECK (i)) engine=innodb
REPLACE SELECT NULL AS a;
ERROR HY000: Field 'DB_ROW_HASH_1' doesn't have a default value
#
# End of 10.5 tests
#

View File

@ -62,3 +62,20 @@ INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
--disable_warnings --disable_warnings
DROP TABLE t2, t1; DROP TABLE t2, t1;
--echo #
--echo # MDEV-26433: assertion: table->get_ref_count() == 0 in dict0dict.cc
--echo # line 1915
--echo #
--error ER_NO_DEFAULT_FOR_FIELD
CREATE TEMPORARY TABLE v0 ( v1 TEXT ( 15 ) CHAR SET BINARY NOT NULL NOT NULL UNIQUE CHECK ( v1 ) ) REPLACE SELECT NULL AS v3 , 74 AS v2 ;
--error ER_NO_DEFAULT_FOR_FIELD
CREATE TEMPORARY TABLE t1 (i TEXT(15) NOT NULL DEFAULT '' UNIQUE CHECK (i)) engine=innodb
REPLACE SELECT NULL AS a;
--echo #
--echo # End of 10.5 tests
--echo #

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

@ -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

@ -1,4 +1,5 @@
set sql_mode=""; set sql_mode="";
call mtr.add_suppression("Incorrect definition of table mysql.column_stats:.*");
Run mysql_upgrade once Run mysql_upgrade once
Phase 1/7: Checking and upgrading mysql database Phase 1/7: Checking and upgrading mysql database
Processing databases Processing databases

View File

@ -5,6 +5,7 @@
set sql_mode=""; set sql_mode="";
call mtr.add_suppression("Incorrect definition of table mysql.column_stats:.*");
# #
# Basic test that we can run mysql_upgrde and that it finds the # Basic test that we can run mysql_upgrde and that it finds the
# expected binaries it uses. # expected binaries it uses.

View File

@ -363,7 +363,9 @@ The following specify which files/extra groups are read (specified before remain
--gtid-strict-mode Enforce strict seq_no ordering of events in the binary --gtid-strict-mode Enforce strict seq_no ordering of events in the binary
log. Slave stops with an error if it encounters an event log. Slave stops with an error if it encounters an event
that would cause it to generate an out-of-order binlog if that would cause it to generate an out-of-order binlog if
executed. executed. When ON the same server-id semisync-replicated
transactions that duplicate exising ones in binlog are
ignored without error and slave interruption.
-?, --help Display this help and exit. -?, --help Display this help and exit.
--histogram-size=# Number of bytes used for a histogram. If set to 0, no --histogram-size=# Number of bytes used for a histogram. If set to 0, no
histograms are created by ANALYZE. histograms are created by ANALYZE.

View File

@ -38,6 +38,7 @@ perl;
test-sql-discovery query-cache-info password-reuse-check test-sql-discovery query-cache-info password-reuse-check
query-response-time metadata-lock-info locales unix-socket query-response-time metadata-lock-info locales unix-socket
wsrep file-key-management cracklib-password-check user-variables wsrep file-key-management cracklib-password-check user-variables
provider-bzip2 provider-lzma provider-lzo
thread-pool-groups thread-pool-queues thread-pool-stats thread-pool-waits/; thread-pool-groups thread-pool-queues thread-pool-stats thread-pool-waits/;
# And substitute the content some environment variables with their # And substitute the content some environment variables with their

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

@ -946,7 +946,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

@ -4392,15 +4392,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

@ -283,8 +283,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

@ -1,8 +1,6 @@
CREATE TABLE t1 (c1 longtext); CREATE TABLE t1 (c1 longtext);
INSERT INTO t1 values ('a'); INSERT INTO t1 values ('a');
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp'; SELECT * INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp' FROM t1;
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
show global variables like 'secure_file_priv'; show global variables like 'secure_file_priv';
Variable_name Value Variable_name Value
secure_file_priv MYSQL_TMP_DIR/ secure_file_priv MYSQL_TMP_DIR/
@ -31,18 +29,10 @@ LOAD DATA INFILE 'MYSQL_TMP_DIR_UCASE/B11764517.tmp' INTO TABLE t1;
LOAD DATA INFILE 'MYSQL_TMP_DIR_LCASE/B11764517.tmp' INTO TABLE t1; LOAD DATA INFILE 'MYSQL_TMP_DIR_LCASE/B11764517.tmp' INTO TABLE t1;
LOAD DATA INFILE "MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp" into table t1; LOAD DATA INFILE "MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp" into table t1;
ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp'; SELECT * INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp' FROM t1;
ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp'; SELECT * INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp' FROM t1;
Warnings: SELECT * INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp' FROM t1;
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead SELECT * INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp' FROM t1;
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp'; SELECT * INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp' FROM t1;
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp';
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp';
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
DROP TABLE t1; DROP TABLE t1;

View File

@ -14,7 +14,7 @@ LET $MYSQL_TMP_DIR_LCASE= `SELECT lower('$MYSQL_TMP_DIR')`;
#create the file #create the file
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR/B11764517.tmp'; eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR/B11764517.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
show global variables like 'secure_file_priv'; show global variables like 'secure_file_priv';
@ -52,19 +52,19 @@ eval LOAD DATA INFILE "$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517.tmp" int
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
--error ER_OPTION_PREVENTS_STATEMENT --error ER_OPTION_PREVENTS_STATEMENT
eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517-2.tmp'; eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517-2.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR\\\\B11764517-2.tmp'; eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR\\\\B11764517-2.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR/B11764517-3.tmp'; eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR/B11764517-3.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR_UCASE MYSQL_TMP_DIR_UCASE --replace_result $MYSQL_TMP_DIR_UCASE MYSQL_TMP_DIR_UCASE
eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR_UCASE/B11764517-4.tmp'; eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR_UCASE/B11764517-4.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR_LCASE MYSQL_TMP_DIR_LCASE --replace_result $MYSQL_TMP_DIR_LCASE MYSQL_TMP_DIR_LCASE
eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR_LCASE/B11764517-5.tmp'; eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR_LCASE/B11764517-5.tmp' FROM t1;
--error 0,1 --error 0,1
--remove_file $MYSQL_TMP_DIR/B11764517.tmp; --remove_file $MYSQL_TMP_DIR/B11764517.tmp;

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

@ -1316,6 +1316,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

@ -707,7 +707,7 @@ Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL, `a` int(11) DEFAULT NULL,
`b` text DEFAULT NULL, `b` text DEFAULT NULL,
`c` char(1) DEFAULT NULL `c` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP PROCEDURE p2; DROP PROCEDURE p2;
DROP PROCEDURE p1; DROP PROCEDURE p1;

View File

@ -469,8 +469,8 @@ t2 CREATE TABLE `t2` (
`t2` text DEFAULT NULL, `t2` text DEFAULT NULL,
`t3` mediumtext DEFAULT NULL, `t3` mediumtext DEFAULT NULL,
`t4` longtext DEFAULT NULL, `t4` longtext DEFAULT NULL,
`enum1` char(1) DEFAULT NULL, `enum1` varchar(1) DEFAULT NULL,
`set1` char(5) DEFAULT NULL, `set1` varchar(5) DEFAULT NULL,
`blob1` tinyblob DEFAULT NULL, `blob1` tinyblob DEFAULT NULL,
`blob2` blob DEFAULT NULL, `blob2` blob DEFAULT NULL,
`blob3` mediumblob DEFAULT NULL, `blob3` mediumblob DEFAULT NULL,
@ -631,8 +631,8 @@ t2 CREATE TABLE `t2` (
`t2` text DEFAULT NULL, `t2` text DEFAULT NULL,
`t3` mediumtext DEFAULT NULL, `t3` mediumtext DEFAULT NULL,
`t4` longtext DEFAULT NULL, `t4` longtext DEFAULT NULL,
`enum1` char(1) DEFAULT NULL, `enum1` varchar(1) DEFAULT NULL,
`set1` char(5) DEFAULT NULL, `set1` varchar(5) DEFAULT NULL,
`blob1` tinyblob DEFAULT NULL, `blob1` tinyblob DEFAULT NULL,
`blob2` blob DEFAULT NULL, `blob2` blob DEFAULT NULL,
`blob3` mediumblob DEFAULT NULL, `blob3` mediumblob DEFAULT NULL,
@ -1044,7 +1044,7 @@ t1 CREATE TABLE `t1` (
`a_flt0` float DEFAULT NULL, `a_flt0` float DEFAULT NULL,
`a_dbl0` double DEFAULT NULL, `a_dbl0` double DEFAULT NULL,
`a_bit3` bit(3) DEFAULT NULL, `a_bit3` bit(3) DEFAULT NULL,
`a_enum0` char(1) DEFAULT NULL, `a_enum0` varchar(1) DEFAULT NULL,
`a_varchar10` varchar(10) DEFAULT NULL, `a_varchar10` varchar(10) DEFAULT NULL,
`a_text1` text DEFAULT NULL, `a_text1` text DEFAULT NULL,
`a_tinytext1` tinytext DEFAULT NULL, `a_tinytext1` tinytext DEFAULT NULL,
@ -1062,7 +1062,7 @@ t1 CREATE TABLE `t1` (
`aa_flt0` float DEFAULT NULL, `aa_flt0` float DEFAULT NULL,
`aa_dbl0` double DEFAULT NULL, `aa_dbl0` double DEFAULT NULL,
`aa_bit3` bit(3) DEFAULT NULL, `aa_bit3` bit(3) DEFAULT NULL,
`aa_enum0` char(1) DEFAULT NULL, `aa_enum0` varchar(1) DEFAULT NULL,
`aa_varchar10` varchar(10) DEFAULT NULL, `aa_varchar10` varchar(10) DEFAULT NULL,
`aa_text1` text DEFAULT NULL, `aa_text1` text DEFAULT NULL,
`aa_tinytext1` tinytext DEFAULT NULL, `aa_tinytext1` tinytext DEFAULT NULL,

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

@ -1307,7 +1307,7 @@ $$
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE "t1" ( t1 CREATE TABLE "t1" (
"var" char(1) DEFAULT NULL "var" varchar(1) DEFAULT NULL
) )
DROP TABLE t1; DROP TABLE t1;
# #

View File

@ -8697,11 +8697,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

@ -85,3 +85,7 @@ db_name table_name hist_type_equal histogram_equal
test t1 1 1 test t1 1 1
test t2 1 1 test t2 1 1
drop table t1,t2,t4; drop table t1,t2,t4;
#
# MDEV-28866 mariadb-upgrade to 10.8 mysql.column_stats hist_type + histogram errors
#
FOUND 2 /Incorrect definition of table mysql.column_stats:/ in mysqld.1.err

View File

@ -65,3 +65,13 @@ from
A.column_name=B.column_name; A.column_name=B.column_name;
drop table t1,t2,t4; drop table t1,t2,t4;
--echo #
--echo # MDEV-28866 mariadb-upgrade to 10.8 mysql.column_stats hist_type + histogram errors
--echo #
# There should only be two count here corresponding the test creation of mysql.column_stats, and
# none generated by the $MYSQL_UPGRADE run.
--let $error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let SEARCH_FILE= $error_log
--let SEARCH_PATTERN= Incorrect definition of table mysql.column_stats:
--source include/search_pattern_in_file.inc

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;
# #
@ -2997,6 +2997,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

@ -2442,6 +2442,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

@ -2889,70 +2889,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`
@ -2980,32 +2980,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
@ -3430,9 +3430,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`
@ -3447,9 +3447,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

@ -723,7 +723,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)

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