mysql-5.5.41 merge
This commit is contained in:
commit
a978bdda1e
@ -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()
|
||||||
|
|
||||||
#
|
|
||||||
# Control aspects of the development environment which are
|
|
||||||
# specific to MySQL maintainers and developers.
|
|
||||||
#
|
|
||||||
INCLUDE(maintainer)
|
|
||||||
|
|
||||||
SET(MYSQL_MAINTAINER_MODE "AUTO" CACHE STRING "MySQL maintainer-specific development environment. Options are: ON OFF AUTO.")
|
SET(MYSQL_MAINTAINER_MODE "AUTO" 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)
|
||||||
@ -374,13 +355,7 @@ CHECK_JEMALLOC()
|
|||||||
# not run with the warning options as to not perturb fragile checks
|
# not run with the warning options as to not perturb fragile checks
|
||||||
# (i.e. do not make warnings into errors).
|
# (i.e. do not make warnings into errors).
|
||||||
#
|
#
|
||||||
IF(MYSQL_MAINTAINER_MODE MATCHES "ON")
|
INCLUDE(maintainer)
|
||||||
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()
|
|
||||||
|
|
||||||
IF(WITH_UNIT_TESTS)
|
IF(WITH_UNIT_TESTS)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
@ -494,4 +469,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()
|
||||||
|
|
||||||
|
@ -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
|
||||||
@ -2413,6 +2413,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);
|
init_alloc_root(&s_mem_root, 16384, 0);
|
||||||
if (load_defaults("my", load_groups, &argc, &argv))
|
if (load_defaults("my", load_groups, &argc, &argv))
|
||||||
|
@ -201,15 +201,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
44
cmake/compile_flags.cmake
Normal 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()
|
@ -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")
|
|
||||||
|
|
||||||
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} -Werror")
|
||||||
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT
|
SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -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-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()
|
||||||
|
@ -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()
|
|
||||||
|
@ -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 "")
|
||||||
|
@ -53,15 +53,6 @@ IF(NOT SYSTEM_TYPE)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
# Always enable -Wall for gnu C/C++
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
|
|
||||||
ENDIF()
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
|
||||||
SET(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")
|
|
||||||
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.
|
||||||
|
@ -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 */
|
||||||
|
@ -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.
|
||||||
|
@ -35,7 +35,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)
|
||||||
|
@ -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;
|
||||||
|
@ -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);
|
||||||
|
@ -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.
|
||||||
*
|
*
|
||||||
|
@ -255,6 +255,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;
|
||||||
@ -1156,6 +1157,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,
|
||||||
@ -1596,8 +1598,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");
|
||||||
@ -1625,8 +1628,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() )
|
||||||
@ -2487,6 +2490,14 @@ 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",
|
||||||
|
"$path_client_bindir/replace");
|
||||||
|
$ENV{'REPLACE'}= native_path($exe_replace);
|
||||||
|
|
||||||
# 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;
|
||||||
@ -5429,6 +5440,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());
|
||||||
@ -5975,7 +5990,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
|
||||||
#
|
#
|
||||||
@ -6026,6 +6040,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
|
||||||
@ -6435,6 +6475,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
|
||||||
|
@ -773,3 +773,54 @@ Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function
|
|||||||
SET DEBUG_SYNC= 'RESET';
|
SET DEBUG_SYNC= 'RESET';
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK() AND IS_USED_LOCK().
|
||||||
|
#
|
||||||
|
# Verifying issue for IS_FREE_LOCK() function.
|
||||||
|
SELECT GET_LOCK("lock_19070633", 600);
|
||||||
|
GET_LOCK("lock_19070633", 600)
|
||||||
|
1
|
||||||
|
connect con1, localhost, root,,;
|
||||||
|
# Waiting after getting user level lock info and releasing mutex.
|
||||||
|
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||||
|
# Sending: SELECT IS_FREE_LOCK("lock_19070633");
|
||||||
|
SELECT IS_FREE_LOCK("lock_19070633");
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||||
|
SELECT RELEASE_LOCK("lock_19070633");
|
||||||
|
RELEASE_LOCK("lock_19070633")
|
||||||
|
1
|
||||||
|
# Signaling connection con1 after releasing the lock.
|
||||||
|
# Without fix, accessing user level lock info in con1 would result in
|
||||||
|
# crash or valgrind issue invalid read is reported.
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||||
|
connection con1;
|
||||||
|
# Reaping: SELECT IS_FREE_LOCK("lock_19070633");
|
||||||
|
IS_FREE_LOCK("lock_19070633")
|
||||||
|
0
|
||||||
|
connection default;
|
||||||
|
# Verifying issue for IS_USED_LOCK() function.
|
||||||
|
SELECT GET_LOCK("lock_19070633", 600);
|
||||||
|
GET_LOCK("lock_19070633", 600)
|
||||||
|
1
|
||||||
|
connection con1;
|
||||||
|
# Waiting after getting user level lock info and releasing mutex.
|
||||||
|
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||||
|
# Sending: SELECT IS_USED_LOCK("lock_19070633");
|
||||||
|
SELECT IS_USED_LOCK("lock_19070633");
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||||
|
SELECT RELEASE_LOCK("lock_19070633");
|
||||||
|
RELEASE_LOCK("lock_19070633")
|
||||||
|
1
|
||||||
|
# Signaling connection con1 after releasing the lock.
|
||||||
|
# Without fix, accessing user level lock info in con1 would result in
|
||||||
|
# crash or valgrind issue invalid read is reported.
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||||
|
connection con1;
|
||||||
|
# Reaping: SELECT IS_USED_LOCK("lock_19070633");
|
||||||
|
IS_USED_LOCK("lock_19070633")
|
||||||
|
#
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
disconnect con1;
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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 ****
|
||||||
|
@ -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;
|
||||||
|
@ -79,4 +79,5 @@ z
|
|||||||
31
|
31
|
||||||
32
|
32
|
||||||
drop table corrupt_bit_test_ā;
|
drop table corrupt_bit_test_ā;
|
||||||
|
DROP DATABASE pad;
|
||||||
SET GLOBAL innodb_change_buffering_debug = 0;
|
SET GLOBAL innodb_change_buffering_debug = 0;
|
||||||
|
11
mysql-test/suite/innodb/r/insert_debug.result
Normal file
11
mysql-test/suite/innodb/r/insert_debug.result
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
|
||||||
|
# CAUSES INFINITE PAGE SPLIT
|
||||||
|
#
|
||||||
|
SET GLOBAL innodb_change_buffering_debug=1;
|
||||||
|
SET GLOBAL innodb_limit_optimistic_insert_debug=1;
|
||||||
|
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB
|
||||||
|
PARTITION BY HASH (c1) PARTITIONS 15;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL innodb_change_buffering_debug=0;
|
||||||
|
SET GLOBAL innodb_limit_optimistic_insert_debug=0;
|
253
mysql-test/suite/innodb/r/sp_temp_table.result
Normal file
253
mysql-test/suite/innodb/r/sp_temp_table.result
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
#
|
||||||
|
# Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE
|
||||||
|
# CALLED FROM A FUNCTION
|
||||||
|
#
|
||||||
|
call mtr.add_suppression("MySQL is trying to drop table");
|
||||||
|
CREATE PROCEDURE cachedata(
|
||||||
|
IN obj_id BIGINT UNSIGNED,
|
||||||
|
IN start DATETIME,
|
||||||
|
IN end DATETIME
|
||||||
|
)
|
||||||
|
cachedata:BEGIN
|
||||||
|
DECLARE cache_count BIGINT;
|
||||||
|
SET @timestamp := NOW();
|
||||||
|
CREATE TEMPORARY TABLE IF NOT EXISTS cachedata (
|
||||||
|
timestamp DATETIME,
|
||||||
|
object_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
start DATETIME,
|
||||||
|
end DATETIME,
|
||||||
|
seqno BIGINT AUTO_INCREMENT,
|
||||||
|
value FLOAT,
|
||||||
|
PRIMARY KEY (seqno),
|
||||||
|
INDEX (timestamp),
|
||||||
|
INDEX (object_id, start, end)
|
||||||
|
) ENGINE=INNODB;
|
||||||
|
DELETE FROM cachedata WHERE
|
||||||
|
timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND);
|
||||||
|
SELECT count(*) INTO cache_count FROM cachedata WHERE
|
||||||
|
object_id = obj_id
|
||||||
|
AND start = start
|
||||||
|
AND end = end;
|
||||||
|
IF cache_count > 0 THEN LEAVE cachedata;
|
||||||
|
END IF;
|
||||||
|
INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 2345),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 2345),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 2345);
|
||||||
|
END$$
|
||||||
|
CREATE FUNCTION get_cache(
|
||||||
|
obj_id BIGINT UNSIGNED,
|
||||||
|
start DATETIME,
|
||||||
|
end DATETIME
|
||||||
|
)
|
||||||
|
RETURNS FLOAT
|
||||||
|
READS SQL DATA
|
||||||
|
BEGIN
|
||||||
|
DECLARE result FLOAT;
|
||||||
|
CALL cachedata(obj_id, start, end);
|
||||||
|
SELECT SUM(value) INTO result FROM cachedata WHERE
|
||||||
|
object_id = obj_id
|
||||||
|
AND start = start
|
||||||
|
AND end = end;
|
||||||
|
RETURN result;
|
||||||
|
END$$
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
get_cache(1, '2014-01-01', '2014-02-01')
|
||||||
|
95247
|
||||||
|
select sleep(1);
|
||||||
|
sleep(1)
|
||||||
|
0
|
||||||
|
DROP FUNCTION get_cache;
|
||||||
|
DROP PROCEDURE cachedata;
|
242
mysql-test/suite/innodb/r/strict_mode.result
Normal file
242
mysql-test/suite/innodb/r/strict_mode.result
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
#
|
||||||
|
# Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
|
||||||
|
# INNODB_STRICT_MODE = 1
|
||||||
|
#
|
||||||
|
set innodb_strict_mode = 0;
|
||||||
|
create table t1 (id int auto_increment primary key,
|
||||||
|
v varchar(32),
|
||||||
|
col1 text,
|
||||||
|
col2 text,
|
||||||
|
col3 text,
|
||||||
|
col4 text,
|
||||||
|
col5 text,
|
||||||
|
col6 text,
|
||||||
|
col7 text,
|
||||||
|
col8 text,
|
||||||
|
col9 text,
|
||||||
|
col10 text,
|
||||||
|
col11 text,
|
||||||
|
col12 text,
|
||||||
|
col13 text,
|
||||||
|
col14 text,
|
||||||
|
col15 text,
|
||||||
|
col16 text,
|
||||||
|
col17 text,
|
||||||
|
col18 text,
|
||||||
|
col19 text,
|
||||||
|
col20 text,
|
||||||
|
col21 text,
|
||||||
|
col22 text,
|
||||||
|
col23 text,
|
||||||
|
col24 text,
|
||||||
|
col25 text,
|
||||||
|
col26 text,
|
||||||
|
col27 text,
|
||||||
|
col28 text,
|
||||||
|
col29 text,
|
||||||
|
col30 text,
|
||||||
|
col31 text,
|
||||||
|
col32 text,
|
||||||
|
col33 text,
|
||||||
|
col34 text,
|
||||||
|
col35 text,
|
||||||
|
col36 text,
|
||||||
|
col37 text,
|
||||||
|
col38 text,
|
||||||
|
col39 text,
|
||||||
|
col40 text,
|
||||||
|
col41 text,
|
||||||
|
col42 text,
|
||||||
|
col43 text,
|
||||||
|
col44 text,
|
||||||
|
col45 text ,
|
||||||
|
col46 text,
|
||||||
|
col47 text,
|
||||||
|
col48 text,
|
||||||
|
col49 text,
|
||||||
|
col50 text,
|
||||||
|
col51 text,
|
||||||
|
col52 text,
|
||||||
|
col53 text,
|
||||||
|
col54 text,
|
||||||
|
col55 text,
|
||||||
|
col56 text,
|
||||||
|
col57 text,
|
||||||
|
col58 text,
|
||||||
|
col59 text,
|
||||||
|
col60 text,
|
||||||
|
col61 text,
|
||||||
|
col62 text,
|
||||||
|
col63 text,
|
||||||
|
col64 text,
|
||||||
|
col65 text,
|
||||||
|
col66 text,
|
||||||
|
col67 text,
|
||||||
|
col68 text ,
|
||||||
|
col69 text,
|
||||||
|
col70 text,
|
||||||
|
col71 text,
|
||||||
|
col72 text,
|
||||||
|
col73 text,
|
||||||
|
col74 text,
|
||||||
|
col75 text,
|
||||||
|
col76 text,
|
||||||
|
col77 text,
|
||||||
|
col78 text,
|
||||||
|
col79 text,
|
||||||
|
col80 text,
|
||||||
|
col81 text,
|
||||||
|
col82 text,
|
||||||
|
col83 text,
|
||||||
|
col84 text,
|
||||||
|
col85 text,
|
||||||
|
col86 text,
|
||||||
|
col87 text,
|
||||||
|
col88 text,
|
||||||
|
col89 text,
|
||||||
|
col90 text,
|
||||||
|
col91 text,
|
||||||
|
col92 text,
|
||||||
|
col93 text,
|
||||||
|
col94 text,
|
||||||
|
col95 text,
|
||||||
|
col96 text,
|
||||||
|
col97 text,
|
||||||
|
col98 text,
|
||||||
|
col99 text,
|
||||||
|
col100 text,
|
||||||
|
col101 text,
|
||||||
|
col102 text,
|
||||||
|
col103 text,
|
||||||
|
col104 text,
|
||||||
|
col105 text,
|
||||||
|
col106 text,
|
||||||
|
col107 text,
|
||||||
|
col108 text,
|
||||||
|
col109 text,
|
||||||
|
col110 text,
|
||||||
|
col111 text,
|
||||||
|
col112 text,
|
||||||
|
col113 text,
|
||||||
|
col114 text,
|
||||||
|
col115 text,
|
||||||
|
col116 text,
|
||||||
|
col117 text,
|
||||||
|
col118 text,
|
||||||
|
col119 text,
|
||||||
|
col120 text,
|
||||||
|
col121 text,
|
||||||
|
col122 text,
|
||||||
|
col123 text,
|
||||||
|
col124 text,
|
||||||
|
col125 text,
|
||||||
|
col126 text ,
|
||||||
|
col127 text,
|
||||||
|
col128 text,
|
||||||
|
col129 text,
|
||||||
|
col130 text,
|
||||||
|
col131 text,
|
||||||
|
col132 text,
|
||||||
|
col133 text,
|
||||||
|
col134 text,
|
||||||
|
col135 text,
|
||||||
|
col136 text,
|
||||||
|
col137 text,
|
||||||
|
col138 text,
|
||||||
|
col139 text,
|
||||||
|
col140 text,
|
||||||
|
col141 text,
|
||||||
|
col142 text,
|
||||||
|
col143 text,
|
||||||
|
col144 text,
|
||||||
|
col145 text,
|
||||||
|
col146 text,
|
||||||
|
col147 text ,
|
||||||
|
col148 text,
|
||||||
|
col149 text,
|
||||||
|
col150 text,
|
||||||
|
col151 text,
|
||||||
|
col152 text,
|
||||||
|
col153 text,
|
||||||
|
col154 text,
|
||||||
|
col155 text,
|
||||||
|
col156 text,
|
||||||
|
col157 text,
|
||||||
|
col158 text,
|
||||||
|
col159 text,
|
||||||
|
col160 text,
|
||||||
|
col161 text,
|
||||||
|
col162 text,
|
||||||
|
col163 text,
|
||||||
|
col164 text,
|
||||||
|
col165 text,
|
||||||
|
col166 text,
|
||||||
|
col167 text,
|
||||||
|
col168 text,
|
||||||
|
col169 text,
|
||||||
|
col170 text,
|
||||||
|
col171 text,
|
||||||
|
col172 text ,
|
||||||
|
col173 text,
|
||||||
|
col174 text,
|
||||||
|
col175 text,
|
||||||
|
col176 text,
|
||||||
|
col177 text,
|
||||||
|
col178 text,
|
||||||
|
col179 text,
|
||||||
|
col180 text,
|
||||||
|
col181 text,
|
||||||
|
col182 text,
|
||||||
|
col183 text,
|
||||||
|
col184 text,
|
||||||
|
col185 text,
|
||||||
|
col186 text,
|
||||||
|
col187 text,
|
||||||
|
col188 text,
|
||||||
|
col189 text,
|
||||||
|
col190 text,
|
||||||
|
col191 text,
|
||||||
|
col192 text,
|
||||||
|
col193 text,
|
||||||
|
col194 text,
|
||||||
|
col195 text,
|
||||||
|
col196 text,
|
||||||
|
col197 text,
|
||||||
|
col198 text,
|
||||||
|
col199 text,
|
||||||
|
col200 text,
|
||||||
|
col201 text,
|
||||||
|
col202 text,
|
||||||
|
col203 text,
|
||||||
|
col204 text,
|
||||||
|
col205 text,
|
||||||
|
col206 text,
|
||||||
|
col207 text,
|
||||||
|
col208 text,
|
||||||
|
col209 text,
|
||||||
|
col210 text,
|
||||||
|
col211 text,
|
||||||
|
col212 text,
|
||||||
|
col213 text,
|
||||||
|
col214 text,
|
||||||
|
col215 text,
|
||||||
|
col216 text,
|
||||||
|
col217 text,
|
||||||
|
col218 text,
|
||||||
|
col219 text,
|
||||||
|
col220 text,
|
||||||
|
col221 text,
|
||||||
|
col222 text,
|
||||||
|
col223 text,
|
||||||
|
col224 text,
|
||||||
|
col225 text,
|
||||||
|
col226 text,
|
||||||
|
col227 text,
|
||||||
|
col228 text
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
Warnings:
|
||||||
|
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||||
|
set innodb_strict_mode = 1;
|
||||||
|
alter table t1 engine=InnoDB;
|
||||||
|
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||||
|
drop table t1;
|
@ -3,6 +3,11 @@
|
|||||||
#
|
#
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||||
|
{
|
||||||
|
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||||
|
}
|
||||||
|
|
||||||
# Issues with innodb_change_buffering_debug on Windows, so the test scenario
|
# Issues with innodb_change_buffering_debug on Windows, so the test scenario
|
||||||
# cannot be created on windows
|
# cannot be created on windows
|
||||||
--source include/not_windows.inc
|
--source include/not_windows.inc
|
||||||
@ -16,14 +21,20 @@
|
|||||||
# It instructs InnoDB to try to evict pages from the buffer pool when
|
# It instructs InnoDB to try to evict pages from the buffer pool when
|
||||||
# change buffering is possible, so that the change buffer will be used
|
# change buffering is possible, so that the change buffer will be used
|
||||||
# whenever possible.
|
# whenever possible.
|
||||||
-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
|
||||||
SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
|
SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
|
||||||
-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
|
|
||||||
SET GLOBAL innodb_change_buffering_debug = 1;
|
SET GLOBAL innodb_change_buffering_debug = 1;
|
||||||
|
|
||||||
# Turn off Unique Check to create corrupted index with dup key
|
# Turn off Unique Check to create corrupted index with dup key
|
||||||
SET UNIQUE_CHECKS=0;
|
SET UNIQUE_CHECKS=0;
|
||||||
|
|
||||||
|
CREATE DATABASE pad;
|
||||||
|
let $i=345;
|
||||||
|
while ($i)
|
||||||
|
{
|
||||||
|
--eval CREATE TABLE pad.t$i (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
dec $i;
|
||||||
|
}
|
||||||
|
|
||||||
-- enable_query_log
|
-- enable_query_log
|
||||||
|
|
||||||
set names utf8;
|
set names utf8;
|
||||||
@ -119,6 +130,6 @@ select z from corrupt_bit_test_ā limit 10;
|
|||||||
|
|
||||||
# Drop table
|
# Drop table
|
||||||
drop table corrupt_bit_test_ā;
|
drop table corrupt_bit_test_ā;
|
||||||
|
DROP DATABASE pad;
|
||||||
|
|
||||||
-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
|
|
||||||
SET GLOBAL innodb_change_buffering_debug = 0;
|
SET GLOBAL innodb_change_buffering_debug = 0;
|
||||||
|
22
mysql-test/suite/innodb/t/insert_debug.test
Normal file
22
mysql-test/suite/innodb/t/insert_debug.test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
--source include/have_partition.inc
|
||||||
|
|
||||||
|
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||||
|
{
|
||||||
|
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#19904003 INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG=1
|
||||||
|
--echo # CAUSES INFINITE PAGE SPLIT
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET GLOBAL innodb_change_buffering_debug=1;
|
||||||
|
SET GLOBAL innodb_limit_optimistic_insert_debug=1;
|
||||||
|
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB
|
||||||
|
PARTITION BY HASH (c1) PARTITIONS 15;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SET GLOBAL innodb_change_buffering_debug=0;
|
||||||
|
SET GLOBAL innodb_limit_optimistic_insert_debug=0;
|
108
mysql-test/suite/innodb/t/sp_temp_table.test
Normal file
108
mysql-test/suite/innodb/t/sp_temp_table.test
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/big_test.inc
|
||||||
|
|
||||||
|
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||||
|
{
|
||||||
|
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #19306524 FAILING ASSERTION WITH TEMP TABLE FOR A PROCEDURE
|
||||||
|
--echo # CALLED FROM A FUNCTION
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
call mtr.add_suppression("MySQL is trying to drop table");
|
||||||
|
|
||||||
|
DELIMITER $$;
|
||||||
|
CREATE PROCEDURE cachedata(
|
||||||
|
IN obj_id BIGINT UNSIGNED,
|
||||||
|
IN start DATETIME,
|
||||||
|
IN end DATETIME
|
||||||
|
)
|
||||||
|
|
||||||
|
cachedata:BEGIN
|
||||||
|
DECLARE cache_count BIGINT;
|
||||||
|
|
||||||
|
SET @timestamp := NOW();
|
||||||
|
|
||||||
|
CREATE TEMPORARY TABLE IF NOT EXISTS cachedata (
|
||||||
|
timestamp DATETIME,
|
||||||
|
object_id BIGINT UNSIGNED NOT NULL,
|
||||||
|
start DATETIME,
|
||||||
|
end DATETIME,
|
||||||
|
seqno BIGINT AUTO_INCREMENT,
|
||||||
|
value FLOAT,
|
||||||
|
PRIMARY KEY (seqno),
|
||||||
|
INDEX (timestamp),
|
||||||
|
INDEX (object_id, start, end)
|
||||||
|
) ENGINE=INNODB;
|
||||||
|
|
||||||
|
DELETE FROM cachedata WHERE
|
||||||
|
timestamp < DATE_SUB(@timestamp, INTERVAL 15 SECOND);
|
||||||
|
|
||||||
|
SELECT count(*) INTO cache_count FROM cachedata WHERE
|
||||||
|
object_id = obj_id
|
||||||
|
AND start = start
|
||||||
|
AND end = end;
|
||||||
|
|
||||||
|
IF cache_count > 0 THEN LEAVE cachedata;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
INSERT INTO cachedata (timestamp, object_id, start, end, value) VALUES
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 2345),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 2345),
|
||||||
|
(@timestamp, obj_id, start, end, 1234),
|
||||||
|
(@timestamp, obj_id, start, end, 4567),
|
||||||
|
(@timestamp, obj_id, start, end, 8901),
|
||||||
|
(@timestamp, obj_id, start, end, 2345);
|
||||||
|
|
||||||
|
END$$
|
||||||
|
|
||||||
|
|
||||||
|
CREATE FUNCTION get_cache(
|
||||||
|
obj_id BIGINT UNSIGNED,
|
||||||
|
start DATETIME,
|
||||||
|
end DATETIME
|
||||||
|
)
|
||||||
|
RETURNS FLOAT
|
||||||
|
READS SQL DATA
|
||||||
|
BEGIN
|
||||||
|
DECLARE result FLOAT;
|
||||||
|
|
||||||
|
CALL cachedata(obj_id, start, end);
|
||||||
|
|
||||||
|
SELECT SUM(value) INTO result FROM cachedata WHERE
|
||||||
|
object_id = obj_id
|
||||||
|
AND start = start
|
||||||
|
AND end = end;
|
||||||
|
|
||||||
|
RETURN result;
|
||||||
|
END$$
|
||||||
|
|
||||||
|
DELIMITER ;$$
|
||||||
|
|
||||||
|
let $i = 30;
|
||||||
|
while ($i)
|
||||||
|
{
|
||||||
|
SELECT get_cache(1, '2014-01-01', '2014-02-01');
|
||||||
|
select sleep(1);
|
||||||
|
dec $i;
|
||||||
|
}
|
||||||
|
|
||||||
|
DROP FUNCTION get_cache;
|
||||||
|
DROP PROCEDURE cachedata;
|
251
mysql-test/suite/innodb/t/strict_mode.test
Normal file
251
mysql-test/suite/innodb/t/strict_mode.test
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
if (`select plugin_auth_version <= "5.5.40-MariaDB-36.1" from information_schema.plugins where plugin_name='innodb'`)
|
||||||
|
{
|
||||||
|
--skip Not fixed in XtraDB as of 5.5.40-MariaDB-36.1 or earlier
|
||||||
|
}
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
|
||||||
|
--echo # INNODB_STRICT_MODE = 1
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
set innodb_strict_mode = 0;
|
||||||
|
|
||||||
|
create table t1 (id int auto_increment primary key,
|
||||||
|
v varchar(32),
|
||||||
|
col1 text,
|
||||||
|
col2 text,
|
||||||
|
col3 text,
|
||||||
|
col4 text,
|
||||||
|
col5 text,
|
||||||
|
col6 text,
|
||||||
|
col7 text,
|
||||||
|
col8 text,
|
||||||
|
col9 text,
|
||||||
|
col10 text,
|
||||||
|
col11 text,
|
||||||
|
col12 text,
|
||||||
|
col13 text,
|
||||||
|
col14 text,
|
||||||
|
col15 text,
|
||||||
|
col16 text,
|
||||||
|
col17 text,
|
||||||
|
col18 text,
|
||||||
|
col19 text,
|
||||||
|
col20 text,
|
||||||
|
col21 text,
|
||||||
|
col22 text,
|
||||||
|
col23 text,
|
||||||
|
col24 text,
|
||||||
|
col25 text,
|
||||||
|
col26 text,
|
||||||
|
col27 text,
|
||||||
|
col28 text,
|
||||||
|
col29 text,
|
||||||
|
col30 text,
|
||||||
|
col31 text,
|
||||||
|
col32 text,
|
||||||
|
col33 text,
|
||||||
|
col34 text,
|
||||||
|
col35 text,
|
||||||
|
col36 text,
|
||||||
|
col37 text,
|
||||||
|
col38 text,
|
||||||
|
col39 text,
|
||||||
|
col40 text,
|
||||||
|
col41 text,
|
||||||
|
col42 text,
|
||||||
|
col43 text,
|
||||||
|
col44 text,
|
||||||
|
col45 text ,
|
||||||
|
col46 text,
|
||||||
|
col47 text,
|
||||||
|
col48 text,
|
||||||
|
col49 text,
|
||||||
|
col50 text,
|
||||||
|
col51 text,
|
||||||
|
col52 text,
|
||||||
|
col53 text,
|
||||||
|
col54 text,
|
||||||
|
col55 text,
|
||||||
|
col56 text,
|
||||||
|
col57 text,
|
||||||
|
col58 text,
|
||||||
|
col59 text,
|
||||||
|
col60 text,
|
||||||
|
col61 text,
|
||||||
|
col62 text,
|
||||||
|
col63 text,
|
||||||
|
col64 text,
|
||||||
|
col65 text,
|
||||||
|
col66 text,
|
||||||
|
col67 text,
|
||||||
|
col68 text ,
|
||||||
|
col69 text,
|
||||||
|
col70 text,
|
||||||
|
col71 text,
|
||||||
|
col72 text,
|
||||||
|
col73 text,
|
||||||
|
col74 text,
|
||||||
|
col75 text,
|
||||||
|
col76 text,
|
||||||
|
col77 text,
|
||||||
|
col78 text,
|
||||||
|
col79 text,
|
||||||
|
col80 text,
|
||||||
|
col81 text,
|
||||||
|
col82 text,
|
||||||
|
col83 text,
|
||||||
|
col84 text,
|
||||||
|
col85 text,
|
||||||
|
col86 text,
|
||||||
|
col87 text,
|
||||||
|
col88 text,
|
||||||
|
col89 text,
|
||||||
|
col90 text,
|
||||||
|
col91 text,
|
||||||
|
col92 text,
|
||||||
|
col93 text,
|
||||||
|
col94 text,
|
||||||
|
col95 text,
|
||||||
|
col96 text,
|
||||||
|
col97 text,
|
||||||
|
col98 text,
|
||||||
|
col99 text,
|
||||||
|
col100 text,
|
||||||
|
col101 text,
|
||||||
|
col102 text,
|
||||||
|
col103 text,
|
||||||
|
col104 text,
|
||||||
|
col105 text,
|
||||||
|
col106 text,
|
||||||
|
col107 text,
|
||||||
|
col108 text,
|
||||||
|
col109 text,
|
||||||
|
col110 text,
|
||||||
|
col111 text,
|
||||||
|
col112 text,
|
||||||
|
col113 text,
|
||||||
|
col114 text,
|
||||||
|
col115 text,
|
||||||
|
col116 text,
|
||||||
|
col117 text,
|
||||||
|
col118 text,
|
||||||
|
col119 text,
|
||||||
|
col120 text,
|
||||||
|
col121 text,
|
||||||
|
col122 text,
|
||||||
|
col123 text,
|
||||||
|
col124 text,
|
||||||
|
col125 text,
|
||||||
|
col126 text ,
|
||||||
|
col127 text,
|
||||||
|
col128 text,
|
||||||
|
col129 text,
|
||||||
|
col130 text,
|
||||||
|
col131 text,
|
||||||
|
col132 text,
|
||||||
|
col133 text,
|
||||||
|
col134 text,
|
||||||
|
col135 text,
|
||||||
|
col136 text,
|
||||||
|
col137 text,
|
||||||
|
col138 text,
|
||||||
|
col139 text,
|
||||||
|
col140 text,
|
||||||
|
col141 text,
|
||||||
|
col142 text,
|
||||||
|
col143 text,
|
||||||
|
col144 text,
|
||||||
|
col145 text,
|
||||||
|
col146 text,
|
||||||
|
col147 text ,
|
||||||
|
col148 text,
|
||||||
|
col149 text,
|
||||||
|
col150 text,
|
||||||
|
col151 text,
|
||||||
|
col152 text,
|
||||||
|
col153 text,
|
||||||
|
col154 text,
|
||||||
|
col155 text,
|
||||||
|
col156 text,
|
||||||
|
col157 text,
|
||||||
|
col158 text,
|
||||||
|
col159 text,
|
||||||
|
col160 text,
|
||||||
|
col161 text,
|
||||||
|
col162 text,
|
||||||
|
col163 text,
|
||||||
|
col164 text,
|
||||||
|
col165 text,
|
||||||
|
col166 text,
|
||||||
|
col167 text,
|
||||||
|
col168 text,
|
||||||
|
col169 text,
|
||||||
|
col170 text,
|
||||||
|
col171 text,
|
||||||
|
col172 text ,
|
||||||
|
col173 text,
|
||||||
|
col174 text,
|
||||||
|
col175 text,
|
||||||
|
col176 text,
|
||||||
|
col177 text,
|
||||||
|
col178 text,
|
||||||
|
col179 text,
|
||||||
|
col180 text,
|
||||||
|
col181 text,
|
||||||
|
col182 text,
|
||||||
|
col183 text,
|
||||||
|
col184 text,
|
||||||
|
col185 text,
|
||||||
|
col186 text,
|
||||||
|
col187 text,
|
||||||
|
col188 text,
|
||||||
|
col189 text,
|
||||||
|
col190 text,
|
||||||
|
col191 text,
|
||||||
|
col192 text,
|
||||||
|
col193 text,
|
||||||
|
col194 text,
|
||||||
|
col195 text,
|
||||||
|
col196 text,
|
||||||
|
col197 text,
|
||||||
|
col198 text,
|
||||||
|
col199 text,
|
||||||
|
col200 text,
|
||||||
|
col201 text,
|
||||||
|
col202 text,
|
||||||
|
col203 text,
|
||||||
|
col204 text,
|
||||||
|
col205 text,
|
||||||
|
col206 text,
|
||||||
|
col207 text,
|
||||||
|
col208 text,
|
||||||
|
col209 text,
|
||||||
|
col210 text,
|
||||||
|
col211 text,
|
||||||
|
col212 text,
|
||||||
|
col213 text,
|
||||||
|
col214 text,
|
||||||
|
col215 text,
|
||||||
|
col216 text,
|
||||||
|
col217 text,
|
||||||
|
col218 text,
|
||||||
|
col219 text,
|
||||||
|
col220 text,
|
||||||
|
col221 text,
|
||||||
|
col222 text,
|
||||||
|
col223 text,
|
||||||
|
col224 text,
|
||||||
|
col225 text,
|
||||||
|
col226 text,
|
||||||
|
col227 text,
|
||||||
|
col228 text
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
set innodb_strict_mode = 1;
|
||||||
|
--error ER_TOO_BIG_ROWSIZE
|
||||||
|
alter table t1 engine=InnoDB;
|
||||||
|
|
||||||
|
drop table t1;
|
@ -57,11 +57,16 @@ ERROR 42000: Variable 'sql_log_bin' can't be set to the value of '
|
|||||||
SET @@session.sql_log_bin = NO;
|
SET @@session.sql_log_bin = NO;
|
||||||
ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'NO'
|
ERROR 42000: Variable 'sql_log_bin' can't be set to the value of 'NO'
|
||||||
'#-------------------FN_DYNVARS_156_05----------------------------#'
|
'#-------------------FN_DYNVARS_156_05----------------------------#'
|
||||||
SET @@global.sql_log_bin = 0;
|
|
||||||
SELECT @@global.sql_log_bin;
|
SELECT @@global.sql_log_bin;
|
||||||
@@global.sql_log_bin
|
@@global.sql_log_bin
|
||||||
0
|
1
|
||||||
|
SET @@global.sql_log_bin = 0;
|
||||||
|
ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
|
||||||
|
SELECT @@global.sql_log_bin;
|
||||||
|
@@global.sql_log_bin
|
||||||
|
1
|
||||||
SET @@global.sql_log_bin = 1;
|
SET @@global.sql_log_bin = 1;
|
||||||
|
ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
|
||||||
'#----------------------FN_DYNVARS_156_06------------------------#'
|
'#----------------------FN_DYNVARS_156_06------------------------#'
|
||||||
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_log_bin';
|
SELECT count(VARIABLE_VALUE) FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='sql_log_bin';
|
||||||
count(VARIABLE_VALUE)
|
count(VARIABLE_VALUE)
|
||||||
|
@ -109,11 +109,15 @@ SET @@session.sql_log_bin = NO;
|
|||||||
|
|
||||||
--echo '#-------------------FN_DYNVARS_156_05----------------------------#'
|
--echo '#-------------------FN_DYNVARS_156_05----------------------------#'
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Test if accessing global sql_log_bin gives error #
|
# Test if setting global sql_log_bin gives error, #
|
||||||
|
# and there is no error on reading it. #
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
SELECT @@global.sql_log_bin;
|
||||||
|
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
SET @@global.sql_log_bin = 0;
|
SET @@global.sql_log_bin = 0;
|
||||||
SELECT @@global.sql_log_bin;
|
SELECT @@global.sql_log_bin;
|
||||||
|
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||||
SET @@global.sql_log_bin = 1;
|
SET @@global.sql_log_bin = 1;
|
||||||
|
|
||||||
--echo '#----------------------FN_DYNVARS_156_06------------------------#'
|
--echo '#----------------------FN_DYNVARS_156_06------------------------#'
|
||||||
|
@ -1136,6 +1136,61 @@ DROP TABLE t1;
|
|||||||
disconnect con1;
|
disconnect con1;
|
||||||
disconnect con2;
|
disconnect con2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#19070633 - POSSIBLE ACCESS TO FREED MEMORY IN IS_FREE_LOCK() AND IS_USED_LOCK().
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--enable_connect_log
|
||||||
|
|
||||||
|
--echo # Verifying issue for IS_FREE_LOCK() function.
|
||||||
|
SELECT GET_LOCK("lock_19070633", 600);
|
||||||
|
|
||||||
|
connect (con1, localhost, root,,);
|
||||||
|
--echo # Waiting after getting user level lock info and releasing mutex.
|
||||||
|
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||||
|
--echo # Sending: SELECT IS_FREE_LOCK("lock_19070633");
|
||||||
|
send SELECT IS_FREE_LOCK("lock_19070633");
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||||
|
SELECT RELEASE_LOCK("lock_19070633");
|
||||||
|
--echo # Signaling connection con1 after releasing the lock.
|
||||||
|
--echo # Without fix, accessing user level lock info in con1 would result in
|
||||||
|
--echo # crash or valgrind issue invalid read is reported.
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
--echo # Reaping: SELECT IS_FREE_LOCK("lock_19070633");
|
||||||
|
--reap
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo # Verifying issue for IS_USED_LOCK() function.
|
||||||
|
SELECT GET_LOCK("lock_19070633", 600);
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
--echo # Waiting after getting user level lock info and releasing mutex.
|
||||||
|
SET DEBUG_SYNC= 'after_getting_user_level_lock_info SIGNAL parked WAIT_FOR go';
|
||||||
|
--echo # Sending: SELECT IS_USED_LOCK("lock_19070633");
|
||||||
|
send SELECT IS_USED_LOCK("lock_19070633");
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC= 'now WAIT_FOR parked';
|
||||||
|
SELECT RELEASE_LOCK("lock_19070633");
|
||||||
|
--echo # Signaling connection con1 after releasing the lock.
|
||||||
|
--echo # Without fix, accessing user level lock info in con1 would result in
|
||||||
|
--echo # crash or valgrind issue invalid read is reported.
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL go';
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
--echo # Reaping: SELECT IS_USED_LOCK("lock_19070633");
|
||||||
|
--replace_column 1 #
|
||||||
|
--reap
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
--disable_connect_log
|
||||||
|
|
||||||
# Check that all connections opened by test cases in this file are really
|
# Check that all connections opened by test cases in this file are really
|
||||||
# gone so execution of other tests won't be affected by their presence.
|
# gone so execution of other tests won't be affected by their presence.
|
||||||
|
@ -98,3 +98,19 @@ deallocate prepare abc;
|
|||||||
|
|
||||||
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||||
WHERE VARIABLE_NAME = 'socket';
|
WHERE VARIABLE_NAME = 'socket';
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
# Creating a temporary text file.
|
||||||
|
--write_file $MYSQL_TMP_DIR/bug16581605.txt
|
||||||
|
abc
|
||||||
|
def
|
||||||
|
EOF
|
||||||
|
|
||||||
|
#REPLACE.EXE UTILITY will work fine after the fix.
|
||||||
|
--exec $REPLACE abc xyz < $MYSQL_TMP_DIR/bug16581605.txt
|
||||||
|
|
||||||
|
#Cleanup
|
||||||
|
remove_file $MYSQL_TMP_DIR/bug16581605.txt;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
/* Copyright (c) 2000, 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
|
||||||
@ -328,26 +328,4 @@ int pthread_attr_destroy(pthread_attr_t *connect_att)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
** Fix localtime_r() to be a bit safer
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
struct tm *localtime_r(const time_t *timep,struct tm *tmp)
|
|
||||||
{
|
|
||||||
if (*timep == (time_t) -1) /* This will crash win32 */
|
|
||||||
{
|
|
||||||
bzero(tmp,sizeof(*tmp));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
struct tm *res=localtime(timep);
|
|
||||||
if (!res) /* Wrong date */
|
|
||||||
{
|
|
||||||
bzero(tmp,sizeof(*tmp)); /* Keep things safe */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
*tmp= *res;
|
|
||||||
}
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
#endif /* __WIN__ */
|
#endif /* __WIN__ */
|
||||||
|
@ -8,9 +8,18 @@
|
|||||||
# post mode : ping server until answer is received
|
# post mode : ping server until answer is received
|
||||||
#
|
#
|
||||||
|
|
||||||
|
get_option () {
|
||||||
|
local section=$1
|
||||||
|
local option=$2
|
||||||
|
local default=$3
|
||||||
|
ret=$(/usr/bin/my_print_defaults $section | grep '^--'${option}'=' | cut -d= -f2-)
|
||||||
|
[ -z $ret ] && ret=$default
|
||||||
|
echo $ret
|
||||||
|
}
|
||||||
|
|
||||||
install_db () {
|
install_db () {
|
||||||
# Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode)
|
# Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode)
|
||||||
datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p')
|
datadir=$(get_option mysqld datadir "/var/lib/mysql")
|
||||||
|
|
||||||
# Restore log, dir, perms and SELinux contexts
|
# Restore log, dir, perms and SELinux contexts
|
||||||
[ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
|
[ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1
|
||||||
@ -35,9 +44,16 @@ pinger () {
|
|||||||
# Wait for ping to answer to signal startup completed,
|
# Wait for ping to answer to signal startup completed,
|
||||||
# might take a while in case of e.g. crash recovery
|
# might take a while in case of e.g. crash recovery
|
||||||
# MySQL systemd service will timeout script if no answer
|
# MySQL systemd service will timeout script if no answer
|
||||||
|
datadir=$(get_option mysqld datadir "/var/lib/mysql")
|
||||||
|
socket=$(get_option mysqld socket "$datadir/mysql.sock")
|
||||||
|
case $socket in
|
||||||
|
/*) adminsocket="$socket" ;;
|
||||||
|
*) adminsocket="$datadir/$socket" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
while /bin/true ; do
|
while /bin/true ; do
|
||||||
sleep 1
|
sleep 1
|
||||||
mysqladmin ping >/dev/null 2>&1 && break
|
mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping >/dev/null 2>&1 && break
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,15 @@ errlogfile="$result"
|
|||||||
get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
|
get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid"
|
||||||
mypidfile="$result"
|
mypidfile="$result"
|
||||||
|
|
||||||
|
case $socketfile in
|
||||||
|
/*) adminsocket="$socketfile" ;;
|
||||||
|
*) adminsocket="$datadir/$socketfile" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
start(){
|
start(){
|
||||||
[ -x $exec ] || exit 5
|
[ -x $exec ] || exit 5
|
||||||
# check to see if it's already running
|
# check to see if it's already running
|
||||||
RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1`
|
RESPONSE=$(/usr/bin/mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping 2>&1)
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
# already running, do nothing
|
# already running, do nothing
|
||||||
action $"Starting $prog: " /bin/true
|
action $"Starting $prog: " /bin/true
|
||||||
@ -107,7 +111,7 @@ start(){
|
|||||||
ret=0
|
ret=0
|
||||||
TIMEOUT="$STARTTIMEOUT"
|
TIMEOUT="$STARTTIMEOUT"
|
||||||
while [ $TIMEOUT -gt 0 ]; do
|
while [ $TIMEOUT -gt 0 ]; do
|
||||||
RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` && break
|
RESPONSE=$(/usr/bin/mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping 2>&1) && break
|
||||||
echo "$RESPONSE" | grep -q "Access denied for user" && break
|
echo "$RESPONSE" | grep -q "Access denied for user" && break
|
||||||
if ! /bin/kill -0 $safe_pid 2>/dev/null; then
|
if ! /bin/kill -0 $safe_pid 2>/dev/null; then
|
||||||
echo "MySQL Daemon failed to start."
|
echo "MySQL Daemon failed to start."
|
||||||
|
@ -89,17 +89,10 @@ IF(MALLOC_LIB)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
IF(CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
# Strip maintainer mode options if necessary
|
|
||||||
STRING(REPLACE "${MY_MAINTAINER_C_WARNINGS}" "" CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
|
||||||
STRING(REPLACE "${MY_MAINTAINER_CXX_WARNINGS}" "" CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
|
||||||
FOREACH(ARCH ${CMAKE_OSX_ARCHITECTURES})
|
FOREACH(ARCH ${CMAKE_OSX_ARCHITECTURES})
|
||||||
SET(CFLAGS "${CFLAGS} -arch ${ARCH}")
|
SET(CFLAGS "${CFLAGS} -arch ${ARCH}")
|
||||||
SET(CXXFLAGS "${CXXFLAGS} -arch ${ARCH}")
|
SET(CXXFLAGS "${CXXFLAGS} -arch ${ARCH}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ELSE()
|
|
||||||
# Strip maintainer mode options if necessary
|
|
||||||
STRING(REPLACE "${MY_MAINTAINER_C_WARNINGS}" "" CFLAGS "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
|
||||||
STRING(REPLACE "${MY_MAINTAINER_CXX_WARNINGS}" "" CXXFLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
|
@ -264,13 +264,13 @@ sub addall {
|
|||||||
foreach $host (@hosts) {
|
foreach $host (@hosts) {
|
||||||
# user privileges: SELECT
|
# user privileges: SELECT
|
||||||
if (($todo == 2) || ($todo == 3)) {
|
if (($todo == 2) || ($todo == 3)) {
|
||||||
$sth = $dbh->do("GRANT SELECT ON $db.* TO $user@\"$host\" IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
$sth = $dbh->do("GRANT SELECT ON $db.* TO \'$user\'@\'$host\' IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
||||||
} elsif ($todo == 4) {
|
} elsif ($todo == 4) {
|
||||||
# user privileges: SELECT,INSERT,UPDATE,DELETE
|
# user privileges: SELECT,INSERT,UPDATE,DELETE
|
||||||
$sth = $dbh->do("GRANT SELECT,INSERT,UPDATE,DELETE ON $db.* TO $user@\"$host\" IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
$sth = $dbh->do("GRANT SELECT,INSERT,UPDATE,DELETE ON $db.* TO \'$user\'@\'$host\' IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
||||||
} elsif ($todo == 5) {
|
} elsif ($todo == 5) {
|
||||||
# user privileges: SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES
|
# user privileges: SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES
|
||||||
$sth = $dbh->do("GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES ON $db.* TO $user@\"$host\" IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
$sth = $dbh->do("GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,LOCK TABLES,CREATE TEMPORARY TABLES ON $db.* TO \'$user\'@\'$host\' IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
||||||
} elsif ($todo == 6) {
|
} elsif ($todo == 6) {
|
||||||
# all privileges
|
# all privileges
|
||||||
$sth = $dbh->do("GRANT ALL ON $db.* TO \'$user\'\@\'$host\' IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
$sth = $dbh->do("GRANT ALL ON $db.* TO \'$user\'\@\'$host\' IDENTIFIED BY \'$pass\'") || die $dbh->errstr;
|
||||||
|
@ -1079,6 +1079,9 @@ inline LEX_STRING *hton_name(const handlerton *hton)
|
|||||||
#define HTON_NO_PARTITION (1 << 8) //You can not partition these tables
|
#define HTON_NO_PARTITION (1 << 8) //You can not partition these tables
|
||||||
#define HTON_EXTENDED_KEYS (1 << 9) //supports extended keys
|
#define HTON_EXTENDED_KEYS (1 << 9) //supports extended keys
|
||||||
|
|
||||||
|
// MySQL compatibility. Unused.
|
||||||
|
#define HTON_SUPPORTS_FOREIGN_KEYS (1 << 0) //Foreign key constraint supported.
|
||||||
|
|
||||||
class Ha_trx_info;
|
class Ha_trx_info;
|
||||||
|
|
||||||
struct THD_TRANS
|
struct THD_TRANS
|
||||||
|
@ -6545,21 +6545,24 @@ longlong Item_func_is_free_lock::val_int()
|
|||||||
DBUG_ASSERT(fixed == 1);
|
DBUG_ASSERT(fixed == 1);
|
||||||
String *res=args[0]->val_str(&value);
|
String *res=args[0]->val_str(&value);
|
||||||
User_level_lock *ull;
|
User_level_lock *ull;
|
||||||
|
longlong ret_val= 0LL;
|
||||||
|
|
||||||
null_value=0;
|
null_value=0;
|
||||||
if (!res || !res->length())
|
if (!res || !res->length())
|
||||||
{
|
{
|
||||||
null_value=1;
|
null_value=1;
|
||||||
return 0;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_mutex_lock(&LOCK_user_locks);
|
mysql_mutex_lock(&LOCK_user_locks);
|
||||||
ull= (User_level_lock *) my_hash_search(&hash_user_locks, (uchar*) res->ptr(),
|
ull= (User_level_lock *) my_hash_search(&hash_user_locks, (uchar*) res->ptr(),
|
||||||
(size_t) res->length());
|
(size_t) res->length());
|
||||||
mysql_mutex_unlock(&LOCK_user_locks);
|
|
||||||
if (!ull || !ull->locked)
|
if (!ull || !ull->locked)
|
||||||
return 1;
|
ret_val= 1;
|
||||||
return 0;
|
mysql_mutex_unlock(&LOCK_user_locks);
|
||||||
|
DEBUG_SYNC(current_thd, "after_getting_user_level_lock_info");
|
||||||
|
|
||||||
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
longlong Item_func_is_used_lock::val_int()
|
longlong Item_func_is_used_lock::val_int()
|
||||||
@ -6567,6 +6570,7 @@ longlong Item_func_is_used_lock::val_int()
|
|||||||
DBUG_ASSERT(fixed == 1);
|
DBUG_ASSERT(fixed == 1);
|
||||||
String *res=args[0]->val_str(&value);
|
String *res=args[0]->val_str(&value);
|
||||||
User_level_lock *ull;
|
User_level_lock *ull;
|
||||||
|
my_thread_id thread_id= 0UL;
|
||||||
|
|
||||||
null_value=1;
|
null_value=1;
|
||||||
if (!res || !res->length())
|
if (!res || !res->length())
|
||||||
@ -6575,12 +6579,15 @@ longlong Item_func_is_used_lock::val_int()
|
|||||||
mysql_mutex_lock(&LOCK_user_locks);
|
mysql_mutex_lock(&LOCK_user_locks);
|
||||||
ull= (User_level_lock *) my_hash_search(&hash_user_locks, (uchar*) res->ptr(),
|
ull= (User_level_lock *) my_hash_search(&hash_user_locks, (uchar*) res->ptr(),
|
||||||
(size_t) res->length());
|
(size_t) res->length());
|
||||||
|
if ((ull != NULL) && ull->locked)
|
||||||
|
{
|
||||||
|
null_value= 0;
|
||||||
|
thread_id= ull->thread_id;
|
||||||
|
}
|
||||||
mysql_mutex_unlock(&LOCK_user_locks);
|
mysql_mutex_unlock(&LOCK_user_locks);
|
||||||
if (!ull || !ull->locked)
|
DEBUG_SYNC(current_thd, "after_getting_user_level_lock_info");
|
||||||
return 0;
|
|
||||||
|
|
||||||
null_value=0;
|
return thread_id;
|
||||||
return ull->thread_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef ITEM_FUNC_INCLUDED
|
#ifndef ITEM_FUNC_INCLUDED
|
||||||
#define ITEM_FUNC_INCLUDED
|
#define ITEM_FUNC_INCLUDED
|
||||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2009, 2014, SkySQL 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
|
||||||
@ -279,7 +279,8 @@ public:
|
|||||||
inline longlong check_integer_overflow(longlong value, bool val_unsigned)
|
inline longlong check_integer_overflow(longlong value, bool val_unsigned)
|
||||||
{
|
{
|
||||||
if ((unsigned_flag && !val_unsigned && value < 0) ||
|
if ((unsigned_flag && !val_unsigned && value < 0) ||
|
||||||
(!unsigned_flag && val_unsigned && (ulonglong) value > LONGLONG_MAX))
|
(!unsigned_flag && val_unsigned &&
|
||||||
|
(ulonglong) value > (ulonglong) LONGLONG_MAX))
|
||||||
return raise_integer_overflow();
|
return raise_integer_overflow();
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -1583,7 +1583,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
|
|||||||
ev = new Execute_load_log_event(buf, event_len, description_event);
|
ev = new Execute_load_log_event(buf, event_len, description_event);
|
||||||
break;
|
break;
|
||||||
case START_EVENT_V3: /* this is sent only by MySQL <=4.x */
|
case START_EVENT_V3: /* this is sent only by MySQL <=4.x */
|
||||||
ev = new Start_log_event_v3(buf, description_event);
|
ev = new Start_log_event_v3(buf, event_len, description_event);
|
||||||
break;
|
break;
|
||||||
case STOP_EVENT:
|
case STOP_EVENT:
|
||||||
ev = new Stop_log_event(buf, description_event);
|
ev = new Stop_log_event(buf, description_event);
|
||||||
@ -4138,11 +4138,17 @@ void Start_log_event_v3::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
|
|||||||
Start_log_event_v3::Start_log_event_v3()
|
Start_log_event_v3::Start_log_event_v3()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Start_log_event_v3::Start_log_event_v3(const char* buf,
|
Start_log_event_v3::Start_log_event_v3(const char* buf, uint event_len,
|
||||||
const Format_description_log_event
|
const Format_description_log_event
|
||||||
*description_event)
|
*description_event)
|
||||||
:Log_event(buf, description_event)
|
:Log_event(buf, description_event), binlog_version(BINLOG_VERSION)
|
||||||
{
|
{
|
||||||
|
if (event_len < (uint)description_event->common_header_len +
|
||||||
|
ST_COMMON_HEADER_LEN_OFFSET)
|
||||||
|
{
|
||||||
|
server_version[0]= 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
buf+= description_event->common_header_len;
|
buf+= description_event->common_header_len;
|
||||||
binlog_version= uint2korr(buf+ST_BINLOG_VER_OFFSET);
|
binlog_version= uint2korr(buf+ST_BINLOG_VER_OFFSET);
|
||||||
memcpy(server_version, buf+ST_SERVER_VER_OFFSET,
|
memcpy(server_version, buf+ST_SERVER_VER_OFFSET,
|
||||||
@ -4442,9 +4448,12 @@ Format_description_log_event(const char* buf,
|
|||||||
const
|
const
|
||||||
Format_description_log_event*
|
Format_description_log_event*
|
||||||
description_event)
|
description_event)
|
||||||
:Start_log_event_v3(buf, description_event), event_type_permutation(0)
|
:Start_log_event_v3(buf, event_len, description_event),
|
||||||
|
common_header_len(0), post_header_len(NULL), event_type_permutation(0)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Format_description_log_event::Format_description_log_event(char*,...)");
|
DBUG_ENTER("Format_description_log_event::Format_description_log_event(char*,...)");
|
||||||
|
if (!Start_log_event_v3::is_valid())
|
||||||
|
DBUG_VOID_RETURN; /* sanity check */
|
||||||
buf+= LOG_EVENT_MINIMAL_HEADER_LEN;
|
buf+= LOG_EVENT_MINIMAL_HEADER_LEN;
|
||||||
if ((common_header_len=buf[ST_COMMON_HEADER_LEN_OFFSET]) < OLD_HEADER_LEN)
|
if ((common_header_len=buf[ST_COMMON_HEADER_LEN_OFFSET]) < OLD_HEADER_LEN)
|
||||||
DBUG_VOID_RETURN; /* sanity check */
|
DBUG_VOID_RETURN; /* sanity check */
|
||||||
|
@ -2366,14 +2366,14 @@ public:
|
|||||||
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
void print(FILE* file, PRINT_EVENT_INFO* print_event_info);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Start_log_event_v3(const char* buf,
|
Start_log_event_v3(const char* buf, uint event_len,
|
||||||
const Format_description_log_event* description_event);
|
const Format_description_log_event* description_event);
|
||||||
~Start_log_event_v3() {}
|
~Start_log_event_v3() {}
|
||||||
Log_event_type get_type_code() { return START_EVENT_V3;}
|
Log_event_type get_type_code() { return START_EVENT_V3;}
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
bool write(IO_CACHE* file);
|
bool write(IO_CACHE* file);
|
||||||
#endif
|
#endif
|
||||||
bool is_valid() const { return 1; }
|
bool is_valid() const { return server_version[0] != 0; }
|
||||||
int get_data_size()
|
int get_data_size()
|
||||||
{
|
{
|
||||||
return START_V3_HEADER_LEN; //no variable-sized part
|
return START_V3_HEADER_LEN; //no variable-sized part
|
||||||
|
114
sql/sql_parse.cc
114
sql/sql_parse.cc
@ -5383,6 +5383,115 @@ bool check_global_access(THD *thd, ulong want_access, bool no_errors)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Checks foreign key's parent table access.
|
||||||
|
|
||||||
|
@param thd [in] Thread handler
|
||||||
|
@param create_info [in] Create information (like MAX_ROWS, ENGINE or
|
||||||
|
temporary table flag)
|
||||||
|
@param alter_info [in] Initial list of columns and indexes for the
|
||||||
|
table to be created
|
||||||
|
|
||||||
|
@retval
|
||||||
|
false ok.
|
||||||
|
@retval
|
||||||
|
true error or access denied. Error is sent to client in this case.
|
||||||
|
*/
|
||||||
|
bool check_fk_parent_table_access(THD *thd,
|
||||||
|
HA_CREATE_INFO *create_info,
|
||||||
|
Alter_info *alter_info)
|
||||||
|
{
|
||||||
|
Key *key;
|
||||||
|
List_iterator<Key> key_iterator(alter_info->key_list);
|
||||||
|
|
||||||
|
while ((key= key_iterator++))
|
||||||
|
{
|
||||||
|
if (key->type == Key::FOREIGN_KEY)
|
||||||
|
{
|
||||||
|
TABLE_LIST parent_table;
|
||||||
|
bool is_qualified_table_name;
|
||||||
|
Foreign_key *fk_key= (Foreign_key *)key;
|
||||||
|
LEX_STRING db_name;
|
||||||
|
LEX_STRING table_name= { fk_key->ref_table->table.str,
|
||||||
|
fk_key->ref_table->table.length };
|
||||||
|
const ulong privileges= (SELECT_ACL | INSERT_ACL | UPDATE_ACL |
|
||||||
|
DELETE_ACL | REFERENCES_ACL);
|
||||||
|
|
||||||
|
// Check if tablename is valid or not.
|
||||||
|
DBUG_ASSERT(table_name.str != NULL);
|
||||||
|
if (check_table_name(table_name.str, table_name.length, false))
|
||||||
|
{
|
||||||
|
my_error(ER_WRONG_TABLE_NAME, MYF(0), table_name.str);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fk_key->ref_table->db.str)
|
||||||
|
{
|
||||||
|
is_qualified_table_name= true;
|
||||||
|
db_name.str= (char *) thd->memdup(fk_key->ref_table->db.str,
|
||||||
|
fk_key->ref_table->db.length+1);
|
||||||
|
db_name.length= fk_key->ref_table->db.length;
|
||||||
|
|
||||||
|
// Check if database name is valid or not.
|
||||||
|
if (fk_key->ref_table->db.str && check_db_name(&db_name))
|
||||||
|
{
|
||||||
|
my_error(ER_WRONG_DB_NAME, MYF(0), db_name.str);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (thd->lex->copy_db_to(&db_name.str, &db_name.length))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
is_qualified_table_name= false;
|
||||||
|
|
||||||
|
// if lower_case_table_names is set then convert tablename to lower case.
|
||||||
|
if (lower_case_table_names)
|
||||||
|
{
|
||||||
|
table_name.str= (char *) thd->memdup(fk_key->ref_table->table.str,
|
||||||
|
fk_key->ref_table->table.length+1);
|
||||||
|
table_name.length= my_casedn_str(files_charset_info, table_name.str);
|
||||||
|
}
|
||||||
|
|
||||||
|
parent_table.init_one_table(db_name.str, db_name.length,
|
||||||
|
table_name.str, table_name.length,
|
||||||
|
table_name.str, TL_IGNORE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check if user has any of the "privileges" at table level on
|
||||||
|
"parent_table".
|
||||||
|
Having privilege on any of the parent_table column is not
|
||||||
|
enough so checking whether user has any of the "privileges"
|
||||||
|
at table level only here.
|
||||||
|
*/
|
||||||
|
if (check_some_access(thd, privileges, &parent_table) ||
|
||||||
|
parent_table.grant.want_privilege)
|
||||||
|
{
|
||||||
|
if (is_qualified_table_name)
|
||||||
|
{
|
||||||
|
const size_t qualified_table_name_len= NAME_LEN + 1 + NAME_LEN + 1;
|
||||||
|
char *qualified_table_name= (char *) thd->alloc(qualified_table_name_len);
|
||||||
|
|
||||||
|
my_snprintf(qualified_table_name, qualified_table_name_len, "%s.%s",
|
||||||
|
db_name.str, table_name.str);
|
||||||
|
table_name.str= qualified_table_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0),
|
||||||
|
"REFERENCES",
|
||||||
|
thd->security_ctx->priv_user,
|
||||||
|
thd->security_ctx->host_or_ip,
|
||||||
|
table_name.str);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Check stack size; Send error if there isn't enough stack to continue
|
Check stack size; Send error if there isn't enough stack to continue
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -7347,8 +7456,11 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
|||||||
if (check_table_access(thd, SELECT_ACL, tables, FALSE, UINT_MAX, FALSE))
|
if (check_table_access(thd, SELECT_ACL, tables, FALSE, UINT_MAX, FALSE))
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
error= FALSE;
|
|
||||||
|
|
||||||
|
if (check_fk_parent_table_access(thd, &lex->create_info, &lex->alter_info))
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
error= FALSE;
|
||||||
err:
|
err:
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,9 @@ bool delete_precheck(THD *thd, TABLE_LIST *tables);
|
|||||||
bool insert_precheck(THD *thd, TABLE_LIST *tables);
|
bool insert_precheck(THD *thd, TABLE_LIST *tables);
|
||||||
bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
||||||
TABLE_LIST *create_table);
|
TABLE_LIST *create_table);
|
||||||
|
bool check_fk_parent_table_access(THD *thd,
|
||||||
|
HA_CREATE_INFO *create_info,
|
||||||
|
Alter_info *alter_info);
|
||||||
|
|
||||||
bool parse_sql(THD *thd,
|
bool parse_sql(THD *thd,
|
||||||
Parser_state *parser_state,
|
Parser_state *parser_state,
|
||||||
|
@ -6245,6 +6245,18 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
If foreign key is added then check permission to access parent table.
|
||||||
|
|
||||||
|
In function "check_fk_parent_table_access", create_info->db_type is used
|
||||||
|
to identify whether engine supports FK constraint or not. Since
|
||||||
|
create_info->db_type is set here, check to parent table access is delayed
|
||||||
|
till this point for the alter operation.
|
||||||
|
*/
|
||||||
|
if ((alter_info->flags & ALTER_FOREIGN_KEY) &&
|
||||||
|
check_fk_parent_table_access(thd, create_info, alter_info))
|
||||||
|
goto err;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If this is an ALTER TABLE and no explicit row type specified reuse
|
If this is an ALTER TABLE and no explicit row type specified reuse
|
||||||
the table's row type.
|
the table's row type.
|
||||||
|
@ -2650,13 +2650,13 @@ static Sys_var_bit Sys_log_off(
|
|||||||
static bool fix_sql_log_bin_after_update(sys_var *self, THD *thd,
|
static bool fix_sql_log_bin_after_update(sys_var *self, THD *thd,
|
||||||
enum_var_type type)
|
enum_var_type type)
|
||||||
{
|
{
|
||||||
if (type == OPT_SESSION)
|
DBUG_ASSERT(type == OPT_SESSION);
|
||||||
{
|
|
||||||
if (thd->variables.sql_log_bin)
|
if (thd->variables.sql_log_bin)
|
||||||
thd->variables.option_bits |= OPTION_BIN_LOG;
|
thd->variables.option_bits |= OPTION_BIN_LOG;
|
||||||
else
|
else
|
||||||
thd->variables.option_bits &= ~OPTION_BIN_LOG;
|
thd->variables.option_bits &= ~OPTION_BIN_LOG;
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2678,7 +2678,10 @@ static bool check_sql_log_bin(sys_var *self, THD *thd, set_var *var)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if (var->type == OPT_GLOBAL)
|
if (var->type == OPT_GLOBAL)
|
||||||
return FALSE;
|
{
|
||||||
|
my_error(ER_INCORRECT_GLOBAL_LOCAL_VAR, MYF(0), self->name.str, "SESSION");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (error_if_in_trans_or_substatement(thd,
|
if (error_if_in_trans_or_substatement(thd,
|
||||||
ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN,
|
ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN,
|
||||||
@ -2689,9 +2692,9 @@ static bool check_sql_log_bin(sys_var *self, THD *thd, set_var *var)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Sys_var_mybool Sys_log_binlog(
|
static Sys_var_mybool Sys_log_binlog(
|
||||||
"sql_log_bin", "sql_log_bin",
|
"sql_log_bin", "Controls whether logging to the binary log is done",
|
||||||
SESSION_VAR(sql_log_bin), NO_CMD_LINE,
|
SESSION_VAR(sql_log_bin), NO_CMD_LINE, DEFAULT(TRUE),
|
||||||
DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_sql_log_bin),
|
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_sql_log_bin),
|
||||||
ON_UPDATE(fix_sql_log_bin_after_update));
|
ON_UPDATE(fix_sql_log_bin_after_update));
|
||||||
|
|
||||||
static Sys_var_bit Sys_sql_warnings(
|
static Sys_var_bit Sys_sql_warnings(
|
||||||
|
@ -295,6 +295,14 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
|
|||||||
ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c
|
ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c
|
||||||
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c ut/ut0bh.c)
|
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c ut/ut0bh.c)
|
||||||
|
|
||||||
|
# These files have unused result errors, so we skip Werror
|
||||||
|
CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR)
|
||||||
|
IF(HAVE_WERROR)
|
||||||
|
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
||||||
|
ADD_COMPILE_FLAGS(page/page0zip.c COMPILE_FLAGS "-Wno-error")
|
||||||
|
ADD_COMPILE_FLAGS(ut/ut0ut.c COMPILE_FLAGS "-Wno-error")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_INNODB)
|
IF(WITH_INNODB)
|
||||||
# Legacy option
|
# Legacy option
|
||||||
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
|
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
|
||||||
|
@ -42,6 +42,12 @@ UNIV_INTERN dict_index_t* dict_ind_compact;
|
|||||||
UNIV_INTERN uint ibuf_debug;
|
UNIV_INTERN uint ibuf_debug;
|
||||||
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
Issue a warning that the row is too big. */
|
||||||
|
void
|
||||||
|
ib_warn_row_too_big(const dict_table_t* table);
|
||||||
|
|
||||||
|
|
||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
#include "buf0buf.h"
|
#include "buf0buf.h"
|
||||||
#include "data0type.h"
|
#include "data0type.h"
|
||||||
@ -1765,11 +1771,18 @@ dict_index_add_to_cache(
|
|||||||
|
|
||||||
new_index->n_fields = new_index->n_def;
|
new_index->n_fields = new_index->n_def;
|
||||||
|
|
||||||
if (strict && dict_index_too_big_for_tree(table, new_index)) {
|
if (dict_index_too_big_for_tree(table, new_index)) {
|
||||||
|
|
||||||
|
if (strict) {
|
||||||
too_big:
|
too_big:
|
||||||
dict_mem_index_free(new_index);
|
dict_mem_index_free(new_index);
|
||||||
dict_mem_index_free(index);
|
dict_mem_index_free(index);
|
||||||
return(DB_TOO_BIG_RECORD);
|
return(DB_TOO_BIG_RECORD);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
ib_warn_row_too_big(table);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UNIV_UNLIKELY(index->type & DICT_UNIVERSAL)) {
|
if (UNIV_UNLIKELY(index->type & DICT_UNIVERSAL)) {
|
||||||
@ -2516,8 +2529,15 @@ dict_foreign_remove_from_cache(
|
|||||||
foreign);
|
foreign);
|
||||||
|
|
||||||
rbt = foreign->referenced_table->referenced_rbt;
|
rbt = foreign->referenced_table->referenced_rbt;
|
||||||
|
|
||||||
if (rbt != NULL) {
|
if (rbt != NULL) {
|
||||||
rbt_delete(rbt, foreign->id);
|
const ib_rbt_node_t* node
|
||||||
|
= rbt_lookup(rbt, foreign->id);
|
||||||
|
dict_foreign_t* val = *(dict_foreign_t**) node->value;
|
||||||
|
|
||||||
|
if (val == foreign) {
|
||||||
|
rbt_delete(rbt, foreign->id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2530,7 +2550,13 @@ dict_foreign_remove_from_cache(
|
|||||||
rbt = foreign->foreign_table->foreign_rbt;
|
rbt = foreign->foreign_table->foreign_rbt;
|
||||||
|
|
||||||
if (rbt != NULL) {
|
if (rbt != NULL) {
|
||||||
rbt_delete(rbt, foreign->id);
|
const ib_rbt_node_t* node
|
||||||
|
= rbt_lookup(rbt, foreign->id);
|
||||||
|
dict_foreign_t* val = *(dict_foreign_t**) node->value;
|
||||||
|
|
||||||
|
if (val == foreign) {
|
||||||
|
rbt_delete(rbt, foreign->id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5485,11 +5511,11 @@ dict_set_corrupted(
|
|||||||
|
|
||||||
dict_index_copy_types(tuple, sys_index, 2);
|
dict_index_copy_types(tuple, sys_index, 2);
|
||||||
|
|
||||||
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_GE,
|
btr_cur_search_to_nth_level(sys_index, 0, tuple, PAGE_CUR_LE,
|
||||||
BTR_MODIFY_LEAF,
|
BTR_MODIFY_LEAF,
|
||||||
&cursor, 0, __FILE__, __LINE__, &mtr);
|
&cursor, 0, __FILE__, __LINE__, &mtr);
|
||||||
|
|
||||||
if (cursor.up_match == dtuple_get_n_fields(tuple)) {
|
if (cursor.low_match == dtuple_get_n_fields(tuple)) {
|
||||||
/* UPDATE SYS_INDEXES SET TYPE=index->type
|
/* UPDATE SYS_INDEXES SET TYPE=index->type
|
||||||
WHERE TABLE_ID=index->table->id AND INDEX_ID=index->id */
|
WHERE TABLE_ID=index->table->id AND INDEX_ID=index->id */
|
||||||
ulint len;
|
ulint len;
|
||||||
|
@ -2261,7 +2261,7 @@ innobase_init(
|
|||||||
innobase_hton->start_consistent_snapshot=innobase_start_trx_and_assign_read_view;
|
innobase_hton->start_consistent_snapshot=innobase_start_trx_and_assign_read_view;
|
||||||
innobase_hton->flush_logs=innobase_flush_logs;
|
innobase_hton->flush_logs=innobase_flush_logs;
|
||||||
innobase_hton->show_status=innobase_show_status;
|
innobase_hton->show_status=innobase_show_status;
|
||||||
innobase_hton->flags=HTON_EXTENDED_KEYS;
|
innobase_hton->flags=HTON_EXTENDED_KEYS | HTON_SUPPORTS_FOREIGN_KEYS;
|
||||||
innobase_hton->release_temporary_latches=innobase_release_temporary_latches;
|
innobase_hton->release_temporary_latches=innobase_release_temporary_latches;
|
||||||
innobase_hton->alter_table_flags = innobase_alter_table_flags;
|
innobase_hton->alter_table_flags = innobase_alter_table_flags;
|
||||||
innobase_hton->kill_query = innobase_kill_query;
|
innobase_hton->kill_query = innobase_kill_query;
|
||||||
@ -9331,6 +9331,7 @@ ha_innobase::start_stmt(
|
|||||||
thr_lock_type lock_type)
|
thr_lock_type lock_type)
|
||||||
{
|
{
|
||||||
trx_t* trx;
|
trx_t* trx;
|
||||||
|
DBUG_ENTER("ha_innobase::start_stmt");
|
||||||
|
|
||||||
update_thd(thd);
|
update_thd(thd);
|
||||||
|
|
||||||
@ -9353,6 +9354,28 @@ ha_innobase::start_stmt(
|
|||||||
prebuilt->hint_need_to_fetch_extra_cols = 0;
|
prebuilt->hint_need_to_fetch_extra_cols = 0;
|
||||||
reset_template(prebuilt);
|
reset_template(prebuilt);
|
||||||
|
|
||||||
|
if (dict_table_is_temporary(prebuilt->table)
|
||||||
|
&& prebuilt->mysql_has_locked
|
||||||
|
&& prebuilt->select_lock_type == LOCK_NONE) {
|
||||||
|
ulint error;
|
||||||
|
|
||||||
|
switch (thd_sql_command(thd)) {
|
||||||
|
case SQLCOM_INSERT:
|
||||||
|
case SQLCOM_UPDATE:
|
||||||
|
case SQLCOM_DELETE:
|
||||||
|
init_table_handle_for_HANDLER();
|
||||||
|
prebuilt->select_lock_type = LOCK_X;
|
||||||
|
error = row_lock_table_for_mysql(prebuilt, NULL, 1);
|
||||||
|
|
||||||
|
if (error != DB_SUCCESS) {
|
||||||
|
error = convert_error_code_to_mysql(
|
||||||
|
(int) error, 0, thd);
|
||||||
|
DBUG_RETURN((int) error);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!prebuilt->mysql_has_locked) {
|
if (!prebuilt->mysql_has_locked) {
|
||||||
/* This handle is for a temporary table created inside
|
/* This handle is for a temporary table created inside
|
||||||
this same LOCK TABLES; since MySQL does NOT call external_lock
|
this same LOCK TABLES; since MySQL does NOT call external_lock
|
||||||
@ -9385,7 +9408,7 @@ ha_innobase::start_stmt(
|
|||||||
|
|
||||||
innobase_register_trx(ht, thd, trx);
|
innobase_register_trx(ht, thd, trx);
|
||||||
|
|
||||||
return(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************//**
|
/******************************************************************//**
|
||||||
@ -12232,3 +12255,30 @@ innobase_convert_to_filename_charset(
|
|||||||
|
|
||||||
return(strconvert(cs_from, from, cs_to, to, len, &errors));
|
return(strconvert(cs_from, from, cs_to, to, len, &errors));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
Issue a warning that the row is too big. */
|
||||||
|
extern "C"
|
||||||
|
void
|
||||||
|
ib_warn_row_too_big(const dict_table_t* table)
|
||||||
|
{
|
||||||
|
/* If prefix is true then a 768-byte prefix is stored
|
||||||
|
locally for BLOB fields. Refer to dict_table_get_format() */
|
||||||
|
const bool prefix = ((table->flags & DICT_TF_FORMAT_MASK)
|
||||||
|
>> DICT_TF_FORMAT_SHIFT) < UNIV_FORMAT_B;
|
||||||
|
|
||||||
|
const ulint free_space = page_get_free_space_of_empty(
|
||||||
|
table->flags & DICT_TF_COMPACT) / 2;
|
||||||
|
|
||||||
|
THD* thd = current_thd;
|
||||||
|
|
||||||
|
push_warning_printf(
|
||||||
|
thd, MYSQL_ERROR::WARN_LEVEL_WARN, HA_ERR_TO_BIG_ROW,
|
||||||
|
"Row size too large (> %lu). Changing some columns to TEXT"
|
||||||
|
" or BLOB %smay help. In current row format, BLOB prefix of"
|
||||||
|
" %d bytes is stored inline.", free_space
|
||||||
|
, prefix ? "or using ROW_FORMAT=DYNAMIC or"
|
||||||
|
" ROW_FORMAT=COMPRESSED ": ""
|
||||||
|
, prefix ? DICT_MAX_FIXED_COL_LEN : 0);
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
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
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -28,7 +28,7 @@ Created 10/16/1994 Heikki Tuuri
|
|||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)\
|
# define LIMIT_OPTIMISTIC_INSERT_DEBUG(NREC, CODE)\
|
||||||
if (btr_cur_limit_optimistic_insert_debug\
|
if (btr_cur_limit_optimistic_insert_debug > 1\
|
||||||
&& (NREC) >= (ulint)btr_cur_limit_optimistic_insert_debug) {\
|
&& (NREC) >= (ulint)btr_cur_limit_optimistic_insert_debug) {\
|
||||||
CODE;\
|
CODE;\
|
||||||
}
|
}
|
||||||
|
@ -1375,6 +1375,14 @@ dict_table_init_referenced_rbt(
|
|||||||
/*===========================*/
|
/*===========================*/
|
||||||
dict_table_t* table); /*!< in: the table object whose
|
dict_table_t* table); /*!< in: the table object whose
|
||||||
table->referenced_rbt will be initialized */
|
table->referenced_rbt will be initialized */
|
||||||
|
/********************************************************************//**
|
||||||
|
Check if it is a temporary table.
|
||||||
|
@return true if temporary table flag is set. */
|
||||||
|
UNIV_INLINE
|
||||||
|
ibool
|
||||||
|
dict_table_is_temporary(
|
||||||
|
/*====================*/
|
||||||
|
const dict_table_t* table); /*!< in: table to check */
|
||||||
|
|
||||||
#ifndef UNIV_NONINL
|
#ifndef UNIV_NONINL
|
||||||
#include "dict0dict.ic"
|
#include "dict0dict.ic"
|
||||||
|
@ -1004,3 +1004,15 @@ dict_table_init_referenced_rbt(
|
|||||||
ut_a(table->referenced_rbt != NULL);
|
ut_a(table->referenced_rbt != NULL);
|
||||||
return(table->referenced_rbt);
|
return(table->referenced_rbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************************************************************//**
|
||||||
|
Check if it is a temporary table.
|
||||||
|
@return true if temporary table flag is set. */
|
||||||
|
UNIV_INLINE
|
||||||
|
ibool
|
||||||
|
dict_table_is_temporary(
|
||||||
|
/*====================*/
|
||||||
|
const dict_table_t* table) /*!< in: table to check */
|
||||||
|
{
|
||||||
|
return(table->flags & (DICT_TF2_TEMPORARY << DICT_TF2_SHIFT));
|
||||||
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All Rights Reserved.
|
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
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
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@ -3089,6 +3089,9 @@ row_drop_table_for_mysql(
|
|||||||
ulint namelen;
|
ulint namelen;
|
||||||
ibool locked_dictionary = FALSE;
|
ibool locked_dictionary = FALSE;
|
||||||
pars_info_t* info = NULL;
|
pars_info_t* info = NULL;
|
||||||
|
DBUG_ENTER("row_drop_table_for_mysql");
|
||||||
|
|
||||||
|
DBUG_PRINT("row_drop_table_for_mysql", ("table: %s", name));
|
||||||
|
|
||||||
ut_a(name != NULL);
|
ut_a(name != NULL);
|
||||||
|
|
||||||
@ -3099,7 +3102,7 @@ row_drop_table_for_mysql(
|
|||||||
"InnoDB: Shut down mysqld and edit my.cnf so that newraw"
|
"InnoDB: Shut down mysqld and edit my.cnf so that newraw"
|
||||||
" is replaced with raw.\n", stderr);
|
" is replaced with raw.\n", stderr);
|
||||||
|
|
||||||
return(DB_ERROR);
|
DBUG_RETURN(DB_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
trx->op_info = "dropping table";
|
trx->op_info = "dropping table";
|
||||||
@ -3504,7 +3507,7 @@ funct_exit:
|
|||||||
|
|
||||||
srv_wake_master_thread();
|
srv_wake_master_thread();
|
||||||
|
|
||||||
return((int) err);
|
DBUG_RETURN((int) err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2003, 2005, 2006 MySQL AB
|
# Copyright (c) 2003, 2005, 2006 MySQL AB
|
||||||
# Use is subject to license terms
|
# Use is subject to license terms
|
||||||
|
#
|
||||||
# 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 Library General Public
|
# modify it under the terms of the GNU Library General Public
|
||||||
# License as published by the Free Software Foundation; version 2
|
# License as published by the Free Software Foundation; version 2
|
||||||
|
@ -17,6 +17,13 @@ IF(NOT LIBJEMALLOC)
|
|||||||
MESSAGE(WARNING "TokuDB is enabled, but jemalloc is not. This configuration is not supported")
|
MESSAGE(WARNING "TokuDB is enabled, but jemalloc is not. This configuration is not supported")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF (HAVE_WVLA)
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-vla")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla")
|
||||||
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-vla")
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-vla")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
############################################
|
############################################
|
||||||
SET(TOKUDB_VERSION "tokudb-7.5.3")
|
SET(TOKUDB_VERSION "tokudb-7.5.3")
|
||||||
SET(TOKUDB_DEB_FILES "usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-5.5/README-TOKUDB\nusr/share/doc/mariadb-server-5.5/README.md" PARENT_SCOPE)
|
SET(TOKUDB_DEB_FILES "usr/lib/mysql/plugin/ha_tokudb.so\netc/mysql/conf.d/tokudb.cnf\nusr/bin/tokuftdump\nusr/share/doc/mariadb-server-5.5/README-TOKUDB\nusr/share/doc/mariadb-server-5.5/README.md" PARENT_SCOPE)
|
||||||
|
@ -499,12 +499,14 @@ mkdir debug
|
|||||||
# Attempt to remove any optimisation flags from the debug build
|
# Attempt to remove any optimisation flags from the debug build
|
||||||
CFLAGS=`echo " ${CFLAGS} " | \
|
CFLAGS=`echo " ${CFLAGS} " | \
|
||||||
sed -e 's/ -O[0-9]* / /' \
|
sed -e 's/ -O[0-9]* / /' \
|
||||||
|
-e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \
|
||||||
-e 's/ -unroll2 / /' \
|
-e 's/ -unroll2 / /' \
|
||||||
-e 's/ -ip / /' \
|
-e 's/ -ip / /' \
|
||||||
-e 's/^ //' \
|
-e 's/^ //' \
|
||||||
-e 's/ $//'`
|
-e 's/ $//'`
|
||||||
CXXFLAGS=`echo " ${CXXFLAGS} " | \
|
CXXFLAGS=`echo " ${CXXFLAGS} " | \
|
||||||
sed -e 's/ -O[0-9]* / /' \
|
sed -e 's/ -O[0-9]* / /' \
|
||||||
|
-e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \
|
||||||
-e 's/ -unroll2 / /' \
|
-e 's/ -unroll2 / /' \
|
||||||
-e 's/ -ip / /' \
|
-e 's/ -ip / /' \
|
||||||
-e 's/^ //' \
|
-e 's/^ //' \
|
||||||
@ -1288,7 +1290,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
* Fri Aug 19 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
|
* Fri Aug 19 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
|
||||||
|
|
||||||
- Null-upmerge the fix of bug#37165: This spec file is not affected.
|
- Null-upmerge the fix of bug#37165: This spec file is not affected.
|
||||||
- Replace "/var/lib/mysql" by the spec file variable "%{mysqldatadir}".
|
- Replace "/var/lib/mysql" by the spec file variable "%%{mysqldatadir}".
|
||||||
|
|
||||||
* Fri Aug 12 2011 Daniel Fischer <daniel.fischer@oracle.com>
|
* Fri Aug 12 2011 Daniel Fischer <daniel.fischer@oracle.com>
|
||||||
|
|
||||||
@ -1309,7 +1311,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
not in an RPM upgrade.
|
not in an RPM upgrade.
|
||||||
This affects both the "mkdir" and the call of "mysql_install_db".
|
This affects both the "mkdir" and the call of "mysql_install_db".
|
||||||
|
|
||||||
* Thu Feb 09 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
|
* Wed Feb 09 2011 Joerg Bruehe <joerg.bruehe@oracle.com>
|
||||||
|
|
||||||
- Fix bug#56581: If an installation deviates from the default file locations
|
- Fix bug#56581: If an installation deviates from the default file locations
|
||||||
("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade)
|
("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade)
|
||||||
@ -1430,7 +1432,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
- Fix some problems with the directives around "tcmalloc" (experimental),
|
- Fix some problems with the directives around "tcmalloc" (experimental),
|
||||||
remove erroneous traces of the InnoDB plugin (that is 5.1 only).
|
remove erroneous traces of the InnoDB plugin (that is 5.1 only).
|
||||||
|
|
||||||
* Fri Oct 06 2009 Magnus Blaudd <mvensson@mysql.com>
|
* Tue Oct 06 2009 Magnus Blaudd <mvensson@mysql.com>
|
||||||
|
|
||||||
- Removed mysql_fix_privilege_tables
|
- Removed mysql_fix_privilege_tables
|
||||||
|
|
||||||
@ -1548,7 +1550,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
|
|
||||||
* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
|
* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
|
||||||
|
|
||||||
- Call "make install" using "benchdir_root=%{_datadir}",
|
- Call "make install" using "benchdir_root=%%{_datadir}",
|
||||||
because that is affecting the regression test suite as well.
|
because that is affecting the regression test suite as well.
|
||||||
|
|
||||||
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
|
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
|
||||||
@ -1627,7 +1629,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
|
|
||||||
- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS
|
- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS
|
||||||
|
|
||||||
* Wed Mar 07 2006 Kent Boortz <kent@mysql.com>
|
* Tue Mar 07 2006 Kent Boortz <kent@mysql.com>
|
||||||
|
|
||||||
- Changed product name from "Community Edition" to "Community Server"
|
- Changed product name from "Community Edition" to "Community Server"
|
||||||
|
|
||||||
@ -1665,7 +1667,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
- Added zlib to the list of (static) libraries installed
|
- Added zlib to the list of (static) libraries installed
|
||||||
- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld)
|
- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld)
|
||||||
- Compile MySQL with bundled zlib
|
- Compile MySQL with bundled zlib
|
||||||
- Fixed %packager name to "MySQL Production Engineering Team"
|
- Fixed %%packager name to "MySQL Production Engineering Team"
|
||||||
|
|
||||||
* Mon Dec 05 2005 Joerg Bruehe <joerg@mysql.com>
|
* Mon Dec 05 2005 Joerg Bruehe <joerg@mysql.com>
|
||||||
|
|
||||||
@ -1815,7 +1817,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
- ISAM and merge storage engines were purged. As well as appropriate
|
- ISAM and merge storage engines were purged. As well as appropriate
|
||||||
tools and manpages (isamchk and isamlog)
|
tools and manpages (isamchk and isamlog)
|
||||||
|
|
||||||
* Thu Dec 31 2004 Lenz Grimmer <lenz@mysql.com>
|
* Fri Dec 31 2004 Lenz Grimmer <lenz@mysql.com>
|
||||||
|
|
||||||
- enabled the "Archive" storage engine for the max binary
|
- enabled the "Archive" storage engine for the max binary
|
||||||
- enabled the "CSV" storage engine for the max binary
|
- enabled the "CSV" storage engine for the max binary
|
||||||
@ -1875,7 +1877,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
|
|
||||||
- marked /etc/logrotate.d/mysql as a config file (BUG 2156)
|
- marked /etc/logrotate.d/mysql as a config file (BUG 2156)
|
||||||
|
|
||||||
* Fri Dec 13 2003 Lenz Grimmer <lenz@mysql.com>
|
* Sat Dec 13 2003 Lenz Grimmer <lenz@mysql.com>
|
||||||
|
|
||||||
- fixed file permissions (BUG 1672)
|
- fixed file permissions (BUG 1672)
|
||||||
|
|
||||||
@ -2017,7 +2019,7 @@ echo "=====" >> $STATUS_HISTORY
|
|||||||
- Added separate libmysql_r directory; now both a threaded
|
- Added separate libmysql_r directory; now both a threaded
|
||||||
and non-threaded library is shipped.
|
and non-threaded library is shipped.
|
||||||
|
|
||||||
* Wed Sep 28 1999 David Axmark <davida@mysql.com>
|
* Tue Sep 28 1999 David Axmark <davida@mysql.com>
|
||||||
|
|
||||||
- Added the support-files/my-example.cnf to the docs directory.
|
- Added the support-files/my-example.cnf to the docs directory.
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2001, 2006 MySQL AB
|
# Copyright (c) 2001, 2006 MySQL AB
|
||||||
# Use is subject to license terms
|
# 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
|
||||||
# the Free Software Foundation; version 2 of the License.
|
# the Free Software Foundation; version 2 of the License.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Copyright (c) 2002, 2003, 2005, 2006 MySQL AB
|
# Copyright (c) 2002, 2003, 2005, 2006 MySQL AB
|
||||||
# Use is subject to license terms
|
# 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
|
||||||
# the Free Software Foundation; version 2 of the License.
|
# the Free Software Foundation; version 2 of the License.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user