mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.9 into 10.10
This commit is contained in:
@ -118,8 +118,10 @@ fedora-ninja:
|
||||
- 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
|
||||
- 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
|
||||
# Ninja builds are not affected by bug https://jira.mariadb.org/browse/MDEV-25968
|
||||
- eatmydata ninja package -j 2 --verbose 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
|
||||
# @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
|
||||
- *rpm_listfiles
|
||||
- mkdir ../rpm; mv *.rpm ../rpm
|
||||
|
@ -25,6 +25,6 @@ test_script:
|
||||
- set PATH=C:\Strawberry\perl\bin;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\_build\mysql-test
|
||||
- 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -42,7 +42,7 @@
|
||||
#include <violite.h>
|
||||
#include <my_sys.h>
|
||||
#include <source_revision.h>
|
||||
#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H)
|
||||
#if defined(HAVE_LOCALE_H)
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
@ -2857,6 +2857,9 @@ static void initialize_readline ()
|
||||
/* Allow conditional parsing of the ~/.inputrc file. */
|
||||
rl_readline_name= (char *) "mysql";
|
||||
rl_terminal_name= getenv("TERM");
|
||||
#ifdef HAVE_SETLOCALE
|
||||
setlocale(LC_ALL,"");
|
||||
#endif
|
||||
|
||||
/* Tell the completer that we want a crack first. */
|
||||
#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);
|
||||
#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_completion_entry_function= &no_completion;
|
||||
rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
|
||||
@ -3791,7 +3791,6 @@ print_table_data(MYSQL_RES *result)
|
||||
{
|
||||
String separator(256);
|
||||
MYSQL_ROW cur;
|
||||
MYSQL_FIELD *field;
|
||||
bool *num_flag;
|
||||
|
||||
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);
|
||||
}
|
||||
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;
|
||||
if (quick)
|
||||
@ -3825,7 +3824,7 @@ print_table_data(MYSQL_RES *result)
|
||||
{
|
||||
mysql_field_seek(result,0);
|
||||
(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 numcells= charset_info->numcells(field->name,
|
||||
@ -3867,7 +3866,7 @@ print_table_data(MYSQL_RES *result)
|
||||
data_length= (uint) lengths[off];
|
||||
}
|
||||
|
||||
field= mysql_fetch_field(result);
|
||||
MYSQL_FIELD *field= mysql_fetch_field(result);
|
||||
field_max_length= field->max_length;
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
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
|
||||
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_alter[MAX_ALTER_STR_SIZE];
|
||||
size_t length_of_db= strlen(sock->db);
|
||||
uint i;
|
||||
my_bool found_error=0, table_rebuild=0;
|
||||
DYNAMIC_ARRAY *array4repair= &tables4repair;
|
||||
DBUG_ENTER("print_result");
|
||||
@ -1070,7 +1069,7 @@ static void print_result()
|
||||
|
||||
prev[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]);
|
||||
my_bool status = !strcmp(row[2], "status");
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
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
|
||||
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)
|
||||
{
|
||||
ulonglong counter= 0, queries;
|
||||
ulonglong queries;
|
||||
ulonglong detach_counter;
|
||||
unsigned int commit_counter;
|
||||
MYSQL *mysql;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
statement *ptr;
|
||||
thread_context *con= (thread_context *)p;
|
||||
|
||||
@ -2023,8 +2022,7 @@ limit_not_met:
|
||||
my_progname, mysql_errno(mysql), mysql_error(mysql));
|
||||
else
|
||||
{
|
||||
while ((row= mysql_fetch_row(result)))
|
||||
counter++;
|
||||
while (mysql_fetch_row(result)) {}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
}
|
||||
@ -2034,7 +2032,7 @@ limit_not_met:
|
||||
if (commit_rate && (++commit_counter == commit_rate))
|
||||
{
|
||||
commit_counter= 0;
|
||||
run_query(mysql, "COMMIT", strlen("COMMIT"));
|
||||
run_query(mysql, C_STRING_WITH_LEN("COMMIT"));
|
||||
}
|
||||
|
||||
if (con->limit && queries == con->limit)
|
||||
@ -2046,7 +2044,7 @@ limit_not_met:
|
||||
|
||||
end:
|
||||
if (commit_rate)
|
||||
run_query(mysql, "COMMIT", strlen("COMMIT"));
|
||||
run_query(mysql, C_STRING_WITH_LEN("COMMIT"));
|
||||
|
||||
mysql_close(mysql);
|
||||
|
||||
|
@ -64,13 +64,8 @@ char *batch_readline(LINE_BUFFER *line_buff, bool binary_mode)
|
||||
return 0;
|
||||
if (out_length && pos[out_length-1] == '\n')
|
||||
{
|
||||
/*
|
||||
On Windows platforms we also need to remove '\r', unconditionally. On
|
||||
Unix-like platforms we only remove it if we are not on binary mode.
|
||||
*/
|
||||
|
||||
/* Remove '\n' */
|
||||
if (--out_length && IF_WIN(1,!binary_mode) && pos[out_length-1] == '\r')
|
||||
if (--out_length && !binary_mode && pos[out_length-1] == '\r')
|
||||
/* Remove '\r' */
|
||||
out_length--;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
# 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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -154,7 +154,11 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
|
||||
# (can be a static or shared lib)
|
||||
IF(LIB_TYPE STREQUAL "STATIC_LIBRARY")
|
||||
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})
|
||||
# Extract dependent OS libraries
|
||||
GET_DEPENDEND_OS_LIBS(${LIB} LIB_OSLIBS)
|
||||
|
@ -28,7 +28,3 @@ SET(EXECINFO_ROOT /usr/local CACHE INTERNAL "Where to find execinfo library and
|
||||
INCLUDE_DIRECTORIES(${EXECINFO_ROOT}/include)
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${EXECINFO_ROOT}/include)
|
||||
SET(ENV{LIB} "$ENV{LIB}:${EXECINFO_ROOT}/lib")
|
||||
FIND_LIBRARY(EXECINFO NAMES execinfo)
|
||||
IF(EXECINFO)
|
||||
SET(LIBEXECINFO ${EXECINFO})
|
||||
ENDIF()
|
||||
|
@ -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()
|
@ -296,6 +296,11 @@ SET(HAVE_SOCKPEERCRED CACHE INTERNAL "")
|
||||
SET(HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL "")
|
||||
SET(HAVE_GCC_C11_ATOMICS 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_LINK_H CACHE INTERNAL "")
|
||||
SET(HAVE_DLADDR CACHE INTERNAL "")
|
||||
|
@ -134,6 +134,8 @@ IF(UNIX)
|
||||
IF(NOT LIBRT)
|
||||
MY_SEARCH_LIBS(clock_gettime rt LIBRT)
|
||||
ENDIF()
|
||||
MY_SEARCH_LIBS(backtrace_symbols_fd execinfo LIBEXECINFO)
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
FIND_PACKAGE(Threads)
|
||||
|
||||
|
@ -7,9 +7,7 @@
|
||||
#include <my_sys.h>
|
||||
#include <my_pthread.h>
|
||||
|
||||
int main (argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
register int result, ix;
|
||||
extern int factorial(int);
|
||||
|
@ -35,6 +35,7 @@ typedef struct {
|
||||
uint num;
|
||||
pthread_mutex_t data_mutex;
|
||||
pthread_cond_t data_cond;
|
||||
pthread_cond_t done_cond;
|
||||
my_bool data_avail;
|
||||
my_bool cancelled;
|
||||
const char *from;
|
||||
@ -229,25 +230,24 @@ compress_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||
thd = threads + i;
|
||||
|
||||
pthread_mutex_lock(&thd->data_mutex);
|
||||
while (thd->data_avail == TRUE) {
|
||||
pthread_cond_wait(&thd->data_cond,
|
||||
while (!thd->to_len) {
|
||||
pthread_cond_wait(&thd->done_cond,
|
||||
&thd->data_mutex);
|
||||
}
|
||||
|
||||
xb_a(threads[i].to_len > 0);
|
||||
|
||||
bool fail = ds_write(dest_file, "NEWBNEWB", 8) ||
|
||||
write_uint64_le(dest_file,
|
||||
comp_file->bytes_processed);
|
||||
comp_file->bytes_processed += threads[i].from_len;
|
||||
comp_file->bytes_processed += thd->from_len;
|
||||
|
||||
if (!fail) {
|
||||
fail = write_uint32_le(dest_file, threads[i].adler) ||
|
||||
ds_write(dest_file, threads[i].to,
|
||||
threads[i].to_len);
|
||||
fail = write_uint32_le(dest_file, thd->adler) ||
|
||||
ds_write(dest_file, thd->to,
|
||||
thd->to_len);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&threads[i].data_mutex);
|
||||
thd->to_len = 0;
|
||||
pthread_mutex_unlock(&thd->data_mutex);
|
||||
|
||||
if (fail) {
|
||||
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_cond_destroy(&thd->data_cond);
|
||||
pthread_cond_destroy(&thd->done_cond);
|
||||
pthread_mutex_destroy(&thd->data_mutex);
|
||||
|
||||
my_free(thd->to);
|
||||
@ -347,22 +348,24 @@ create_worker_threads(uint n)
|
||||
comp_thread_ctxt_t *threads;
|
||||
uint i;
|
||||
|
||||
threads = (comp_thread_ctxt_t *) my_malloc(PSI_NOT_INSTRUMENTED,
|
||||
sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE));
|
||||
threads = static_cast<comp_thread_ctxt_t*>
|
||||
(my_malloc(PSI_NOT_INSTRUMENTED, n * sizeof *threads,
|
||||
MYF(MY_ZEROFILL|MY_FAE)));
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
comp_thread_ctxt_t *thd = threads + i;
|
||||
|
||||
thd->num = i + 1;
|
||||
thd->cancelled = FALSE;
|
||||
thd->data_avail = FALSE;
|
||||
|
||||
thd->to = (char *) my_malloc(PSI_NOT_INSTRUMENTED,
|
||||
COMPRESS_CHUNK_SIZE + MY_QLZ_COMPRESS_OVERHEAD, MYF(MY_FAE));
|
||||
thd->to = static_cast<char*>
|
||||
(my_malloc(PSI_NOT_INSTRUMENTED,
|
||||
COMPRESS_CHUNK_SIZE +
|
||||
MY_QLZ_COMPRESS_OVERHEAD,
|
||||
MYF(MY_FAE)));
|
||||
|
||||
/* Initialize and data mutex and condition var */
|
||||
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;
|
||||
}
|
||||
|
||||
@ -413,7 +416,7 @@ compress_worker_thread_func(void *arg)
|
||||
|
||||
if (thd->cancelled)
|
||||
break;
|
||||
|
||||
thd->data_avail = FALSE;
|
||||
thd->to_len = qlz_compress(thd->from, thd->to, thd->from_len,
|
||||
&thd->state);
|
||||
|
||||
@ -428,6 +431,7 @@ compress_worker_thread_func(void *arg)
|
||||
|
||||
thd->adler = adler32(0x00000001, (uchar *) thd->to,
|
||||
(uInt)thd->to_len);
|
||||
pthread_cond_signal(&thd->done_cond);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&thd->data_mutex);
|
||||
|
@ -841,7 +841,6 @@ static void backup_file_op(uint32_t space_id, int type,
|
||||
case FILE_MODIFY:
|
||||
ddl_tracker.insert_defer_id(
|
||||
space_id, filename_to_spacename(name, len));
|
||||
msg("DDL tracking : modify %u \"%.*s\"", space_id, int(len), name);
|
||||
break;
|
||||
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());
|
||||
break;
|
||||
case FILE_MODIFY:
|
||||
msg("DDL tracking : modify %u \"%.*s\"", space_id, int(len), name);
|
||||
break;
|
||||
case FILE_RENAME:
|
||||
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 block_size_1{log_sys.get_block_size() - 1};
|
||||
|
||||
#ifdef HAVE_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
|
||||
ut_ad(!log_sys.is_pmem());
|
||||
|
||||
{
|
||||
recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) &
|
||||
block_size_1;
|
||||
@ -3011,87 +3003,6 @@ static bool xtrabackup_copy_logfile()
|
||||
recv_sys_t::parse_mtr_result r;
|
||||
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=
|
||||
@ -3135,9 +3046,6 @@ static bool xtrabackup_copy_logfile()
|
||||
if (ds_write(dst_log_file, log_sys.buf + start_offset,
|
||||
recv_sys.offset - start_offset))
|
||||
{
|
||||
#ifdef HAVE_PMEM
|
||||
write_error:
|
||||
#endif
|
||||
msg("Error: write to ib_logfile0 failed");
|
||||
return true;
|
||||
}
|
||||
@ -3167,9 +3075,6 @@ static bool xtrabackup_copy_logfile()
|
||||
else
|
||||
{
|
||||
recv_sys.len= recv_sys.offset & ~block_size_1;
|
||||
#ifdef HAVE_PMEM
|
||||
retry:
|
||||
#endif
|
||||
if (retry_count == 100)
|
||||
break;
|
||||
|
||||
|
@ -148,9 +148,7 @@ int main(int argc, char *argv[])
|
||||
/* reads options */
|
||||
/* Initiates DEBUG - but no debugging here ! */
|
||||
|
||||
static int static_get_options(argc,argv)
|
||||
register int *argc;
|
||||
register char **argv[];
|
||||
static int static_get_options(int *argc, char***argv)
|
||||
{
|
||||
int help,version;
|
||||
char *pos;
|
||||
@ -218,10 +216,9 @@ register char **argv[];
|
||||
} /* static_get_options */
|
||||
|
||||
|
||||
static int get_replace_strings(argc,argv,from_array,to_array)
|
||||
register int *argc;
|
||||
register char **argv[];
|
||||
POINTER_ARRAY *from_array,*to_array;
|
||||
static int get_replace_strings(int *argc, char ***argv,
|
||||
POINTER_ARRAY *from_array,
|
||||
POINTER_ARRAY *to_array)
|
||||
{
|
||||
char *pos;
|
||||
|
||||
@ -974,9 +971,7 @@ static void free_buffer()
|
||||
bytes read from disk.
|
||||
*/
|
||||
|
||||
static int fill_buffer_retaining(fd,n)
|
||||
File fd;
|
||||
int n;
|
||||
static int fill_buffer_retaining(File fd, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1019,9 +1014,7 @@ int n;
|
||||
/* Return 0 if convert is ok */
|
||||
/* Global variable update is set if something was changed */
|
||||
|
||||
static int convert_pipe(rep,in,out)
|
||||
REPLACE *rep;
|
||||
FILE *in,*out;
|
||||
static int convert_pipe(REPLACE *rep, FILE *in, FILE *out)
|
||||
{
|
||||
int retain,error;
|
||||
uint length;
|
||||
|
Submodule libmariadb updated: 4fc7903cf3...485a3ad68c
@ -1,5 +1,5 @@
|
||||
# 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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -154,6 +154,7 @@ ENDIF()
|
||||
IF(TARGET libfmt)
|
||||
ADD_DEPENDENCIES(sql_embedded libfmt)
|
||||
ENDIF()
|
||||
TARGET_LINK_LIBRARIES(sql_embedded LINK_PRIVATE tpool ${CRC32_LIBRARY})
|
||||
|
||||
# On Windows, static embedded server library is called mysqlserver.lib
|
||||
# On Unix, it is libmysqld.a
|
||||
|
@ -496,7 +496,7 @@ MYSQL_METHODS embedded_methods=
|
||||
|
||||
char **copy_arguments(int argc, char **argv)
|
||||
{
|
||||
uint length= 0;
|
||||
size_t length= 0;
|
||||
char **from, **res, **end= argv+argc;
|
||||
|
||||
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->decimals= server_field.decimals;
|
||||
|
||||
client_field->db_length= strlen(client_field->db);
|
||||
client_field->table_length= strlen(client_field->table);
|
||||
client_field->name_length= strlen(client_field->name);
|
||||
client_field->org_name_length= strlen(client_field->org_name);
|
||||
client_field->org_table_length= strlen(client_field->org_table);
|
||||
client_field->db_length= (uint)strlen(client_field->db);
|
||||
client_field->table_length= (uint)strlen(client_field->table);
|
||||
client_field->name_length= (uint)strlen(client_field->name);
|
||||
client_field->org_name_length= (uint)strlen(client_field->org_name);
|
||||
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_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)))
|
||||
return TRUE;
|
||||
*(uint *)field_buf= length;
|
||||
*(uint *)field_buf= (uint)length;
|
||||
*next_field= field_buf + sizeof(uint);
|
||||
memcpy((uchar*) *next_field, from, length);
|
||||
(*next_field)[length]= 0;
|
||||
if (next_mysql_field->max_length < length)
|
||||
next_mysql_field->max_length=length;
|
||||
next_mysql_field->max_length=(ulong)length;
|
||||
++next_field;
|
||||
++next_mysql_field;
|
||||
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,
|
||||
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;
|
||||
char *field_buf;
|
||||
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);
|
||||
length= copy_and_convert(*next_field, conv_length, to_cs,
|
||||
(const char*) from, length, from_cs, &dummy_error);
|
||||
*(uint *) field_buf= length;
|
||||
*(uint *) field_buf= (uint)length;
|
||||
(*next_field)[length]= 0;
|
||||
if (next_mysql_field->max_length < length)
|
||||
next_mysql_field->max_length= length;
|
||||
next_mysql_field->max_length= (ulong)length;
|
||||
++next_field;
|
||||
++next_mysql_field;
|
||||
return false;
|
||||
|
72
mysql-test/include/ensure_binlog_row_event_columns.inc
Normal file
72
mysql-test/include/ensure_binlog_row_event_columns.inc
Normal 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
|
@ -105,7 +105,6 @@ INSERT INTO global_suppressions VALUES
|
||||
*/
|
||||
|
||||
("Got error [0-9]* when reading table"),
|
||||
("Incorrect definition of table"),
|
||||
("Incorrect information in file"),
|
||||
("InnoDB: Warning: we did not need to do crash recovery"),
|
||||
/*("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: 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
|
||||
change the size of core files
|
||||
|
@ -19,9 +19,143 @@ package My::CoreDump;
|
||||
use strict;
|
||||
use Carp;
|
||||
use My::Platform;
|
||||
use Text::Wrap;
|
||||
use Data::Dumper;
|
||||
|
||||
use File::Temp qw/ tempfile tempdir /;
|
||||
use File::Find;
|
||||
use File::Basename;
|
||||
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
|
||||
|
||||
@ -50,8 +184,38 @@ sub _verify_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 {
|
||||
my ($core_name)= @_;
|
||||
my ($core_name, $code)= @_;
|
||||
confess "Undefined format"
|
||||
unless defined $code;
|
||||
|
||||
# Check that gdb exists
|
||||
`gdb --version`;
|
||||
@ -61,7 +225,7 @@ sub _gdb {
|
||||
}
|
||||
|
||||
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 {
|
||||
print "\nCoredump $core_name does not exist, cannot run 'gdb'\n";
|
||||
return;
|
||||
@ -76,13 +240,7 @@ sub _gdb {
|
||||
|
||||
# Create tempfile containing gdb commands
|
||||
my ($tmp, $tmp_name) = tempfile();
|
||||
print $tmp
|
||||
"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";
|
||||
print $tmp $code;
|
||||
close $tmp or die "Error closing $tmp_name: $!";
|
||||
|
||||
# Run gdb
|
||||
@ -105,7 +263,7 @@ EOF
|
||||
|
||||
|
||||
sub _dbx {
|
||||
my ($core_name)= @_;
|
||||
my ($core_name, $format)= @_;
|
||||
|
||||
print "\nTrying 'dbx' to get a backtrace\n";
|
||||
|
||||
@ -167,7 +325,7 @@ sub cdb_check {
|
||||
|
||||
|
||||
sub _cdb {
|
||||
my ($core_name)= @_;
|
||||
my ($core_name, $format)= @_;
|
||||
print "\nTrying 'cdb' to get a backtrace\n";
|
||||
return unless -f $core_name;
|
||||
|
||||
@ -304,38 +462,82 @@ EOF
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub show {
|
||||
my ($class, $core_name, $exe_mysqld, $parallel)= @_;
|
||||
$hint_mysqld= $exe_mysqld;
|
||||
|
||||
# On Windows, rely on cdb to be there...
|
||||
if (IS_WINDOWS)
|
||||
sub _auto
|
||||
{
|
||||
my ($core_name, $code, $rest)= @_;
|
||||
# We use ordered array @print_methods and omit auto itself
|
||||
my @valid_methods= @print_methods[0 .. $#print_methods - 2];
|
||||
my $x= 0;
|
||||
my @methods= grep { ++$x % 2} @valid_methods;
|
||||
my $f= $config{print_core};
|
||||
foreach my $m (@methods)
|
||||
{
|
||||
_cdb($core_name);
|
||||
return;
|
||||
}
|
||||
|
||||
# We try dbx first; gdb itself may coredump if run on a Sun Studio
|
||||
# compiled binary on Solaris.
|
||||
|
||||
my @debuggers =
|
||||
(
|
||||
\&_dbx,
|
||||
\&_gdb,
|
||||
\&_lldb,
|
||||
# TODO...
|
||||
);
|
||||
|
||||
# Try debuggers until one succeeds
|
||||
|
||||
foreach my $debugger (@debuggers){
|
||||
if ($debugger->($core_name)){
|
||||
my $debugger= $print_methods{$m};
|
||||
confess "Broken @print_methods"
|
||||
if $debugger->{method} == \&_auto;
|
||||
# If we didn't find format for 'auto' (that is only possible for 'custom')
|
||||
# we get format for specific debugger
|
||||
if (not defined $code && defined $print_formats{$f} and
|
||||
exists $print_formats{$f}->{codes}->{$m})
|
||||
{
|
||||
$code= $print_formats{$f}->{codes}->{$m};
|
||||
}
|
||||
mtr_verbose2("Trying to print with method ${m}:${f}");
|
||||
if ($debugger->{method}->($core_name, $code)) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
@ -5,6 +5,7 @@ use warnings;
|
||||
use Text::Wrap;
|
||||
use Cwd;
|
||||
use My::Platform;
|
||||
use mtr_report;
|
||||
|
||||
# 1. options to support:
|
||||
# --xxx[=ARGS]
|
||||
@ -108,6 +109,10 @@ EEE
|
||||
|
||||
my %opts;
|
||||
my %opt_vals;
|
||||
my $debugger;
|
||||
my $boot_debugger;
|
||||
my $client_debugger;
|
||||
|
||||
my $help = "\n\nOptions for running debuggers\n\n";
|
||||
|
||||
for my $k (sort keys %debuggers) {
|
||||
@ -164,7 +169,7 @@ sub do_args($$$$$) {
|
||||
if ($v->{script}) {
|
||||
::mtr_tonewfile($vars{script}, subst($v->{script}, %vars)."\n".$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);
|
||||
@ -189,16 +194,23 @@ sub help() { $help }
|
||||
sub fix_options(@) {
|
||||
my $re=join '|', keys %opts;
|
||||
$re =~ s/=s//g;
|
||||
# FIXME: what is '=;'? What about ':s' to denote optional argument in register_opt()
|
||||
map { $_ . (/^--($re)$/ and '=;') } @_;
|
||||
}
|
||||
|
||||
sub pre_setup() {
|
||||
my $used;
|
||||
my $interactive;
|
||||
my %options;
|
||||
my %client_options;
|
||||
my %boot_options;
|
||||
|
||||
my $embedded= $::opt_embedded_server ? ' with --embedded' : '';
|
||||
|
||||
for my $k (keys %debuggers) {
|
||||
for my $opt ($k, "manual-$k", "boot-$k", "client-$k") {
|
||||
if ($opt_vals{$opt})
|
||||
{
|
||||
my $val= $opt_vals{$opt};
|
||||
if ($val) {
|
||||
$used = 1;
|
||||
$interactive ||= ($debuggers{$k}->{interactive} ||
|
||||
$debuggers{$k}->{term} ||
|
||||
@ -207,10 +219,40 @@ sub pre_setup() {
|
||||
$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) {
|
||||
$ENV{ASAN_OPTIONS}= 'abort_on_error=1:'.($ENV{ASAN_OPTIONS} || '');
|
||||
::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($$$) {
|
||||
my ($args, $exe, $input) = @_;
|
||||
my $found;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
do_args($args, $exe, $input, 'bootstrap', $boot_debugger)
|
||||
if defined $boot_debugger;
|
||||
}
|
||||
|
||||
sub setup_client_args($$) {
|
||||
my ($args, $exe) = @_;
|
||||
my $found;
|
||||
my $embedded = $::opt_embedded_server ? ' with --embedded' : '';
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', 'client', $client_debugger)
|
||||
if defined $client_debugger;
|
||||
}
|
||||
|
||||
sub setup_args($$$) {
|
||||
my ($args, $exe, $type) = @_;
|
||||
my $found;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
do_args($args, $exe, IS_WINDOWS() ? 'NUL' : '/dev/null', $type, $debugger)
|
||||
if defined $debugger;
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -87,7 +87,7 @@ sub init_pattern {
|
||||
# separator betwen suite and testname), make the pattern match
|
||||
# beginning of string
|
||||
$from= "^$from";
|
||||
mtr_verbose("$what='$from'");
|
||||
mtr_verbose2("$what='$from'");
|
||||
}
|
||||
# Check that pattern is a valid regex
|
||||
eval { "" =~/$from/; 1 } or
|
||||
@ -293,7 +293,7 @@ sub combinations_from_file($$)
|
||||
return () if @::opt_combinations or not -f $filename;
|
||||
return () if ::using_extern();
|
||||
# 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);
|
||||
foreach my $group ($config->option_groups()) {
|
||||
my $comb= { name => $group->name(), comb_opt => [] };
|
||||
@ -427,9 +427,9 @@ sub collect_suite_name($$)
|
||||
sub collect_one_suite {
|
||||
my ($opt_cases, $suitename, $over, $suitedir, @overlays) = @_;
|
||||
|
||||
mtr_verbose("Collecting: $suitename");
|
||||
mtr_verbose("suitedir: $suitedir");
|
||||
mtr_verbose("overlays: @overlays") if @overlays;
|
||||
mtr_verbose2("Collecting: $suitename");
|
||||
mtr_verbose2("suitedir: $suitedir");
|
||||
mtr_verbose2("overlays: @overlays") if @overlays;
|
||||
|
||||
# we always need to process the parent suite, even if we won't use any
|
||||
# test from it.
|
||||
@ -501,8 +501,8 @@ sub process_suite {
|
||||
$suite->{rdir} = -d $rdir ? $rdir : $suite->{tdir};
|
||||
}
|
||||
|
||||
mtr_verbose("testdir: " . $suite->{tdir});
|
||||
mtr_verbose( "resdir: " . $suite->{rdir});
|
||||
mtr_verbose2("testdir: " . $suite->{tdir});
|
||||
mtr_verbose2( "resdir: " . $suite->{rdir});
|
||||
|
||||
# disabled.def
|
||||
parse_disabled($suite->{dir} .'/disabled.def', $suitename);
|
||||
@ -512,7 +512,7 @@ sub process_suite {
|
||||
if (@::opt_combinations)
|
||||
{
|
||||
# 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) {
|
||||
my $comb= {};
|
||||
$comb->{name}= $combination;
|
||||
|
@ -46,7 +46,7 @@ sub mtr_ping_port ($);
|
||||
sub mtr_ping_port ($) {
|
||||
my $port= shift;
|
||||
|
||||
mtr_verbose("mtr_ping_port: $port");
|
||||
mtr_verbose2("mtr_ping_port: $port");
|
||||
|
||||
if (IS_WINDOWS && USE_NETPING)
|
||||
{
|
||||
@ -56,12 +56,12 @@ sub mtr_ping_port ($) {
|
||||
$ping->port_number($port);
|
||||
if ($ping->ping("localhost",0.1))
|
||||
{
|
||||
mtr_verbose("USED");
|
||||
mtr_verbose2("USED");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_verbose("FREE");
|
||||
mtr_verbose2("FREE");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -84,12 +84,12 @@ sub mtr_ping_port ($) {
|
||||
if ( connect(SOCK, $paddr) )
|
||||
{
|
||||
close(SOCK); # FIXME check error?
|
||||
mtr_verbose("USED");
|
||||
mtr_verbose2("USED");
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtr_verbose("FREE");
|
||||
mtr_verbose2("FREE");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ use Sys::Hostname;
|
||||
use base qw(Exporter);
|
||||
our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
|
||||
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_report_test_skipped mtr_print
|
||||
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 (@) {
|
||||
my ($server, @args)= @_;
|
||||
my $proc= $server->{proc};
|
||||
|
@ -126,19 +126,19 @@ sub collect_test_cases ($) {
|
||||
{
|
||||
my $base_name= $1;
|
||||
my $idx= $2;
|
||||
mtr_verbose("$test_name => $base_name idx=$idx");
|
||||
mtr_verbose2("$test_name => $base_name idx=$idx");
|
||||
if ( $idx > 1 )
|
||||
{
|
||||
$idx-= 1;
|
||||
$base_name= "$base_name$idx";
|
||||
mtr_verbose("New basename $base_name");
|
||||
mtr_verbose2("New basename $base_name");
|
||||
}
|
||||
|
||||
foreach my $tinfo2 (@$cases)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -146,7 +146,7 @@ sub collect_test_cases ($) {
|
||||
|
||||
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};
|
||||
}
|
||||
else
|
||||
@ -224,14 +224,14 @@ sub collect_one_suite($)
|
||||
my $suite= shift; # Test suite name
|
||||
my @cases; # Array of hash
|
||||
|
||||
mtr_verbose("Collecting: $suite");
|
||||
mtr_verbose2("Collecting: $suite");
|
||||
|
||||
my $suitedir= "$::glob_mysql_test_dir"; # Default
|
||||
if ( $suite ne "main" )
|
||||
{
|
||||
$suitedir= mtr_path_exists("$suitedir/suite/$suite",
|
||||
"$suitedir/$suite");
|
||||
mtr_verbose("suitedir: $suitedir");
|
||||
mtr_verbose2("suitedir: $suitedir");
|
||||
}
|
||||
|
||||
my $testdir= "$suitedir/t";
|
||||
@ -363,7 +363,7 @@ sub collect_one_suite($)
|
||||
if (@::opt_combinations)
|
||||
{
|
||||
# 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) {
|
||||
my $comb= {};
|
||||
$comb->{name}= $combination;
|
||||
@ -374,7 +374,7 @@ sub collect_one_suite($)
|
||||
elsif (-f $combination_file )
|
||||
{
|
||||
# Read combinations file in my.cnf format
|
||||
mtr_verbose("Read combinations file");
|
||||
mtr_verbose2("Read combinations file");
|
||||
my $config= My::Config->new($combination_file);
|
||||
|
||||
foreach my $group ($config->groups()) {
|
||||
@ -605,7 +605,7 @@ sub collect_one_test_case($$$$$$$$$) {
|
||||
# Add suite opts
|
||||
foreach my $opt ( @$suite_opts )
|
||||
{
|
||||
mtr_verbose($opt);
|
||||
mtr_verbose2($opt);
|
||||
push(@{$tinfo->{'master_opt'}}, $opt);
|
||||
push(@{$tinfo->{'slave_opt'}}, $opt);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ sub mtr_timer_start($$$) {
|
||||
if ( $tpid )
|
||||
{
|
||||
# Parent, record the information
|
||||
mtr_verbose("Starting timer for '$name',",
|
||||
mtr_verbose2("Starting timer for '$name',",
|
||||
"duration: $duration, pid: $tpid");
|
||||
$timers->{'timers'}->{$name}->{'pid'}= $tpid;
|
||||
$timers->{'timers'}->{$name}->{'duration'}= $duration;
|
||||
@ -96,13 +96,13 @@ sub mtr_timer_start($$$) {
|
||||
$SIG{INT}= 'DEFAULT';
|
||||
|
||||
$SIG{TERM}= sub {
|
||||
mtr_verbose("timer $$ woke up, exiting!");
|
||||
mtr_verbose2("timer $$ woke up, exiting!");
|
||||
exit(0);
|
||||
};
|
||||
|
||||
$0= "mtr_timer(timers,$name,$duration)";
|
||||
sleep($duration);
|
||||
mtr_verbose("timer $$ expired after $duration seconds");
|
||||
mtr_verbose2("timer $$ expired after $duration seconds");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
--source include/windows.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"
|
||||
|
@ -161,32 +161,32 @@ EmployeeID SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
|
||||
FirstName VARCHAR(30) NOT NULL CHECK (CHAR_LENGTH(FirstName > 2))
|
||||
);
|
||||
INSERT INTO t1 VALUES (NULL, 'Ken');
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: 'Ken'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: 'Ken'
|
||||
SHOW WARNINGS;
|
||||
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`
|
||||
INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: 'Ken'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: 'Ken'
|
||||
SHOW WARNINGS;
|
||||
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`
|
||||
INSERT IGNORE INTO t1 VALUES (NULL, 'Ken');
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
|
||||
INSERT IGNORE INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'Brian'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'Brian'
|
||||
set sql_mode="";
|
||||
INSERT INTO t1 VALUES (NULL, 'Ken');
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
|
||||
INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'Brian'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'Brian'
|
||||
set sql_mode=default;
|
||||
select * from t1;
|
||||
EmployeeID FirstName
|
||||
@ -240,13 +240,13 @@ drop table t1;
|
||||
#
|
||||
create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x111'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x111'
|
||||
select * from t1;
|
||||
v1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x111'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x111'
|
||||
select v1 from t1;
|
||||
v1
|
||||
select * from t1;
|
||||
@ -260,8 +260,8 @@ flush tables;
|
||||
select * from t1;
|
||||
v1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x111'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x111'
|
||||
select * from t1;
|
||||
v1
|
||||
deallocate prepare stmt;
|
||||
|
@ -47,11 +47,11 @@ insert into t1 values (0x01,0x01);
|
||||
select * from t1 where a=b;
|
||||
a b
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x01'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '\x01'
|
||||
select * from t1 where a=b and b=0x01;
|
||||
a b
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '\x01'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '\x01'
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill);
|
||||
INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2);
|
||||
|
2
mysql-test/main/create_windows.result
Normal file
2
mysql-test/main/create_windows.result
Normal file
@ -0,0 +1,2 @@
|
||||
create table `...................................................`(i int);
|
||||
ERROR HY000: Can't create table `test`.`...................................................` (errno: 38 "Filename too long")
|
10
mysql-test/main/create_windows.test
Normal file
10
mysql-test/main/create_windows.test
Normal 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);
|
@ -3373,17 +3373,17 @@ SELECT * FROM t1 WHERE a IN (1,2,3);
|
||||
a
|
||||
1
|
||||
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';
|
||||
a
|
||||
1
|
||||
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';
|
||||
a
|
||||
1
|
||||
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';
|
||||
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
|
||||
|
@ -10291,7 +10291,7 @@ SELECT * FROM t1 WHERE a=10;
|
||||
a
|
||||
1e1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '1é1'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '1é1'
|
||||
SELECT * FROM t1 WHERE a='1e1';
|
||||
a
|
||||
1e1
|
||||
@ -10300,12 +10300,12 @@ SELECT * FROM t1 WHERE a=10 AND a='1e1';
|
||||
a
|
||||
1e1
|
||||
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');
|
||||
a
|
||||
1e1
|
||||
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');
|
||||
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
|
||||
@ -10322,17 +10322,17 @@ SELECT * FROM t1 WHERE a IN (1,2);
|
||||
a
|
||||
1ë1
|
||||
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';
|
||||
a
|
||||
1ë1
|
||||
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';
|
||||
a
|
||||
1ë1
|
||||
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';
|
||||
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
|
||||
|
@ -510,3 +510,12 @@ a b
|
||||
2 2
|
||||
3 3
|
||||
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;
|
||||
|
@ -644,3 +644,15 @@ insert delayed into t1 values (3,3);
|
||||
flush tables t1;
|
||||
select * from 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;
|
||||
|
||||
|
@ -677,13 +677,13 @@ a
|
||||
A
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'A'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'A'
|
||||
SELECT DISTINCT a FROM t1 WHERE a=0;
|
||||
a
|
||||
A
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'A'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'A'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE);
|
||||
INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06');
|
||||
|
@ -1,5 +1,6 @@
|
||||
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("Incorrect definition of table mysql.event:.*");
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
drop database if exists mysqltest_db2;
|
||||
|
@ -8,6 +8,7 @@ set sql_mode="";
|
||||
--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("Incorrect definition of table mysql.event:.*");
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists events_test;
|
||||
|
@ -21,6 +21,7 @@ insert into event_like select * from mysql.event;
|
||||
alter table mysql.event
|
||||
change column body body longtext character set utf8 collate utf8_bin;
|
||||
"Now we restart the server"
|
||||
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
|
||||
# restart
|
||||
use events_test;
|
||||
select @@event_scheduler;
|
||||
|
@ -45,6 +45,7 @@ alter table mysql.event
|
||||
change column body body longtext character set utf8 collate utf8_bin;
|
||||
--echo "Now we restart the server"
|
||||
|
||||
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
use events_test;
|
||||
|
@ -774,28 +774,28 @@ SELECT 'a' IN ('a',2);
|
||||
1
|
||||
Warnings:
|
||||
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
|
||||
SELECT 'a' IN ('a',2,NULL);
|
||||
'a' IN ('a',2,NULL)
|
||||
1
|
||||
Warnings:
|
||||
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
|
||||
SELECT 'a' NOT IN ('a',2);
|
||||
'a' NOT IN ('a',2)
|
||||
0
|
||||
Warnings:
|
||||
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
|
||||
SELECT 'a' NOT IN ('a',2,NULL);
|
||||
'a' NOT IN ('a',2,NULL)
|
||||
0
|
||||
Warnings:
|
||||
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
|
||||
SELECT 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')
|
||||
Warnings:
|
||||
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
|
||||
SELECT a IN (1,'1',NULL) FROM t1;
|
||||
a IN (1,'1',NULL)
|
||||
Warnings:
|
||||
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
|
||||
SELECT a NOT IN (1,'1') FROM t1;
|
||||
a NOT IN (1,'1')
|
||||
Warnings:
|
||||
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
|
||||
SELECT a NOT IN (1,'1',NULL) FROM t1;
|
||||
a NOT IN (1,'1',NULL)
|
||||
Warnings:
|
||||
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
|
||||
SELECT a IN (1,TIME'10:20:30') FROM t1;
|
||||
a IN (1,TIME'10:20:30')
|
||||
@ -1197,7 +1197,7 @@ SELECT a IN ('a',1) FROM t1;
|
||||
a IN ('a',1)
|
||||
Warnings:
|
||||
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
|
||||
SELECT a IN ('a',TIME'10:20:30') FROM t1;
|
||||
a IN ('a',TIME'10:20:30')
|
||||
@ -1209,7 +1209,7 @@ SELECT a NOT IN ('a',1) FROM t1;
|
||||
a NOT IN ('a',1)
|
||||
Warnings:
|
||||
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
|
||||
SELECT a NOT IN ('a',TIME'10:20:30') FROM t1;
|
||||
a NOT IN ('a',TIME'10:20:30')
|
||||
@ -1581,7 +1581,7 @@ A NULL
|
||||
B NULL
|
||||
Warnings:
|
||||
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
|
||||
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN ('A',b,10);
|
||||
a b
|
||||
@ -1589,30 +1589,30 @@ A NULL
|
||||
B NULL
|
||||
Warnings:
|
||||
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
|
||||
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (b,a,10);
|
||||
a b
|
||||
A NULL
|
||||
Warnings:
|
||||
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: [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
|
||||
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);
|
||||
a b
|
||||
A NULL
|
||||
Warnings:
|
||||
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: [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
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'A'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'A'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# 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)
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '0x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
||||
SELECT '0x' IN (0,1);
|
||||
'0x' IN (0,1)
|
||||
1
|
||||
Warnings:
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (double)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (double)
|
||||
Note 1105 DBUG: [0] arg=1 handler=0 (decimal)
|
||||
Note 1105 DBUG: [1] arg=2 handler=0 (decimal)
|
||||
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));
|
||||
('0x',1) IN ((0,1))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '0x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
||||
SELECT ('0x',1) IN ((0,1),(1,1));
|
||||
('0x',1) IN ((0,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,1] 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,1] handler=int
|
||||
Note 1105 DBUG: [1,2] handler=int
|
||||
Note 1105 DBUG: => handler=bigint
|
||||
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,Item_func_in";
|
||||
SET SESSION debug_dbug="-d,cmp_item";
|
||||
|
@ -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 greatest_a_a 253 10 1 Y 0 39 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_b 254 1 1 Y 0 39 8
|
||||
def coalesce___b 254 1 1 Y 0 39 8
|
||||
def coalesce_b_b 254 1 1 Y 0 39 8
|
||||
def if_______b_b 254 1 1 Y 0 39 8
|
||||
def ifnull___b_b 254 1 1 Y 0 39 8
|
||||
def least____b_b 254 1 1 Y 0 39 8
|
||||
def greatest_b_b 254 1 1 Y 0 39 8
|
||||
def case_______b 253 1 1 Y 0 39 8
|
||||
def case_____b_b 253 1 1 Y 0 39 8
|
||||
def coalesce___b 253 1 1 Y 0 39 8
|
||||
def coalesce_b_b 253 1 1 Y 0 39 8
|
||||
def if_______b_b 253 1 1 Y 0 39 8
|
||||
def ifnull___b_b 253 1 1 Y 0 39 8
|
||||
def least____b_b 253 1 1 Y 0 39 8
|
||||
def greatest_b_b 253 1 1 Y 0 39 8
|
||||
___________a a
|
||||
case_______a a
|
||||
case_____a_a a
|
||||
|
@ -63,7 +63,7 @@ select nullif(1,'test');
|
||||
nullif(1,'test')
|
||||
1
|
||||
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");
|
||||
NULLIF(NULL,NULL) NULLIF(NULL,1) NULLIF(NULL,1.0) NULLIF(NULL,"test")
|
||||
NULL NULL NULL NULL
|
||||
|
@ -470,7 +470,7 @@ HEX(a)
|
||||
7FFFFFFFFFFFFFFE
|
||||
7FFFFFFFFFFFFFFF
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'abc'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'abc'
|
||||
CREATE TABLE t3 (a BIGINT UNSIGNED);
|
||||
INSERT INTO t3 VALUES (9223372036854775551);
|
||||
SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42);
|
||||
@ -498,21 +498,21 @@ f1
|
||||
a
|
||||
1
|
||||
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;
|
||||
f1 case f1 when 'a' then '+' when 1 then '-' end
|
||||
a +
|
||||
b NULL
|
||||
1 -
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
create index t1f1_idx on t1(f1);
|
||||
select f1 from t1 where f1 in ('a',1);
|
||||
f1
|
||||
1
|
||||
a
|
||||
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);
|
||||
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
|
||||
@ -527,8 +527,8 @@ select f1 from t1 where f1 in (2,1);
|
||||
f1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
explain select f1 from t1 where f1 in (2,1);
|
||||
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
|
||||
@ -539,9 +539,9 @@ f2
|
||||
0
|
||||
2
|
||||
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 DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
explain select f2 from t2 where f2 in ('a',2);
|
||||
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
|
||||
@ -549,21 +549,21 @@ select f2 from t2 where f2 in ('a','b');
|
||||
f2
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
explain select f2 from t2 where f2 in ('a','b');
|
||||
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
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
select f2 from t2 where f2 in (1,'b');
|
||||
f2
|
||||
0
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
explain select f2 from t2 where f2 in (1,'b');
|
||||
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
|
||||
@ -916,22 +916,22 @@ SELECT '0x' IN (0);
|
||||
'0x' IN (0)
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '0x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
||||
SELECT '0x' IN (0,1);
|
||||
'0x' IN (0,1)
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '0x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
||||
SELECT ('0x',1) IN ((0,1));
|
||||
('0x',1) IN ((0,1))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '0x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
||||
SELECT ('0x',1) IN ((0,1),(1,1));
|
||||
('0x',1) IN ((0,1),(1,1))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '0x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
@ -425,9 +425,7 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
|
||||
y
|
||||
0
|
||||
Warnings:
|
||||
Warning 1918 Encountered illegal value '' when converting to DECIMAL
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'str1'
|
||||
Warning 1918 Encountered illegal value '' when converting to DECIMAL
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'str2'
|
||||
SELECT c DIV 900 y FROM t1 GROUP BY y;
|
||||
y
|
||||
|
@ -317,7 +317,7 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
|
||||
COALESCE(a) = COALESCE(b)
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: ''
|
||||
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #54461: crash with longblob and union or update with subquery
|
||||
|
@ -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"))
|
||||
1 0 3
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'baaa'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'baaa'
|
||||
select position(("1" in (1,2,3)) in "01");
|
||||
position(("1" in (1,2,3)) in "01")
|
||||
2
|
||||
@ -1189,12 +1189,12 @@ SELECT * FROM t1, t2 WHERE num=str;
|
||||
str num
|
||||
notnumber 0
|
||||
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);
|
||||
str num
|
||||
notnumber 0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'notnum'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'notnum'
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1(
|
||||
id int(11) NOT NULL auto_increment,
|
||||
|
@ -1811,14 +1811,14 @@ val2
|
||||
val4
|
||||
DELETE FROM t WHERE a = 100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'val1'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'val2'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'val4'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'val1'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'val2'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'val4'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'val1'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'val2'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'val4'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'val1'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'val2'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'val4'
|
||||
GET DIAGNOSTICS CONDITION 3 @n = ROW_NUMBER;
|
||||
SELECT @n;
|
||||
@n
|
||||
|
@ -1654,8 +1654,8 @@ SELECT 1 FROM g1 WHERE a >= ANY
|
||||
(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ;
|
||||
1
|
||||
Warnings:
|
||||
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 DECIMAL value: 'a'
|
||||
DROP TABLE g1;
|
||||
#
|
||||
# Bug#16451878 GEOMETRY QUERY CRASHES SERVER
|
||||
|
@ -829,11 +829,11 @@ set sql_mode='';
|
||||
SELECT a FROM t1 HAVING 'a' > 1;
|
||||
a
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
SELECT a FROM t1 HAVING "a" > 1;
|
||||
a
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
SELECT a FROM t1 HAVING `a` > 1;
|
||||
a
|
||||
2
|
||||
@ -2334,17 +2334,17 @@ field1 field2
|
||||
2004-10-11 18:13:00 1
|
||||
2009-02-19 02:05:00 5
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'v'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'g'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'o'
|
||||
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 ;
|
||||
field1 field2
|
||||
2004-10-11 18:13:00 1
|
||||
2009-02-19 02:05:00 5
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'v'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'g'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'o'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'v'
|
||||
SET SESSION SQL_MODE=default;
|
||||
drop table t1;
|
||||
#
|
||||
|
@ -3309,11 +3309,11 @@ b min(a)
|
||||
d 7
|
||||
f 7
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'd'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'd'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'g'
|
||||
explain
|
||||
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
|
||||
|
@ -524,7 +524,7 @@ ORDER BY t1.f2;
|
||||
MAX(t2.f2)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'd'
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.0 tests
|
||||
#
|
||||
@ -860,13 +860,13 @@ bar
|
||||
SELECT DEFAULT(f) AS h FROM t1 HAVING h > 5;
|
||||
h
|
||||
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;
|
||||
h
|
||||
A
|
||||
A
|
||||
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';
|
||||
h
|
||||
A
|
||||
@ -894,7 +894,7 @@ HAVING t.f != 112 AND t.f = 'x' AND t.f != 'a';
|
||||
f
|
||||
x
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-20200: AddressSanitizer: use-after-poison in
|
||||
|
@ -5533,11 +5533,11 @@ i
|
||||
SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
|
||||
i
|
||||
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);
|
||||
i
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-28080: HAVING with NOT EXIST predicate in an equality
|
||||
|
@ -37,7 +37,9 @@ SELECT v.* FROM v JOIN INFORMATION_SCHEMA.TABLES WHERE DATA_LENGTH = -1;
|
||||
--eval KILL $conid
|
||||
--disconnect con1
|
||||
--connection default
|
||||
--disable_warnings
|
||||
DROP VIEW IF EXISTS vv;
|
||||
--enable_warnings
|
||||
DROP VIEW v;
|
||||
DROP FUNCTION f;
|
||||
DROP TABLE t;
|
||||
|
@ -726,7 +726,7 @@ SET sql_mode= 'STRICT_ALL_TABLES';
|
||||
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;
|
||||
REPLACE INTO v1 SET f2 = 1;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
|
||||
SELECT * from t1;
|
||||
f1 f2
|
||||
drop view v1;
|
||||
@ -739,7 +739,7 @@ drop view v1;
|
||||
SELECT 0,0 INTO OUTFILE 't1.txt';
|
||||
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;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
|
||||
SELECT * from t1;
|
||||
f1 f2
|
||||
drop view v1;
|
||||
@ -751,7 +751,7 @@ SET @@sql_mode= @save_mode;
|
||||
CREATE TABLE t1 (f INT);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
|
||||
REPLACE INTO v1 SET f = NULL;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: 'foo'
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@ -43,3 +43,15 @@ INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
|
||||
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`))
|
||||
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
|
||||
#
|
||||
|
@ -62,3 +62,20 @@ INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
|
||||
--disable_warnings
|
||||
|
||||
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 #
|
||||
|
@ -883,4 +883,74 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 4
|
||||
DROP TABLE t1;
|
||||
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
|
||||
|
@ -459,4 +459,58 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
|
||||
|
||||
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
|
||||
|
@ -3887,8 +3887,8 @@ ORDER BY t2.v;
|
||||
MAX(t1.i)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'y'
|
||||
|
||||
EXPLAIN
|
||||
SELECT MAX(t1.i)
|
||||
|
13
mysql-test/main/json_debug_nonembedded.result
Normal file
13
mysql-test/main/json_debug_nonembedded.result
Normal file
@ -0,0 +1,13 @@
|
||||
#
|
||||
# MDEV-28762: recursive call of some json functions without stack control
|
||||
#
|
||||
SET @saved_dbug = @@debug_dbug;
|
||||
SET debug_dbug='+d,json_check_min_stack_requirement';
|
||||
SET @json1= '{"key1":"val1"}';
|
||||
SET @json2= '{"key1":"val1"}';
|
||||
SELECT JSON_OVERLAPS(@json1, @json2);
|
||||
ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
|
||||
SET @@debug_dbug= @saved_dbug;
|
||||
#
|
||||
# End of 10.9 test
|
||||
#
|
22
mysql-test/main/json_debug_nonembedded.test
Normal file
22
mysql-test/main/json_debug_nonembedded.test
Normal file
@ -0,0 +1,22 @@
|
||||
-- source include/not_embedded.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28762: recursive call of some json functions without stack control
|
||||
--echo #
|
||||
|
||||
SET @saved_dbug = @@debug_dbug;
|
||||
SET debug_dbug='+d,json_check_min_stack_requirement';
|
||||
|
||||
SET @json1= '{"key1":"val1"}';
|
||||
SET @json2= '{"key1":"val1"}';
|
||||
|
||||
--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
|
||||
--error ER_STACK_OVERRUN_NEED_MORE
|
||||
SELECT JSON_OVERLAPS(@json1, @json2);
|
||||
|
||||
SET @@debug_dbug= @saved_dbug;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.9 test
|
||||
--echo #
|
@ -878,3 +878,28 @@ SET DEBUG_SYNC="RESET";
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
DROP TABLES t1, t2;
|
||||
#
|
||||
# MDEV-28567 Assertion `0' in open_tables upon function-related operation
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW UPDATE t2 SET b = 0;
|
||||
CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW UPDATE t1 SET a = 6;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
DROP TRIGGER tr1;
|
||||
INSERT INTO t2 SELECT * FROM t2;
|
||||
SELECT f() FROM t2;
|
||||
ERROR 42000: FUNCTION test.f does not exist
|
||||
set debug_sync= 'after_open_table_mdl_shared signal s1';
|
||||
ALTER VIEW v1 AS SELECT f() FROM t1;
|
||||
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
set debug_sync= 'now wait_for s1';
|
||||
SELECT * FROM ( SELECT * FROM v1 ) sq;
|
||||
COMMIT;
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
DROP TABLE t1, t2;
|
||||
set debug_sync= 'reset';
|
||||
|
@ -1103,3 +1103,122 @@ DROP TABLES t1, t2;
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28567 Assertion `0' in open_tables upon function-related operation
|
||||
--echo #
|
||||
# To get MDL trace run this case like this:
|
||||
# mtr --mysqld=--debug=d,mdl,query:i:o,/tmp/mdl.log ...
|
||||
# Cleanup trace like this:
|
||||
# sed -i -re '/(mysql|performance_schema|sys|mtr)\// d; /MDL_BACKUP_|MDL_INTENTION_/ d; /\/(t2|tr1|tr2)/ d' /tmp/mdl.log
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW UPDATE t2 SET b = 0;
|
||||
CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW UPDATE t1 SET a = 6;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
|
||||
SET AUTOCOMMIT=OFF;
|
||||
SELECT * FROM t1;
|
||||
# T@6
|
||||
# Seized: test/t1 (MDL_SHARED_READ)
|
||||
|
||||
--connect (con1,localhost,root,,test)
|
||||
--send
|
||||
DROP TRIGGER tr1;
|
||||
# T@7
|
||||
# Seized: test/t1 (MDL_SHARED_NO_WRITE)
|
||||
# Waiting: test/t1 (MDL_EXCLUSIVE)
|
||||
# Waiting: test/t1 (MDL_SHARED_WRITE)
|
||||
# Deadlock: test/t1 (MDL_SHARED_WRITE)
|
||||
|
||||
--connection default
|
||||
--error 0, ER_LOCK_DEADLOCK
|
||||
INSERT INTO t2 SELECT * FROM t2;
|
||||
# T@6
|
||||
# Released: test/t1 (MDL_SHARED_READ)
|
||||
# T@7
|
||||
# Acquired: test/t1 (MDL_EXCLUSIVE) (good)
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
SELECT f() FROM t2;
|
||||
# T@6
|
||||
# Seized: test/f (MDL_SHARED)
|
||||
# T@7
|
||||
# Released: test/t1 (MDL_EXCLUSIVE)
|
||||
# Good1: continue T@6 below
|
||||
# Bad1: continue T@8 below
|
||||
|
||||
# Now we hold test/f, the below code creates concurrent
|
||||
# waiting of 3 threads for test/f which leads to deadlock (Bad)
|
||||
|
||||
# To achive Good comment out 'now wait_for s1' below and run multiple times.
|
||||
|
||||
--connect (con2,localhost,root,,test)
|
||||
set debug_sync= 'after_open_table_mdl_shared signal s1';
|
||||
--send
|
||||
ALTER VIEW v1 AS SELECT f() FROM t1;
|
||||
# T@8
|
||||
# Good2: Waiting: test/v1 (MDL_EXCLUSIVE)
|
||||
# Good2-3: continue T@7 below
|
||||
# Good5: Acquired: test/v1 (MDL_EXCLUSIVE)
|
||||
# Good5: Seized: test/v1 (MDL_EXCLUSIVE)
|
||||
# Good5-6: continue T@7 below
|
||||
# Good7: Seized: test/t1 (MDL_SHARED_READ)
|
||||
# Good7: Waiting: test/f (MDL_SHARED)
|
||||
# Good7-8: continue T@7 below
|
||||
# Good9: Acquired: test/f (MDL_SHARED)
|
||||
# Good9: Released: test/f (MDL_SHARED)
|
||||
# Good9: Released: test/t1 (MDL_SHARED_READ)
|
||||
# Good9: Released: test/v1 (MDL_EXCLUSIVE)
|
||||
# Good9: command finished without error
|
||||
# Bad1: Seized: test/v1 (MDL_EXCLUSIVE)
|
||||
# Bad1: Seized: test/v1 (MDL_EXCLUSIVE)
|
||||
# Bad1: Seized: test/t1 (MDL_SHARED_READ)
|
||||
# Bad1-2: continue T@6 below
|
||||
# Bad4: Waiting: test/f (MDL_SHARED)
|
||||
# Bad4: Deadlock: test/f (MDL_SHARED)
|
||||
# Bad4: command finished with error
|
||||
|
||||
--connection con1
|
||||
--reap
|
||||
--send
|
||||
CREATE FUNCTION f() RETURNS INT RETURN 1;
|
||||
# T@7
|
||||
# Good3: Waiting: test/f (MDL_EXCLUSIVE)
|
||||
# Good3-4: continue T@6 below
|
||||
# Good6: Acquired: test/f (MDL_EXCLUSIVE)
|
||||
# Good6-7: continue T@8 above
|
||||
# Good8: Released: test/f (MDL_EXCLUSIVE)
|
||||
# Good8-9: continue T@8 above
|
||||
# Bad3: Waiting: test/f (MDL_EXCLUSIVE)
|
||||
# Bad3-4: continue T@8 above
|
||||
|
||||
--connection default
|
||||
set debug_sync= 'now wait_for s1';
|
||||
--disable_result_log
|
||||
SELECT * FROM ( SELECT * FROM v1 ) sq;
|
||||
--enable_result_log
|
||||
# T@6
|
||||
# Good1: Seized: test/v1 (MDL_SHARED_READ)
|
||||
# Good1-2: continue T@8 above
|
||||
# Good4: Seized: test/t1 (MDL_SHARED_READ)
|
||||
# Bad2: Waiting: test/v1 (MDL_SHARED_READ)
|
||||
# Bad2-3: continue T@7 above
|
||||
|
||||
# Cleanup
|
||||
COMMIT;
|
||||
# Good4: Released: test/t1 (MDL_SHARED_READ)
|
||||
# Good4: Released: test/v1 (MDL_SHARED_READ)
|
||||
# Good4: Released: test/f (MDL_SHARED)
|
||||
# Good4-5: continue T@8 above
|
||||
|
||||
--connection con2
|
||||
--error 0, ER_SP_DOES_NOT_EXIST
|
||||
--reap
|
||||
--disconnect con1
|
||||
--disconnect con2
|
||||
--connection default
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION f;
|
||||
DROP TABLE t1, t2;
|
||||
set debug_sync= 'reset';
|
||||
|
@ -972,10 +972,10 @@ c c b
|
||||
c NULL NULL
|
||||
c NULL NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
SET optimizer_switch=@save_optimizer_switch;
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
#
|
||||
|
@ -29,8 +29,6 @@ RESET MASTER;
|
||||
# It creates the table with a wrong table name and generates an error.
|
||||
# (error output was suppressed to make the test case platform agnostic)
|
||||
|
||||
# It is not in binary_mode, so table name '0x410D0A42' can be translated to
|
||||
# '0x410A42' by mysql depending on the OS - Windows or Unix-like.
|
||||
DROP TABLE `TABLE_NAME_MASKED`;
|
||||
|
||||
# In binary_mode, table name '0x410D0A42' and string '0x410042' can be
|
||||
@ -46,5 +44,5 @@ DROP TABLE `A
|
||||
B`;
|
||||
RESET MASTER;
|
||||
include/assert.inc [Table and contents created through mysqltest match 0x610D0A62.]
|
||||
include/assert.inc [Table and contents created while replaying binary log without --binary-mode set match 0x61(0D)0A62.]
|
||||
include/assert.inc [Table and contents created while replaying binary log without --binary-mode set match 0x610A62.]
|
||||
include/assert.inc [Table and contents created while replaying binary log with --binary-mode set match 0x610D0A62.]
|
||||
|
@ -48,27 +48,15 @@ RESET MASTER;
|
||||
--echo # It creates the table with a wrong table name and generates an error.
|
||||
--echo # (error output was suppressed to make the test case platform agnostic)
|
||||
|
||||
## disabling result log because the error message has the
|
||||
## table name in the output which is one byte different ('\r')
|
||||
## on unixes and windows.
|
||||
|
||||
--disable_result_log
|
||||
--error 1
|
||||
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/my.sql 2>&1
|
||||
--enable_result_log
|
||||
|
||||
--echo
|
||||
--echo # It is not in binary_mode, so table name '0x410D0A42' can be translated to
|
||||
--echo # '0x410A42' by mysql depending on the OS - Windows or Unix-like.
|
||||
--replace_result $table_name_wrong TABLE_NAME_MASKED $table_name_right TABLE_NAME_MASKED
|
||||
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')`)
|
||||
{
|
||||
eval DROP TABLE `$table_name_right`;
|
||||
}
|
||||
|
||||
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`)
|
||||
{
|
||||
eval DROP TABLE `$table_name_wrong`;
|
||||
}
|
||||
eval DROP TABLE `$table_name_wrong`;
|
||||
|
||||
--echo
|
||||
--echo # In binary_mode, table name '0x410D0A42' and string '0x410042' can be
|
||||
@ -150,15 +138,9 @@ RESET MASTER;
|
||||
--let $assert_cond= "$tbl0" = "610D0A62" AND "$val0" = "610D0A62"
|
||||
--source include/assert.inc
|
||||
|
||||
--let $assert_text= Table and contents created while replaying binary log without --binary-mode set match 0x61(0D)0A62.
|
||||
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')`)
|
||||
{
|
||||
--let $assert_cond= "$tbl1" = "610D0A62" AND "$val1" = "610D0A62"
|
||||
}
|
||||
if (`SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) NOT IN ('Win32', 'Win64', 'Windows')`)
|
||||
{
|
||||
--let $assert_cond= "$tbl1" = "610A62" AND "$val1" = "610A62"
|
||||
}
|
||||
--let $assert_text= Table and contents created while replaying binary log without --binary-mode set match 0x610A62.
|
||||
--let $assert_cond= "$tbl1" = "610A62" AND "$val1" = "610A62"
|
||||
|
||||
--source include/assert.inc
|
||||
|
||||
--let $assert_text= Table and contents created while replaying binary log with --binary-mode set match 0x610D0A62.
|
||||
|
@ -1,4 +1,5 @@
|
||||
set sql_mode="";
|
||||
call mtr.add_suppression("Incorrect definition of table mysql.column_stats:.*");
|
||||
Run mysql_upgrade once
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
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
|
||||
# expected binaries it uses.
|
||||
|
@ -364,7 +364,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
|
||||
log. Slave stops with an error if it encounters an event
|
||||
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.
|
||||
--histogram-size=# Number of bytes used for a histogram. If set to 0, no
|
||||
histograms are created by ANALYZE.
|
||||
|
@ -38,6 +38,7 @@ perl;
|
||||
test-sql-discovery query-cache-info password-reuse-check
|
||||
query-response-time metadata-lock-info locales unix-socket
|
||||
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 hashicorp provider/;
|
||||
|
||||
|
@ -442,7 +442,7 @@ NULLIF(1,1e0),
|
||||
NULLIF(1,'2001-01-01'),
|
||||
NULLIF(1,TIME'00:00:00');
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '2001-01-01'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '2001-01-01'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -946,7 +946,7 @@ Warnings:
|
||||
Warning 1366 Incorrect integer value: 'three' for column `test`.`t2`.`b` at row 2
|
||||
UPDATE v SET a = NULL;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
|
||||
DROP view v;
|
||||
DROP TABLE t1, t2;
|
||||
SET @save_isp=@@innodb_stats_persistent;
|
||||
|
@ -296,12 +296,12 @@ id
|
||||
2
|
||||
3
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
|
||||
select @@profiling;
|
||||
@@profiling
|
||||
1
|
||||
|
@ -4392,15 +4392,15 @@ set sql_mode='STRICT_ALL_TABLES';
|
||||
CREATE TABLE t1 (id int, count int);
|
||||
insert into t1 values (1,1),(0,2);
|
||||
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'";
|
||||
execute stmt;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'update t1 set count = count + 1 where id = ?';
|
||||
set @a = '1bad';
|
||||
execute stmt using @a;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
|
||||
deallocate prepare stmt;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id decimal(10,5), count int);
|
||||
|
@ -283,8 +283,8 @@ SET @arg00=1;
|
||||
execute stmt4 using @arg00;
|
||||
Field Type Null Key Default Extra
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
prepare stmt4 from ' show columns from t2 from test like ''a%'' ';
|
||||
execute stmt4;
|
||||
Field Type Null Key Default Extra
|
||||
|
@ -7,15 +7,15 @@ set sql_mode='STRICT_TRANS_TABLES';
|
||||
CREATE TABLE t1 (id int, count int) engine=innodb;
|
||||
insert into t1 values (1,1),(0,2);
|
||||
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'";
|
||||
execute stmt;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
|
||||
deallocate prepare stmt;
|
||||
prepare stmt from 'update t1 set count = count + 1 where id = ?';
|
||||
set @a = '1bad';
|
||||
execute stmt using @a;
|
||||
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
|
||||
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
|
||||
deallocate prepare stmt;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id decimal(10,5), count int) engine=innodb;
|
||||
|
@ -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 DECIMAL 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));
|
||||
row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3))
|
||||
1
|
||||
Warnings:
|
||||
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'
|
||||
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))
|
||||
@ -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))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
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));
|
||||
row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
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
|
||||
|
@ -1,8 +1,6 @@
|
||||
CREATE TABLE t1 (c1 longtext);
|
||||
INSERT INTO t1 values ('a');
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.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 * INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp' FROM t1;
|
||||
show global variables like 'secure_file_priv';
|
||||
Variable_name Value
|
||||
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\\..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
|
||||
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
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.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/B11764517-3.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_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
|
||||
SELECT * INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp' FROM t1;
|
||||
SELECT * INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp' FROM t1;
|
||||
SELECT * INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp' FROM t1;
|
||||
SELECT * INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp' FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
@ -14,7 +14,7 @@ LET $MYSQL_TMP_DIR_LCASE= `SELECT lower('$MYSQL_TMP_DIR')`;
|
||||
|
||||
#create the file
|
||||
--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
|
||||
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
|
||||
--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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
--remove_file $MYSQL_TMP_DIR/B11764517.tmp;
|
||||
|
@ -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 ;
|
||||
G1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'z'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'j'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'z'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'q'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'j'
|
||||
DROP TABLE CC;
|
||||
# End of test#45227
|
||||
#
|
||||
|
@ -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 ;
|
||||
G1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'j'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'z'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'j'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'z'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'q'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||
DROP TABLE CC;
|
||||
# End of test#45227
|
||||
#
|
||||
|
@ -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 ;
|
||||
G1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'z'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'j'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'z'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'q'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'j'
|
||||
DROP TABLE CC;
|
||||
# End of test#45227
|
||||
#
|
||||
|
@ -1316,6 +1316,18 @@ t1 CREATE TABLE `t1` (
|
||||
`c1` varchar(3) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
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);
|
||||
SET sql_mode=ORACLE;
|
||||
SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
|
||||
|
@ -1161,6 +1161,16 @@ SHOW CREATE 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);
|
||||
SET sql_mode=ORACLE;
|
||||
SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
|
||||
|
@ -707,7 +707,7 @@ Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` text DEFAULT NULL,
|
||||
`c` char(1) DEFAULT NULL
|
||||
`c` varchar(1) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p1;
|
||||
|
@ -469,8 +469,8 @@ t2 CREATE TABLE `t2` (
|
||||
`t2` text DEFAULT NULL,
|
||||
`t3` mediumtext DEFAULT NULL,
|
||||
`t4` longtext DEFAULT NULL,
|
||||
`enum1` char(1) DEFAULT NULL,
|
||||
`set1` char(5) DEFAULT NULL,
|
||||
`enum1` varchar(1) DEFAULT NULL,
|
||||
`set1` varchar(5) DEFAULT NULL,
|
||||
`blob1` tinyblob DEFAULT NULL,
|
||||
`blob2` blob DEFAULT NULL,
|
||||
`blob3` mediumblob DEFAULT NULL,
|
||||
@ -631,8 +631,8 @@ t2 CREATE TABLE `t2` (
|
||||
`t2` text DEFAULT NULL,
|
||||
`t3` mediumtext DEFAULT NULL,
|
||||
`t4` longtext DEFAULT NULL,
|
||||
`enum1` char(1) DEFAULT NULL,
|
||||
`set1` char(5) DEFAULT NULL,
|
||||
`enum1` varchar(1) DEFAULT NULL,
|
||||
`set1` varchar(5) DEFAULT NULL,
|
||||
`blob1` tinyblob DEFAULT NULL,
|
||||
`blob2` blob DEFAULT NULL,
|
||||
`blob3` mediumblob DEFAULT NULL,
|
||||
@ -1044,7 +1044,7 @@ t1 CREATE TABLE `t1` (
|
||||
`a_flt0` float DEFAULT NULL,
|
||||
`a_dbl0` double 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_text1` text DEFAULT NULL,
|
||||
`a_tinytext1` tinytext DEFAULT NULL,
|
||||
@ -1062,7 +1062,7 @@ t1 CREATE TABLE `t1` (
|
||||
`aa_flt0` float DEFAULT NULL,
|
||||
`aa_dbl0` double 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_text1` text DEFAULT NULL,
|
||||
`aa_tinytext1` tinytext DEFAULT NULL,
|
||||
|
@ -353,3 +353,13 @@ drop table _t1;
|
||||
#
|
||||
# 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
|
||||
#
|
||||
|
@ -371,3 +371,18 @@ drop table _t1;
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--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 #
|
||||
|
@ -1307,7 +1307,7 @@ $$
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE "t1" (
|
||||
"var" char(1) DEFAULT NULL
|
||||
"var" varchar(1) DEFAULT NULL
|
||||
)
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@ -8697,11 +8697,11 @@ RETURN a = timestamp'2038-01-19 03:14:07.999999'
|
||||
END
|
||||
$$
|
||||
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;
|
||||
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;
|
||||
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 f2;
|
||||
DROP FUNCTION f3;
|
||||
|
@ -85,3 +85,7 @@ db_name table_name hist_type_equal histogram_equal
|
||||
test t1 1 1
|
||||
test t2 1 1
|
||||
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
|
||||
|
@ -65,3 +65,13 @@ from
|
||||
A.column_name=B.column_name;
|
||||
|
||||
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
|
||||
|
@ -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')
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
|
||||
ERROR 21000: Operand should contain 1 column(s)
|
||||
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);
|
||||
1
|
||||
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);
|
||||
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);
|
||||
1
|
||||
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);
|
||||
1
|
||||
1
|
||||
@ -6348,10 +6348,10 @@ ORDER BY b
|
||||
);
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
SELECT 1 FROM t1 WHERE a =
|
||||
(SELECT 1 FROM t2 WHERE b =
|
||||
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
|
||||
@ -6359,10 +6359,10 @@ GROUP BY b
|
||||
);
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
|
||||
|
@ -1677,7 +1677,7 @@ WHERE ( alias2.f1 , alias2.f2 ) IN ( SELECT max(f2) , f1 FROM t0 GROUP BY f2 , f
|
||||
f1 f2
|
||||
8 8
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'u'
|
||||
EXPLAIN
|
||||
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
|
||||
@ -1711,7 +1711,7 @@ WHERE ( alias2.f1 , alias2.f2 ) IN ( SELECT max(f2) , f1 FROM t0 GROUP BY f2 , f
|
||||
f1 f2
|
||||
8 8
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'u'
|
||||
EXPLAIN
|
||||
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
|
||||
@ -1903,8 +1903,8 @@ WHERE SUBQUERY2_t2.col_varchar_nokey IN
|
||||
(SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey));
|
||||
col_int_key
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'v'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'v'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'r'
|
||||
set @@optimizer_switch='subquery_cache=off,materialization=off,in_to_exists=on,semijoin=off';
|
||||
EXPLAIN
|
||||
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));
|
||||
col_int_key
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'v'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'v'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'r'
|
||||
drop table t1, t2;
|
||||
set @@optimizer_switch = @old_optimizer_switch;
|
||||
#
|
||||
@ -2997,6 +2997,63 @@ ANALYZE
|
||||
}
|
||||
DROP TABLE t1;
|
||||
# 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
|
||||
#
|
||||
# MDEV-19134: EXISTS() slower if ORDER BY is defined
|
||||
|
@ -2442,6 +2442,45 @@ DROP TABLE t1;
|
||||
|
||||
--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 #
|
||||
|
@ -2889,70 +2889,70 @@ WHERE table1 .`col_varchar_key` ) field10
|
||||
1 NULL w
|
||||
1 NULL y
|
||||
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 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 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 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 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 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 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 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 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 DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
SET @@optimizer_switch='subquery_cache=on';
|
||||
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
|
||||
SELECT SUBQUERY2_t1 .`col_int_key`
|
||||
@ -2980,32 +2980,32 @@ WHERE table1 .`col_varchar_key` ) field10
|
||||
1 NULL w
|
||||
1 NULL y
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'c'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'e'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'h'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'i'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'j'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'l'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'n'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'p'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 's'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 't'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'v'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'z'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'a'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'b'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'c'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'd'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'e'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'g'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'h'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'i'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'j'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'k'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'l'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'n'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'o'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'p'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'q'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'r'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 's'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 't'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'u'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'v'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'w'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'y'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'z'
|
||||
drop table t1,t2,t3,t4;
|
||||
set @@optimizer_switch= default;
|
||||
#launchpad BUG#609045
|
||||
@ -3430,9 +3430,9 @@ WHERE table1 .`col_varchar_key` ) field10
|
||||
1 NULL d
|
||||
1 NULL f
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
SET @@optimizer_switch = 'subquery_cache=on';
|
||||
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
|
||||
SELECT SUBQUERY2_t1 .`col_int_key`
|
||||
@ -3447,9 +3447,9 @@ WHERE table1 .`col_varchar_key` ) field10
|
||||
1 NULL d
|
||||
1 NULL f
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||
drop table t1,t2,t3,t4;
|
||||
set @@optimizer_switch= default;
|
||||
#launchpad BUG#611625
|
||||
|
@ -723,7 +723,7 @@ a
|
||||
1
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: ''
|
||||
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user