1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

maria-10.0.16 merge

bzr merge -r4588 maria/10.0
This commit is contained in:
Nirbhay Choubey
2015-01-26 22:54:27 -05:00
409 changed files with 13043 additions and 2869 deletions

View File

@ -28,10 +28,12 @@ ENDIF()
# We use the LOCATION target property (CMP0026) # We use the LOCATION target property (CMP0026)
# and get_target_property() for non-existent targets (CMP0045) # and get_target_property() for non-existent targets (CMP0045)
# and INSTALL_NAME_DIR (CMP0042)
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
CMAKE_VERSION VERSION_GREATER "3.0.0") CMAKE_VERSION VERSION_GREATER "3.0.0")
CMAKE_POLICY(SET CMP0026 OLD) CMAKE_POLICY(SET CMP0026 OLD)
CMAKE_POLICY(SET CMP0045 OLD) CMAKE_POLICY(SET CMP0045 OLD)
CMAKE_POLICY(SET CMP0042 OLD)
ENDIF() ENDIF()
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
@ -108,36 +110,15 @@ FOREACH(_base
ENDFOREACH() ENDFOREACH()
# Following autotools tradition, add preprocessor definitions # Following autotools tradition, add preprocessor definitions
# specified in environment variable CPPFLAGS # specified in environment variable CPPFLAGS
IF(DEFINED ENV{CPPFLAGS}) IF(DEFINED ENV{CPPFLAGS})
ADD_DEFINITIONS($ENV{CPPFLAGS}) ADD_DEFINITIONS($ENV{CPPFLAGS})
ENDIF() ENDIF()
# SET(MYSQL_MAINTAINER_MODE "AUTO" CACHE STRING "MySQL maintainer-specific development environment. Options are: ON OFF AUTO.")
# Control aspects of the development environment which are
# specific to MySQL maintainers and developers.
#
INCLUDE(maintainer)
SET(MYSQL_MAINTAINER_MODE "OFF" CACHE STRING "MySQL maintainer-specific development environment. Options are: ON OFF AUTO.")
MARK_AS_ADVANCED(MYSQL_MAINTAINER_MODE) MARK_AS_ADVANCED(MYSQL_MAINTAINER_MODE)
# Whether the maintainer mode compiler options should be enabled.
IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
SET_MYSQL_MAINTAINER_GNU_C_OPTIONS()
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS()
ENDIF()
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS()
ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS()
ENDIF()
# Packaging # Packaging
IF (NOT CPACK_GENERATOR) IF (NOT CPACK_GENERATOR)
IF(WIN32) IF(WIN32)
@ -396,18 +377,7 @@ CHECK_PCRE()
# We have to add MAINTAINER_C_WARNINGS first to ensure that the flags # We have to add MAINTAINER_C_WARNINGS first to ensure that the flags
# given by the invoking user are honored # given by the invoking user are honored
# #
IF(MYSQL_MAINTAINER_MODE MATCHES "ON") INCLUDE(maintainer)
SET(CMAKE_C_FLAGS "${MY_MAINTAINER_C_WARNINGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${MY_MAINTAINER_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
SET(CMAKE_C_FLAGS_DEBUG "${MY_MAINTAINER_C_WARNINGS} ${CMAKE_C_FLAGS_DEBUG}")
SET(CMAKE_CXX_FLAGS_DEBUG "${MY_MAINTAINER_CXX_WARNINGS} ${CMAKE_CXX_FLAGS_DEBUG}")
ENDIF()
IF(CMAKE_CROSSCOMPILING)
SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
INCLUDE(${IMPORT_EXECUTABLES})
ENDIF()
IF(WITH_UNIT_TESTS) IF(WITH_UNIT_TESTS)
ENABLE_TESTING() ENABLE_TESTING()
@ -534,4 +504,3 @@ IF(NON_DISTRIBUTABLE_WARNING)
MESSAGE(WARNING " MESSAGE(WARNING "
You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.") You have linked MariaDB with GPLv3 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with Free Software Foundation.")
ENDIF() ENDIF()

View File

@ -1,3 +1,3 @@
MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0 MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=15 MYSQL_VERSION_PATCH=16

View File

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2000, 2013, Oracle and/or its affiliates. Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 2013, Monty Program Ab. Copyright (c) 2009, 2014, MariaDB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -2435,6 +2435,7 @@ int main(int argc, char** argv)
DBUG_PROCESS(argv[0]); DBUG_PROCESS(argv[0]);
my_init_time(); // for time functions my_init_time(); // for time functions
tzset(); // set tzname
init_alloc_root(&s_mem_root, 16384, 0, MYF(0)); init_alloc_root(&s_mem_root, 16384, 0, MYF(0));
if (load_defaults("my", load_groups, &argc, &argv)) if (load_defaults("my", load_groups, &argc, &argv))

View File

@ -5908,7 +5908,7 @@ void do_connect(struct st_command *command)
{ {
int con_port= opt_port; int con_port= opt_port;
char *con_options; char *con_options;
char *ssl_cipher= 0; char *ssl_cipher __attribute__((unused))= 0;
my_bool con_ssl= 0, con_compress= 0; my_bool con_ssl= 0, con_compress= 0;
my_bool con_pipe= 0; my_bool con_pipe= 0;
my_bool con_shm __attribute__ ((unused))= 0; my_bool con_shm __attribute__ ((unused))= 0;

View File

@ -202,15 +202,16 @@ IF(UNIX)
ENDIF() ENDIF()
ENDIF() ENDIF()
# OSX flags # Default Clang flags
IF(APPLE) IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
SET(COMMON_C_FLAGS "-g -fno-common -fno-strict-aliasing") SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
# XXX: why are we using -felide-constructors on OSX? SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}")
SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors -fno-strict-aliasing") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}") ENDIF()
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}") IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}") SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${COMMON_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
ENDIF() ENDIF()
# Solaris flags # Solaris flags

44
cmake/compile_flags.cmake Normal file
View File

@ -0,0 +1,44 @@
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
#
# 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-1301 USA
## ADD_COMPILE_FLAGS(<source files> COMPILE_FLAGS <flags>)
MACRO(ADD_COMPILE_FLAGS)
SET(FILES "")
SET(FLAGS "")
SET(COMPILE_FLAGS)
FOREACH(ARG ${ARGV})
IF(ARG STREQUAL "COMPILE_FLAGS")
SET(COMPILE_FLAGS "COMPILE_FLAGS")
ELSEIF(COMPILE_FLAGS)
LIST(APPEND FLAGS ${ARG})
ELSE()
LIST(APPEND FILES ${ARG})
ENDIF()
ENDFOREACH()
FOREACH(FILE ${FILES})
FOREACH(FLAG ${FLAGS})
GET_SOURCE_FILE_PROPERTY(PROP ${FILE} COMPILE_FLAGS)
IF(NOT PROP)
SET(PROP ${FLAG})
ELSE()
SET(PROP "${PROP} ${FLAG}")
ENDIF()
SET_SOURCE_FILES_PROPERTIES(
${FILE} PROPERTIES COMPILE_FLAGS "${PROP}"
)
ENDFOREACH()
ENDFOREACH()
ENDMACRO()

View File

@ -189,6 +189,7 @@ ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7")
ALTERNATIVE_NAME("client" "mysql") ALTERNATIVE_NAME("client" "mysql")
ALTERNATIVE_NAME("devel" "mariadb-devel") ALTERNATIVE_NAME("devel" "mariadb-devel")
ALTERNATIVE_NAME("server" "mariadb-server") ALTERNATIVE_NAME("server" "mariadb-server")
ALTERNATIVE_NAME("server" "mysql-compat-server")
ALTERNATIVE_NAME("shared" "mariadb-libs") ALTERNATIVE_NAME("shared" "mariadb-libs")
ALTERNATIVE_NAME("shared" "mysql-libs") ALTERNATIVE_NAME("shared" "mysql-libs")
ALTERNATIVE_NAME("test" "mariadb-test") ALTERNATIVE_NAME("test" "mariadb-test")

View File

@ -304,6 +304,8 @@ FUNCTION(GET_DEPENDEND_OS_LIBS target result)
SET(${result} ${ret} PARENT_SCOPE) SET(${result} ${ret} PARENT_SCOPE)
ENDFUNCTION() ENDFUNCTION()
INCLUDE(CheckCCompilerFlag)
SET(VISIBILITY_HIDDEN_FLAG) SET(VISIBILITY_HIDDEN_FLAG)
IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX) IF(CMAKE_COMPILER_IS_GNUCXX AND UNIX)

View File

@ -1,4 +1,4 @@
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -13,51 +13,46 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE(CheckCCompilerFlag) # Common warning flags for GCC, G++, Clang and Clang++
SET(MY_WARNING_FLAGS "-Wall -Wextra -Wformat-security")
MY_CHECK_C_COMPILER_FLAG("-Wvla" HAVE_WVLA) # Requires GCC 4.3+ or Clang
IF(HAVE_WVLA)
SET(MY_WARNING_FLAGS "${MY_WARNING_FLAGS} -Wvla")
ENDIF()
# Setup GCC (GNU C compiler) warning options. # Common warning flags for GCC and Clang
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS) SET(MY_C_WARNING_FLAGS
SET(MY_MAINTAINER_WARNINGS "${MY_WARNING_FLAGS} -Wwrite-strings -Wdeclaration-after-statement")
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -DFORCE_INIT_OF_VARS")
CHECK_C_COMPILER_FLAG("-Wno-missing-field-initializers" # Common warning flags for G++ and Clang++
HAVE_NO_MISSING_FIELD_INITIALIZERS) SET(MY_CXX_WARNING_FLAGS
"${MY_WARNING_FLAGS} -Woverloaded-virtual -Wno-unused-parameter")
IF (HAVE_NO_MISSING_FIELD_INITIALIZERS) # Extra warning flags for Clang++
SET(MY_MAINTAINER_WARNINGS IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
"${MY_MAINTAINER_WARNINGS} -Wno-missing-field-initializers") SET(MY_CXX_WARNING_FLAGS
ENDIF() "${MY_CXX_WARNING_FLAGS} -Wno-null-conversion -Wno-unused-private-field")
ENDIF()
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement" # Turn on Werror (warning => error) when using maintainer mode.
HAVE_DECLARATION_AFTER_STATEMENT) IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
IF(HAVE_DECLARATION_AFTER_STATEMENT) SET(MY_C_WARNING_FLAGS "${MY_C_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -DFORCE_INIT_OF_VARS -Werror")
"-Wdeclaration-after-statement") ENDIF()
ENDIF()
SET(MY_MAINTAINER_C_WARNINGS
"${MY_MAINTAINER_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
CACHE INTERNAL "C warning options used in maintainer builds.")
# Do not make warnings in checks into errors.
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
ENDMACRO()
# Setup G++ (GNU C++ compiler) warning options. # Set warning flags for GCC/Clang
MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS) IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
SET(MY_MAINTAINER_CXX_WARNINGS SET(MY_MAINTAINER_C_WARNINGS "${MY_C_WARNING_FLAGS}")
"${MY_MAINTAINER_WARNINGS} -Wno-invalid-offsetof -Wno-unused-parameter -Woverloaded-virtual" ENDIF()
CACHE INTERNAL "C++ warning options used in maintainer builds.") # Set warning flags for G++/Clang++
ENDMACRO() IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_CXX_WARNING_FLAGS}")
# Setup ICC (Intel C Compiler) warning options. ENDIF()
MACRO(SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS)
SET(MY_MAINTAINER_WARNINGS "-Wcheck")
SET(MY_MAINTAINER_C_WARNINGS "${MY_MAINTAINER_WARNINGS}"
CACHE INTERNAL "C warning options used in maintainer builds.")
ENDMACRO()
# Setup ICPC (Intel C++ Compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS)
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_WARNINGS}"
CACHE INTERNAL "C++ warning options used in maintainer builds.")
ENDMACRO()
IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MY_MAINTAINER_C_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_MAINTAINER_CXX_WARNINGS}")
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${MY_MAINTAINER_C_WARNINGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${MY_MAINTAINER_CXX_WARNINGS}")
ENDIF()

View File

@ -1,5 +1,4 @@
# Copyright (c) 2010 Sun Microsystems, Inc. # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
# Use is subject to license terms.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -15,21 +14,3 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This file includes OSX specific options and quirks, related to system checks # This file includes OSX specific options and quirks, related to system checks
# Workaround for CMake bug#9051
# (CMake does not pass CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET when
# running TRY_COMPILE)
IF(CMAKE_OSX_SYSROOT)
SET(ENV{CMAKE_OSX_SYSROOT} ${CMAKE_OSX_SYSROOT})
ENDIF()
IF(CMAKE_OSX_SYSROOT)
SET(ENV{MACOSX_DEPLOYMENT_TARGET} ${OSX_DEPLOYMENT_TARGET})
ENDIF()
IF(CMAKE_OSX_DEPLOYMENT_TARGET)
# Workaround linker problems on OSX 10.4
IF(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.5")
ADD_DEFINITIONS(-fno-common)
ENDIF()
ENDIF()

View File

@ -1,4 +1,4 @@
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -90,7 +90,7 @@ SET(HAVE_GETRLIMIT CACHE INTERNAL "")
SET(HAVE_GETRUSAGE CACHE INTERNAL "") SET(HAVE_GETRUSAGE CACHE INTERNAL "")
SET(HAVE_GETTIMEOFDAY CACHE INTERNAL "") SET(HAVE_GETTIMEOFDAY CACHE INTERNAL "")
SET(HAVE_GETWD CACHE INTERNAL "") SET(HAVE_GETWD CACHE INTERNAL "")
SET(HAVE_GMTIME_R CACHE INTERNAL "") SET(HAVE_GMTIME_R 1 CACHE INTERNAL "")
SET(HAVE_GRP_H CACHE INTERNAL "") SET(HAVE_GRP_H CACHE INTERNAL "")
SET(HAVE_IA64INTRIN_H CACHE INTERNAL "") SET(HAVE_IA64INTRIN_H CACHE INTERNAL "")
SET(HAVE_IEEEFP_H CACHE INTERNAL "") SET(HAVE_IEEEFP_H CACHE INTERNAL "")
@ -111,7 +111,7 @@ SET(HAVE_LANGINFO_H CACHE INTERNAL "")
SET(HAVE_LDIV 1 CACHE INTERNAL "") SET(HAVE_LDIV 1 CACHE INTERNAL "")
SET(HAVE_LIMITS_H 1 CACHE INTERNAL "") SET(HAVE_LIMITS_H 1 CACHE INTERNAL "")
SET(HAVE_LOCALE_H 1 CACHE INTERNAL "") SET(HAVE_LOCALE_H 1 CACHE INTERNAL "")
SET(HAVE_LOCALTIME_R CACHE INTERNAL "") SET(HAVE_LOCALTIME_R 1 CACHE INTERNAL "")
SET(HAVE_LOG2 CACHE INTERNAL "") SET(HAVE_LOG2 CACHE INTERNAL "")
SET(HAVE_LONGJMP 1 CACHE INTERNAL "") SET(HAVE_LONGJMP 1 CACHE INTERNAL "")
SET(HAVE_LRAND48 CACHE INTERNAL "") SET(HAVE_LRAND48 CACHE INTERNAL "")

View File

@ -52,16 +52,6 @@ IF(NOT SYSTEM_TYPE)
ENDIF() ENDIF()
ENDIF() ENDIF()
# Always enable -Wall for gnu C/C++
IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_FLAGS MATCHES ".*-Wall.*")
SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_C_FLAGS MATCHES ".*-Wall.*")
SET(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS} -Wall")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCXX)
# MySQL "canonical" GCC flags. At least -fno-rtti flag affects # MySQL "canonical" GCC flags. At least -fno-rtti flag affects
# ABI and cannot be simply removed. # ABI and cannot be simply removed.

View File

@ -75,11 +75,29 @@ ENDIF()
MYSQL_ADD_EXECUTABLE(replace replace.c COMPONENT Server) MYSQL_ADD_EXECUTABLE(replace replace.c COMPONENT Server)
TARGET_LINK_LIBRARIES(replace mysys) TARGET_LINK_LIBRARIES(replace mysys)
IF(UNIX) IF(UNIX)
MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.c)
MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c) MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c)
TARGET_LINK_LIBRARIES(resolve_stack_dump mysys) TARGET_LINK_LIBRARIES(resolve_stack_dump mysys)
MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client) MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client)
TARGET_LINK_LIBRARIES(mysql_waitpid mysys) TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
ENDIF() ENDIF()
# Add path to the InnoDB headers
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/storage/innobase/include
${CMAKE_SOURCE_DIR}/sql)
# We use the InnoDB code directly in case the code changes.
ADD_DEFINITIONS("-DUNIV_INNOCHECKSUM")
SET(INNOBASE_SOURCES
../storage/innobase/buf/buf0checksum.cc
../storage/innobase/ut/ut0crc32.cc
../storage/innobase/ut/ut0ut.cc
../storage/innobase/page/page0zip.cc
)
MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.cc ${INNOBASE_SOURCES})
TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl)
ADD_DEPENDENCIES(innochecksum GenError)

View File

@ -1,325 +0,0 @@
/*
Copyright (c) 2005, 2011, Oracle and/or its affiliates
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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-1301 USA
*/
/*
InnoDB offline file checksum utility. 85% of the code in this file
was taken wholesale fron the InnoDB codebase.
The final 15% was originally written by Mark Smith of Danga
Interactive, Inc. <junior@danga.com>
Published with a permission.
*/
#include <my_global.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
/* all of these ripped from InnoDB code from MySQL 4.0.22 */
#define UT_HASH_RANDOM_MASK 1463735687
#define UT_HASH_RANDOM_MASK2 1653893711
#define FIL_PAGE_LSN 16
#define FIL_PAGE_FILE_FLUSH_LSN 26
#define FIL_PAGE_OFFSET 4
#define FIL_PAGE_DATA 38
#define FIL_PAGE_END_LSN_OLD_CHKSUM 8
#define FIL_PAGE_SPACE_OR_CHKSUM 0
#define UNIV_PAGE_SIZE (2 * 8192)
/* command line argument to do page checks (that's it) */
/* another argument to specify page ranges... seek to right spot and go from there */
typedef unsigned long int ulint;
/* innodb function in name; modified slightly to not have the ASM version (lots of #ifs that didn't apply) */
ulint mach_read_from_4(uchar *b)
{
return( ((ulint)(b[0]) << 24)
+ ((ulint)(b[1]) << 16)
+ ((ulint)(b[2]) << 8)
+ (ulint)(b[3])
);
}
ulint
ut_fold_ulint_pair(
/*===============*/
/* out: folded value */
ulint n1, /* in: ulint */
ulint n2) /* in: ulint */
{
return(((((n1 ^ n2 ^ UT_HASH_RANDOM_MASK2) << 8) + n1)
^ UT_HASH_RANDOM_MASK) + n2);
}
ulint
ut_fold_binary(
/*===========*/
/* out: folded value */
uchar* str, /* in: string of bytes */
ulint len) /* in: length */
{
ulint i;
ulint fold= 0;
for (i= 0; i < len; i++)
{
fold= ut_fold_ulint_pair(fold, (ulint)(*str));
str++;
}
return(fold);
}
ulint
buf_calc_page_new_checksum(
/*=======================*/
/* out: checksum */
uchar* page) /* in: buffer page */
{
ulint checksum;
/* Since the fields FIL_PAGE_FILE_FLUSH_LSN and ..._ARCH_LOG_NO
are written outside the buffer pool to the first pages of data
files, we have to skip them in the page checksum calculation.
We must also skip the field FIL_PAGE_SPACE_OR_CHKSUM where the
checksum is stored, and also the last 8 bytes of page because
there we store the old formula checksum. */
checksum= ut_fold_binary(page + FIL_PAGE_OFFSET,
FIL_PAGE_FILE_FLUSH_LSN - FIL_PAGE_OFFSET)
+ ut_fold_binary(page + FIL_PAGE_DATA,
UNIV_PAGE_SIZE - FIL_PAGE_DATA
- FIL_PAGE_END_LSN_OLD_CHKSUM);
checksum= checksum & 0xFFFFFFFF;
return(checksum);
}
ulint
buf_calc_page_old_checksum(
/*=======================*/
/* out: checksum */
uchar* page) /* in: buffer page */
{
ulint checksum;
checksum= ut_fold_binary(page, FIL_PAGE_FILE_FLUSH_LSN);
checksum= checksum & 0xFFFFFFFF;
return(checksum);
}
int main(int argc, char **argv)
{
FILE *f; /* our input file */
uchar *p; /* storage of pages read */
int bytes; /* bytes read count */
ulint ct; /* current page number (0 based) */
int now; /* current time */
int lastt; /* last time */
ulint oldcsum, oldcsumfield, csum, csumfield, logseq, logseqfield; /* ulints for checksum storage */
struct stat st; /* for stat, if you couldn't guess */
unsigned long long int size; /* size of file (has to be 64 bits) */
ulint pages; /* number of pages in file */
ulint start_page= 0, end_page= 0, use_end_page= 0; /* for starting and ending at certain pages */
off_t offset= 0;
int just_count= 0; /* if true, just print page count */
int verbose= 0;
int debug= 0;
int c;
int fd;
/* remove arguments */
while ((c= getopt(argc, argv, "cvds:e:p:")) != -1)
{
switch (c)
{
case 'v':
verbose= 1;
break;
case 'c':
just_count= 1;
break;
case 's':
start_page= atoi(optarg);
break;
case 'e':
end_page= atoi(optarg);
use_end_page= 1;
break;
case 'p':
start_page= atoi(optarg);
end_page= atoi(optarg);
use_end_page= 1;
break;
case 'd':
debug= 1;
break;
case ':':
fprintf(stderr, "option -%c requires an argument\n", optopt);
return 1;
break;
case '?':
fprintf(stderr, "unrecognized option: -%c\n", optopt);
return 1;
break;
}
}
/* debug implies verbose... */
if (debug) verbose= 1;
/* make sure we have the right arguments */
if (optind >= argc)
{
printf("InnoDB offline file checksum utility.\n");
printf("usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", argv[0]);
printf("\t-c\tprint the count of pages in the file\n");
printf("\t-s n\tstart on this page number (0 based)\n");
printf("\t-e n\tend at this page number (0 based)\n");
printf("\t-p n\tcheck only this page (0 based)\n");
printf("\t-v\tverbose (prints progress every 5 seconds)\n");
printf("\t-d\tdebug mode (prints checksums for each page)\n");
return 1;
}
/* stat the file to get size and page count */
if (stat(argv[optind], &st))
{
perror("error statting file");
return 1;
}
size= st.st_size;
pages= size / UNIV_PAGE_SIZE;
if (just_count)
{
printf("%lu\n", pages);
return 0;
}
else if (verbose)
{
printf("file %s = %llu bytes (%lu pages)...\n", argv[optind], size, pages);
printf("checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
}
/* open the file for reading */
f= fopen(argv[optind], "r");
if (!f)
{
perror("error opening file");
return 1;
}
/* seek to the necessary position */
if (start_page)
{
fd= fileno(f);
if (!fd)
{
perror("unable to obtain file descriptor number");
return 1;
}
offset= (off_t)start_page * (off_t)UNIV_PAGE_SIZE;
if (lseek(fd, offset, SEEK_SET) != offset)
{
perror("unable to seek to necessary offset");
return 1;
}
}
/* allocate buffer for reading (so we don't realloc every time) */
p= (uchar *)malloc(UNIV_PAGE_SIZE);
/* main checksumming loop */
ct= start_page;
lastt= 0;
while (!feof(f))
{
bytes= fread(p, 1, UNIV_PAGE_SIZE, f);
if (!bytes && feof(f)) return 0;
if (bytes != UNIV_PAGE_SIZE)
{
fprintf(stderr, "bytes read (%d) doesn't match universal page size (%d)\n", bytes, UNIV_PAGE_SIZE);
return 1;
}
/* check the "stored log sequence numbers" */
logseq= mach_read_from_4(p + FIL_PAGE_LSN + 4);
logseqfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
if (debug)
printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
if (logseq != logseqfield)
{
fprintf(stderr, "page %lu invalid (fails log sequence number check)\n", ct);
return 1;
}
/* check old method of checksumming */
oldcsum= buf_calc_page_old_checksum(p);
oldcsumfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM);
if (debug)
printf("page %lu: old style: calculated = %lu; recorded = %lu\n", ct, oldcsum, oldcsumfield);
if (oldcsumfield != mach_read_from_4(p + FIL_PAGE_LSN) && oldcsumfield != oldcsum)
{
fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
return 1;
}
/* now check the new method */
csum= buf_calc_page_new_checksum(p);
csumfield= mach_read_from_4(p + FIL_PAGE_SPACE_OR_CHKSUM);
if (debug)
printf("page %lu: new style: calculated = %lu; recorded = %lu\n", ct, csum, csumfield);
if (csumfield != 0 && csum != csumfield)
{
fprintf(stderr, "page %lu invalid (fails new style checksum)\n", ct);
return 1;
}
/* end if this was the last page we were supposed to check */
if (use_end_page && (ct >= end_page))
return 0;
/* do counter increase and progress printing */
ct++;
if (verbose)
{
if (ct % 64 == 0)
{
now= time(0);
if (!lastt) lastt= now;
if (now - lastt >= 1)
{
printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
lastt= now;
}
}
}
}
return 0;
}

470
extra/innochecksum.cc Normal file
View File

@ -0,0 +1,470 @@
/*
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
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-1301 USA
*/
/*
InnoDB offline file checksum utility. 85% of the code in this utility
is included from the InnoDB codebase.
The final 15% was originally written by Mark Smith of Danga
Interactive, Inc. <junior@danga.com>
Published with a permission.
*/
#include <my_global.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef __WIN__
# include <unistd.h>
#endif
#include <my_getopt.h>
#include <m_string.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#include <string.h>
/* Only parts of these files are included from the InnoDB codebase.
The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
#include "univ.i" /* include all of this */
#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
#define FSEG_PAGE_DATA FIL_PAGE_DATA
#include "ut0ut.h"
#include "ut0byte.h"
#include "mach0data.h"
#include "fsp0types.h"
#include "rem0rec.h"
#include "buf0checksum.h" /* buf_calc_page_*() */
#include "fil0fil.h" /* FIL_* */
#include "page0page.h" /* PAGE_* */
#include "page0zip.h" /* page_zip_*() */
#include "trx0undo.h" /* TRX_* */
#include "fsp0fsp.h" /* fsp_flags_get_page_size() &
fsp_flags_get_zip_size() */
#include "mach0data.h" /* mach_read_from_4() */
#include "ut0crc32.h" /* ut_crc32_init() */
#ifdef UNIV_NONINL
# include "fsp0fsp.ic"
# include "mach0data.ic"
# include "ut0rnd.ic"
#endif
/* Global variables */
static my_bool verbose;
static my_bool debug;
static my_bool skip_corrupt;
static my_bool just_count;
static ulong start_page;
static ulong end_page;
static ulong do_page;
static my_bool use_end_page;
static my_bool do_one_page;
ulong srv_page_size; /* replaces declaration in srv0srv.c */
static ulong physical_page_size; /* Page size in bytes on disk. */
static ulong logical_page_size; /* Page size when uncompressed. */
static bool compressed= false; /* Is tablespace compressed */
/* Get the page size of the filespace from the filespace header. */
static
my_bool
get_page_size(
/*==========*/
FILE* f, /*!< in: file pointer, must be open
and set to start of file */
byte* buf, /*!< in: buffer used to read the page */
ulong* logical_page_size, /*!< out: Logical/Uncompressed page size */
ulong* physical_page_size) /*!< out: Physical/Commpressed page size */
{
ulong flags;
int bytes= fread(buf, 1, UNIV_PAGE_SIZE_MIN, f);
if (ferror(f))
{
perror("Error reading file header");
return FALSE;
}
if (bytes != UNIV_PAGE_SIZE_MIN)
{
fprintf(stderr, "Error; Was not able to read the minimum page size ");
fprintf(stderr, "of %d bytes. Bytes read was %d\n", UNIV_PAGE_SIZE_MIN, bytes);
return FALSE;
}
rewind(f);
flags = mach_read_from_4(buf + FIL_PAGE_DATA + FSP_SPACE_FLAGS);
/* srv_page_size is used by InnoDB code as UNIV_PAGE_SIZE */
srv_page_size = *logical_page_size = fsp_flags_get_page_size(flags);
/* fsp_flags_get_zip_size() will return zero if not compressed. */
*physical_page_size = fsp_flags_get_zip_size(flags);
if (*physical_page_size == 0)
{
*physical_page_size= *logical_page_size;
}
else
{
compressed= true;
}
return TRUE;
}
/* command line argument to do page checks (that's it) */
/* another argument to specify page ranges... seek to right spot and go from there */
static struct my_option innochecksum_options[] =
{
{"help", '?', "Displays this help and exits.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"info", 'I', "Synonym for --help.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Displays version information and exits.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"verbose", 'v', "Verbose (prints progress every 5 seconds).",
&verbose, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"debug", 'd', "Debug mode (prints checksums for each page, implies verbose).",
&debug, &debug, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip_corrupt", 'u', "Skip corrupt pages.",
&skip_corrupt, &skip_corrupt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"count", 'c', "Print the count of pages in the file.",
&just_count, &just_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"start_page", 's', "Start on this page number (0 based).",
&start_page, &start_page, 0, GET_ULONG, REQUIRED_ARG,
0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
{"end_page", 'e', "End at this page number (0 based).",
&end_page, &end_page, 0, GET_ULONG, REQUIRED_ARG,
0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
{"page", 'p', "Check only this page (0 based).",
&do_page, &do_page, 0, GET_ULONG, REQUIRED_ARG,
0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
static void print_version(void)
{
printf("%s Ver %s, for %s (%s)\n",
my_progname, INNODB_VERSION_STR,
SYSTEM_TYPE, MACHINE_TYPE);
}
static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
printf("InnoDB offline file checksum utility.\n");
printf("Usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", my_progname);
my_print_help(innochecksum_options);
my_print_variables(innochecksum_options);
}
extern "C" my_bool
innochecksum_get_one_option(
/*========================*/
int optid,
const struct my_option *opt __attribute__((unused)),
char *argument __attribute__((unused)))
{
switch (optid) {
case 'd':
verbose=1; /* debug implies verbose... */
break;
case 'e':
use_end_page= 1;
break;
case 'p':
end_page= start_page= do_page;
use_end_page= 1;
do_one_page= 1;
break;
case 'V':
print_version();
exit(0);
break;
case 'I':
case '?':
usage();
exit(0);
break;
}
return 0;
}
static int get_options(
/*===================*/
int *argc,
char ***argv)
{
int ho_error;
if ((ho_error=handle_options(argc, argv, innochecksum_options, innochecksum_get_one_option)))
exit(ho_error);
/* The next arg must be the filename */
if (!*argc)
{
usage();
return 1;
}
return 0;
} /* get_options */
int main(int argc, char **argv)
{
FILE* f; /* our input file */
char* filename; /* our input filename. */
unsigned char *big_buf, *buf;
ulong bytes; /* bytes read count */
ulint ct; /* current page number (0 based) */
time_t now; /* current time */
time_t lastt; /* last time */
ulint oldcsum, oldcsumfield, csum, csumfield, crc32, logseq, logseqfield;
/* ulints for checksum storage */
struct stat st; /* for stat, if you couldn't guess */
unsigned long long int size; /* size of file (has to be 64 bits) */
ulint pages; /* number of pages in file */
off_t offset= 0;
int fd;
printf("InnoDB offline file checksum utility.\n");
ut_crc32_init();
MY_INIT(argv[0]);
if (get_options(&argc,&argv))
exit(1);
if (verbose)
my_print_variables(innochecksum_options);
/* The file name is not optional */
filename = *argv;
if (*filename == '\0')
{
fprintf(stderr, "Error; File name missing\n");
return 1;
}
/* stat the file to get size and page count */
if (stat(filename, &st))
{
fprintf(stderr, "Error; %s cannot be found\n", filename);
return 1;
}
size= st.st_size;
/* Open the file for reading */
f= fopen(filename, "rb");
if (f == NULL)
{
fprintf(stderr, "Error; %s cannot be opened", filename);
perror(" ");
return 1;
}
big_buf = (unsigned char *)malloc(2 * UNIV_PAGE_SIZE_MAX);
if (big_buf == NULL)
{
fprintf(stderr, "Error; failed to allocate memory\n");
perror("");
return 1;
}
/* Make sure the page is aligned */
buf = (unsigned char*)ut_align_down(big_buf
+ UNIV_PAGE_SIZE_MAX, UNIV_PAGE_SIZE_MAX);
if (!get_page_size(f, buf, &logical_page_size, &physical_page_size))
{
free(big_buf);
return 1;
}
if (compressed)
{
printf("Table is compressed\n");
printf("Key block size is %lu\n", physical_page_size);
}
else
{
printf("Table is uncompressed\n");
printf("Page size is %lu\n", physical_page_size);
}
pages= (ulint) (size / physical_page_size);
if (just_count)
{
if (verbose)
printf("Number of pages: ");
printf("%lu\n", pages);
free(big_buf);
return 0;
}
else if (verbose)
{
printf("file %s = %llu bytes (%lu pages)...\n", filename, size, pages);
if (do_one_page)
printf("InnoChecksum; checking page %lu\n", do_page);
else
printf("InnoChecksum; checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
}
#ifdef UNIV_LINUX
if (posix_fadvise(fileno(f), 0, 0, POSIX_FADV_SEQUENTIAL) ||
posix_fadvise(fileno(f), 0, 0, POSIX_FADV_NOREUSE))
{
perror("posix_fadvise failed");
}
#endif
/* seek to the necessary position */
if (start_page)
{
fd= fileno(f);
if (!fd)
{
perror("Error; Unable to obtain file descriptor number");
free(big_buf);
return 1;
}
offset= (off_t)start_page * (off_t)physical_page_size;
if (lseek(fd, offset, SEEK_SET) != offset)
{
perror("Error; Unable to seek to necessary offset");
free(big_buf);
return 1;
}
}
/* main checksumming loop */
ct= start_page;
lastt= 0;
while (!feof(f))
{
bytes= fread(buf, 1, physical_page_size, f);
if (!bytes && feof(f))
{
free(big_buf);
return 0;
}
if (ferror(f))
{
fprintf(stderr, "Error reading %lu bytes", physical_page_size);
perror(" ");
free(big_buf);
return 1;
}
if (compressed) {
/* compressed pages */
if (!page_zip_verify_checksum(buf, physical_page_size)) {
fprintf(stderr, "Fail; page %lu invalid (fails compressed page checksum).\n", ct);
if (!skip_corrupt)
{
free(big_buf);
return 1;
}
}
} else {
/* check the "stored log sequence numbers" */
logseq= mach_read_from_4(buf + FIL_PAGE_LSN + 4);
logseqfield= mach_read_from_4(buf + logical_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
if (debug)
printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
if (logseq != logseqfield)
{
fprintf(stderr, "Fail; page %lu invalid (fails log sequence number check)\n", ct);
if (!skip_corrupt)
{
free(big_buf);
return 1;
}
}
/* check old method of checksumming */
oldcsum= buf_calc_page_old_checksum(buf);
oldcsumfield= mach_read_from_4(buf + logical_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM);
if (debug)
printf("page %lu: old style: calculated = %lu; recorded = %lu\n", ct, oldcsum, oldcsumfield);
if (oldcsumfield != mach_read_from_4(buf + FIL_PAGE_LSN) && oldcsumfield != oldcsum)
{
fprintf(stderr, "Fail; page %lu invalid (fails old style checksum)\n", ct);
if (!skip_corrupt)
{
free(big_buf);
return 1;
}
}
/* now check the new method */
csum= buf_calc_page_new_checksum(buf);
crc32= buf_calc_page_crc32(buf);
csumfield= mach_read_from_4(buf + FIL_PAGE_SPACE_OR_CHKSUM);
if (debug)
printf("page %lu: new style: calculated = %lu; crc32 = %lu; recorded = %lu\n",
ct, csum, crc32, csumfield);
if (csumfield != 0 && crc32 != csumfield && csum != csumfield)
{
fprintf(stderr, "Fail; page %lu invalid (fails innodb and crc32 checksum)\n", ct);
if (!skip_corrupt)
{
free(big_buf);
return 1;
}
}
}
/* end if this was the last page we were supposed to check */
if (use_end_page && (ct >= end_page))
{
free(big_buf);
return 0;
}
/* do counter increase and progress printing */
ct++;
if (verbose)
{
if (ct % 64 == 0)
{
now= time(0);
if (!lastt) lastt= now;
if (now - lastt >= 1)
{
printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
lastt= now;
}
}
}
}
free(big_buf);
return 0;
}

View File

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2000, 2011, Oracle and/or its affiliates Copyright (c) 2000, 2014, Oracle and/or its affiliates
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License modify it under the terms of the GNU General Public License
@ -1021,7 +1021,7 @@ FILE *in,*out;
updated=retain=0; updated=retain=0;
reset_buffer(); reset_buffer();
while ((error=fill_buffer_retaining(fileno(in),retain)) > 0) while ((error=fill_buffer_retaining(my_fileno(in),retain)) > 0)
{ {
end_of_line=buffer ; end_of_line=buffer ;
buffer[bufbytes]=0; /* Sentinel */ buffer[bufbytes]=0; /* Sentinel */

View File

@ -12,6 +12,15 @@ before calling SSL_new();
*** end Note *** *** end Note ***
yaSSL Release notes, version 2.3.5 (9/29/2014)
This release of yaSSL fixes an RSA Padding check vulnerability reported by
Intel Security Advanced Threat Research team
See normal build instructions below under 1.0.6.
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
yaSSL Release notes, version 2.3.4 (8/15/2014) yaSSL Release notes, version 2.3.4 (8/15/2014)
This release of yaSSL adds checking to the input_buffer class itself. This release of yaSSL adds checking to the input_buffer class itself.

View File

@ -34,7 +34,7 @@
#include "rsa.h" #include "rsa.h"
#define YASSL_VERSION "2.3.4" #define YASSL_VERSION "2.3.5"
#if defined(__cplusplus) #if defined(__cplusplus)

View File

@ -24,7 +24,7 @@
#include "handshake.hpp" #include "handshake.hpp"
#include "asn.hpp" // provide crypto wrapper?? #include "asn.hpp" // provide crypto wrapper??
#include <my_attribute.h>
namespace yaSSL { namespace yaSSL {
@ -947,7 +947,7 @@ void Alert::Process(input_buffer& input, SSL& ssl)
if (ssl.getSecurity().get_parms().cipher_type_ == block) { if (ssl.getSecurity().get_parms().cipher_type_ == block) {
int ivExtra = 0; int ivExtra = 0;
opaque fill; opaque fill __attribute__((unused));
if (ssl.isTLSv1_1()) if (ssl.isTLSv1_1())
ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
@ -2395,7 +2395,7 @@ void Finished::Process(input_buffer& input, SSL& ssl)
if (ssl.isTLSv1_1()) if (ssl.isTLSv1_1())
ivExtra = ssl.getCrypto().get_cipher().get_blockSize(); ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
opaque fill; opaque fill __attribute__((unused));
int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra - int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra -
HANDSHAKE_HEADER - finishedSz - digestSz; HANDSHAKE_HEADER - finishedSz - digestSz;
for (int i = 0; i < padSz; i++) for (int i = 0; i < padSz; i++)

View File

@ -177,7 +177,7 @@ word32 RSA_BlockType1::UnPad(const byte* pkcsBlock, word32 pkcsBlockLen,
// skip past the padding until we find the separator // skip past the padding until we find the separator
unsigned i=1; unsigned i=1;
while (i<pkcsBlockLen && pkcsBlock[i++]) { // null body while (i<pkcsBlockLen && pkcsBlock[i++] == 0xFF) { // null body
} }
if (!(i==pkcsBlockLen || pkcsBlock[i-1]==0)) if (!(i==pkcsBlockLen || pkcsBlock[i-1]==0))
return 0; return 0;

View File

@ -64,9 +64,11 @@ extern "C" {
#define T_ZEROFILL_KEEP_LSN (1ULL << 33) #define T_ZEROFILL_KEEP_LSN (1ULL << 33)
/** If repair should not bump create_rename_lsn */ /** If repair should not bump create_rename_lsn */
#define T_NO_CREATE_RENAME_LSN (1ULL << 34) #define T_NO_CREATE_RENAME_LSN (1ULL << 34)
#define T_CREATE_UNIQUE_BY_SORT (1ULL << 35) /** If repair shouldn't do any locks */
#define T_SUPPRESS_ERR_HANDLING (1ULL << 36) #define T_NO_LOCKS (1ULL << 35)
#define T_FORCE_SORT_MEMORY (1ULL << 37) #define T_CREATE_UNIQUE_BY_SORT (1ULL << 36)
#define T_SUPPRESS_ERR_HANDLING (1ULL << 37)
#define T_FORCE_SORT_MEMORY (1ULL << 38)
#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL) #define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. /* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
Copyright (c) 2009, 2013, Monty Program Ab. Copyright (c) 2009, 2014, MariaDB
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -104,8 +104,18 @@ int pthread_attr_init(pthread_attr_t *connect_att);
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
int pthread_attr_destroy(pthread_attr_t *connect_att); int pthread_attr_destroy(pthread_attr_t *connect_att);
int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void)); int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
struct tm *gmtime_r(const time_t *timep,struct tm *tmp); static inline struct tm *localtime_r(const time_t *timep, struct tm *tmp)
{
localtime_s(tmp, timep);
return tmp;
}
static inline struct tm *gmtime_r(const time_t *clock, struct tm *res)
{
gmtime_s(res, clock);
return res;
}
void pthread_exit(void *a); void pthread_exit(void *a);
int pthread_join(pthread_t thread, void **value_ptr); int pthread_join(pthread_t thread, void **value_ptr);
@ -721,11 +731,10 @@ struct st_my_thread_var
mysql_cond_t * volatile current_cond; mysql_cond_t * volatile current_cond;
pthread_t pthread_self; pthread_t pthread_self;
my_thread_id id; my_thread_id id;
int cmp_length;
int volatile abort; int volatile abort;
my_bool init; my_bool init;
struct st_my_thread_var *next,**prev; struct st_my_thread_var *next,**prev;
void *opt_info; void *keycache_link;
uint lock_type; /* used by conditional release the queue */ uint lock_type; /* used by conditional release the queue */
void *stack_ends_here; void *stack_ends_here;
safe_mutex_t *mutex_in_use; safe_mutex_t *mutex_in_use;

View File

@ -75,6 +75,7 @@ typedef int my_socket;
#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ #include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
extern unsigned int mariadb_deinitialize_ssl;
extern unsigned int mysql_port; extern unsigned int mysql_port;
extern char *mysql_unix_port; extern char *mysql_unix_port;

View File

@ -172,6 +172,7 @@ extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,unsigned int free_data); extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *); extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,unsigned char * argument); extern int list_walk(LIST *,list_walk_action action,unsigned char * argument);
extern unsigned int mariadb_deinitialize_ssl;
extern unsigned int mysql_port; extern unsigned int mysql_port;
extern char *mysql_unix_port; extern char *mysql_unix_port;
typedef struct st_mysql_field { typedef struct st_mysql_field {

View File

@ -257,7 +257,8 @@ mariadb_dyncol_unpack_free
mariadb_dyncol_column_cmp_named mariadb_dyncol_column_cmp_named
mariadb_dyncol_column_count mariadb_dyncol_column_count
mariadb_dyncol_prepare_decimal mariadb_dyncol_prepare_decimal
#
mariadb_deinitialize_ssl
# Added in MariaDB-10.0 to stay compatible with MySQL-5.6, yuck! # Added in MariaDB-10.0 to stay compatible with MySQL-5.6, yuck!
mysql_options4 mysql_options4
) )

View File

@ -205,6 +205,7 @@ void STDCALL mysql_server_end()
mysql_client_plugin_deinit(); mysql_client_plugin_deinit();
finish_client_errs(); finish_client_errs();
if (mariadb_deinitialize_ssl)
vio_end(); vio_end();
#ifdef EMBEDDED_LIBRARY #ifdef EMBEDDED_LIBRARY
end_embedded_server(); end_embedded_server();

View File

@ -2,6 +2,9 @@
* Copyright (c) 2000 * Copyright (c) 2000
* SWsoft company * SWsoft company
* *
* Modifications copyright (c) 2001, 2013. Oracle and/or its affiliates.
* All rights reserved.
*
* This material is provided "as is", with absolutely no warranty expressed * This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk. * or implied. Any use is at your own risk.
* *

View File

@ -0,0 +1,39 @@
--echo #
--echo # MDEV-7149 Constant condition propagation erroneously applied for LIKE
--echo #
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
DROP TABLE t1;

View File

@ -0,0 +1,16 @@
--echo #
--echo # MDEV-7149 Constant condition propagation erroneously applied for LIKE
--echo #
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
INSERT INTO t1 VALUES ('ae'),('ä');
SELECT * FROM t1 WHERE c1='ä';
SELECT * FROM t1 WHERE c1 LIKE 'ae';
SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
SELECT * FROM t1 WHERE CONCAT(c1)='ä';
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae';
SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
DROP TABLE IF EXISTS t1;

View File

@ -4,8 +4,7 @@
# #
# The test below is redundant # The test below is redundant
-- require r/not_embedded.require if (`select version() like '%embedded%'`) {
disable_query_log; This should never happen;
select version() like '%embedded%' as 'have_embedded'; }
enable_query_log;

View File

@ -1,3 +1,4 @@
--source include/not_embedded.inc
if ($rpl_inited) if ($rpl_inited)
{ {

View File

@ -180,6 +180,7 @@ sub create_process {
} }
$SIG{INT}= 'DEFAULT'; $SIG{INT}= 'DEFAULT';
$SIG{HUP}= 'DEFAULT';
# Make this process it's own process group to be able to kill # Make this process it's own process group to be able to kill
# it and any childs(that hasn't changed group themself) # it and any childs(that hasn't changed group themself)

View File

@ -141,6 +141,7 @@ extern "C" void handle_signal(int sig)
// Ignore further signals // Ignore further signals
signal(SIGTERM, SIG_IGN); signal(SIGTERM, SIG_IGN);
signal(SIGINT, SIG_IGN); signal(SIGINT, SIG_IGN);
signal(SIGHUP, SIG_IGN);
// Continune execution, allow the child to be started and // Continune execution, allow the child to be started and
// finally terminated by monitor loop // finally terminated by monitor loop
@ -164,6 +165,7 @@ int main(int argc, char* const argv[] )
/* Install signal handlers */ /* Install signal handlers */
sigaction(SIGTERM, &sa,NULL); sigaction(SIGTERM, &sa,NULL);
sigaction(SIGINT, &sa,NULL); sigaction(SIGINT, &sa,NULL);
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGCHLD, &sa,NULL); sigaction(SIGCHLD, &sa,NULL);
sigaction(SIGABRT, &sa_abort,NULL); sigaction(SIGABRT, &sa_abort,NULL);
@ -231,6 +233,7 @@ int main(int argc, char* const argv[] )
// Use default signal handlers in child // Use default signal handlers in child
signal(SIGTERM, SIG_DFL); signal(SIGTERM, SIG_DFL);
signal(SIGINT, SIG_DFL); signal(SIGINT, SIG_DFL);
signal(SIGHUP, SIG_DFL);
signal(SIGCHLD, SIG_DFL); signal(SIGCHLD, SIG_DFL);
// Make this process it's own process group to be able to kill // Make this process it's own process group to be able to kill

View File

@ -109,6 +109,7 @@ require "lib/mtr_gprof.pl";
require "lib/mtr_misc.pl"; require "lib/mtr_misc.pl";
$SIG{INT}= sub { mtr_error("Got ^C signal"); }; $SIG{INT}= sub { mtr_error("Got ^C signal"); };
$SIG{HUP}= sub { mtr_error("Hangup detected on controlling terminal"); };
our $mysql_version_id; our $mysql_version_id;
my $mysql_version_extra; my $mysql_version_extra;
@ -262,6 +263,7 @@ our $opt_ddd;
our $opt_client_ddd; our $opt_client_ddd;
my $opt_boot_ddd; my $opt_boot_ddd;
our $opt_manual_gdb; our $opt_manual_gdb;
our $opt_manual_lldb;
our $opt_manual_dbx; our $opt_manual_dbx;
our $opt_manual_ddd; our $opt_manual_ddd;
our $opt_manual_debug; our $opt_manual_debug;
@ -923,6 +925,7 @@ sub run_worker ($) {
my ($server_port, $thread_num)= @_; my ($server_port, $thread_num)= @_;
$SIG{INT}= sub { exit(1); }; $SIG{INT}= sub { exit(1); };
$SIG{HUP}= sub { exit(1); };
# Connect to server # Connect to server
my $server = new IO::Socket::INET my $server = new IO::Socket::INET
@ -1172,6 +1175,7 @@ sub command_line_setup {
'gdb' => \$opt_gdb, 'gdb' => \$opt_gdb,
'client-gdb' => \$opt_client_gdb, 'client-gdb' => \$opt_client_gdb,
'manual-gdb' => \$opt_manual_gdb, 'manual-gdb' => \$opt_manual_gdb,
'manual-lldb' => \$opt_manual_lldb,
'boot-gdb' => \$opt_boot_gdb, 'boot-gdb' => \$opt_boot_gdb,
'manual-debug' => \$opt_manual_debug, 'manual-debug' => \$opt_manual_debug,
'ddd' => \$opt_ddd, 'ddd' => \$opt_ddd,
@ -1502,6 +1506,7 @@ sub command_line_setup {
{ {
$default_vardir= "$glob_mysql_test_dir/var"; $default_vardir= "$glob_mysql_test_dir/var";
} }
$default_vardir = realpath $default_vardir unless IS_WINDOWS;
if ( ! $opt_vardir ) if ( ! $opt_vardir )
{ {
@ -1608,8 +1613,9 @@ sub command_line_setup {
$opt_debugger= undef; $opt_debugger= undef;
} }
if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd || if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_lldb ||
$opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx) $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_dbx ||
$opt_manual_dbx)
{ {
mtr_error("You need to use the client debug options for the", mtr_error("You need to use the client debug options for the",
"embedded server. Ex: --client-gdb"); "embedded server. Ex: --client-gdb");
@ -1637,8 +1643,8 @@ sub command_line_setup {
# Check debug related options # Check debug related options
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
$opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || $opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd ||
$opt_dbx || $opt_client_dbx || $opt_manual_dbx || $opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx ||
$opt_debugger || $opt_client_debugger ) $opt_debugger || $opt_client_debugger )
{ {
if ( using_extern() ) if ( using_extern() )
@ -2495,6 +2501,26 @@ sub environment_setup {
"$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql"); "$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql");
$ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql); $ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql);
# ----------------------------------------------------
# replace
# ----------------------------------------------------
my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'),
"$basedir/extra/replace",
"$bindir/extra$opt_vs_config/replace",
"$path_client_bindir/replace");
$ENV{'REPLACE'}= native_path($exe_replace);
# ----------------------------------------------------
# innochecksum
# ----------------------------------------------------
my $exe_innochecksum=
mtr_exe_maybe_exists("$bindir/extra$opt_vs_config/innochecksum",
"$path_client_bindir/innochecksum");
if ($exe_innochecksum)
{
$ENV{'INNOCHECKSUM'}= native_path($exe_innochecksum);
}
# Create an environment variable to make it possible # Create an environment variable to make it possible
# to detect that valgrind is being used from test cases # to detect that valgrind is being used from test cases
$ENV{'VALGRIND_TEST'}= $opt_valgrind; $ENV{'VALGRIND_TEST'}= $opt_valgrind;
@ -5455,6 +5481,10 @@ sub mysqld_start ($$) {
{ {
gdb_arguments(\$args, \$exe, $mysqld->name()); gdb_arguments(\$args, \$exe, $mysqld->name());
} }
elsif ( $opt_manual_lldb )
{
lldb_arguments(\$args, \$exe, $mysqld->name());
}
elsif ( $opt_ddd || $opt_manual_ddd ) elsif ( $opt_ddd || $opt_manual_ddd )
{ {
ddd_arguments(\$args, \$exe, $mysqld->name()); ddd_arguments(\$args, \$exe, $mysqld->name());
@ -6001,7 +6031,6 @@ sub start_mysqltest ($) {
return $proc; return $proc;
} }
# #
# Modify the exe and args so that program is run in gdb in xterm # Modify the exe and args so that program is run in gdb in xterm
# #
@ -6052,6 +6081,32 @@ sub gdb_arguments {
$$exe= "xterm"; $$exe= "xterm";
} }
#
# Modify the exe and args so that program is run in lldb
#
sub lldb_arguments {
my $args= shift;
my $exe= shift;
my $type= shift;
my $input= shift;
my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type";
unlink($lldb_init_file);
# Put $args into a single string
my $str= join(" ", @$$args);
$input = $input ? "< $input" : "";
# write init file for mysqld or client
mtr_tofile($lldb_init_file, "set args $str $input\n");
print "\nTo start lldb for $type, type in another window:\n";
print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n";
# Indicate the exe should not be started
$$exe= undef;
return;
}
# #
# Modify the exe and args so that program is run in ddd # Modify the exe and args so that program is run in ddd
@ -6180,7 +6235,6 @@ sub debugger_arguments {
} }
} }
# #
# Modify the exe and args so that program is run in valgrind # Modify the exe and args so that program is run in valgrind
# #
@ -6202,10 +6256,14 @@ sub valgrind_arguments {
if -f "$glob_mysql_test_dir/valgrind.supp"; if -f "$glob_mysql_test_dir/valgrind.supp";
# Ensure the jemalloc works with mysqld # Ensure the jemalloc works with mysqld
if ($mysqld_variables{'version-malloc-library'} ne "system" && if ($$exe =~ /mysqld/)
$$exe =~ /mysqld/)
{ {
mtr_add_arg($args, "--soname-synonyms=somalloc=NONE" ); my %somalloc=(
'system jemalloc' => 'libjemalloc*',
'bundled jemalloc' => 'NONE'
);
my ($syn) = $somalloc{$mysqld_variables{'version-malloc-library'}};
mtr_add_arg($args, '--soname-synonyms=somalloc=%s', $syn) if $syn;
} }
} }
@ -6483,6 +6541,8 @@ Options for debugging the product
test(s) test(s)
manual-dbx Let user manually start mysqld in dbx, before running manual-dbx Let user manually start mysqld in dbx, before running
test(s) test(s)
manual-lldb Let user manually start mysqld in lldb, before running
test(s)
max-save-core Limit the number of core files saved (to avoid filling max-save-core Limit the number of core files saved (to avoid filling
up disks for heavily crashing server). Defaults to up disks for heavily crashing server). Defaults to
$opt_max_save_core, set to 0 for no limit. Set $opt_max_save_core, set to 0 for no limit. Set

View File

@ -3,3 +3,4 @@ ERROR 28000: Access denied for user 'foo'@'localhost' (using password: NO)
ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES) ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES)
ERROR 08S01: Unknown command ERROR 08S01: Unknown command
ERROR 08S01: Unknown command ERROR 08S01: Unknown command
that's all

View File

@ -436,7 +436,9 @@ CREATE OR REPLACE TEMPORARY TABLE tmp LIKE t1;
LOCK TABLE t1 WRITE; LOCK TABLE t1 WRITE;
CREATE OR REPLACE TABLE t1 LIKE tmp; CREATE OR REPLACE TABLE t1 LIKE tmp;
KILL QUERY con_id; KILL QUERY con_id;
ERROR 70100: Query execution was interrupted
CREATE OR REPLACE TABLE t1 (a int); CREATE OR REPLACE TABLE t1 (a int);
KILL QUERY con_id; KILL QUERY con_id;
ERROR 70100: Query execution was interrupted
drop table t1; drop table t1;
DROP TABLE t2; DROP TABLE t2;

View File

@ -2915,3 +2915,98 @@ SET sql_mode=default;
# #
# End of 5.5 tests # End of 5.5 tests
# #
#
# Start of 10.0 tests
#
SET NAMES binary;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where 0
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ('%' = concat(`test`.`t1`.`c1`))
DROP TABLE t1;
#
# End of 10.0 tests
#

View File

@ -7659,6 +7659,198 @@ DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed; DROP FUNCTION iswellformed;
DROP TABLE allbytes; DROP TABLE allbytes;
# End of ctype_backslash.inc # End of ctype_backslash.inc
SET NAMES latin1;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
SET NAMES latin1 COLLATE latin1_bin;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
# #
# MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion # MDEV-6752 Trailing incomplete characters are not replaced to question marks on conversion
# #

View File

@ -7700,6 +7700,276 @@ DROP TABLE t1;
# Start of MariaDB-10.0 tests # Start of MariaDB-10.0 tests
# #
SET NAMES utf8 COLLATE utf8_unicode_ci;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ae'),('ä');
SELECT * FROM t1 WHERE c1='ä';
c1
ä
SELECT * FROM t1 WHERE c1 LIKE 'ae';
c1
ae
SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae'))
SELECT * FROM t1 WHERE CONCAT(c1)='ä';
c1
ä
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae';
c1
ae
SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae'))
DROP TABLE IF EXISTS t1;
SET NAMES utf8 COLLATE utf8_german2_ci;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ae'),('ä');
SELECT * FROM t1 WHERE c1='ä';
c1
ae
ä
SELECT * FROM t1 WHERE c1 LIKE 'ae';
c1
ae
SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
c1
ae
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae'))
SELECT * FROM t1 WHERE CONCAT(c1)='ä';
c1
ae
ä
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae';
c1
ae
SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
c1
ae
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae'))
DROP TABLE IF EXISTS t1;
# #
# MDEV-4929 Myanmar collation # MDEV-4929 Myanmar collation
# #
@ -12856,5 +13126,38 @@ DROP TABLE t1;
# END of ctype_myanmar.inc # END of ctype_myanmar.inc
# #
# #
# MDEV-7366 SELECT 'a' = BINARY 'A' returns 1 (utf8 charset, utf8_unicode_ci collation)
#
SET NAMES utf8 COLLATE utf8_unicode_ci;
SELECT 'a' = BINARY 'A';
'a' = BINARY 'A'
0
SELECT BINARY 'A' = 'a';
BINARY 'A' = 'a'
0
#
# Wrong result set for WHERE a='oe' COLLATE utf8_german2_ci AND a='oe'
#
SET NAMES utf8 COLLATE utf8_german2_ci;
CREATE TABLE t1 (a CHAR(10) CHARACTER SET utf8);
INSERT INTO t1 VALUES ('ö'),('oe');
SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci;
a
oe
SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe';
a
oe
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' AND a='oe' COLLATE utf8_german2_ci;
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
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe'))
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe';
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
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 'oe') and (`test`.`t1`.`a` = 'oe'))
DROP TABLE t1;
#
# End of MariaDB-10.0 tests # End of MariaDB-10.0 tests
# #

View File

@ -5326,6 +5326,199 @@ DROP TABLE t1;
# #
# Start of 10.0 tests # Start of 10.0 tests
# #
SET NAMES latin1, collation_connection=ucs2_bin;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
SET NAMES latin1, collation_connection=ucs2_general_ci;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
SET NAMES latin1;
# #
# MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context # MDEV-6661 PI() does not work well in UCS2/UTF16/UTF32 context
# #

View File

@ -5936,6 +5936,235 @@ set max_sort_length=default;
# #
# Start of 10.0 tests # Start of 10.0 tests
# #
SET NAMES utf8 COLLATE utf8_bin;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
SET NAMES utf8;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
c1
a
a
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'a ';
c1
a
SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='a' AND CONCAT(c1) LIKE 'a ';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'a') and (concat(`test`.`t1`.`c1`) like 'a '))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
c1
a
a
SELECT * FROM t1 WHERE 'a ' LIKE CONCAT(c1);
c1
a
SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
c1
a
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 'a'=CONCAT(c1) AND 'a ' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('a' = concat(`test`.`t1`.`c1`)) and ('a ' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '% '=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('% ' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
c1
%
%
SELECT * FROM t1 WHERE 'a' LIKE CONCAT(c1);
c1
%
SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
c1
%
EXPLAIN EXTENDED SELECT * FROM t1 WHERE '%'=CONCAT(c1) AND 'a' LIKE CONCAT(c1);
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where (('%' = concat(`test`.`t1`.`c1`)) and ('a' like concat(`test`.`t1`.`c1`)))
DROP TABLE t1;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ae'),('ä');
SELECT * FROM t1 WHERE c1='ä';
c1
ä
SELECT * FROM t1 WHERE c1 LIKE 'ae';
c1
ae
SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1='ä' AND c1 LIKE 'ae';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((`test`.`t1`.`c1` = 'ä') and (`test`.`t1`.`c1` like 'ae'))
SELECT * FROM t1 WHERE CONCAT(c1)='ä';
c1
ä
SELECT * FROM t1 WHERE CONCAT(c1) LIKE 'ae';
c1
ae
SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
c1
EXPLAIN EXTENDED SELECT * FROM t1 WHERE CONCAT(c1)='ä' AND CONCAT(c1) LIKE 'ae';
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
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` where ((concat(`test`.`t1`.`c1`) = 'ä') and (concat(`test`.`t1`.`c1`) like 'ae'))
DROP TABLE IF EXISTS t1;
# #
# MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string) # MDEV-6666 Malformed result for CONCAT(utf8_column, binary_string)
# #

View File

@ -0,0 +1,14 @@
call mtr.add_suppression("bad_row_type.frm: invalid value 11 for the field row_format");
select * from bad_row_type;
category_id category_name
show create table bad_row_type;
Table Create Table
bad_row_type CREATE TABLE `bad_row_type` (
`category_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 /* `compression`='tokudb_zlib' */
show table status like 'bad_row_type';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
bad_row_type MyISAM 10 Dynamic 0 0 0 281474976710655 1024 0 1 x x NULL utf8_general_ci NULL `compression`='tokudb_zlib'
drop table bad_row_type;

View File

@ -2677,3 +2677,27 @@ Warning 1292 Truncated incorrect time value: '9336:00:00'
Warning 1292 Truncated incorrect time value: '2952:00:00' Warning 1292 Truncated incorrect time value: '2952:00:00'
Warning 1292 Truncated incorrect time value: '2952:00:00' Warning 1292 Truncated incorrect time value: '2952:00:00'
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-7221 from_days fails after null value
#
CREATE TABLE t1 (
id INT(11) NOT NULL PRIMARY KEY,
date1 DATE NULL DEFAULT NULL
);
INSERT INTO t1 VALUES (12, '2011-05-12');
INSERT INTO t1 VALUES (13, NULL);
INSERT INTO t1 VALUES (14, '2009-10-23');
INSERT INTO t1 VALUES (15, '2014-10-30');
INSERT INTO t1 VALUES (16, NULL);
INSERT INTO t1 VALUES (17, NULL);
INSERT INTO t1 VALUES (18, '2010-10-13');
SELECT a.id,a.date1,FROM_DAYS(TO_DAYS(a.date1)-10) as date2, DATE_ADD(a.date1,INTERVAL -10 DAY),TO_DAYS(a.date1)-10 FROM t1 a ORDER BY a.id;
id date1 date2 DATE_ADD(a.date1,INTERVAL -10 DAY) TO_DAYS(a.date1)-10
12 2011-05-12 2011-05-02 2011-05-02 734624
13 NULL NULL NULL NULL
14 2009-10-23 2009-10-13 2009-10-13 734058
15 2014-10-30 2014-10-20 2014-10-20 735891
16 NULL NULL NULL NULL
17 NULL NULL NULL NULL
18 2010-10-13 2010-10-03 2010-10-03 734413
DROP TABLE t1;

View File

@ -2494,6 +2494,20 @@ WHERE t1a.c1 = c2 GROUP BY i2;
i2 i2
DROP TABLE t1,t2; DROP TABLE t1,t2;
# #
# MDEV-6855
# MIN(*) with subqueries with IS NOT NULL in WHERE clause crashed.
#
CREATE TABLE t1 (i INT, c VARCHAR(3), KEY(c,i)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (7,'foo'),(0,'bar');
CREATE TABLE t2 (j INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES (0),(8),(1),(8),(9);
SELECT MAX(i), c FROM t1
WHERE c != 'qux' AND ( SELECT SUM(j) FROM t1, t2 ) IS NOT NULL GROUP BY c;
MAX(i) c
0 bar
7 foo
drop table t1,t2;
#
# Bug #58782 # Bug #58782
# Missing rows with SELECT .. WHERE .. IN subquery # Missing rows with SELECT .. WHERE .. IN subquery
# with full GROUP BY and no aggr # with full GROUP BY and no aggr

View File

@ -57,3 +57,26 @@ i GROUP_CONCAT( d1, d2 ORDER BY d1, d2 )
NULL 11.1,22.2 NULL 11.1,22.2
DROP TABLE t1; DROP TABLE t1;
End of 5.5 tests End of 5.5 tests
#
# MDEV-5719: Wrong result with GROUP BY and LEFT OUTER JOIN
#
CREATE TABLE t1 (oidGroup INT, oid INT PRIMARY KEY)ENGINE=INNODB;
INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4);
CREATE TABLE t2 (oid INT PRIMARY KEY)ENGINE=INNODB;
INSERT INTO t2 VALUES (3);
SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON
a.oid=b.oid WHERE a.oidGroup=1;
oidGroup oid oid
1 1 NULL
1 2 NULL
1 3 3
1 4 NULL
SELECT a.oidGroup, a.oid, b.oid FROM t1 a LEFT JOIN t2 b ON
a.oid=b.oid WHERE a.oidGroup=1 GROUP BY a.oid;
oidGroup oid oid
1 1 NULL
1 2 NULL
1 3 3
1 4 NULL
DROP TABLE t1, t2;
# End of tests

View File

@ -0,0 +1,9 @@
create table t1 (a int(10) auto_increment primary key, b int(11));
insert t1 values (null,1);
insert t1 values (null,2), (1,-1), (null,3) on duplicate key update b=values(b);
select * from t1;
a b
1 -1
2 2
3 3
drop table t1;

View File

@ -435,16 +435,16 @@ p i a
4 3 zzzz 4 3 zzzz
update t1 set p=3 where p=1; update t1 set p=3 where p=1;
update t2 set i=2 where i=1; update t2 set i=2 where i=1;
show status like 'key_%'; select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
Variable_name Value VARIABLE_NAME VARIABLE_VALUE
Key_blocks_not_flushed 0 KEY_BLOCKS_NOT_FLUSHED 0
Key_blocks_unused KEY_BLOCKS_UNUSED KEY_BLOCKS_USED 4
Key_blocks_used 4 KEY_BLOCKS_WARM 0
Key_blocks_warm 0 KEY_READ_REQUESTS 22
Key_read_requests 22 KEY_READS 0
Key_reads 0 KEY_WRITE_REQUESTS 26
Key_write_requests 26 KEY_WRITES 6
Key_writes 6 select variable_value into @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
select * from information_schema.key_caches where segment_number is null; select * from information_schema.key_caches where segment_number is null;
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
default NULL NULL 2097152 1024 4 # 0 22 0 26 6 default NULL NULL 2097152 1024 4 # 0 22 0 26 6
@ -483,16 +483,18 @@ p i a
4 3 zzzz 4 3 zzzz
update t1 set p=3 where p=1; update t1 set p=3 where p=1;
update t2 set i=2 where i=1; update t2 set i=2 where i=1;
show status like 'key_%'; select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
Variable_name Value VARIABLE_NAME VARIABLE_VALUE
Key_blocks_not_flushed 0 KEY_BLOCKS_NOT_FLUSHED 0
Key_blocks_unused KEY_BLOCKS_UNUSED KEY_BLOCKS_USED 4
Key_blocks_used 4 KEY_BLOCKS_WARM 0
Key_blocks_warm 0 KEY_READ_REQUESTS 22
Key_read_requests 22 KEY_READS 0
Key_reads 0 KEY_WRITE_REQUESTS 26
Key_write_requests 26 KEY_WRITES 6
Key_writes 6 select variable_value < @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
variable_value < @key_blocks_unused
1
select * from information_schema.key_caches where segment_number is null; select * from information_schema.key_caches where segment_number is null;
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
default 2 NULL 2097152 1024 4 # 0 22 0 26 6 default 2 NULL 2097152 1024 4 # 0 22 0 26 6
@ -526,16 +528,18 @@ p i a
4 3 zzzz 4 3 zzzz
update t1 set p=3 where p=1; update t1 set p=3 where p=1;
update t2 set i=2 where i=1; update t2 set i=2 where i=1;
show status like 'key_%'; select * from information_schema.session_status where variable_name like 'key_%' and variable_name != 'Key_blocks_unused';
Variable_name Value VARIABLE_NAME VARIABLE_VALUE
Key_blocks_not_flushed 0 KEY_BLOCKS_NOT_FLUSHED 0
Key_blocks_unused KEY_BLOCKS_UNUSED KEY_BLOCKS_USED 4
Key_blocks_used 4 KEY_BLOCKS_WARM 0
Key_blocks_warm 0 KEY_READ_REQUESTS 22
Key_read_requests 22 KEY_READS 0
Key_reads 0 KEY_WRITE_REQUESTS 26
Key_write_requests 26 KEY_WRITES 6
Key_writes 6 select variable_value = @key_blocks_unused from information_schema.session_status where variable_name = 'Key_blocks_unused';
variable_value = @key_blocks_unused
1
select * from information_schema.key_caches where segment_number is null; select * from information_schema.key_caches where segment_number is null;
KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_BLOCKS DIRTY_BLOCKS READ_REQUESTS READS WRITE_REQUESTS WRITES
default 1 NULL 2097152 1024 4 # 0 22 0 26 6 default 1 NULL 2097152 1024 4 # 0 22 0 26 6

View File

@ -0,0 +1,10 @@
#
# MDEV-6896 kill user command cause MariaDB crash!
#
create user foo@'127.0.0.1';
select user from information_schema.processlist;
user
foo
root
kill user foo@'127.0.0.1';
drop user foo@'127.0.0.1';

View File

@ -3,11 +3,15 @@ SHOW PROCESSLIST;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
# root # test Sleep # # NULL 0.000 # root # test Sleep # # NULL 0.000
# root # test Query # # SHOW PROCESSLIST 0.000 # root # test Query # # SHOW PROCESSLIST 0.000
connection default; SET DEBUG_SYNC='before_execute_sql_command SIGNAL ready WAIT_FOR go';
KILL QUERY con_id;
connection con1;
SHOW PROCESSLIST; SHOW PROCESSLIST;
connection default;
SET DEBUG_SYNC='now WAIT_FOR ready';
KILL QUERY con_id;
SET DEBUG_SYNC='now SIGNAL go';
connection con1;
ERROR 70100: Query execution was interrupted ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC='reset';
SHOW PROCESSLIST; SHOW PROCESSLIST;
Id User Host db Command Time State Info Progress Id User Host db Command Time State Info Progress
# root # test Sleep # # NULL 0.000 # root # test Sleep # # NULL 0.000

View File

@ -0,0 +1,7 @@
connect con1,localhost,root,,;
connection default;
kill query id;
connection con1;
select count(*) > 0 from mysql.user;
count(*) > 0
1

View File

@ -536,7 +536,8 @@ CREATE TABLE `db_17876.slow_log_data` (
`last_insert_id` int(11) default NULL, `last_insert_id` int(11) default NULL,
`insert_id` int(11) default NULL, `insert_id` int(11) default NULL,
`server_id` int(11) default NULL, `server_id` int(11) default NULL,
`sql_text` mediumtext `sql_text` mediumtext,
`thread_id` bigint(21) unsigned default NULL
); );
CREATE TABLE `db_17876.general_log_data` ( CREATE TABLE `db_17876.general_log_data` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

View File

@ -0,0 +1,49 @@
drop table if exists t1,t2,t3;
drop view if exists v2,v3;
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (
f1 DATE,
f2 VARCHAR(1024),
f3 VARCHAR(10),
f4 DATE,
f5 VARCHAR(10),
f6 VARCHAR(10),
f7 VARCHAR(10),
f8 DATETIME,
f9 INT,
f10 VARCHAR(1024),
f11 VARCHAR(1024),
f12 INT,
f13 VARCHAR(1024)
) ENGINE=MyISAM;
CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2;
CREATE TABLE t3 (
f1 VARCHAR(1024),
f2 VARCHAR(1024),
f3 DATETIME,
f4 VARCHAR(10),
f5 INT,
f6 VARCHAR(10),
f7 VARCHAR(1024),
f8 VARCHAR(10),
f9 INT,
f10 DATE,
f11 INT,
f12 VARCHAR(1024),
f13 VARCHAR(10),
f14 DATE,
f15 DATETIME
) ENGINE=MyISAM;
CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3;
INSERT INTO t3 VALUES
('FOO','foo','2000-08-04 00:00:00','one',1,'1','FOO','foo',1,'2004-05-09',1,'one','one','2001-12-07','2001-10-17 08:25:04'),
('BAR','bar','2001-01-01 04:52:37','two',2,'2','BAR','bar',2,'2008-01-01',2,'two','two','2006-06-19','2002-01-01 08:22:49');
CREATE TABLE t4 (f1 VARCHAR(10), f2 INT) ENGINE=MyISAM;
SELECT * FROM t1;
pk
SELECT non_existing FROM v2;
ERROR 42S22: Unknown column 'non_existing' in 'field list'
SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5;
pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2
drop table t1,t2,t3,t4;
drop view v2,v3;

View File

@ -1,2 +0,0 @@
have_embedded
0

View File

@ -7,9 +7,8 @@ SELECT ID, TIME,TIME_MS FROM INFORMATION_SCHEMA.PROCESSLIST WHERE CONCAT(":", ID
SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed'; SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed';
ID TIME TIME_MS ID TIME TIME_MS
TID 0 0.000 TID 0 0.000
SET DEBUG_SYNC = 'dispatch_command_end SIGNAL query_done EXECUTE 2'; set debug_sync='reset';
SET DEBUG_SYNC= 'now WAIT_FOR query_done'; SET debug_dbug="+d,sleep_inject_query_done_debug_sync";
SET DEBUG_SYNC= 'now SIGNAL nosignal';
select sleep(5); select sleep(5);
sleep(5) sleep(5)
0 0

View File

@ -332,3 +332,19 @@ select found_rows() as count;
count count
2 2
drop table t1, t2; drop table t1, t2;
create table t1 (i int, v varchar(64), key (i));
select sql_calc_found_rows * from t1 where i = 0 order by v limit 59,2;
i v
0 foo
0 foo
select found_rows();
found_rows()
75
select sql_calc_found_rows * from t1 ignore index (i) where i = 0 order by v limit 59,2;
i v
0 foo
0 foo
select found_rows();
found_rows()
75
drop table t1;

View File

@ -1456,12 +1456,6 @@ GRANT PROCESS ON *.* TO test_u@localhost;
SHOW ENGINE MYISAM MUTEX; SHOW ENGINE MYISAM MUTEX;
SHOW ENGINE MYISAM STATUS; SHOW ENGINE MYISAM STATUS;
DROP USER test_u@localhost; DROP USER test_u@localhost;
#
# Bug #48985: show create table crashes if previous access to the table
# was killed
#
SHOW CREATE TABLE non_existent;
ERROR 70100: Query execution was interrupted
End of 5.1 tests End of 5.1 tests
# #
# Bug#52593 SHOW CREATE TABLE is blocked if table is locked # Bug#52593 SHOW CREATE TABLE is blocked if table is locked

View File

@ -0,0 +1,32 @@
drop table if exists t1,t2;
drop procedure if exists p1;
#
#MDEV-6985: MariaDB crashes on stored procedure call
#
CREATE TABLE `t1` (
`ID` int(11) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB;
CREATE TABLE `t2` (
`ID` int(11) NOT NULL,
`DATE` datetime DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB;
CREATE PROCEDURE `p1`()
BEGIN
DECLARE _mySelect CURSOR FOR
SELECT DISTINCT t1.ID
FROM t1
LEFT JOIN t2 AS t2 ON
t2.ID = t1.ID
AND t2.DATE = (
SELECT MAX(T3.DATE) FROM t2 AS T3 WHERE T3.ID = t2.ID AND T3.DATE<=NOW()
)
WHERE t1.ID = 1;
OPEN _mySelect;
CLOSE _mySelect;
END ;;
CALL p1();
CALL p1();
drop procedure p1;
drop table t1,t2;

View File

@ -0,0 +1,33 @@
CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D'));
ANALYZE TABLE t1 PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1';
db_name table_name index_name prefix_arity avg_frequency
test t1 a 1 NULL
DROP TABLE t1;
CREATE TABLE t1 (a longtext, FULLTEXT KEY (`a`)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (unhex('3E0D0A4141414142334E7A6143317963324541414141424977414141674541726D'));
ANALYZE TABLE t1 PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * FROM mysql.index_stats WHERE index_name='a' AND table_name='t1';
db_name table_name index_name prefix_arity avg_frequency
test t1 a 1 NULL
DROP TABLE t1;
CREATE TABLE geom (g GEOMETRY NOT NULL, SPATIAL INDEX(g)) ENGINE=MyISAM;
INSERT INTO geom VALUES
(MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
(MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
(MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
ANALYZE TABLE geom PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.geom analyze status Engine-independent statistics collected
test.geom analyze status OK
SELECT * FROM mysql.index_stats WHERE index_name='g' AND table_name='geom';
db_name table_name index_name prefix_arity avg_frequency
test geom g 1 NULL
DROP TABLE geom;

View File

@ -645,3 +645,49 @@ MAX(dt) = '2011-01-06 12:34:30'
1 1
DROP TABLE t1; DROP TABLE t1;
End of 5.5 tests End of 5.5 tests
#
# MDEV-7254: Assigned expression is evaluated twice when updating column TIMESTAMP NOT NULL
#
SET time_zone='+02:00';
create table t1(value timestamp not null);
set @a:=0;
create function f1 () returns timestamp
begin
set @a = @a + 1;
return NULL;
end//
set timestamp=12340;
insert t1 values (f1());
select @a, value from t1;
@a value
1 1970-01-01 05:25:40
set timestamp=12350;
update t1 set value = f1();
select @a, value from t1;
@a value
2 1970-01-01 05:25:50
drop table t1;
drop function f1;
set timestamp=0;
create table t1(value timestamp null);
set @a:=0;
create function f1 () returns timestamp
begin
set @a = @a + 1;
return NULL;
end//
set timestamp=12340;
insert t1 values (f1());
select @a, value from t1;
@a value
1 NULL
set timestamp=12350;
update t1 set value = f1();
select @a, value from t1;
@a value
2 NULL
drop table t1;
drop function f1;
set timestamp=0;
SET time_zone=DEFAULT;
End of 10.0 tests

View File

@ -5394,6 +5394,8 @@ SELECT `f1`(1);
DROP FUNCTION f1; DROP FUNCTION f1;
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1, t2; DROP TABLE t1, t2;
create view v1 as select 1;
drop view v1;
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# -- End of 5.5 tests. # -- End of 5.5 tests.
# ----------------------------------------------------------------- # -----------------------------------------------------------------

View File

@ -60,3 +60,8 @@ SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME = 'socket'; WHERE VARIABLE_NAME = 'socket';
VARIABLE_NAME VARIABLE_NAME
SOCKET SOCKET
#
# Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
#
xyz
def

View File

Binary file not shown.

Binary file not shown.

View File

@ -53,7 +53,7 @@ sub skip_combinations {
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
$skip{'t/openssl_6975.test'} = 'no or too old openssl' $skip{'t/openssl_6975.test'} = 'no or too old openssl'
unless ! IS_WINDOWS and ! system "openssl ciphers TLSv1.2 2>&1 >/dev/null"; unless ! IS_WINDOWS and ! system "openssl ciphers TLSv1.2 >/dev/null 2>&1";
%skip; %skip;
} }

View File

@ -112,6 +112,18 @@ master-bin.000003 #
master-bin.000004 # master-bin.000004 #
master-bin.000005 # master-bin.000005 #
master-bin.000006 # master-bin.000006 #
SET debug_sync = 'reset';
*** MDEV-7402: 'reset master' hangs, waits for signalled COND_xid_list ***
SET debug_sync="reset_logs_after_set_reset_master_pending SIGNAL reset_master_ready WAIT_FOR reset_master_cont";
RESET MASTER;
SET @old_dbug= @@global.DEBUG_DBUG;
SET GLOBAL debug_dbug="+d,inject_binlog_background_thread_before_mark_xid_done";
SET debug_sync="now WAIT_FOR reset_master_ready";
RESET MASTER;
SET debug_sync="now WAIT_FOR injected_binlog_background_thread";
SET GLOBAL debug_dbug=@old_dbug;
SET debug_sync="now SIGNAL reset_master_cont";
SET debug_sync = 'reset';
DROP TABLE t1, t2; DROP TABLE t1, t2;
SET GLOBAL max_binlog_size= @old_max_binlog_size; SET GLOBAL max_binlog_size= @old_max_binlog_size;
SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;

View File

@ -1,6 +1,5 @@
set @save_binlog_format= @@global.binlog_format; set @save_binlog_format= @@global.binlog_format;
set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates; set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates;
set @save_sql_log_bin= @@global.sql_log_bin;
create table t1 (a int) engine= myisam; create table t1 (a int) engine= myisam;
create table t2 (a int) engine= innodb; create table t2 (a int) engine= innodb;
SELECT @@session.binlog_format; SELECT @@session.binlog_format;
@ -129,7 +128,7 @@ commit;
begin; begin;
insert into t2 values (5); insert into t2 values (5);
# Test that the global variable 'binlog_format' and # Test that the global variable 'binlog_format' and
# 'binlog_direct_non_transactional_updates' and 'sql_log_bin' are # 'binlog_direct_non_transactional_updates' are
# writable inside a transaction. # writable inside a transaction.
# Current session values are ROW, FALSE, TRUE respectively. # Current session values are ROW, FALSE, TRUE respectively.
SELECT @@global.binlog_format; SELECT @@global.binlog_format;
@ -137,20 +136,15 @@ SELECT @@global.binlog_format;
ROW ROW
set @@global.binlog_format= statement; set @@global.binlog_format= statement;
set @@global.binlog_direct_non_transactional_updates= TRUE; set @@global.binlog_direct_non_transactional_updates= TRUE;
set @@global.sql_log_bin= FALSE;
SELECT @@global.binlog_format; SELECT @@global.binlog_format;
@@global.binlog_format @@global.binlog_format
STATEMENT STATEMENT
SELECT @@global.binlog_direct_non_transactional_updates; SELECT @@global.binlog_direct_non_transactional_updates;
@@global.binlog_direct_non_transactional_updates @@global.binlog_direct_non_transactional_updates
1 1
SELECT @@global.sql_log_bin;
@@global.sql_log_bin
0
commit; commit;
set @@global.binlog_format= @save_binlog_format; set @@global.binlog_format= @save_binlog_format;
set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct; set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct;
set @@global.sql_log_bin= @save_sql_log_bin;
create table t3(a int, b int) engine= innodb; create table t3(a int, b int) engine= innodb;
create table t4(a int) engine= innodb; create table t4(a int) engine= innodb;
create table t5(a int) engine= innodb; create table t5(a int) engine= innodb;

View File

@ -138,8 +138,39 @@ SET DEBUG_SYNC= "now WAIT_FOR injected_binlog_background_thread";
SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL debug_dbug= @old_dbug;
INSERT INTO t1 VALUES (31, REPEAT("x", 4100)); INSERT INTO t1 VALUES (31, REPEAT("x", 4100));
--source include/show_binary_logs.inc --source include/show_binary_logs.inc
SET debug_sync = 'reset';
--echo *** MDEV-7402: 'reset master' hangs, waits for signalled COND_xid_list ***
--source include/wait_for_binlog_checkpoint.inc
connect(con3,localhost,root,,);
# Make the binlog background thread wait before clearing the pending checkpoint.
# The bug was that one RESET MASTER would clear the reset_master_pending
# flag set by another RESET MASTER; this could cause the wakeup from the
# binlog background thread not to be sent, and thus the second RESET MASTER
# to wait infinitely.
SET debug_sync="reset_logs_after_set_reset_master_pending SIGNAL reset_master_ready WAIT_FOR reset_master_cont";
send RESET MASTER;
--connection default
SET @old_dbug= @@global.DEBUG_DBUG;
SET GLOBAL debug_dbug="+d,inject_binlog_background_thread_before_mark_xid_done";
SET debug_sync="now WAIT_FOR reset_master_ready";
RESET MASTER;
SET debug_sync="now WAIT_FOR injected_binlog_background_thread";
SET GLOBAL debug_dbug=@old_dbug;
SET debug_sync="now SIGNAL reset_master_cont";
--connection con3
REAP;
--connection default
SET debug_sync = 'reset';
# Clean up.
DROP TABLE t1, t2; DROP TABLE t1, t2;
SET GLOBAL max_binlog_size= @old_max_binlog_size; SET GLOBAL max_binlog_size= @old_max_binlog_size;
SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit; SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;

View File

@ -15,7 +15,7 @@ show grants for mysqltest_1@localhost;
connect (plain,localhost,mysqltest_1,,test); connect (plain,localhost,mysqltest_1,,test);
connect (root,localhost,root,,test); connect (root,localhost,root,,test);
# Testing setting both session and global SQL_LOG_BIN variable both as # Testing setting session SQL_LOG_BIN variable both as
# root and as plain user. # root and as plain user.
--echo **** Variable SQL_LOG_BIN **** --echo **** Variable SQL_LOG_BIN ****

View File

@ -10,7 +10,6 @@ source include/have_binlog_format_row.inc;
set @save_binlog_format= @@global.binlog_format; set @save_binlog_format= @@global.binlog_format;
set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates; set @save_binlog_dirct= @@global.binlog_direct_non_transactional_updates;
set @save_sql_log_bin= @@global.sql_log_bin;
create table t1 (a int) engine= myisam; create table t1 (a int) engine= myisam;
create table t2 (a int) engine= innodb; create table t2 (a int) engine= innodb;
@ -117,21 +116,18 @@ commit;
begin; begin;
insert into t2 values (5); insert into t2 values (5);
--echo # Test that the global variable 'binlog_format' and --echo # Test that the global variable 'binlog_format' and
--echo # 'binlog_direct_non_transactional_updates' and 'sql_log_bin' are --echo # 'binlog_direct_non_transactional_updates' are
--echo # writable inside a transaction. --echo # writable inside a transaction.
--echo # Current session values are ROW, FALSE, TRUE respectively. --echo # Current session values are ROW, FALSE, TRUE respectively.
SELECT @@global.binlog_format; SELECT @@global.binlog_format;
set @@global.binlog_format= statement; set @@global.binlog_format= statement;
set @@global.binlog_direct_non_transactional_updates= TRUE; set @@global.binlog_direct_non_transactional_updates= TRUE;
set @@global.sql_log_bin= FALSE;
SELECT @@global.binlog_format; SELECT @@global.binlog_format;
SELECT @@global.binlog_direct_non_transactional_updates; SELECT @@global.binlog_direct_non_transactional_updates;
SELECT @@global.sql_log_bin;
commit; commit;
set @@global.binlog_format= @save_binlog_format; set @@global.binlog_format= @save_binlog_format;
set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct; set @@global.binlog_direct_non_transactional_updates= @save_binlog_dirct;
set @@global.sql_log_bin= @save_sql_log_bin;
create table t3(a int, b int) engine= innodb; create table t3(a int, b int) engine= innodb;
create table t4(a int) engine= innodb; create table t4(a int) engine= innodb;

View File

@ -0,0 +1,11 @@
[innodb]
innodb
default-storage-engine=innodb
partition
[myisam]
skip-innodb
default-storage-engine=myisam
partition

View File

@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d1;
CREATE DATABASE d1; CREATE DATABASE d1;
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema
d1 d1
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema
@ -13,8 +13,8 @@ Database (d%)
d1 d1
SHOW DATABASES LIKE '%'; SHOW DATABASES LIKE '%';
Database (%) Database (%)
information_schema
d1 d1
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema
@ -24,8 +24,8 @@ DROP DATABASE d1;
CREATE SCHEMA d1; CREATE SCHEMA d1;
SHOW SCHEMAS; SHOW SCHEMAS;
Database Database
information_schema
d1 d1
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema
@ -35,8 +35,8 @@ Database (d%)
d1 d1
SHOW SCHEMAS LIKE '%'; SHOW SCHEMAS LIKE '%';
Database (%) Database (%)
information_schema
d1 d1
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema

View File

@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d4;
CREATE DATABASE d4; CREATE DATABASE d4;
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema
d4 d4
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema

View File

@ -5,8 +5,8 @@ Warnings:
Note 1007 Can't create database 'd2'; database exists Note 1007 Can't create database 'd2'; database exists
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema
d2 d2
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema
@ -22,8 +22,8 @@ Warnings:
Note 1007 Can't create database 'd2'; database exists Note 1007 Can't create database 'd2'; database exists
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema
d2 d2
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema

View File

@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d5;
CREATE DATABASE d5; CREATE DATABASE d5;
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema
d5 d5
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema

View File

@ -2,8 +2,8 @@ DROP DATABASE IF EXISTS d6;
CREATE DATABASE d6; CREATE DATABASE d6;
SHOW DATABASES; SHOW DATABASES;
Database Database
information_schema
d6 d6
information_schema
mtr mtr
mysql mysql
performance_schema performance_schema

File diff suppressed because it is too large Load Diff

View File

@ -34,8 +34,6 @@ END//
SELECT sf1(); SELECT sf1();
sf1() sf1()
0 0
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -53,8 +51,6 @@ id data
2 1 2 1
3 3 3 3
INSERT INTO t4 VALUES(sf1()); INSERT INTO t4 VALUES(sf1());
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -75,9 +71,6 @@ id data
3 3 3 3
3 3 3 3
UPDATE t4 SET i = sf1() + 1 WHERE i = sf1(); UPDATE t4 SET i = sf1() + 1 WHERE i = sf1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -104,8 +97,6 @@ id data
3 3 3 3
3 3 3 3
DELETE FROM t4 WHERE i = sf1() + 1; DELETE FROM t4 WHERE i = sf1() + 1;
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1

View File

@ -31,8 +31,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# ; ALTER PROCEDURE sp1 #DET# ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -82,8 +80,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# CONTAINS SQL ; ALTER PROCEDURE sp1 #DET# CONTAINS SQL ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -133,8 +129,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# NO SQL ; ALTER PROCEDURE sp1 #DET# NO SQL ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -184,8 +178,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# READS SQL DATA ; ALTER PROCEDURE sp1 #DET# READS SQL DATA ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -235,8 +227,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA ; ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -286,8 +276,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -337,8 +325,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# CONTAINS SQL COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# CONTAINS SQL COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -388,8 +374,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# NO SQL COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# NO SQL COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -439,8 +423,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# READS SQL DATA COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# READS SQL DATA COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -490,8 +472,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -541,8 +521,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -592,8 +570,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -643,8 +619,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -694,8 +668,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -745,8 +717,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -796,8 +766,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -847,8 +815,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -898,8 +864,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -949,8 +913,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1000,8 +962,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1051,8 +1011,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1102,8 +1060,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1153,8 +1109,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1204,8 +1158,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1255,8 +1207,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1306,8 +1256,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1357,8 +1305,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1408,8 +1354,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1459,8 +1403,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1510,8 +1452,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1561,8 +1501,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1612,8 +1550,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1663,8 +1599,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1714,8 +1648,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1765,8 +1697,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1816,8 +1746,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1867,8 +1795,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1918,8 +1844,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -1969,8 +1893,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2020,8 +1942,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY INVOKER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2071,8 +1991,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2122,8 +2040,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2173,8 +2089,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2224,8 +2138,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2275,8 +2187,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2326,8 +2236,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2377,8 +2285,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2428,8 +2334,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2479,8 +2383,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2530,8 +2432,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2581,8 +2481,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2632,8 +2530,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2683,8 +2579,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2734,8 +2628,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2785,8 +2677,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2836,8 +2726,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2887,8 +2775,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# CONTAINS SQL SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2938,8 +2824,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# NO SQL SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -2989,8 +2873,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# READS SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1
@ -3040,8 +2922,6 @@ CLOSE cur2;
END// END//
ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ; ALTER PROCEDURE sp1 LANGUAGE SQL #DET# MODIFIES SQL DATA SQL SECURITY DEFINER COMMENT 'comment' ;
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1

View File

@ -30,8 +30,6 @@ CLOSE cur1;
CLOSE cur2; CLOSE cur2;
END// END//
CALL sp1(); CALL sp1();
Warnings:
Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM t1 ORDER BY id; SELECT * FROM t1 ORDER BY id;
id data id data
1 1 1 1

View File

@ -16,7 +16,7 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2);
ERROR 21000: Subquery returns more than 1 row ERROR 21000: Subquery returns more than 1 row
UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2);
UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
CREATE TABLE t1 (c1 INT, c2 VARCHAR(100),c3 FLOAT); CREATE TABLE t1 (c1 INT, c2 VARCHAR(100),c3 FLOAT);
@ -35,7 +35,7 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2);
ERROR 21000: Subquery returns more than 1 row ERROR 21000: Subquery returns more than 1 row
UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2);
UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
CREATE TABLE t1 (c1 INT, c2 BINARY(100),c3 FLOAT); CREATE TABLE t1 (c1 INT, c2 BINARY(100),c3 FLOAT);
@ -54,7 +54,7 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2);
ERROR 21000: Subquery returns more than 1 row ERROR 21000: Subquery returns more than 1 row
UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2);
UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
CREATE TABLE t1 (c1 INT, c2 VARBINARY(100),c3 FLOAT); CREATE TABLE t1 (c1 INT, c2 VARBINARY(100),c3 FLOAT);
@ -73,6 +73,6 @@ SELECT * FROM t1 WHERE c1 = (SELECT c1 FROM t2);
ERROR 21000: Subquery returns more than 1 row ERROR 21000: Subquery returns more than 1 row
UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2); UPDATE t1 SET c2 = (SELECT MAX(c1) FROM t2);
UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1); UPDATE t1 SET c1 = (SELECT MAX(c1) FROM t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;

View File

@ -14,7 +14,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -39,7 +39,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -64,7 +64,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -89,7 +89,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -114,7 +114,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -139,7 +139,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -164,7 +164,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -189,7 +189,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -214,7 +214,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -239,7 +239,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -264,7 +264,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -289,7 +289,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -314,7 +314,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -339,7 +339,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -364,7 +364,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -389,7 +389,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -414,7 +414,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -439,7 +439,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -464,7 +464,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -489,7 +489,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -514,7 +514,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -539,7 +539,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -564,7 +564,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -589,7 +589,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -614,7 +614,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -639,7 +639,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -664,7 +664,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -689,7 +689,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -714,7 +714,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -739,7 +739,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -764,7 +764,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
@ -789,7 +789,7 @@ SHOW TABLES;
Tables_in_test Tables_in_test
t2 t2
DROP TABLE t1; DROP TABLE t1;
ERROR 42S02: Unknown table 't1' ERROR 42S02: Unknown table 'test.t1'
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (

View File

@ -15,7 +15,7 @@ ERROR 42S01: Table 't1' already exists
RENAME TABLE t3 TO t1; RENAME TABLE t3 TO t1;
ERROR 42S01: Table 't1' already exists ERROR 42S01: Table 't1' already exists
RENAME TABLE t3 TO doesnotexist.t1; RENAME TABLE t3 TO doesnotexist.t1;
ERROR HY000: Can't find file: './test/t3.frm' (errno: 2 "No such file or directory") ERROR 42S02: Table 'test.t3' doesn't exist
SHOW TABLES; SHOW TABLES;
Tables_in_test Tables_in_test
t1 t1

View File

@ -2,14 +2,18 @@
DROP DATABASE IF EXISTS d1; DROP DATABASE IF EXISTS d1;
--enable_warnings --enable_warnings
CREATE DATABASE d1; CREATE DATABASE d1;
--sorted_result
SHOW DATABASES; SHOW DATABASES;
SHOW DATABASES LIKE 'd%'; SHOW DATABASES LIKE 'd%';
--sorted_result
SHOW DATABASES LIKE '%'; SHOW DATABASES LIKE '%';
USE d1; USE d1;
DROP DATABASE d1; DROP DATABASE d1;
CREATE SCHEMA d1; CREATE SCHEMA d1;
--sorted_result
SHOW SCHEMAS; SHOW SCHEMAS;
SHOW SCHEMAS LIKE 'd%'; SHOW SCHEMAS LIKE 'd%';
--sorted_result
SHOW SCHEMAS LIKE '%'; SHOW SCHEMAS LIKE '%';
USE d1; USE d1;
DROP SCHEMA d1; DROP SCHEMA d1;

View File

@ -2,9 +2,11 @@
DROP DATABASE IF EXISTS d4; DROP DATABASE IF EXISTS d4;
--enable_warnings --enable_warnings
CREATE DATABASE d4; CREATE DATABASE d4;
--sorted_result
SHOW DATABASES; SHOW DATABASES;
--error 1007 --error 1007
CREATE DATABASE d4; CREATE DATABASE d4;
DROP DATABASE d4; DROP DATABASE d4;
--sorted_result
SHOW DATABASES; SHOW DATABASES;

View File

@ -3,12 +3,14 @@ DROP DATABASE IF EXISTS d2;
--enable_warnings --enable_warnings
CREATE DATABASE d2; CREATE DATABASE d2;
CREATE DATABASE IF NOT EXISTS d2; CREATE DATABASE IF NOT EXISTS d2;
--sorted_result
SHOW DATABASES; SHOW DATABASES;
USE d2; USE d2;
DROP DATABASE d2; DROP DATABASE d2;
DROP DATABASE IF EXISTS d2; DROP DATABASE IF EXISTS d2;
CREATE SCHEMA d2; CREATE SCHEMA d2;
CREATE SCHEMA IF NOT EXISTS d2; CREATE SCHEMA IF NOT EXISTS d2;
--sorted_result
SHOW DATABASES; SHOW DATABASES;
USE d2; USE d2;
DROP SCHEMA d2; DROP SCHEMA d2;

View File

@ -6,5 +6,6 @@ SHOW DATABASES;
--error 1008 --error 1008
DROP DATABASE nond5; DROP DATABASE nond5;
DROP DATABASE d5; DROP DATABASE d5;
--sorted_result
SHOW DATABASES; SHOW DATABASES;

View File

@ -6,5 +6,6 @@ SHOW DATABASES;
--error 1064 --error 1064
USE DATABASE nond6; USE DATABASE nond6;
DROP DATABASE d6; DROP DATABASE d6;
--sorted_result
SHOW DATABASES; SHOW DATABASES;

View File

@ -11,18 +11,18 @@ INSERT INTO t1 VALUES (1),(2),(3),(4);
DROP TABLE t1; DROP TABLE t1;
# Save master log position for query DROP TABLE t1 # Save master log position for query DROP TABLE t1
save_master_pos; save_master_pos;
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7); let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 10);
let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7); let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 10);
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
# Save master log position for query CREATE TABLE t2 # Save master log position for query CREATE TABLE t2
save_master_pos; save_master_pos;
let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 8); let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 12);
INSERT INTO t2 VALUES (1),(2); INSERT INTO t2 VALUES (1),(2);
save_master_pos; save_master_pos;
# Save master log position for query INSERT INTO t2 VALUES (1),(2); # Save master log position for query INSERT INTO t2 VALUES (1),(2);
let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 12); let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17);
sync_slave_with_master; sync_slave_with_master;
# Save relay log position for query INSERT INTO t2 VALUES (1),(2); # Save relay log position for query INSERT INTO t2 VALUES (1),(2);
@ -31,8 +31,8 @@ let $relay_pos_insert1_t2= query_get_value(show slave status, Relay_Log_Pos, 1);
connection master; connection master;
INSERT INTO t2 VALUES (3),(4); INSERT INTO t2 VALUES (3),(4);
DROP TABLE t2; DROP TABLE t2;
# Save master log position for query INSERT INTO t2 VALUES (1),(2); # Save master log position for query DROP TABLE t2;
let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17); let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 23);
sync_slave_with_master; sync_slave_with_master;
--source include/stop_slave.inc --source include/stop_slave.inc

View File

@ -11,7 +11,7 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher
RENAME TABLE t2 TO t1; RENAME TABLE t2 TO t1;
--error 1050 --error 1050
RENAME TABLE t3 TO t1; RENAME TABLE t3 TO t1;
--error 1017 --error 1146
RENAME TABLE t3 TO doesnotexist.t1; RENAME TABLE t3 TO doesnotexist.t1;
SHOW TABLES; SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`; let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;

View File

@ -0,0 +1,8 @@
[innodb]
innodb
default-storage-engine=innodb
[myisam]
skip-innodb
default-storage-engine=myisam

View File

@ -70471,17 +70471,17 @@ SIZE
DROP TABLE t17,t18; DROP TABLE t17,t18;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
Note 1051 Unknown table 't4' Note 1051 Unknown table 'test.t4'
Note 1051 Unknown table 't5' Note 1051 Unknown table 'test.t5'
Note 1051 Unknown table 't6' Note 1051 Unknown table 'test.t6'
Note 1051 Unknown table 't7' Note 1051 Unknown table 'test.t7'
Note 1051 Unknown table 't8' Note 1051 Unknown table 'test.t8'
Note 1051 Unknown table 't9' Note 1051 Unknown table 'test.t9'
Note 1051 Unknown table 't10' Note 1051 Unknown table 'test.t10'
Note 1051 Unknown table 't11' Note 1051 Unknown table 'test.t11'
Note 1051 Unknown table 't13' Note 1051 Unknown table 'test.t13'
Note 1051 Unknown table 't14' Note 1051 Unknown table 'test.t14'
Note 1051 Unknown table 't15' Note 1051 Unknown table 'test.t15'
Note 1051 Unknown table 't17' Note 1051 Unknown table 'test.t17'
Note 1051 Unknown table 't18' Note 1051 Unknown table 'test.t18'

View File

@ -780,7 +780,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -1611,7 +1611,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -2461,7 +2461,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -3375,7 +3375,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -4574,7 +4574,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -5978,7 +5978,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -8049,7 +8049,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'0'; SELECT 0 + b'0';
0 + b'0' 0 + b'0'
0 0
@ -11227,7 +11227,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -12009,7 +12009,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -12840,7 +12840,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -13690,7 +13690,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -14604,7 +14604,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -15803,7 +15803,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -17207,7 +17207,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -19278,7 +19278,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1'; SELECT 0 + b'1';
0 + b'1' 0 + b'1'
1 1
@ -22456,7 +22456,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -23244,7 +23244,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -24081,7 +24081,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -24931,7 +24931,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -25845,7 +25845,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -27044,7 +27044,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -28448,7 +28448,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -30519,7 +30519,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'10'; SELECT 0 + b'10';
0 + b'10' 0 + b'10'
2 2
@ -33697,7 +33697,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -34485,7 +34485,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -35322,7 +35322,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -36178,7 +36178,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -37092,7 +37092,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -38291,7 +38291,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -39695,7 +39695,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -41766,7 +41766,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010'; SELECT 0 + b'1010';
0 + b'1010' 0 + b'1010'
10 10
@ -44944,7 +44944,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -45732,7 +45732,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -46569,7 +46569,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -47425,7 +47425,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -48345,7 +48345,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -49550,7 +49550,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -50954,7 +50954,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -53025,7 +53025,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'1010101010101010'; SELECT 0 + b'1010101010101010';
0 + b'1010101010101010' 0 + b'1010101010101010'
43690 43690
@ -56203,7 +56203,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -56993,7 +56993,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -57832,7 +57832,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -58690,7 +58690,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -59612,7 +59612,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -60819,7 +60819,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -62231,7 +62231,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -64304,7 +64304,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + b'101010101010101010101010101010'; SELECT 0 + b'101010101010101010101010101010';
0 + b'101010101010101010101010101010' 0 + b'101010101010101010101010101010'
715827882 715827882
@ -67484,7 +67484,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<0) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<0)
9223372036854775807 9223372036854775807
@ -68271,7 +68271,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<1) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<1)
18446744073709551614 18446744073709551614
@ -69107,7 +69107,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<2) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<2)
18446744073709551612 18446744073709551612
@ -69962,7 +69962,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<4) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<4)
18446744073709551600 18446744073709551600
@ -70881,7 +70881,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<8) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<8)
18446744073709551360 18446744073709551360
@ -72085,7 +72085,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<16) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<16)
18446744073709486080 18446744073709486080
@ -73494,7 +73494,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<32) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<32)
18446744069414584320 18446744069414584320
@ -75570,7 +75570,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64); SELECT 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64);
0 + (1010101010101010101010101010101010101010101010101010101010101010<<64) 0 + (1010101010101010101010101010101010101010101010101010101010101010<<64)
0 0
@ -78747,7 +78747,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<0) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<0)
9223372036854775807 9223372036854775807
@ -79534,7 +79534,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<1) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<1)
18446744073709551614 18446744073709551614
@ -80370,7 +80370,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<2) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<2)
18446744073709551612 18446744073709551612
@ -81225,7 +81225,7 @@ hex(c1) hex(c2)
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<4) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<4)
18446744073709551600 18446744073709551600
@ -82144,7 +82144,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<8) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<8)
18446744073709551360 18446744073709551360
@ -83348,7 +83348,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<16); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<16);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<16) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<16)
18446744073709486080 18446744073709486080
@ -84757,7 +84757,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<32); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<32);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<32) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<32)
18446744069414584320 18446744069414584320
@ -86833,7 +86833,7 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'
SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<64); SELECT 0 + (10101010101010101010101010101010101010101010101010101010101010101<<64);
0 + (10101010101010101010101010101010101010101010101010101010101010101<<64) 0 + (10101010101010101010101010101010101010101010101010101010101010101<<64)
0 0
@ -90016,4 +90016,4 @@ A A
DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2; DELETE t5,t6 FROM t5,t6 WHERE t5.c1=t6.c1 AND t5.c2=t6.c2;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
Warnings: Warnings:
Note 1051 Unknown table 't3' Note 1051 Unknown table 'test.t3'

View File

@ -740,7 +740,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2;
SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2;
c1 c2 c3 c1 c2 c3 c1 c2 c3 c1 c2 c3
DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data
CREATE TABLE t3(c1 INT UNSIGNED NOT NULL PRIMARY KEY, c2 INT SIGNED NULL, c3 INT); CREATE TABLE t3(c1 INT UNSIGNED NOT NULL PRIMARY KEY, c2 INT SIGNED NULL, c3 INT);
CREATE TABLE t4(c1 INT UNSIGNED, c2 INT); CREATE TABLE t4(c1 INT UNSIGNED, c2 INT);
INSERT INTO t3 VALUES(200,126,1),(250,-127,2); INSERT INTO t3 VALUES(200,126,1),(250,-127,2);
@ -980,9 +980,9 @@ drop table mt1, mt2, mt3;
create table mt1 (col1 int); create table mt1 (col1 int);
create table mt2 (col1 int); create table mt2 (col1 int);
update mt1,mt2 set mt1.col1 = (select max(col1) from mt1) where mt1.col1 = mt2.col1; update mt1,mt2 set mt1.col1 = (select max(col1) from mt1) where mt1.col1 = mt2.col1;
ERROR HY000: You can't specify target table 'mt1' for update in FROM clause ERROR HY000: Table 'mt1' is specified twice, both as a target for 'UPDATE' and as a separate source for data
delete mt1 from mt1,mt2 where mt1.col1 < (select max(col1) from mt1) and mt1.col1 = mt2.col1; delete mt1 from mt1,mt2 where mt1.col1 < (select max(col1) from mt1) and mt1.col1 = mt2.col1;
ERROR HY000: You can't specify target table 'mt1' for update in FROM clause ERROR HY000: Table 'mt1' is specified twice, both as a target for 'DELETE' and as a separate source for data
drop table mt1,mt2; drop table mt1,mt2;
CREATE TABLE IF NOT EXISTS `mt1` (`id` int(11) NOT NULL auto_increment, `tst` text, `tsmt1` text, PRIMARY KEY (`id`)); CREATE TABLE IF NOT EXISTS `mt1` (`id` int(11) NOT NULL auto_increment, `tst` text, `tsmt1` text, PRIMARY KEY (`id`));
CREATE TABLE IF NOT EXISTS `mt2` (`ID` int(11) NOT NULL auto_increment, `ParId` int(11) default NULL, `tst` text, `tsmt1` text, PRIMARY KEY (`ID`), KEY `IX_ParId_mt2` (`ParId`), FOREIGN KEY (`ParId`) REFERENCES `mt1` (`id`)); CREATE TABLE IF NOT EXISTS `mt2` (`ID` int(11) NOT NULL auto_increment, `ParId` int(11) default NULL, `tst` text, `tsmt1` text, PRIMARY KEY (`ID`), KEY `IX_ParId_mt2` (`ParId`), FOREIGN KEY (`ParId`) REFERENCES `mt1` (`id`));
@ -1853,7 +1853,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2;
SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2;
c1 c2 c3 c1 c2 c3 c1 c2 c3 c1 c2 c3
DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data
CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL PRIMARY KEY, c2 TINYINT SIGNED NULL, c3 INT); CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL PRIMARY KEY, c2 TINYINT SIGNED NULL, c3 INT);
CREATE TABLE t4(c1 TINYINT UNSIGNED, c2 INT); CREATE TABLE t4(c1 TINYINT UNSIGNED, c2 INT);
INSERT INTO t3 VALUES(200,126,1),(250,-127,2); INSERT INTO t3 VALUES(200,126,1),(250,-127,2);
@ -2600,7 +2600,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2;
SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2;
c1 c2 c3 c1 c2 c3 c1 c2 c3 c1 c2 c3
DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data
CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL PRIMARY KEY, c2 SMALLINT SIGNED NULL, c3 INT); CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL PRIMARY KEY, c2 SMALLINT SIGNED NULL, c3 INT);
CREATE TABLE t4(c1 SMALLINT UNSIGNED, c2 INT); CREATE TABLE t4(c1 SMALLINT UNSIGNED, c2 INT);
INSERT INTO t3 VALUES(200,126,1),(250,-127,2); INSERT INTO t3 VALUES(200,126,1),(250,-127,2);
@ -3347,7 +3347,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2;
SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2;
c1 c2 c3 c1 c2 c3 c1 c2 c3 c1 c2 c3
DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, c2 MEDIUMINT SIGNED NULL, c3 INT); CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, c2 MEDIUMINT SIGNED NULL, c3 INT);
CREATE TABLE t4(c1 MEDIUMINT UNSIGNED, c2 INT); CREATE TABLE t4(c1 MEDIUMINT UNSIGNED, c2 INT);
INSERT INTO t3 VALUES(200,126,1),(250,-127,2); INSERT INTO t3 VALUES(200,126,1),(250,-127,2);
@ -4077,7 +4077,7 @@ DELETE FROM a1, a2 USING t1 AS a1 INNER JOIN t2 AS a2 WHERE a2.c1=a1.c2;
SELECT * FROM t1,t2 WHERE t2.c1=t1.c2; SELECT * FROM t1,t2 WHERE t2.c1=t1.c2;
c1 c2 c3 c1 c2 c3 c1 c2 c3 c1 c2 c3
DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1); DELETE FROM t1,t2 using t1,t2 where t1.c1=(select c1 from t1);
ERROR HY000: You can't specify target table 't1' for update in FROM clause ERROR HY000: Table 't1' is specified twice, both as a target for 'DELETE' and as a separate source for data
CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL PRIMARY KEY, c2 BIGINT SIGNED NULL, c3 INT); CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL PRIMARY KEY, c2 BIGINT SIGNED NULL, c3 INT);
CREATE TABLE t4(c1 BIGINT UNSIGNED, c2 INT); CREATE TABLE t4(c1 BIGINT UNSIGNED, c2 INT);
INSERT INTO t3 VALUES(200,126,1),(250,-127,2); INSERT INTO t3 VALUES(200,126,1),(250,-127,2);

View File

@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CREATE TABLE t1(a CHAR(255), CREATE TABLE t1(a CHAR(255),
b CHAR(255), b CHAR(255),
c CHAR(255), c CHAR(255),

View File

@ -1,3 +1,4 @@
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CREATE TABLE t1(a CHAR(255), CREATE TABLE t1(a CHAR(255),
b CHAR(255), b CHAR(255),
c CHAR(255), c CHAR(255),

View File

@ -0,0 +1,31 @@
# Create and populate a table
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
INSERT INTO t1 (b) VALUES ('corrupt me');
CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT)
ROW_FORMAT=COMPRESSED ENGINE=InnoDB ;
INSERT INTO t2(b) SELECT b from t1;
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT)
ROW_FORMAT=COMPRESSED ENGINE=InnoDB KEY_BLOCK_SIZE=16;
INSERT INTO t3(b) SELECT b from t1;
# Write file to make mysql-test-run.pl expect the "crash", but don't
# start it until it's told to
# We give 30 seconds to do a clean shutdown because we do not want
# to redo apply the pages of t1.ibd at the time of recovery.
# We want SQL to initiate the first access to t1.ibd.
# Wait until disconnected.
# Run innochecksum on t1
InnoDB offline file checksum utility.
Table is uncompressed
Page size is 16384
# Run innochecksum on t2
InnoDB offline file checksum utility.
Table is compressed
Key block size is 8192
# Run innochecksum on t3
InnoDB offline file checksum utility.
Table is compressed
Key block size is 16384
# Write file to make mysql-test-run.pl start up the server again
# Cleanup
DROP TABLE t1, t2, t3;

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,4 @@
Variable_name Value
innodb_stats_sample_pages 1
Variable_name Value
innodb_stats_traditional OFF

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