5.5.39 merge
This commit is contained in:
commit
6fb17a0601
@ -26,6 +26,14 @@ IF(POLICY CMP0022)
|
||||
CMAKE_POLICY(SET CMP0022 OLD)
|
||||
ENDIF()
|
||||
|
||||
# We use the LOCATION target property (CMP0026)
|
||||
# and get_target_property() for non-existent targets (CMP0045)
|
||||
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
|
||||
CMAKE_VERSION VERSION_GREATER "3.0.0")
|
||||
CMAKE_POLICY(SET CMP0026 OLD)
|
||||
CMAKE_POLICY(SET CMP0045 OLD)
|
||||
ENDIF()
|
||||
|
||||
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||
@ -441,7 +449,6 @@ IF(NOT WITHOUT_SERVER)
|
||||
IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
|
||||
ADD_SUBDIRECTORY(internal)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(packaging/rpm-uln)
|
||||
ADD_SUBDIRECTORY(packaging/rpm-oel)
|
||||
ENDIF()
|
||||
|
||||
|
4
VERSION
4
VERSION
@ -1,7 +1,3 @@
|
||||
# Version number for MariaDB is maintained here.
|
||||
# The version string is created from:
|
||||
# MYSQL_VERSION_MAJOR.MYSQL_VERSION_MINOR.MYSQL_VERSION_PATCH-MYSQL_VERSION_EXTRA
|
||||
#
|
||||
MYSQL_VERSION_MAJOR=10
|
||||
MYSQL_VERSION_MINOR=0
|
||||
MYSQL_VERSION_PATCH=13
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2012, Monty Program Ab.
|
||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2014, Monty Program Ab.
|
||||
|
||||
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
|
||||
@ -71,6 +71,7 @@ extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
|
||||
char *argument);
|
||||
static my_bool sql_connect(MYSQL *mysql, uint wait);
|
||||
static int execute_commands(MYSQL *mysql,int argc, char **argv);
|
||||
static char **mask_password(int argc, char ***argv);
|
||||
static int drop_db(MYSQL *mysql,const char *db);
|
||||
extern "C" sig_handler endprog(int signal_number);
|
||||
static void nice_time(ulong sec,char *buff);
|
||||
@ -306,9 +307,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
int error= 0;
|
||||
int error= 0, temp_argc;
|
||||
MYSQL mysql;
|
||||
char **commands, **save_argv;
|
||||
char **commands, **save_argv, **temp_argv;
|
||||
|
||||
MY_INIT(argv[0]);
|
||||
mysql_init(&mysql);
|
||||
@ -316,8 +317,12 @@ int main(int argc,char *argv[])
|
||||
if ((error= load_defaults("my",load_default_groups,&argc,&argv)))
|
||||
goto err1;
|
||||
save_argv = argv; /* Save for free_defaults */
|
||||
|
||||
if ((error=handle_options(&argc, &argv, my_long_options, get_one_option)))
|
||||
goto err2;
|
||||
temp_argv= mask_password(argc, &argv);
|
||||
temp_argc= argc;
|
||||
|
||||
if (debug_info_flag)
|
||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||
if (debug_check_flag)
|
||||
@ -328,7 +333,7 @@ int main(int argc,char *argv[])
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
commands = argv;
|
||||
commands = temp_argv;
|
||||
if (tty_password)
|
||||
opt_password = get_tty_password(NullS);
|
||||
|
||||
@ -475,6 +480,13 @@ int main(int argc,char *argv[])
|
||||
} /* got connection */
|
||||
|
||||
mysql_close(&mysql);
|
||||
temp_argc--;
|
||||
while(temp_argc >= 0)
|
||||
{
|
||||
my_free(temp_argv[temp_argc]);
|
||||
temp_argc--;
|
||||
}
|
||||
my_free(temp_argv);
|
||||
err2:
|
||||
mysql_library_end();
|
||||
my_free(opt_password);
|
||||
@ -1216,6 +1228,47 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Masking the password if it is passed as command line argument.
|
||||
|
||||
@details It works in Linux and changes cmdline in ps and /proc/pid/cmdline,
|
||||
but it won't work for history file of shell.
|
||||
The command line arguments are copied to another array and the
|
||||
password in the argv is masked. This function is called just after
|
||||
"handle_options" because in "handle_options", the agrv pointers
|
||||
are altered which makes freeing of dynamically allocated memory
|
||||
difficult. The password masking is done before all other operations
|
||||
in order to minimise the time frame of password visibility via cmdline.
|
||||
|
||||
@param argc command line options (count)
|
||||
@param argv command line options (values)
|
||||
|
||||
@return temp_argv copy of argv
|
||||
*/
|
||||
|
||||
static char **mask_password(int argc, char ***argv)
|
||||
{
|
||||
char **temp_argv;
|
||||
temp_argv= (char **)(my_malloc(sizeof(char *) * argc, MYF(MY_WME)));
|
||||
argc--;
|
||||
while (argc > 0)
|
||||
{
|
||||
temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE));
|
||||
if (find_type((*argv)[argc - 1],&command_typelib, FIND_TYPE_BASIC) == ADMIN_PASSWORD ||
|
||||
find_type((*argv)[argc - 1],&command_typelib, FIND_TYPE_BASIC) == ADMIN_OLD_PASSWORD)
|
||||
{
|
||||
char *start= (*argv)[argc];
|
||||
while (*start)
|
||||
*start++= 'x';
|
||||
start= (*argv)[argc];
|
||||
if (*start)
|
||||
start[1]= 0; /* Cut length of argument */
|
||||
}
|
||||
argc--;
|
||||
}
|
||||
temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE));
|
||||
return(temp_argv);
|
||||
}
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
|
@ -5910,19 +5910,36 @@ int main(int argc, char **argv)
|
||||
dump_all_tablespaces();
|
||||
dump_all_databases();
|
||||
}
|
||||
else if (argc > 1 && !opt_databases)
|
||||
{
|
||||
/* Only one database and selected table(s) */
|
||||
if (!opt_alltspcs && !opt_notspcs)
|
||||
dump_tablespaces_for_tables(*argv, (argv + 1), (argc -1));
|
||||
dump_selected_tables(*argv, (argv + 1), (argc - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* One or more databases, all tables */
|
||||
if (!opt_alltspcs && !opt_notspcs)
|
||||
dump_tablespaces_for_databases(argv);
|
||||
dump_databases(argv);
|
||||
// Check all arguments meet length condition. Currently database and table
|
||||
// names are limited to NAME_LEN bytes and stack-based buffers assumes
|
||||
// that escaped name will be not longer than NAME_LEN*2 + 2 bytes long.
|
||||
int argument;
|
||||
for (argument= 0; argument < argc; argument++)
|
||||
{
|
||||
size_t argument_length= strlen(argv[argument]);
|
||||
if (argument_length > NAME_LEN)
|
||||
{
|
||||
die(EX_CONSCHECK, "[ERROR] Argument '%s' is too long, it cannot be "
|
||||
"name for any table or database.\n", argv[argument]);
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 1 && !opt_databases)
|
||||
{
|
||||
/* Only one database and selected table(s) */
|
||||
if (!opt_alltspcs && !opt_notspcs)
|
||||
dump_tablespaces_for_tables(*argv, (argv + 1), (argc - 1));
|
||||
dump_selected_tables(*argv, (argv + 1), (argc - 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* One or more databases, all tables */
|
||||
if (!opt_alltspcs && !opt_notspcs)
|
||||
dump_tablespaces_for_databases(argv);
|
||||
dump_databases(argv);
|
||||
}
|
||||
}
|
||||
|
||||
/* add 'START SLAVE' to end of dump */
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 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
|
||||
@ -80,13 +80,6 @@ IF(ENABLE_DTRACE)
|
||||
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
|
||||
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
|
||||
)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# Systemtap object
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
|
||||
-o ${CMAKE_BINARY_DIR}/probes_mysql.o
|
||||
)
|
||||
ENDIF()
|
||||
ADD_CUSTOM_TARGET(gen_dtrace_header
|
||||
DEPENDS
|
||||
${CMAKE_BINARY_DIR}/include/probes_mysql.d
|
||||
@ -105,12 +98,7 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
||||
IF(ENABLE_DTRACE)
|
||||
ADD_DEPENDENCIES(${target} gen_dtrace_header)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
TARGET_LINK_LIBRARIES(${target} ${CMAKE_BINARY_DIR}/probes_mysql.o)
|
||||
ENDIF()
|
||||
|
||||
# On Solaris, invoke dtrace -G to generate object file and
|
||||
# link it together with target.
|
||||
# Invoke dtrace to generate object file and link it together with target.
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||
SET(objdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
|
||||
SET(outfile ${objdir}/${target}_dtrace.o)
|
||||
@ -127,6 +115,21 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
||||
-P ${CMAKE_SOURCE_DIR}/cmake/dtrace_prelink.cmake
|
||||
WORKING_DIRECTORY ${objdir}
|
||||
)
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# dtrace on Linux runs gcc and uses flags from environment
|
||||
SET(CFLAGS_SAVED $ENV{CFLAGS})
|
||||
SET(ENV{CFLAGS} ${CMAKE_C_FLAGS})
|
||||
SET(outfile "${CMAKE_BINARY_DIR}/probes_mysql.o")
|
||||
# Systemtap object
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
|
||||
-o ${outfile}
|
||||
)
|
||||
SET(ENV{CFLAGS} ${CFLAGS_SAVED})
|
||||
ENDIF()
|
||||
|
||||
# Do not try to extend the library if we have not built the .o file
|
||||
IF(outfile)
|
||||
# Add full object path to linker flags
|
||||
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
||||
IF(NOT target_type MATCHES "STATIC")
|
||||
@ -138,12 +141,12 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
||||
# but maybe one day this will be fixed.
|
||||
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_AR} r ${target_location} ${outfile}
|
||||
COMMAND ${CMAKE_RANLIB} ${target_location}
|
||||
)
|
||||
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
|
||||
SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "")
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_AR} r ${target_location} ${outfile}
|
||||
COMMAND ${CMAKE_RANLIB} ${target_location}
|
||||
)
|
||||
# Used in DTRACE_INSTRUMENT_WITH_STATIC_LIBS
|
||||
SET(TARGET_OBJECT_DIRECTORY_${target} ${objdir} CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@ -38,7 +38,9 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
||||
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
|
||||
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
|
||||
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
|
||||
STRING(REPLACE
|
||||
"${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
|
||||
pdb_location ${pdb_location})
|
||||
ENDIF()
|
||||
|
||||
set(comp "")
|
||||
|
@ -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
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -62,22 +62,30 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
# Enable debug info also in Release build, and create PDB to be able to analyze
|
||||
# crashes
|
||||
FOREACH(lang C CXX)
|
||||
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Zi")
|
||||
ENDFOREACH()
|
||||
# Enable debug info also in Release build,
|
||||
# and create PDB to be able to analyze crashes.
|
||||
FOREACH(type EXE SHARED MODULE)
|
||||
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE "${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
|
||||
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE
|
||||
"${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
|
||||
ENDFOREACH()
|
||||
|
||||
# Force static runtime libraries
|
||||
# - Choose debugging information:
|
||||
# /Z7
|
||||
# Produces an .obj file containing full symbolic debugging
|
||||
# information for use with the debugger. The symbolic debugging
|
||||
# information includes the names and types of variables, as well as
|
||||
# functions and line numbers. No .pdb file is produced by the compiler.
|
||||
FOREACH(lang C CXX)
|
||||
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Z7")
|
||||
ENDFOREACH()
|
||||
FOREACH(flag
|
||||
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
||||
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
||||
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
|
||||
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
@ -105,7 +113,6 @@ IF(MSVC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
|
||||
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
# _WIN64 is defined by the compiler itself.
|
||||
# Yet, we define it here again to work around a bug with Intellisense
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 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
|
||||
@ -33,7 +33,6 @@ SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp sr
|
||||
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(yassl)
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(yassl)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2005, 2014, Oracle and/or its affiliates.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -791,7 +791,10 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
|
||||
strncpy(name, path, MAX_PATH - 1 - HALF_PATH);
|
||||
strncat(name, "/", 1);
|
||||
strncat(name, entry->d_name, HALF_PATH);
|
||||
if (stat(name, &buf) < 0) return SSL_BAD_STAT;
|
||||
if (stat(name, &buf) < 0) {
|
||||
closedir(dir);
|
||||
return SSL_BAD_STAT;
|
||||
}
|
||||
|
||||
if (S_ISREG(buf.st_mode))
|
||||
ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2006, 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
|
||||
@ -32,7 +32,6 @@ SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
|
||||
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(taocrypt)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2005, 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
|
||||
@ -296,11 +296,11 @@ private:
|
||||
byte* signature_;
|
||||
char issuer_[ASN_NAME_MAX]; // Names
|
||||
char subject_[ASN_NAME_MAX]; // Names
|
||||
char beforeDate_[MAX_DATE_SZ]; // valid before date
|
||||
char beforeDate_[MAX_DATE_SZ+1]; // valid before date, +null term
|
||||
byte beforeDateType_; // beforeDate time type
|
||||
char afterDate_[MAX_DATE_SZ]; // valid after date
|
||||
char afterDate_[MAX_DATE_SZ+1]; // valid after date, +null term
|
||||
byte afterDateType_; // afterDate time type
|
||||
bool verify_; // Default to yes, but could be off
|
||||
bool verify_; // Default to yes, but could be off
|
||||
|
||||
void ReadHeader();
|
||||
void Decode(SignerList*, CertType);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#error don't use
|
||||
/*
|
||||
Copyright (c) 2010, 2012, 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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -406,7 +406,6 @@ SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRAR
|
||||
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
||||
|
||||
# Visual Studio users need debug static library for debug projects
|
||||
INSTALL_DEBUG_SYMBOLS(clientlib)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
|
@ -14,6 +14,7 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
|
||||
aria_chk.1 aria_dump_log.1 aria_ftdump.1 aria_pack.1 aria_read_log.1
|
||||
myisamlog.1 myisampack.1 mysql.server.1
|
||||
mysql_convert_table_format.1 mysql_fix_extensions.1
|
||||
mysql_install_db.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
.TH ARIA_PACK "1" "May 2014" "aria_pack Ver 1.0" "User Commands"
|
||||
.SH NAME
|
||||
aria_pack \- manual page for aria_pack Ver 1.0
|
||||
aria_pack \- generate compressed, read\-only Aria tables
|
||||
.SH SYNOPSIS
|
||||
.B aria_pack
|
||||
[\fIOPTIONS\fR] \fIfilename\fR...
|
||||
|
@ -1255,7 +1255,7 @@ indicates a
|
||||
FORMAT_DESCRIPTION_EVENT\&. The following table lists the possible type codes\&.
|
||||
.TS
|
||||
allbox tab(:);
|
||||
l l l.
|
||||
l l lx.
|
||||
T{
|
||||
Type
|
||||
T}:T{
|
||||
@ -1389,6 +1389,7 @@ T}
|
||||
T{
|
||||
0f
|
||||
T}:T{
|
||||
.nf
|
||||
FORMAT_DESCRIPTION_EVENT
|
||||
T}:T{
|
||||
This indicates the start of a log file written by MySQL 5 or later\&.
|
||||
@ -1526,7 +1527,7 @@ Master Pos: The position of the next event in the original master log file\&.
|
||||
Flags: 16 flags\&. Currently, the following flags are used\&. The others are reserved for future use\&.
|
||||
.TS
|
||||
allbox tab(:);
|
||||
l l l.
|
||||
l l lx.
|
||||
T{
|
||||
Flag
|
||||
T}:T{
|
||||
@ -1537,6 +1538,7 @@ T}
|
||||
T{
|
||||
01
|
||||
T}:T{
|
||||
.nf
|
||||
LOG_EVENT_BINLOG_IN_USE_F
|
||||
T}:T{
|
||||
Log file correctly closed\&. (Used only in
|
||||
@ -1558,6 +1560,7 @@ T}
|
||||
T{
|
||||
04
|
||||
T}:T{
|
||||
.nf
|
||||
LOG_EVENT_THREAD_SPECIFIC_F
|
||||
T}:T{
|
||||
Set if the event is dependent on the connection it was executed in (for
|
||||
|
@ -2027,7 +2027,7 @@ value, an empty string, and the string value
|
||||
are distinguished from one another in the output generated by this option as follows\&.
|
||||
.TS
|
||||
allbox tab(:);
|
||||
l l.
|
||||
l lx.
|
||||
T{
|
||||
\fBValue\fR:
|
||||
T}:T{
|
||||
|
15
mysql-test/include/have_semisync_plugin.inc
Normal file
15
mysql-test/include/have_semisync_plugin.inc
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Check if server has support for loading plugins
|
||||
#
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip Requires dynamic loading
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the variable SEMISYNC_MASTER_SO is set
|
||||
#
|
||||
if (!$SEMISYNC_MASTER_SO)
|
||||
{
|
||||
skip Need semisync plugins;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
if ($value == No such row)
|
||||
{
|
||||
SET sql_log_bin = 0;
|
||||
eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
|
||||
install plugin rpl_semi_sync_master soname 'semisync_master';
|
||||
SET GLOBAL rpl_semi_sync_master_enabled = 1;
|
||||
SET sql_log_bin = 1;
|
||||
}
|
||||
@ -28,7 +28,7 @@ if ($value == No such row)
|
||||
if ($value == No such row)
|
||||
{
|
||||
SET sql_log_bin = 0;
|
||||
eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
|
||||
install plugin rpl_semi_sync_slave soname 'semisync_slave';
|
||||
SET GLOBAL rpl_semi_sync_slave_enabled = 1;
|
||||
SET sql_log_bin = 1;
|
||||
}
|
||||
|
32
mysql-test/include/stop_dump_threads.inc
Normal file
32
mysql-test/include/stop_dump_threads.inc
Normal file
@ -0,0 +1,32 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Stop all dump threads on the server of the current connection.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# --source include/stop_dump_threads.inc
|
||||
|
||||
--let $include_filename= stop_dump_threads.inc
|
||||
--source include/begin_include_file.inc
|
||||
|
||||
|
||||
--let $_sdt_show_rpl_debug_info_old= $show_rpl_debug_info
|
||||
--let $show_rpl_debug_info= 1
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
|
||||
--let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
|
||||
|
||||
while ($_sdt_dump_thread_id != '')
|
||||
{
|
||||
eval KILL $_sdt_dump_thread_id;
|
||||
--let $wait_condition= SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = $_sdt_dump_thread_id
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
|
||||
}
|
||||
|
||||
--let $show_rpl_debug_info= $_sdt_show_rpl_debug_info_old
|
||||
|
||||
--let $include_filename= stop_dump_threads.inc
|
||||
--source include/end_include_file.inc
|
@ -13,6 +13,11 @@
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
|
||||
--connection master
|
||||
# After BUG#17638477 fix, uninstallation of rpl_semi_sync_master
|
||||
# is not allowed when there are semi sync slaves. Hence kill
|
||||
# all dump threads before uninstalling it.
|
||||
SET GLOBAL rpl_semi_sync_master_enabled = OFF;
|
||||
--source include/stop_dump_threads.inc
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
--enable_warnings
|
||||
|
||||
|
@ -4508,6 +4508,39 @@ COALESCE(c1)
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-5745 analyze MySQL fix for bug#12368495
|
||||
#
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x000000 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(LEADING 0x000000 FROM _ucs2 0x0061))
|
||||
2
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _ucs2 0x0061))
|
||||
2
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x00 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(LEADING 0x00 FROM _ucs2 0x0061))
|
||||
1
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x000000 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(TRAILING 0x000000 FROM _ucs2 0x0061))
|
||||
2
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _ucs2 0x0061))
|
||||
2
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _ucs2 0x0061))
|
||||
1
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x000000 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x000000 FROM _ucs2 0x0061))
|
||||
2
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061))
|
||||
2
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061))
|
||||
1
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061))
|
||||
1
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
@ -1626,6 +1626,39 @@ SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)'))
|
||||
'2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second
|
||||
2010-10-10 10:10:10
|
||||
#
|
||||
# MDEV-5745 analyze MySQL fix for bug#12368495
|
||||
#
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x0000000000 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(LEADING 0x0000000000 FROM _utf32 0x00000061))
|
||||
4
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _utf32 0x00000061))
|
||||
4
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x00 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(LEADING 0x00 FROM _utf32 0x00000061))
|
||||
1
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0000000000 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(TRAILING 0x0000000000 FROM _utf32 0x00000061))
|
||||
4
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _utf32 0x00000061))
|
||||
4
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _utf32 0x00000061))
|
||||
3
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x0000000000 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x0000000000 FROM _utf32 0x00000061))
|
||||
4
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _utf32 0x00000061))
|
||||
4
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x61 FROM _utf32 0x00000061))
|
||||
3
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
|
||||
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061))
|
||||
1
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
@ -2961,6 +2961,9 @@ replace(var, '00000000', table_name)
|
||||
(( t2 ++ t2 ))
|
||||
drop procedure foo;
|
||||
drop table t1,t2;
|
||||
select md5(_filename "a"), sha(_filename "a");
|
||||
md5(_filename "a") sha(_filename "a")
|
||||
0cc175b9c0f1b6a831c399e269772661 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -2023,10 +2023,72 @@ SEC_TO_TIME(1.12)+0.1 decimal(14,2) YES NULL
|
||||
SEC_TO_TIME(1.123456)+0.1 decimal(18,6) YES NULL
|
||||
SEC_TO_TIME(1.1234567)+0.1 decimal(18,6) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(concat(a,'10'))*1;
|
||||
a
|
||||
2000-02-23
|
||||
2005-05-04
|
||||
SELECT * FROM t1 GROUP BY (-FROM_UNIXTIME(concat(a,'10')))*1;
|
||||
a
|
||||
2005-05-04
|
||||
2000-02-23
|
||||
SELECT * FROM t1 GROUP BY (-FROM_UNIXTIME(concat(a,'10')));
|
||||
a
|
||||
2005-05-04
|
||||
2000-02-23
|
||||
SELECT * FROM t1 GROUP BY ABS(FROM_UNIXTIME(concat(a,'10')));
|
||||
a
|
||||
2000-02-23
|
||||
2005-05-04
|
||||
SELECT * FROM t1 GROUP BY @a:=(FROM_UNIXTIME(concat(a,'10'))*1);
|
||||
a
|
||||
2000-02-23
|
||||
2005-05-04
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE='+02:00';
|
||||
#
|
||||
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
|
||||
#
|
||||
CREATE TABLE t1 (a DATE);
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
|
||||
a f1 f2
|
||||
2005-05-04 1970-01-01 02:33:25 19700101023325.000000
|
||||
2000-02-23 1970-01-01 02:33:20 19700101023320.000000
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
|
||||
a
|
||||
2000-02-23
|
||||
2005-05-04
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(concat(a,'10'))/1;
|
||||
a
|
||||
2000-02-23
|
||||
2005-05-04
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE);
|
||||
INSERT INTO t1 VALUES ('2005-05-04');
|
||||
SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
|
||||
f2
|
||||
0.000000
|
||||
SELECT CHAR_LENGTH(CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10')))) AS f2 FROM t1;
|
||||
f2
|
||||
8
|
||||
CREATE TABLE t2 AS SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`f2` varchar(26) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
f2
|
||||
0.000000
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
||||
#
|
||||
SET TIME_ZONE='+02:00';
|
||||
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
|
||||
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
||||
NULL
|
||||
@ -2600,3 +2662,18 @@ SELECT COALESCE(TIME'10:20:30',DATE'2001-01-01');
|
||||
COALESCE(TIME'10:20:30',DATE'2001-01-01')
|
||||
2014-04-15 10:20:30
|
||||
SET timestamp=DEFAULT;
|
||||
#
|
||||
# MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column
|
||||
#
|
||||
CREATE TABLE t1 ( d DATE, t TIME );
|
||||
INSERT INTO t1 VALUES ('2008-12-05','22:34:09'),('2005-03-27','14:26:02');
|
||||
SELECT EXTRACT(DAY_MINUTE FROM GREATEST(t,d)), GREATEST(t,d) FROM t1;
|
||||
EXTRACT(DAY_MINUTE FROM GREATEST(t,d)) GREATEST(t,d)
|
||||
342259 838:59:59
|
||||
342259 838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '9336:00:00'
|
||||
Warning 1292 Truncated incorrect time value: '9336:00:00'
|
||||
Warning 1292 Truncated incorrect time value: '2952:00:00'
|
||||
Warning 1292 Truncated incorrect time value: '2952:00:00'
|
||||
DROP TABLE t1;
|
||||
|
@ -3536,7 +3536,7 @@ COUNT(DISTINCT a, b) SUM(DISTINCT a)
|
||||
0 NULL
|
||||
EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by
|
||||
1 SIMPLE t2 index NULL a 15 NULL 16 Using index
|
||||
SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
|
||||
SUM(DISTINCT a) MAX(b)
|
||||
1 8
|
||||
@ -3564,7 +3564,7 @@ SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
|
||||
168
|
||||
EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by
|
||||
1 SIMPLE t2 index NULL a 15 NULL 16 Using index
|
||||
SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
||||
(SUM(DISTINCT a) + MAX(b))
|
||||
9
|
||||
@ -3593,6 +3593,58 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
drop table t1;
|
||||
# End of test#50539.
|
||||
#
|
||||
# Bug#17217128 - BAD INTERACTION BETWEEN MIN/MAX AND
|
||||
# "HAVING SUM(DISTINCT)": WRONG RESULTS.
|
||||
#
|
||||
CREATE TABLE t (a INT, b INT, KEY(a,b));
|
||||
INSERT INTO t VALUES (1,1), (2,2), (3,3), (4,4), (1,0), (3,2), (4,5);
|
||||
ANALYZE TABLE t;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t analyze status OK
|
||||
SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
|
||||
a SUM(DISTINCT a) MIN(b)
|
||||
1 1 0
|
||||
2 2 2
|
||||
3 3 2
|
||||
4 4 4
|
||||
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||
SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
|
||||
a SUM(DISTINCT a) MAX(b)
|
||||
1 1 1
|
||||
2 2 2
|
||||
3 3 3
|
||||
4 4 5
|
||||
EXPLAIN SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||
SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
|
||||
a MAX(b)
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 5
|
||||
EXPLAIN SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||
SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
|
||||
SUM(DISTINCT a) MIN(b) MAX(b)
|
||||
10 0 5
|
||||
EXPLAIN SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||
SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
|
||||
a SUM(DISTINCT a) MIN(b) MAX(b)
|
||||
1 1 0 1
|
||||
2 2 2 2
|
||||
3 3 2 3
|
||||
4 4 4 5
|
||||
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||
DROP TABLE t;
|
||||
#
|
||||
# MDEV-4219 A simple select query returns random data (upstream bug#68473)
|
||||
#
|
||||
drop table if exists faulty;
|
||||
|
@ -118,3 +118,171 @@ COUNT(DISTINCT a)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
#
|
||||
# Bug#17909656 - WRONG RESULTS FOR A SIMPLE QUERY WITH GROUP BY
|
||||
#
|
||||
CREATE TABLE t0 (
|
||||
i1 INTEGER NOT NULL
|
||||
);
|
||||
INSERT INTO t0 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
|
||||
(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),
|
||||
(21),(22),(23),(24),(25),(26),(27),(28),(29),(30);
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(1) NOT NULL,
|
||||
i1 INTEGER NOT NULL,
|
||||
i2 INTEGER NOT NULL,
|
||||
UNIQUE KEY k1 (c1,i2)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT 'A',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'B',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'C',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'D',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'E',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'F',i1,i1 FROM t0;
|
||||
CREATE TABLE t2 (
|
||||
c1 CHAR(1) NOT NULL,
|
||||
i1 INTEGER NOT NULL,
|
||||
i2 INTEGER NOT NULL,
|
||||
UNIQUE KEY k2 (c1,i1,i2)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t2 SELECT 'A',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'B',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'C',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'D',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'E',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'F',i1,i1 FROM t0;
|
||||
ANALYZE TABLE t1;
|
||||
ANALYZE TABLE t2;
|
||||
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' AND i2 = 17) OR ( c1 = 'F')
|
||||
GROUP BY c1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range k1 k1 5 NULL 31 Using where; Using index
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' AND i2 = 17) OR ( c1 = 'F')
|
||||
GROUP BY c1;
|
||||
c1 max(i2)
|
||||
C 17
|
||||
F 30
|
||||
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR ( c1 = 'F' AND i2 = 17))
|
||||
GROUP BY c1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range k1 k1 5 NULL 31 Using where; Using index
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR ( c1 = 'F' AND i2 = 17))
|
||||
GROUP BY c1;
|
||||
c1 max(i2)
|
||||
C 30
|
||||
F 17
|
||||
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||
GROUP BY c1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range k1 k1 5 NULL 2 Using where; Using index
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||
GROUP BY c1;
|
||||
c1 max(i2)
|
||||
C 17
|
||||
F 17
|
||||
EXPLAIN SELECT c1, max(i2) FROM t1
|
||||
WHERE ((c1 = 'C' AND (i2 = 40 OR i2 = 30)) OR ( c1 = 'F' AND (i2 = 40 )))
|
||||
GROUP BY c1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range k1 k1 5 NULL 3 Using where; Using index
|
||||
SELECT c1, max(i2) FROM t1
|
||||
WHERE ((c1 = 'C' AND (i2 = 40 OR i2 = 30)) OR ( c1 = 'F' AND (i2 = 40 )))
|
||||
GROUP BY c1;
|
||||
c1 max(i2)
|
||||
C 30
|
||||
EXPLAIN SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
|
||||
GROUP BY c1,i1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range k2 k2 5 NULL 59 Using where; Using index
|
||||
SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
|
||||
GROUP BY c1,i1;
|
||||
c1 i1 max(i2)
|
||||
C 17 17
|
||||
F 17 17
|
||||
EXPLAIN SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
|
||||
GROUP BY c1,i1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 range k2 k2 5 NULL 58 Using where; Using index
|
||||
SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
|
||||
GROUP BY c1,i1;
|
||||
c1 i1 max(i2)
|
||||
C 17 17
|
||||
F 17 17
|
||||
EXPLAIN SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE ((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35) OR ( i2 = 17 ))
|
||||
GROUP BY c1,i1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index k2 k2 9 NULL 180 Using where; Using index
|
||||
SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE ((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35) OR ( i2 = 17 ))
|
||||
GROUP BY c1,i1;
|
||||
c1 i1 max(i2)
|
||||
A 17 17
|
||||
B 17 17
|
||||
C 1 1
|
||||
C 2 2
|
||||
C 3 3
|
||||
C 4 4
|
||||
C 5 5
|
||||
C 6 6
|
||||
C 7 7
|
||||
C 8 8
|
||||
C 9 9
|
||||
C 10 10
|
||||
C 11 11
|
||||
C 12 12
|
||||
C 13 13
|
||||
C 14 14
|
||||
C 15 15
|
||||
C 16 16
|
||||
C 17 17
|
||||
C 18 18
|
||||
C 19 19
|
||||
C 20 20
|
||||
C 21 21
|
||||
C 22 22
|
||||
C 23 23
|
||||
C 24 24
|
||||
C 25 25
|
||||
C 26 26
|
||||
C 27 27
|
||||
C 28 28
|
||||
C 29 29
|
||||
C 30 30
|
||||
D 17 17
|
||||
E 17 17
|
||||
F 1 1
|
||||
F 2 2
|
||||
F 3 3
|
||||
F 4 4
|
||||
F 5 5
|
||||
F 6 6
|
||||
F 7 7
|
||||
F 8 8
|
||||
F 9 9
|
||||
F 10 10
|
||||
F 11 11
|
||||
F 12 12
|
||||
F 13 13
|
||||
F 14 14
|
||||
F 15 15
|
||||
F 16 16
|
||||
F 17 17
|
||||
F 18 18
|
||||
F 19 19
|
||||
F 20 20
|
||||
F 21 21
|
||||
F 22 22
|
||||
F 23 23
|
||||
F 24 24
|
||||
F 25 25
|
||||
F 26 26
|
||||
F 27 27
|
||||
F 28 28
|
||||
F 29 29
|
||||
F 30 30
|
||||
DROP TABLE t0,t1,t2;
|
||||
|
21
mysql-test/r/innodb_load_xa.result
Normal file
21
mysql-test/r/innodb_load_xa.result
Normal file
@ -0,0 +1,21 @@
|
||||
install plugin innodb soname 'ha_innodb';
|
||||
Warnings:
|
||||
Warning 1105 Cannot enable tc-log at run-time. XA features of InnoDB are disabled
|
||||
select engine,support,transactions,xa from information_schema.engines where engine='innodb';
|
||||
engine support transactions xa
|
||||
InnoDB YES YES NO
|
||||
create table t1 (a int) engine=innodb;
|
||||
start transaction;
|
||||
insert t1 values (1);
|
||||
insert t1 values (2);
|
||||
commit;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 # Gtid # # GTID #-#-#
|
||||
mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
|
||||
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
mysqld-bin.000001 # Query # # use `test`; insert t1 values (1)
|
||||
mysqld-bin.000001 # Query # # use `test`; insert t1 values (2)
|
||||
mysqld-bin.000001 # Query # # COMMIT
|
||||
drop table t1;
|
||||
uninstall plugin innodb;
|
@ -1014,8 +1014,8 @@ The following options may be given as the first argument:
|
||||
created to handle remaining clients.
|
||||
--thread-stack=# The stack size for each thread
|
||||
--time-format=name The TIME format (ignored)
|
||||
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
|
||||
currently supported)
|
||||
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
|
||||
effect.
|
||||
--tmp-table-size=# If an internal in-memory temporary table exceeds this
|
||||
size, MySQL will automatically convert it to an on-disk
|
||||
MyISAM or Aria table
|
||||
|
13
mysql-test/r/order_by_innodb.result
Normal file
13
mysql-test/r/order_by_innodb.result
Normal file
@ -0,0 +1,13 @@
|
||||
drop table if exists t0,t1,t2,t3;
|
||||
#
|
||||
# MDEV-6434: Wrong result (extra rows) with ORDER BY, multiple-column index, InnoDB
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, d TEXT, KEY idx(a,b,c)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (a,c) VALUES
|
||||
(8, 9),(8, 10),(13, 15),(16, 17),(16, 18),(16, 19),(20, 21),
|
||||
(20, 22),(20, 24),(20, 25),(20, 26),(20, 27),(20, 28);
|
||||
SELECT * FROM t1 WHERE a = 8 AND (b = 1 OR b IS NULL) ORDER BY c;
|
||||
a b c d
|
||||
8 NULL 9 NULL
|
||||
8 NULL 10 NULL
|
||||
DROP TABLE t1;
|
@ -2562,6 +2562,50 @@ id id2 dob address city hours_worked_per_week weeks_worked_last_year
|
||||
16 16 1949-11-07 address16 city16 40 52
|
||||
50 50 1923-09-08 address50 city50 40 52
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-6322: The PARTITION engine can return wrong query results
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
CustomerID varchar(5) DEFAULT NULL,
|
||||
CompanyName varchar(40) DEFAULT NULL,
|
||||
ContactName varchar(30) DEFAULT NULL,
|
||||
ContactTitle varchar(30) DEFAULT NULL,
|
||||
Address varchar(60) DEFAULT NULL,
|
||||
City varchar(15) DEFAULT NULL,
|
||||
Region varchar(15) DEFAULT NULL,
|
||||
PostalCode varchar(10) DEFAULT NULL,
|
||||
Country varchar(15) NOT NULL,
|
||||
Phone varchar(24) DEFAULT NULL,
|
||||
Fax varchar(24) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
PARTITION BY LIST COLUMNS(Country)
|
||||
(PARTITION p1 VALUES IN ('Germany','Austria','Switzerland','Poland'),
|
||||
PARTITION p2 VALUES IN ('USA','Canada','Mexico'),
|
||||
PARTITION p3 VALUES IN ('Spain','Portugal','Italy'),
|
||||
PARTITION p4 VALUES IN ('UK','Ireland'),
|
||||
PARTITION p5 VALUES IN ('France','Belgium'),
|
||||
PARTITION p6 VALUES IN ('Sweden','Finland','Denmark','Norway'),
|
||||
PARTITION p7 VALUES IN ('Venezuela','Argentina','Brazil')
|
||||
);
|
||||
INSERT INTO t1 (CustomerID, City, Country) VALUES
|
||||
('ANATR','México D.F','Mexico'),
|
||||
('ANTON','México D.F','Mexico'),
|
||||
('BOTTM','Tsawassen','Canada'),
|
||||
('CENTC','México D.F','Mexico'),
|
||||
('GREAL','Eugene','USA'),
|
||||
('HUNGC','Elgin','USA'),
|
||||
('LAUGB','Vancouver','Canada'),
|
||||
('LAZYK','Walla Walla','USA'),
|
||||
('LETSS','San Francisco','USA'),
|
||||
('LONEP','Portland','USA');
|
||||
SELECT * FROM t1 WHERE Country = 'USA';
|
||||
CustomerID CompanyName ContactName ContactTitle Address City Region PostalCode Country Phone Fax
|
||||
GREAL NULL NULL NULL NULL Eugene NULL NULL USA NULL NULL
|
||||
HUNGC NULL NULL NULL NULL Elgin NULL NULL USA NULL NULL
|
||||
LAZYK NULL NULL NULL NULL Walla Walla NULL NULL USA NULL NULL
|
||||
LETSS NULL NULL NULL NULL San Francisco NULL NULL USA NULL NULL
|
||||
LONEP NULL NULL NULL NULL Portland NULL NULL USA NULL NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( d DATE NOT NULL)
|
||||
PARTITION BY RANGE( YEAR(d) ) (
|
||||
PARTITION p0 VALUES LESS THAN (1960),
|
||||
|
@ -694,6 +694,34 @@ count(*)
|
||||
drop table t3;
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MySQL Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
|
||||
#
|
||||
create table t1(c1 int, c2 int, c3 int, c4 int,
|
||||
primary key(c1,c2)) engine=InnoDB
|
||||
partition by list columns(c2)
|
||||
(partition p1 values in (1,2) engine=InnoDB,
|
||||
partition p2 values in (3,4) engine=InnoDB);
|
||||
insert into t1 values (1,1,1,1),(2,3,1,1);
|
||||
select * from t1 where c1=2 and c2=3;
|
||||
c1 c2 c3 c4
|
||||
2 3 1 1
|
||||
drop table t1;
|
||||
#
|
||||
# MySQL Bug#72803: Wrong "Impossible where" with LIST partitioning
|
||||
# also MDEV-6240: Wrong "Impossible where" with LIST partitioning
|
||||
#
|
||||
CREATE TABLE t1 ( d DATE) ENGINE = InnoDB
|
||||
PARTITION BY LIST COLUMNS (d)
|
||||
(
|
||||
PARTITION p0 VALUES IN ('1990-01-01','1991-01-01'),
|
||||
PARTITION p1 VALUES IN ('1981-01-01')
|
||||
);
|
||||
INSERT INTO t1 (d) VALUES ('1991-01-01');
|
||||
SELECT * FROM t1 WHERE d = '1991-01-01';
|
||||
d
|
||||
1991-01-01
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503,
|
||||
# Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes"
|
||||
# (independent testcase for Oracle Bug#13947868)
|
||||
|
@ -3302,6 +3302,120 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 100 Using where
|
||||
drop table t0, t1;
|
||||
#
|
||||
# Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
|
||||
#
|
||||
CREATE TABLE t1
|
||||
(c1 int,
|
||||
c2 int,
|
||||
c3 int,
|
||||
c4 int,
|
||||
PRIMARY KEY (c1,c2))
|
||||
PARTITION BY LIST COLUMNS (c2)
|
||||
(PARTITION p1 VALUES IN (1,2),
|
||||
PARTITION p2 VALUES IN (3,4));
|
||||
INSERT INTO t1 VALUES (1, 1, 1, 1), (2, 3, 1, 1);
|
||||
INSERT INTO t1 VALUES (1, 2, 1, 1), (2, 4, 1, 1);
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 < 1;
|
||||
c1 c2 c3 c4
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 1;
|
||||
c1 c2 c3 c4
|
||||
1 1 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 = 1;
|
||||
c1 c2 c3 c4
|
||||
1 1 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
|
||||
c1 c2 c3 c4
|
||||
1 1 1 1
|
||||
1 2 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
|
||||
c1 c2 c3 c4
|
||||
1 2 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
|
||||
c1 c2 c3 c4
|
||||
1 1 1 1
|
||||
1 2 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
|
||||
c1 c2 c3 c4
|
||||
1 1 1 1
|
||||
1 2 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
|
||||
c1 c2 c3 c4
|
||||
2 3 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 = 3;
|
||||
c1 c2 c3 c4
|
||||
2 3 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
|
||||
c1 c2 c3 c4
|
||||
2 3 1 1
|
||||
2 4 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
|
||||
c1 c2 c3 c4
|
||||
2 4 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 < 4;
|
||||
c1 c2 c3 c4
|
||||
2 3 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
|
||||
c1 c2 c3 c4
|
||||
2 3 1 1
|
||||
2 4 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
|
||||
c1 c2 c3 c4
|
||||
2 4 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 4;
|
||||
c1 c2 c3 c4
|
||||
2 4 1 1
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 > 4;
|
||||
c1 c2 c3 c4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 = 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1 const PRIMARY PRIMARY 8 const,const 1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 const PRIMARY PRIMARY 8 const,const 1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 < 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 const PRIMARY PRIMARY 8 const,const 1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-6239: Partition pruning is not working as expected in an inner query
|
||||
#
|
||||
create table t1
|
||||
|
@ -8,3 +8,6 @@ PLUGIN_TYPE STORAGE ENGINE
|
||||
PLUGIN_LIBRARY NULL
|
||||
PLUGIN_LIBRARY_VERSION NULL
|
||||
LOAD_OPTION ON
|
||||
#
|
||||
# MDEV-6351 --plugin=force has no effect for built-in plugins
|
||||
#
|
||||
|
@ -2108,6 +2108,43 @@ EXECUTE stmt;
|
||||
a
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v2;
|
||||
#
|
||||
# MDEV-6289 : Unexpected results when querying information_schema
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
db varchar(254) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY db (db)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 (db) VALUES ('mysqltest1'),('mysqltest2'),('mysqltest3'),('mysqltest4');
|
||||
drop database if exists mysqltest1;
|
||||
drop database if exists mysqltest2;
|
||||
drop database if exists mysqltest3;
|
||||
drop database if exists mysqltest4;
|
||||
create database mysqltest1;
|
||||
create database mysqltest2;
|
||||
create database mysqltest3;
|
||||
create database mysqltest4;
|
||||
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||
db
|
||||
mysqltest4
|
||||
mysqltest3
|
||||
mysqltest2
|
||||
mysqltest1
|
||||
EXPLAIN EXTENDED
|
||||
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 PRIMARY t1 eq_ref db db 764 information_schema.schemata.SCHEMA_NAME 1 100.00 Using where; Using index
|
||||
2 MATERIALIZED schemata ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`db` AS `db` from `test`.`t1` semi join (`information_schema`.`schemata`) where (`test`.`t1`.`db` = `information_schema`.`schemata`.`SCHEMA_NAME`) order by `test`.`t1`.`db` desc
|
||||
drop table t1;
|
||||
drop database mysqltest1;
|
||||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
drop database mysqltest4;
|
||||
# End of 5.5 tests
|
||||
set @subselect_mat_test_optimizer_switch_value=null;
|
||||
set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
|
||||
|
@ -2148,4 +2148,41 @@ EXECUTE stmt;
|
||||
a
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v2;
|
||||
#
|
||||
# MDEV-6289 : Unexpected results when querying information_schema
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
db varchar(254) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY db (db)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 (db) VALUES ('mysqltest1'),('mysqltest2'),('mysqltest3'),('mysqltest4');
|
||||
drop database if exists mysqltest1;
|
||||
drop database if exists mysqltest2;
|
||||
drop database if exists mysqltest3;
|
||||
drop database if exists mysqltest4;
|
||||
create database mysqltest1;
|
||||
create database mysqltest2;
|
||||
create database mysqltest3;
|
||||
create database mysqltest4;
|
||||
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||
db
|
||||
mysqltest4
|
||||
mysqltest3
|
||||
mysqltest2
|
||||
mysqltest1
|
||||
EXPLAIN EXTENDED
|
||||
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
1 PRIMARY t1 eq_ref db db 764 information_schema.schemata.SCHEMA_NAME 1 100.00 Using where; Using index
|
||||
2 MATERIALIZED schemata ALL NULL NULL NULL NULL NULL NULL
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`db` AS `db` from `test`.`t1` semi join (`information_schema`.`schemata`) where (`test`.`t1`.`db` = `information_schema`.`schemata`.`SCHEMA_NAME`) order by `test`.`t1`.`db` desc
|
||||
drop table t1;
|
||||
drop database mysqltest1;
|
||||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
drop database mysqltest4;
|
||||
# End of 5.5 tests
|
||||
|
@ -810,10 +810,10 @@ c1
|
||||
drop table t1;
|
||||
SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
|
||||
%
|
||||
0.012345687012345687012345687012345687012345687012345687012345687012345687000000000
|
||||
0.012345687012345687012345687012
|
||||
SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
|
||||
MOD()
|
||||
0.012345687012345687012345687012345687012345687012345687012345687012345687000000000
|
||||
0.012345687012345687012345687012
|
||||
create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
|
||||
insert into t1 values (-0.123456,0.123456);
|
||||
select group_concat(f1),group_concat(f2) from t1;
|
||||
|
@ -703,7 +703,7 @@ select .7777777777777777777777777777777777777 *
|
||||
777777777777777777.777777777777777777700000000000
|
||||
select .7777777777777777777777777777777777777 - 0.1;
|
||||
.7777777777777777777777777777777777777 - 0.1
|
||||
0.6777777777777777777777777777777777777
|
||||
0.677777777777777777777777777778
|
||||
select .343434343434343434 + .343434343434343434;
|
||||
.343434343434343434 + .343434343434343434
|
||||
0.686868686868686868
|
||||
@ -1840,7 +1840,7 @@ Warnings:
|
||||
Note 1265 Data truncated for column 'c1' at row 4
|
||||
DESC t2;
|
||||
Field Type Null Key Default Extra
|
||||
c1 decimal(32,30) YES NULL
|
||||
c1 decimal(33,30) YES NULL
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a DECIMAL(30,30));
|
||||
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
|
||||
@ -1851,7 +1851,7 @@ Note 1265 Data truncated for column 'c1' at row 2
|
||||
Note 1265 Data truncated for column 'c1' at row 3
|
||||
DESC t2;
|
||||
Field Type Null Key Default Extra
|
||||
c1 decimal(34,0) YES NULL
|
||||
c1 decimal(33,30) YES NULL
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a DECIMAL(30,30));
|
||||
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
|
||||
|
@ -1876,6 +1876,40 @@ SELECT(SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
|
||||
dev
|
||||
1
|
||||
#
|
||||
# Bug #17059925 : UNIONS COMPUTES ROWS_EXAMINED INCORRECTLY
|
||||
#
|
||||
SET @old_slow_query_log= @@global.slow_query_log;
|
||||
SET @old_log_output= @@global.log_output;
|
||||
SET @old_long_query_time= @@long_query_time;
|
||||
SET GLOBAL log_output= "TABLE";
|
||||
SET GLOBAL slow_query_log= ON;
|
||||
SET SESSION long_query_time= 0;
|
||||
CREATE TABLE t17059925 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
CREATE TABLE t3 (c INT);
|
||||
INSERT INTO t17059925 VALUES (1), (2), (3);
|
||||
INSERT INTO t2 VALUES (4), (5), (6);
|
||||
INSERT INTO t3 VALUES (7), (8), (9);
|
||||
TRUNCATE table mysql.slow_log;
|
||||
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT sql_text, rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%t17059925%';
|
||||
sql_text rows_examined
|
||||
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3 18
|
||||
DROP TABLE t17059925, t2, t3;
|
||||
SET @@long_query_time= @old_long_query_time;
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.slow_query_log= @old_slow_query_log;
|
||||
#
|
||||
# lp:1010729: Unexpected syntax error from UNION
|
||||
# (bug #54382) with single-table join nest
|
||||
#
|
||||
|
@ -189,6 +189,8 @@ select @@concurrent_insert;
|
||||
@@concurrent_insert
|
||||
AUTO
|
||||
set global timed_mutexes=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
show variables like 'timed_mutexes';
|
||||
Variable_name Value
|
||||
timed_mutexes ON
|
||||
@ -196,6 +198,8 @@ select * from information_schema.session_variables where variable_name like 'tim
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TIMED_MUTEXES ON
|
||||
set global timed_mutexes=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
show variables like 'timed_mutexes';
|
||||
Variable_name Value
|
||||
timed_mutexes OFF
|
||||
|
@ -4789,6 +4789,45 @@ DROP DATABASE IF EXISTS nodb;
|
||||
CREATE VIEW nodb.a AS SELECT 1;
|
||||
ERROR 42000: Unknown database 'nodb'
|
||||
#
|
||||
# BUG#14117018 - MYSQL SERVER CREATES INVALID VIEW DEFINITION
|
||||
# BUG#18405221 - SHOW CREATE VIEW OUTPUT INCORRECT
|
||||
#
|
||||
CREATE VIEW v1 AS (SELECT '' FROM DUAL);
|
||||
CREATE VIEW v2 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL);
|
||||
CREATE VIEW v3 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL);
|
||||
CREATE VIEW v4 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||
(SELECT '' AS col2 FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL);
|
||||
CREATE VIEW v5 AS (SELECT 'buggy' AS col1, 'fix' as col2 FROM DUAL) UNION ALL
|
||||
(SELECT 'buggy' as a, 'fix' as a FROM DUAL);
|
||||
# Name for the column in select1 is set properly with or
|
||||
# without this fix.
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||
# Name for the column in select2 is set with this fix.
|
||||
# Without this fix, name would not have set for the
|
||||
# columns in select2.
|
||||
SHOW CREATE VIEW v2;
|
||||
View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||
# Name for the field item in select2 & select3 is set with this fix.
|
||||
# Without this fix, name would not have set for the
|
||||
# columns in select2 & select3.
|
||||
SHOW CREATE VIEW v3;
|
||||
View Create View character_set_client collation_connection
|
||||
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `Name_exp_1`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||
# Name for the field item in select3 is set with this fix.
|
||||
# Without this fix, name would not have set for the
|
||||
# columns in select3.
|
||||
SHOW CREATE VIEW v4;
|
||||
View Create View character_set_client collation_connection
|
||||
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `col2`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||
DROP VIEW v1, v2, v3, v4, v5;
|
||||
#
|
||||
# lp:833600 Wrong result with view + outer join + uncorrelated subquery (non-semijoin)
|
||||
#
|
||||
CREATE TABLE t1 ( a int, b int );
|
||||
@ -5300,6 +5339,61 @@ NULL 8
|
||||
drop view v1;
|
||||
drop table t1,t2,t3;
|
||||
SET optimizer_switch=@save_optimizer_switch_MDEV_3874;
|
||||
CREATE TABLE `t1` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`f0` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`f1` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
);
|
||||
CREATE TABLE `t2` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`f02` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`f03` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
);
|
||||
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v1` AS
|
||||
SELECT
|
||||
`t1`.`f0` AS `f0`,
|
||||
`t1`.`f1` AS `f1`,
|
||||
`t2`.`f02` AS `f02`,
|
||||
`t2`.`f03` AS `f03`
|
||||
FROM
|
||||
(`t1` LEFT JOIN `t2` ON((`t1`.`id` = `t2`.`f02`)));
|
||||
CREATE FUNCTION `f1`(
|
||||
p0 BIGINT(20) UNSIGNED
|
||||
)
|
||||
RETURNS bigint(20) unsigned
|
||||
DETERMINISTIC
|
||||
CONTAINS SQL
|
||||
SQL SECURITY DEFINER
|
||||
COMMENT ''
|
||||
BEGIN
|
||||
DECLARE k0 INTEGER UNSIGNED DEFAULT 0;
|
||||
DECLARE lResult INTEGER UNSIGNED DEFAULT 0;
|
||||
SET k0 = 0;
|
||||
WHILE k0 < 1 DO
|
||||
SELECT COUNT(*) as `f00` INTO lResult FROM `v1` WHERE `v1`.`f0` = p0; -- BUG
|
||||
SET k0 = k0 + 1;
|
||||
END WHILE;
|
||||
RETURN(k0);
|
||||
END|
|
||||
SELECT `f1`(1);
|
||||
`f1`(1)
|
||||
1
|
||||
SELECT `f1`(1);
|
||||
`f1`(1)
|
||||
1
|
||||
SELECT `f1`(1);
|
||||
`f1`(1)
|
||||
1
|
||||
SELECT `f1`(1);
|
||||
`f1`(1)
|
||||
1
|
||||
DROP FUNCTION f1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.5 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
0
mysql-test/std_data/checkDBI_DBD-mysql.pl
Normal file → Executable file
0
mysql-test/std_data/checkDBI_DBD-mysql.pl
Normal file → Executable file
@ -127,3 +127,29 @@ select count(*) from t1;
|
||||
count(*)
|
||||
100
|
||||
drop table t1;
|
||||
#
|
||||
#BUG 18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONS
|
||||
# CORRUPTS FRM
|
||||
CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
|
||||
PARTITIONS 5;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`fld1` int(11) NOT NULL,
|
||||
PRIMARY KEY (`fld1`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (fld1)
|
||||
PARTITIONS 5 */
|
||||
ALTER TABLE t1 ENGINE= ARCHIVE;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
#After the patch, the ENGINE is correctly displayed as MyISAM
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`fld1` int(11) NOT NULL,
|
||||
PRIMARY KEY (`fld1`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (fld1)
|
||||
PARTITIONS 5 */
|
||||
#Cleanup.
|
||||
DROP TABLE t1;
|
||||
|
@ -129,3 +129,21 @@ show create table t1;
|
||||
select count(*) from t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo #BUG 18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONS
|
||||
--echo # CORRUPTS FRM
|
||||
|
||||
CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
|
||||
PARTITIONS 5;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE t1 ENGINE= ARCHIVE;
|
||||
|
||||
--echo #After the patch, the ENGINE is correctly displayed as MyISAM
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
--echo #Cleanup.
|
||||
DROP TABLE t1;
|
||||
|
@ -353,6 +353,10 @@ drop function bug27563;
|
||||
# common cleanup
|
||||
#
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
||||
--echo end of the tests
|
||||
|
@ -5035,9 +5035,9 @@ CAST(0.2359591234567e6 AS TIME)
|
||||
23:59:59
|
||||
SELECT CAST(0.2359591234567e+30 AS TIME);
|
||||
CAST(0.2359591234567e+30 AS TIME)
|
||||
NULL
|
||||
838:59:59
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '2.359591234567e29'
|
||||
Warning 1292 Truncated incorrect time value: '2.359591234567e29'
|
||||
select cast('100:55:50' as time) < cast('24:00:00' as time);
|
||||
cast('100:55:50' as time) < cast('24:00:00' as time)
|
||||
0
|
||||
|
2
mysql-test/suite/engines/iuds/suite.opt
Normal file
2
mysql-test/suite/engines/iuds/suite.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--timezone=GMT-3
|
||||
|
15
mysql-test/suite/innodb/r/blob_unique2pk.result
Normal file
15
mysql-test/suite/innodb/r/blob_unique2pk.result
Normal file
@ -0,0 +1,15 @@
|
||||
create table t1 (f1 tinyblob not null) engine=innodb;
|
||||
alter table t1 add unique index (f1(255));
|
||||
drop table t1;
|
||||
create table t1 (f1 tinyblob not null) engine=innodb;
|
||||
alter table t1 add unique index (f1(356));
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f1` tinyblob NOT NULL,
|
||||
UNIQUE KEY `f1` (`f1`(255))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 (f1 point not null) engine=innodb;
|
||||
alter table t1 add unique index (f1);
|
||||
drop table t1;
|
35
mysql-test/suite/innodb/r/innodb-fk.result
Normal file
35
mysql-test/suite/innodb/r/innodb-fk.result
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# Bug #18806829 OPENING INNODB TABLES WITH MANY FOREIGN KEY
|
||||
# REFERENCES IS SLOW/CRASHES SEMAPHORE
|
||||
#
|
||||
create table t1 (f1 int primary key) engine=innodb;
|
||||
insert into t1 values (5);
|
||||
insert into t1 values (2882);
|
||||
insert into t1 values (10);
|
||||
update t1 set f1 = 28 where f1 = 2882;
|
||||
select * from fk_120;
|
||||
f1
|
||||
5
|
||||
10
|
||||
28
|
||||
select * from fk_1;
|
||||
f1
|
||||
5
|
||||
10
|
||||
28
|
||||
select * from fk_50;
|
||||
f1
|
||||
5
|
||||
10
|
||||
28
|
||||
drop table t1;
|
||||
#
|
||||
# Check if restrict is working fine.
|
||||
#
|
||||
create table t1 (f1 int primary key) engine=innodb;
|
||||
delete from t1 where f1 = 29;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`fk_29`, CONSTRAINT `pc29` FOREIGN KEY (`f1`) REFERENCES `t1` (`f1`))
|
||||
select * from fk_29;
|
||||
f1
|
||||
29
|
||||
drop table t1;
|
20
mysql-test/suite/innodb/t/blob_unique2pk.test
Normal file
20
mysql-test/suite/innodb/t/blob_unique2pk.test
Normal file
@ -0,0 +1,20 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
|
||||
#
|
||||
# Bug#16368875 INNODB: FAILING ASSERTION: PRIMARY_KEY_NO == -1 || PRIMARY_KEY_NO == 0
|
||||
#
|
||||
create table t1 (f1 tinyblob not null) engine=innodb;
|
||||
alter table t1 add unique index (f1(255));
|
||||
drop table t1;
|
||||
|
||||
create table t1 (f1 tinyblob not null) engine=innodb;
|
||||
alter table t1 add unique index (f1(356));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (f1 point not null) engine=innodb;
|
||||
alter table t1 add unique index (f1);
|
||||
drop table t1;
|
||||
|
||||
|
86
mysql-test/suite/innodb/t/innodb-fk.test
Normal file
86
mysql-test/suite/innodb/t/innodb-fk.test
Normal file
@ -0,0 +1,86 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #18806829 OPENING INNODB TABLES WITH MANY FOREIGN KEY
|
||||
--echo # REFERENCES IS SLOW/CRASHES SEMAPHORE
|
||||
--echo #
|
||||
|
||||
create table t1 (f1 int primary key) engine=innodb;
|
||||
insert into t1 values (5);
|
||||
insert into t1 values (2882);
|
||||
insert into t1 values (10);
|
||||
|
||||
let $fk_tables = 120;
|
||||
|
||||
--disable_query_log
|
||||
let $i = $fk_tables;
|
||||
while ($i)
|
||||
{
|
||||
eval create table fk_$i (f1 int primary key,
|
||||
constraint pc$i foreign key (f1) references t1(f1)
|
||||
on delete cascade on update cascade) engine=innodb;
|
||||
eval insert into fk_$i values (5);
|
||||
eval insert into fk_$i values (2882);
|
||||
eval insert into fk_$i values (10);
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
update t1 set f1 = 28 where f1 = 2882;
|
||||
|
||||
select * from fk_120;
|
||||
select * from fk_1;
|
||||
select * from fk_50;
|
||||
|
||||
--disable_query_log
|
||||
let $i = $fk_tables;
|
||||
while ($i)
|
||||
{
|
||||
eval drop table fk_$i;
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # Check if restrict is working fine.
|
||||
--echo #
|
||||
|
||||
create table t1 (f1 int primary key) engine=innodb;
|
||||
|
||||
let $fk_tables = 30;
|
||||
|
||||
--disable_query_log
|
||||
let $i = $fk_tables;
|
||||
while ($i)
|
||||
{
|
||||
eval create table fk_$i (f1 int primary key,
|
||||
constraint pc$i foreign key (f1) references t1(f1)
|
||||
on delete restrict on update restrict) engine=innodb;
|
||||
eval insert into t1 values ($i);
|
||||
eval insert into fk_$i values ($i);
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
delete from t1 where f1 = 29;
|
||||
select * from fk_29;
|
||||
|
||||
--disable_query_log
|
||||
let $i = $fk_tables;
|
||||
while ($i)
|
||||
{
|
||||
eval drop table fk_$i;
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
drop table t1;
|
||||
|
@ -33,3 +33,18 @@ insert into t1 values (2);
|
||||
select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
|
||||
a a
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=Aria PARTITION BY KEY() PARTITIONS 2;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
LOCK TABLE v1 WRITE;
|
||||
CREATE TABLE v1 (i INT);
|
||||
ERROR HY000: Table 'v1' was not locked with LOCK TABLES
|
||||
INSERT INTO v1 VALUES (1);
|
||||
UNLOCK TABLES;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT * FROM t1;
|
||||
pk
|
||||
1
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
@ -49,6 +49,28 @@ insert into t1 values (2);
|
||||
select * from t2 left join t1 on (t2.a=t1.a) where t2.a='bbb';
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# MDEV-6493
|
||||
# Assertion `table->file->stats.records > 0 || error'
|
||||
# failure, or 'Invalid write' valgrind warnings, or crash on scenario
|
||||
# with Aria table, view, LOCK TABLES #
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=Aria PARTITION BY KEY() PARTITIONS 2;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
|
||||
LOCK TABLE v1 WRITE;
|
||||
--error 1100
|
||||
CREATE TABLE v1 (i INT);
|
||||
INSERT INTO v1 VALUES (1);
|
||||
UNLOCK TABLES;
|
||||
check table t1;
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
# Set defaults back
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
|
15
mysql-test/suite/rpl/r/failed_create_view-6409.result
Normal file
15
mysql-test/suite/rpl/r/failed_create_view-6409.result
Normal file
@ -0,0 +1,15 @@
|
||||
create table v1 (a int);
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
create table t1 (a int);
|
||||
create view v1 as select * from t1;
|
||||
ERROR 42S01: Table 'v1' already exists
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
v1
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
drop table if exists t1, v1;
|
||||
include/rpl_end.inc
|
4
mysql-test/suite/rpl/r/kill_hard-6290.result
Normal file
4
mysql-test/suite/rpl/r/kill_hard-6290.result
Normal file
@ -0,0 +1,4 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
kill user test2@nohost;
|
||||
include/rpl_end.inc
|
25
mysql-test/suite/rpl/r/rpl_heartbeat_debug.result
Normal file
25
mysql-test/suite/rpl/r/rpl_heartbeat_debug.result
Normal file
@ -0,0 +1,25 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
include/stop_slave.inc
|
||||
set @restore_slave_net_timeout= @@global.slave_net_timeout;
|
||||
set @@global.slave_net_timeout= 10;
|
||||
show status like 'Slave_heartbeat_period';;
|
||||
Variable_name Slave_heartbeat_period
|
||||
Value 60.000
|
||||
SET @save_dbug= @@GLOBAL.debug_dbug;
|
||||
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
|
||||
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
|
||||
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
||||
include/start_slave.inc
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
drop table t1;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug_dbug=@save_dbug;
|
||||
set @@global.slave_net_timeout= @restore_slave_net_timeout;
|
||||
include/start_slave.inc
|
||||
include/rpl_end.inc
|
61
mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
Normal file
61
mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result
Normal file
@ -0,0 +1,61 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
|
||||
[connection slave]
|
||||
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
[connection master]
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (1);
|
||||
DROP TABLE t1;
|
||||
[connection slave]
|
||||
include/install_semisync.inc
|
||||
[connection slave]
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
Warnings:
|
||||
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
rpl_semi_sync_slave DELETED
|
||||
[connection master]
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
Warnings:
|
||||
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
rpl_semi_sync_master DELETED
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (2);
|
||||
DROP TABLE t1;
|
||||
[connection slave]
|
||||
show status like "Rpl_semi_sync_slave_status";
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status ON
|
||||
[connection master]
|
||||
show status like "Rpl_semi_sync_master_status";
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
show status like "Rpl_semi_sync_master_clients";
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_clients 1
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
rpl_semi_sync_master DELETED
|
||||
[connection slave]
|
||||
include/stop_slave.inc
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
include/start_slave.inc
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
[connection master]
|
||||
show status like "Rpl_semi_sync_master_clients";
|
||||
Variable_name Value
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
plugin_name plugin_status
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (3);
|
||||
DROP TABLE t1;
|
||||
[connection slave]
|
||||
include/rpl_end.inc
|
@ -94,10 +94,12 @@ DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
include/stop_slave.inc
|
||||
[connection master]
|
||||
include/stop_dump_threads.inc
|
||||
SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*';
|
||||
[connection slave]
|
||||
include/restart_slave.inc
|
||||
include/start_slave.inc
|
||||
BEGIN;
|
||||
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
|
||||
[connection master]
|
||||
@ -116,6 +118,9 @@ SET DEBUG_SYNC= 'now WAIT_FOR signal.continued';
|
||||
[connection slave]
|
||||
include/wait_for_slave_to_stop.inc
|
||||
[connection slave1]
|
||||
[connection master]
|
||||
include/stop_dump_threads.inc
|
||||
[connection slave1]
|
||||
include/start_slave.inc
|
||||
[connection master]
|
||||
DROP TABLE t1, t2;
|
||||
|
24
mysql-test/suite/rpl/t/failed_create_view-6409.test
Normal file
24
mysql-test/suite/rpl/t/failed_create_view-6409.test
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# MDEV-6409 CREATE VIEW replication problem if error occurs in mysql_register_view
|
||||
#
|
||||
|
||||
#
|
||||
#
|
||||
# verify that failed CREATE VIEW is not replicated
|
||||
|
||||
create table v1 (a int);
|
||||
|
||||
source include/master-slave.inc;
|
||||
|
||||
connection master;
|
||||
create table t1 (a int);
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
create view v1 as select * from t1;
|
||||
show tables;
|
||||
sync_slave_with_master;
|
||||
show tables;
|
||||
|
||||
connection master;
|
||||
drop table if exists t1, v1;
|
||||
|
||||
--source include/rpl_end.inc
|
11
mysql-test/suite/rpl/t/kill_hard-6290.test
Normal file
11
mysql-test/suite/rpl/t/kill_hard-6290.test
Normal file
@ -0,0 +1,11 @@
|
||||
#
|
||||
# MDEV-6290 Crash in KILL HARD QUERY USER x@y when slave threads are running
|
||||
#
|
||||
|
||||
# this test doesn't depend on the binlog format, no need to run it three times
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
|
||||
--source include/master-slave.inc
|
||||
--connection server_2
|
||||
kill user test2@nohost;
|
||||
--source include/rpl_end.inc
|
52
mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
Normal file
52
mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
Normal file
@ -0,0 +1,52 @@
|
||||
# Testing master to slave heartbeat protocol, test cases that need debug build.
|
||||
|
||||
--source include/master-slave.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
connection slave;
|
||||
--source include/stop_slave.inc
|
||||
set @restore_slave_net_timeout= @@global.slave_net_timeout;
|
||||
--disable_warnings
|
||||
set @@global.slave_net_timeout= 10;
|
||||
--enable_warnings
|
||||
|
||||
###
|
||||
### Checking the range
|
||||
###
|
||||
|
||||
#
|
||||
# default period slave_net_timeout/2
|
||||
#
|
||||
--query_vertical show status like 'Slave_heartbeat_period';
|
||||
SET @save_dbug= @@GLOBAL.debug_dbug;
|
||||
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
|
||||
CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
|
||||
CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
||||
--source include/start_slave.inc
|
||||
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
--connection slave
|
||||
SELECT * FROM t1;
|
||||
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
||||
connection slave;
|
||||
--source include/stop_slave.inc
|
||||
--disable_warnings
|
||||
SET GLOBAL debug_dbug=@save_dbug;
|
||||
set @@global.slave_net_timeout= @restore_slave_net_timeout;
|
||||
--enable_warnings
|
||||
--source include/start_slave.inc
|
||||
|
||||
--source include/rpl_end.inc
|
130
mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
Normal file
130
mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test
Normal file
@ -0,0 +1,130 @@
|
||||
###############################################################################
|
||||
# Bug#17638477 UNINSTALL AND INSTALL SEMI-SYNC PLUGIN CAUSES SLAVES TO BREAK
|
||||
# Problem: Uninstallation of Semi sync plugin should be blocked when it is
|
||||
# in use.
|
||||
# Test case: Uninstallation of semi sync should be allowed
|
||||
# On Master:
|
||||
# 1) When there is no dump thread
|
||||
# 2) When there are no semi sync slaves (i.e., async replication).
|
||||
# On Slave:
|
||||
# 1) When there is no I/O thread
|
||||
# 2) When there are no semi sync enabled I/O thread (i.e.,async replication).
|
||||
###############################################################################
|
||||
|
||||
--source include/have_semisync_plugin.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
###############################################################################
|
||||
# Case 1: Uninstallation of semi sync plugins should be allowed when it is
|
||||
# not in use i.e., when asynchronous replication is active.
|
||||
###############################################################################
|
||||
# Step 1.1: Install semi sync master plugin on master
|
||||
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master';
|
||||
|
||||
# Step 1.2: Install semi sync slave plugin on slave
|
||||
--connection slave
|
||||
--echo [connection slave]
|
||||
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave';
|
||||
|
||||
# Step 1.3: Uninstallation of semisync plugin on master and slave should be
|
||||
# allowed at this state as there is no semi sync replication enabled between
|
||||
# master and slave.
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
--connection master
|
||||
--echo [connection master]
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
|
||||
# Step 1.4: Check that replication is working fine at the end of the test case.
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (1);
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
--echo [connection slave]
|
||||
|
||||
###############################################################################
|
||||
# Case 2: Uninstallation of semi sync plugins should be disallowed
|
||||
# when it is in use i.e., when semi sync replication is active
|
||||
###############################################################################
|
||||
# Step 2.1: Install and enable semi sync replication between master and slave
|
||||
--source include/install_semisync.inc
|
||||
|
||||
# Step 2.2: Check that rpl_semi_sync_slave uninstallation on Slave is not
|
||||
# possible at this state
|
||||
--connection slave
|
||||
--echo [connection slave]
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 2.3: Check that rpl_semi_sync_master uninstallation on Master is not
|
||||
# possible at this state
|
||||
--connection master
|
||||
--echo [connection master]
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 2.4: Check that replication is working fine at the end of the test case.
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (2);
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
--echo [connection slave]
|
||||
|
||||
# Step 2.5: Make sure rpl_semi_sync_master_status on Master and
|
||||
# rpl_semi_sync_slave_staus on Slave are ON
|
||||
show status like "Rpl_semi_sync_slave_status";
|
||||
|
||||
###############################################################################
|
||||
# Case 3: Uninstallation of semi sync plugin should be disallowed when there
|
||||
# are semi sync slaves even though rpl_semi_sync_master_enabled= OFF;.
|
||||
###############################################################################
|
||||
# Step 3.1: Disable semi sync on master
|
||||
--connection master
|
||||
--echo [connection master]
|
||||
show status like "Rpl_semi_sync_master_status";
|
||||
|
||||
# Step 3.2: Check that still Rpl_semi_sync_master_clients is 1
|
||||
show status like "Rpl_semi_sync_master_clients";
|
||||
|
||||
# Step 3.3: Since Rpl_semi_sync_master_clients is 1, uninstallation of
|
||||
# rpl_semi_sync_master should be disallowed.
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
###############################################################################
|
||||
# Case 4: Uninstallation of semi sync plugin should be allowed when it is not
|
||||
# in use. Same as Case 1 but this case is to check the case after enabling and
|
||||
# disabling semi sync replication.
|
||||
###############################################################################
|
||||
|
||||
# Step 4.1: Stop IO thread on slave.
|
||||
--connection slave
|
||||
--echo [connection slave]
|
||||
--source include/stop_slave.inc
|
||||
|
||||
# Step 4.2: Disable semi sync on slave.
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 4.3: Start IO thread on slave.
|
||||
--source include/start_slave.inc
|
||||
|
||||
# Step 4.4: Uninstall semi sync plugin, it should be successful now.
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 4.5: On Master, check that semi sync slaves are now '0'.
|
||||
--connection master
|
||||
--echo [connection master]
|
||||
show status like "Rpl_semi_sync_master_clients";
|
||||
|
||||
# Step 4.6: So uninstalling semi sync plugin should be allowed
|
||||
select plugin_name,plugin_status from information_schema.plugins where plugin_name like 'rpl_%';
|
||||
|
||||
# Step 4.7: Check that replication is working fine at the end of the test case
|
||||
CREATE TABLE t1(i int);
|
||||
INSERT INTO t1 values (3);
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
--echo [connection slave]
|
||||
|
||||
# Cleanup
|
||||
source include/rpl_end.inc;
|
@ -74,14 +74,17 @@ CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(1, 1);
|
||||
|
||||
sync_slave_with_master;
|
||||
--source include/stop_slave.inc
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
# make sure that there are no zombie threads
|
||||
--source include/stop_dump_threads.inc
|
||||
|
||||
let $debug_save= `SELECT @@GLOBAL.debug`;
|
||||
SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*';
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
source include/restart_slave_sql.inc;
|
||||
--source include/start_slave.inc
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET c2 = 2 WHERE c1 = 1;
|
||||
@ -93,6 +96,10 @@ INSERT INTO t2 VALUES(1);
|
||||
UPDATE t1 SET c2 = 3 WHERE c1 = 1;
|
||||
COMMIT;
|
||||
|
||||
# wait for the dump thread reach the sync point
|
||||
--let $wait_condition= select count(*)=1 from information_schema.processlist where state LIKE '%debug sync point%' and command='Binlog Dump'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
let $show_statement= SHOW PROCESSLIST;
|
||||
let $field= Info;
|
||||
@ -105,6 +112,7 @@ send STOP SLAVE;
|
||||
ROLLBACK;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR signal.continued';
|
||||
|
||||
@ -113,12 +121,25 @@ source include/wait_for_slave_to_stop.inc;
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
reap;
|
||||
|
||||
# Slave has stopped, thence lets make sure that
|
||||
# we kill the zombie dump threads. Also, make
|
||||
# sure that we disable the DBUG_EXECUTE_IF
|
||||
# that would set the dump thread to wait
|
||||
--source include/rpl_connection_master.inc
|
||||
--disable_query_log
|
||||
eval SET GLOBAL debug_dbug= '$debug_save';
|
||||
--enable_query_log
|
||||
# make sure that there are no zombie threads
|
||||
--source include/stop_dump_threads.inc
|
||||
|
||||
--source include/rpl_connection_slave1.inc
|
||||
# now the dump thread on the master will start
|
||||
# from a clean slate, i.e. without the
|
||||
# DBUG_EXECUTE_IF set
|
||||
source include/start_slave.inc;
|
||||
|
||||
--source include/rpl_connection_master.inc
|
||||
DROP TABLE t1, t2;
|
||||
--disable_query_log
|
||||
eval SET GLOBAL debug_dbug= '$debug_save';
|
||||
--enable_query_log
|
||||
--source include/rpl_end.inc
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
@ -4,7 +4,11 @@ SELECT @global_start_value;
|
||||
0
|
||||
'#--------------------FN_DYNVARS_177_01------------------------#'
|
||||
SET @@global.timed_mutexes = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SET @@global.timed_mutexes = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
0
|
||||
@ -17,15 +21,21 @@ SELECT @@timed_mutexes;
|
||||
SELECT global.timed_mutexes;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
SET global timed_mutexes = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
1
|
||||
'#--------------------FN_DYNVARS_177_03------------------------#'
|
||||
SET @@global.timed_mutexes = 0;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
0
|
||||
SET @@global.timed_mutexes = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
1
|
||||
@ -82,23 +92,33 @@ VARIABLE_VALUE
|
||||
ON
|
||||
'#---------------------FN_DYNVARS_177_08-------------------------#'
|
||||
SET @@global.timed_mutexes = OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
0
|
||||
SET @@global.timed_mutexes = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
1
|
||||
'#---------------------FN_DYNVARS_177_09----------------------#'
|
||||
SET @@global.timed_mutexes = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
1
|
||||
SET @@global.timed_mutexes = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
0
|
||||
SET @@global.timed_mutexes = @global_start_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.timed_mutexes;
|
||||
@@global.timed_mutexes
|
||||
0
|
||||
|
@ -795,6 +795,23 @@ SELECT COALESCE(c1) FROM t1 ORDER BY 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5745 analyze MySQL fix for bug#12368495
|
||||
--echo #
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x000000 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x00 FROM _ucs2 0x0061));
|
||||
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x000000 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _ucs2 0x0061));
|
||||
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x000000 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061));
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
@ -872,6 +872,22 @@ ORDER BY l DESC;
|
||||
|
||||
SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5745 analyze MySQL fix for bug#12368495
|
||||
--echo #
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x0000000000 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(LEADING 0x00 FROM _utf32 0x00000061));
|
||||
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0000000000 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _utf32 0x00000061));
|
||||
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x0000000000 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _utf32 0x00000061));
|
||||
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
@ -1595,6 +1595,11 @@ call foo('(( 00000000 ++ 00000000 ))');
|
||||
drop procedure foo;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug#18786138 SHA/MD5 HASHING FUNCTIONS DIE WITH "FILENAME" CHARACTER SET
|
||||
#
|
||||
select md5(_filename "a"), sha(_filename "a");
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
@ -1243,13 +1243,47 @@ CREATE TABLE t1 AS SELECT
|
||||
SHOW COLUMNS FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(concat(a,'10'))*1;
|
||||
SELECT * FROM t1 GROUP BY (-FROM_UNIXTIME(concat(a,'10')))*1;
|
||||
SELECT * FROM t1 GROUP BY (-FROM_UNIXTIME(concat(a,'10')));
|
||||
SELECT * FROM t1 GROUP BY ABS(FROM_UNIXTIME(concat(a,'10')));
|
||||
SELECT * FROM t1 GROUP BY @a:=(FROM_UNIXTIME(concat(a,'10'))*1);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
SET TIME_ZONE='+02:00';
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
|
||||
--echo #
|
||||
CREATE TABLE t1 (a DATE);
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(concat(a,'10'))/1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a DATE);
|
||||
INSERT INTO t1 VALUES ('2005-05-04');
|
||||
SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
|
||||
SELECT CHAR_LENGTH(CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10')))) AS f2 FROM t1;
|
||||
CREATE TABLE t2 AS SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
SELECT * FROM t2;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
||||
--echo #
|
||||
SET TIME_ZONE='+02:00';
|
||||
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
|
||||
SET TIME_ZONE=DEFAULT;
|
||||
|
||||
SET TIME_ZONE=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context
|
||||
@ -1589,3 +1623,11 @@ SELECT IFNULL(TIME'10:20:30',DATE'2001-01-01');
|
||||
SELECT CASE WHEN 1 THEN TIME'10:20:30' ELSE DATE'2001-01-01' END;
|
||||
SELECT COALESCE(TIME'10:20:30',DATE'2001-01-01');
|
||||
SET timestamp=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column
|
||||
--echo #
|
||||
CREATE TABLE t1 ( d DATE, t TIME );
|
||||
INSERT INTO t1 VALUES ('2008-12-05','22:34:09'),('2005-03-27','14:26:02');
|
||||
SELECT EXTRACT(DAY_MINUTE FROM GREATEST(t,d)), GREATEST(t,d) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
@ -1417,6 +1417,31 @@ explain SELECT f1, COUNT(DISTINCT f2) FROM t1 GROUP BY f1;
|
||||
drop table t1;
|
||||
--echo # End of test#50539.
|
||||
|
||||
--echo #
|
||||
--echo # Bug#17217128 - BAD INTERACTION BETWEEN MIN/MAX AND
|
||||
--echo # "HAVING SUM(DISTINCT)": WRONG RESULTS.
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (a INT, b INT, KEY(a,b));
|
||||
INSERT INTO t VALUES (1,1), (2,2), (3,3), (4,4), (1,0), (3,2), (4,5);
|
||||
ANALYZE TABLE t;
|
||||
|
||||
SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
|
||||
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
|
||||
|
||||
SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
|
||||
EXPLAIN SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
|
||||
|
||||
SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
|
||||
EXPLAIN SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
|
||||
|
||||
SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
|
||||
EXPLAIN SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
|
||||
|
||||
SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
|
||||
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4219 A simple select query returns random data (upstream bug#68473)
|
||||
--echo #
|
||||
|
@ -137,3 +137,96 @@ SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b';
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#17909656 - WRONG RESULTS FOR A SIMPLE QUERY WITH GROUP BY
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t0 (
|
||||
i1 INTEGER NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO t0 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
|
||||
(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),
|
||||
(21),(22),(23),(24),(25),(26),(27),(28),(29),(30);
|
||||
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(1) NOT NULL,
|
||||
i1 INTEGER NOT NULL,
|
||||
i2 INTEGER NOT NULL,
|
||||
UNIQUE KEY k1 (c1,i2)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 SELECT 'A',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'B',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'C',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'D',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'E',i1,i1 FROM t0;
|
||||
INSERT INTO t1 SELECT 'F',i1,i1 FROM t0;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
c1 CHAR(1) NOT NULL,
|
||||
i1 INTEGER NOT NULL,
|
||||
i2 INTEGER NOT NULL,
|
||||
UNIQUE KEY k2 (c1,i1,i2)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t2 SELECT 'A',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'B',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'C',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'D',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'E',i1,i1 FROM t0;
|
||||
INSERT INTO t2 SELECT 'F',i1,i1 FROM t0;
|
||||
|
||||
-- disable_result_log
|
||||
ANALYZE TABLE t1;
|
||||
ANALYZE TABLE t2;
|
||||
-- enable_result_log
|
||||
|
||||
let query=
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' AND i2 = 17) OR ( c1 = 'F')
|
||||
GROUP BY c1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
let query=
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR ( c1 = 'F' AND i2 = 17))
|
||||
GROUP BY c1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
let query=
|
||||
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||
GROUP BY c1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
let query=
|
||||
SELECT c1, max(i2) FROM t1
|
||||
WHERE ((c1 = 'C' AND (i2 = 40 OR i2 = 30)) OR ( c1 = 'F' AND (i2 = 40 )))
|
||||
GROUP BY c1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
let query=
|
||||
SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
|
||||
GROUP BY c1,i1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
let query=
|
||||
SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
|
||||
GROUP BY c1,i1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
let query=
|
||||
SELECT c1, i1, max(i2) FROM t2
|
||||
WHERE ((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35) OR ( i2 = 17 ))
|
||||
GROUP BY c1,i1;
|
||||
eval EXPLAIN $query;
|
||||
eval $query;
|
||||
|
||||
DROP TABLE t0,t1,t2;
|
||||
|
1
mysql-test/t/innodb_load_xa.opt
Normal file
1
mysql-test/t/innodb_load_xa.opt
Normal file
@ -0,0 +1 @@
|
||||
--ignore-builtin-innodb --loose-innodb --log-bin
|
18
mysql-test/t/innodb_load_xa.test
Normal file
18
mysql-test/t/innodb_load_xa.test
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# MDEV-6082 Assertion `0' fails in TC_LOG_DUMMY::log_and_order on DML after installing TokuDB at runtime on server with disabled InnoDB
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
|
||||
if (!$HA_INNODB_SO) {
|
||||
--skip Need InnoDB plugin
|
||||
}
|
||||
install plugin innodb soname 'ha_innodb';
|
||||
select engine,support,transactions,xa from information_schema.engines where engine='innodb';
|
||||
create table t1 (a int) engine=innodb;
|
||||
start transaction;
|
||||
insert t1 values (1);
|
||||
insert t1 values (2);
|
||||
commit;
|
||||
--source include/show_binlog_events.inc
|
||||
drop table t1;
|
||||
uninstall plugin innodb;
|
0
mysql-test/t/long_tmpdir-master.sh
Normal file → Executable file
0
mysql-test/t/long_tmpdir-master.sh
Normal file → Executable file
0
mysql-test/t/lowercase_mixed_tmpdir-master.sh
Normal file → Executable file
0
mysql-test/t/lowercase_mixed_tmpdir-master.sh
Normal file → Executable file
23
mysql-test/t/order_by_innodb.test
Normal file
23
mysql-test/t/order_by_innodb.test
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# ORDER BY handling (e.g. filesort) tests that require innodb
|
||||
#
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t0,t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6434: Wrong result (extra rows) with ORDER BY, multiple-column index, InnoDB
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT, c INT, d TEXT, KEY idx(a,b,c)) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 (a,c) VALUES
|
||||
(8, 9),(8, 10),(13, 15),(16, 17),(16, 18),(16, 19),(20, 21),
|
||||
(20, 22),(20, 24),(20, 25),(20, 26),(20, 27),(20, 28);
|
||||
|
||||
SELECT * FROM t1 WHERE a = 8 AND (b = 1 OR b IS NULL) ORDER BY c;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -2816,6 +2816,47 @@ select * from t1 IGNORE INDEX(dob, weeks_worked_last_year, hours_worked_per_week
|
||||
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6322: The PARTITION engine can return wrong query results
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
CustomerID varchar(5) DEFAULT NULL,
|
||||
CompanyName varchar(40) DEFAULT NULL,
|
||||
ContactName varchar(30) DEFAULT NULL,
|
||||
ContactTitle varchar(30) DEFAULT NULL,
|
||||
Address varchar(60) DEFAULT NULL,
|
||||
City varchar(15) DEFAULT NULL,
|
||||
Region varchar(15) DEFAULT NULL,
|
||||
PostalCode varchar(10) DEFAULT NULL,
|
||||
Country varchar(15) NOT NULL,
|
||||
Phone varchar(24) DEFAULT NULL,
|
||||
Fax varchar(24) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
PARTITION BY LIST COLUMNS(Country)
|
||||
(PARTITION p1 VALUES IN ('Germany','Austria','Switzerland','Poland'),
|
||||
PARTITION p2 VALUES IN ('USA','Canada','Mexico'),
|
||||
PARTITION p3 VALUES IN ('Spain','Portugal','Italy'),
|
||||
PARTITION p4 VALUES IN ('UK','Ireland'),
|
||||
PARTITION p5 VALUES IN ('France','Belgium'),
|
||||
PARTITION p6 VALUES IN ('Sweden','Finland','Denmark','Norway'),
|
||||
PARTITION p7 VALUES IN ('Venezuela','Argentina','Brazil')
|
||||
);
|
||||
|
||||
INSERT INTO t1 (CustomerID, City, Country) VALUES
|
||||
('ANATR','México D.F','Mexico'),
|
||||
('ANTON','México D.F','Mexico'),
|
||||
('BOTTM','Tsawassen','Canada'),
|
||||
('CENTC','México D.F','Mexico'),
|
||||
('GREAL','Eugene','USA'),
|
||||
('HUNGC','Elgin','USA'),
|
||||
('LAUGB','Vancouver','Canada'),
|
||||
('LAZYK','Walla Walla','USA'),
|
||||
('LETSS','San Francisco','USA'),
|
||||
('LONEP','Portland','USA');
|
||||
|
||||
SELECT * FROM t1 WHERE Country = 'USA';
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Test ALTER TABLE ADD/DROP PARTITION IF EXISTS
|
||||
#
|
||||
|
@ -776,6 +776,34 @@ drop table t3;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MySQL Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
|
||||
--echo #
|
||||
create table t1(c1 int, c2 int, c3 int, c4 int,
|
||||
primary key(c1,c2)) engine=InnoDB
|
||||
partition by list columns(c2)
|
||||
(partition p1 values in (1,2) engine=InnoDB,
|
||||
partition p2 values in (3,4) engine=InnoDB);
|
||||
|
||||
insert into t1 values (1,1,1,1),(2,3,1,1);
|
||||
select * from t1 where c1=2 and c2=3;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MySQL Bug#72803: Wrong "Impossible where" with LIST partitioning
|
||||
--echo # also MDEV-6240: Wrong "Impossible where" with LIST partitioning
|
||||
--echo #
|
||||
CREATE TABLE t1 ( d DATE) ENGINE = InnoDB
|
||||
PARTITION BY LIST COLUMNS (d)
|
||||
(
|
||||
PARTITION p0 VALUES IN ('1990-01-01','1991-01-01'),
|
||||
PARTITION p1 VALUES IN ('1981-01-01')
|
||||
);
|
||||
|
||||
INSERT INTO t1 (d) VALUES ('1991-01-01');
|
||||
SELECT * FROM t1 WHERE d = '1991-01-01';
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503,
|
||||
--echo # Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes"
|
||||
|
@ -1413,6 +1413,54 @@ explain partitions select * from t1 where a between 10 and 10+33;
|
||||
|
||||
drop table t0, t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
|
||||
--echo #
|
||||
CREATE TABLE t1
|
||||
(c1 int,
|
||||
c2 int,
|
||||
c3 int,
|
||||
c4 int,
|
||||
PRIMARY KEY (c1,c2))
|
||||
PARTITION BY LIST COLUMNS (c2)
|
||||
(PARTITION p1 VALUES IN (1,2),
|
||||
PARTITION p2 VALUES IN (3,4));
|
||||
INSERT INTO t1 VALUES (1, 1, 1, 1), (2, 3, 1, 1);
|
||||
INSERT INTO t1 VALUES (1, 2, 1, 1), (2, 4, 1, 1);
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 < 1;
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 1;
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 = 1;
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
|
||||
SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 = 3;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 < 4;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 4;
|
||||
SELECT * FROM t1 WHERE c1 = 2 AND c2 > 4;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 1;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 1;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 = 1;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 3;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 < 4;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 4;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 4;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6239: Partition pruning is not working as expected in an inner query
|
||||
--echo #
|
||||
|
@ -1,4 +1,6 @@
|
||||
|
||||
--source include/not_embedded.inc
|
||||
|
||||
# We used an invalid command-line option and InnoDB failed to start.
|
||||
# Ignore all related warnings
|
||||
call mtr.add_suppression("InnoDB");
|
||||
@ -8,3 +10,17 @@ SELECT
|
||||
PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE,PLUGIN_LIBRARY,PLUGIN_LIBRARY_VERSION,LOAD_OPTION
|
||||
FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb';
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6351 --plugin=force has no effect for built-in plugins
|
||||
--echo #
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--error 1
|
||||
--exec $MYSQLD_CMD --innodb=force --innodb-page-size=6000
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
||||
|
@ -1808,5 +1808,38 @@ EXECUTE stmt;
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6289 : Unexpected results when querying information_schema
|
||||
--echo #
|
||||
CREATE TABLE t1 (
|
||||
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
db varchar(254) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY db (db)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 (db) VALUES ('mysqltest1'),('mysqltest2'),('mysqltest3'),('mysqltest4');
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists mysqltest1;
|
||||
drop database if exists mysqltest2;
|
||||
drop database if exists mysqltest3;
|
||||
drop database if exists mysqltest4;
|
||||
--enable_warnings
|
||||
create database mysqltest1;
|
||||
create database mysqltest2;
|
||||
create database mysqltest3;
|
||||
create database mysqltest4;
|
||||
|
||||
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||
|
||||
EXPLAIN EXTENDED
|
||||
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||
|
||||
drop table t1;
|
||||
drop database mysqltest1;
|
||||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
drop database mysqltest4;
|
||||
|
||||
--echo # End of 5.5 tests
|
||||
|
||||
|
@ -1273,6 +1273,36 @@ SELECT(SELECT 1 AS a ORDER BY a) AS dev;
|
||||
SELECT(SELECT 1 AS a LIMIT 1) AS dev;
|
||||
SELECT(SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #17059925 : UNIONS COMPUTES ROWS_EXAMINED INCORRECTLY
|
||||
--echo #
|
||||
|
||||
## Save current state of slow log variables
|
||||
SET @old_slow_query_log= @@global.slow_query_log;
|
||||
SET @old_log_output= @@global.log_output;
|
||||
SET @old_long_query_time= @@long_query_time;
|
||||
SET GLOBAL log_output= "TABLE";
|
||||
SET GLOBAL slow_query_log= ON;
|
||||
SET SESSION long_query_time= 0;
|
||||
|
||||
CREATE TABLE t17059925 (a INT);
|
||||
CREATE TABLE t2 (b INT);
|
||||
CREATE TABLE t3 (c INT);
|
||||
INSERT INTO t17059925 VALUES (1), (2), (3);
|
||||
INSERT INTO t2 VALUES (4), (5), (6);
|
||||
INSERT INTO t3 VALUES (7), (8), (9);
|
||||
TRUNCATE table mysql.slow_log;
|
||||
--sorted_result
|
||||
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3;
|
||||
SELECT sql_text, rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%t17059925%';
|
||||
DROP TABLE t17059925, t2, t3;
|
||||
|
||||
## Reset to initial values
|
||||
SET @@long_query_time= @old_long_query_time;
|
||||
SET @@global.log_output= @old_log_output;
|
||||
SET @@global.slow_query_log= @old_slow_query_log;
|
||||
|
||||
--echo #
|
||||
--echo # lp:1010729: Unexpected syntax error from UNION
|
||||
--echo # (bug #54382) with single-table join nest
|
||||
|
@ -4700,6 +4700,47 @@ DROP DATABASE IF EXISTS nodb;
|
||||
--error ER_BAD_DB_ERROR
|
||||
CREATE VIEW nodb.a AS SELECT 1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # BUG#14117018 - MYSQL SERVER CREATES INVALID VIEW DEFINITION
|
||||
--echo # BUG#18405221 - SHOW CREATE VIEW OUTPUT INCORRECT
|
||||
--echo #
|
||||
|
||||
CREATE VIEW v1 AS (SELECT '' FROM DUAL);
|
||||
CREATE VIEW v2 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL);
|
||||
CREATE VIEW v3 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL);
|
||||
CREATE VIEW v4 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||
(SELECT '' AS col2 FROM DUAL) UNION ALL
|
||||
(SELECT '' FROM DUAL);
|
||||
|
||||
# In the second (and later) UNIONed queries, duplicate column names are allowed
|
||||
CREATE VIEW v5 AS (SELECT 'buggy' AS col1, 'fix' as col2 FROM DUAL) UNION ALL
|
||||
(SELECT 'buggy' as a, 'fix' as a FROM DUAL);
|
||||
|
||||
--echo # Name for the column in select1 is set properly with or
|
||||
--echo # without this fix.
|
||||
SHOW CREATE VIEW v1;
|
||||
|
||||
--echo # Name for the column in select2 is set with this fix.
|
||||
--echo # Without this fix, name would not have set for the
|
||||
--echo # columns in select2.
|
||||
SHOW CREATE VIEW v2;
|
||||
|
||||
--echo # Name for the field item in select2 & select3 is set with this fix.
|
||||
--echo # Without this fix, name would not have set for the
|
||||
--echo # columns in select2 & select3.
|
||||
SHOW CREATE VIEW v3;
|
||||
|
||||
--echo # Name for the field item in select3 is set with this fix.
|
||||
--echo # Without this fix, name would not have set for the
|
||||
--echo # columns in select3.
|
||||
SHOW CREATE VIEW v4;
|
||||
|
||||
DROP VIEW v1, v2, v3, v4, v5;
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
@ -5231,6 +5272,69 @@ drop view v1;
|
||||
drop table t1,t2,t3;
|
||||
SET optimizer_switch=@save_optimizer_switch_MDEV_3874;
|
||||
|
||||
#
|
||||
# MDEV-5515: sub-bug test of 3rd execution crash
|
||||
#
|
||||
|
||||
CREATE TABLE `t1` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`f0` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`f1` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `t2` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`f02` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||
`f03` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
);
|
||||
|
||||
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v1` AS
|
||||
SELECT
|
||||
`t1`.`f0` AS `f0`,
|
||||
`t1`.`f1` AS `f1`,
|
||||
`t2`.`f02` AS `f02`,
|
||||
`t2`.`f03` AS `f03`
|
||||
FROM
|
||||
(`t1` LEFT JOIN `t2` ON((`t1`.`id` = `t2`.`f02`)));
|
||||
|
||||
--delimiter |
|
||||
CREATE FUNCTION `f1`(
|
||||
p0 BIGINT(20) UNSIGNED
|
||||
)
|
||||
RETURNS bigint(20) unsigned
|
||||
DETERMINISTIC
|
||||
CONTAINS SQL
|
||||
SQL SECURITY DEFINER
|
||||
COMMENT ''
|
||||
BEGIN
|
||||
|
||||
DECLARE k0 INTEGER UNSIGNED DEFAULT 0;
|
||||
DECLARE lResult INTEGER UNSIGNED DEFAULT 0;
|
||||
|
||||
SET k0 = 0;
|
||||
WHILE k0 < 1 DO
|
||||
SELECT COUNT(*) as `f00` INTO lResult FROM `v1` WHERE `v1`.`f0` = p0; -- BUG
|
||||
SET k0 = k0 + 1;
|
||||
END WHILE;
|
||||
|
||||
RETURN(k0);
|
||||
END|
|
||||
--delimiter ;
|
||||
|
||||
|
||||
SELECT `f1`(1);
|
||||
SELECT `f1`(1);
|
||||
SELECT `f1`(1);
|
||||
SELECT `f1`(1);
|
||||
|
||||
DROP FUNCTION f1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo # -----------------------------------------------------------------
|
||||
--echo # -- End of 5.5 tests.
|
||||
--echo # -----------------------------------------------------------------
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates
|
||||
# Copyright (c) 2006, 2014, Oracle and/or its affiliates
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -89,7 +89,6 @@ ADD_EXECUTABLE(thr_lock thr_lock.c)
|
||||
TARGET_LINK_LIBRARIES(thr_lock mysys)
|
||||
SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")
|
||||
|
||||
INSTALL_DEBUG_SYMBOLS(mysys)
|
||||
IF(MSVC)
|
||||
INSTALL_DEBUG_TARGET(mysys DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||
ENDIF()
|
||||
|
@ -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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -456,6 +456,13 @@ process_flags:
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
else if (*fmt == 'c') /* char type parameter */
|
||||
{
|
||||
char par[2];
|
||||
par[0] = va_arg(args, int);
|
||||
if (my_b_write(info, (uchar*) par, 1))
|
||||
goto err;
|
||||
}
|
||||
else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */
|
||||
{
|
||||
char *par = va_arg(args, char *);
|
||||
|
@ -2,5 +2,5 @@
|
||||
#
|
||||
|
||||
/usr/lib/rpm/perl.req $* |
|
||||
sed -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d'
|
||||
sed -e '/perl(GD)/d' -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d'
|
||||
|
||||
|
@ -85,7 +85,7 @@ Name: mysql-%{product_suffix}
|
||||
Summary: A very fast and reliable SQL database server
|
||||
Group: Applications/Databases
|
||||
Version: @VERSION@
|
||||
Release: 2%{?commercial:.1}%{?dist}
|
||||
Release: 4%{?commercial:.1}%{?dist}
|
||||
License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field.
|
||||
Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
|
||||
URL: http://www.mysql.com/
|
||||
@ -118,7 +118,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
%if 0%{?rhel} > 6
|
||||
# For rpm => 4.9 only: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering
|
||||
%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::)
|
||||
%global __requires_exclude ^perl\\((GD|hostnames|lib::mtr|lib::v1|mtr_|My::)
|
||||
%global __provides_exclude_from ^(/usr/share/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$
|
||||
%else
|
||||
# https://fedoraproject.org/wiki/EPEL:Packaging#Generic_Filtering_on_EPEL6
|
||||
@ -166,6 +166,7 @@ Requires: mysql-community-common%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: MySQL-server < %{version}-%{release}
|
||||
Obsoletes: mysql-server < %{version}-%{release}
|
||||
Obsoletes: mariadb-server
|
||||
Obsoletes: mariadb-galera-server
|
||||
Provides: mysql-server = %{version}-%{release}
|
||||
Provides: mysql-server%{?_isa} = %{version}-%{release}
|
||||
%if 0%{?systemd}
|
||||
@ -262,6 +263,25 @@ This package contains the MySQL regression test suite for MySQL
|
||||
database server.
|
||||
|
||||
|
||||
%package bench
|
||||
Summary: MySQL benchmark suite
|
||||
Group: Applications/Databases
|
||||
%if 0%{?commercial}
|
||||
Obsoletes: mysql-community-bench < %{version}-%{release}
|
||||
Requires: mysql-enterprise-server%{?_isa} = %{version}-%{release}
|
||||
%else
|
||||
Requires: mysql-community-server%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
Obsoletes: mariadb-bench
|
||||
Obsoletes: community-mysql-bench < %{version}-%{release}
|
||||
Obsoletes: mysql-bench < %{version}-%{release}
|
||||
Provides: mysql-bench = %{version}-%{release}
|
||||
Provides: mysql-bench%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description bench
|
||||
This package contains the MySQL Benchmark Suite for MySQL database
|
||||
server.
|
||||
|
||||
%package devel
|
||||
Summary: Development header files and libraries for MySQL database client applications
|
||||
Group: Applications/Databases
|
||||
@ -344,6 +364,7 @@ Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release}
|
||||
Provides: MySQL-embedded%{?_isa} = %{version}-%{release}
|
||||
Requires: mysql-community-common%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
Obsoletes: mariadb-embedded
|
||||
Obsoletes: MySQL-embedded < %{version}-%{release}
|
||||
Obsoletes: mysql-embedded < %{version}-%{release}
|
||||
Provides: mysql-embedded = %{version}-%{release}
|
||||
@ -372,6 +393,7 @@ Requires: mysql-enterprise-embedded%{?_isa} = %{version}-%{release}
|
||||
Requires: mysql-community-devel%{?_isa} = %{version}-%{release}
|
||||
Requires: mysql-community-embedded%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
Obsoletes: mariadb-embedded-devel
|
||||
Obsoletes: mysql-embedded-devel < %{version}-%{release}
|
||||
Provides: mysql-embedded-devel = %{version}-%{release}
|
||||
Provides: mysql-embedded-devel%{?_isa} = %{version}-%{release}
|
||||
@ -472,11 +494,13 @@ mkdir debug
|
||||
cmake ../%{src_dir} \
|
||||
-DBUILD_CONFIG=mysql_release \
|
||||
-DINSTALL_LAYOUT=RPM \
|
||||
-DCMAKE_BUILD_TYPE=Debug %{?el7:-DENABLE_DTRACE=OFF} \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DENABLE_DTRACE=OFF \
|
||||
-DCMAKE_C_FLAGS="$optflags" \
|
||||
-DCMAKE_CXX_FLAGS="$optflags" \
|
||||
-DINSTALL_LIBDIR="%{_lib}/mysql" \
|
||||
-DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \
|
||||
-DINSTALL_SQLBENCHDIR=share \
|
||||
-DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
|
||||
-DFEATURE_SET="%{feature_set}" \
|
||||
-DWITH_EMBEDDED_SERVER=1 \
|
||||
@ -495,11 +519,13 @@ mkdir release
|
||||
cmake ../%{src_dir} \
|
||||
-DBUILD_CONFIG=mysql_release \
|
||||
-DINSTALL_LAYOUT=RPM \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo %{?el7:-DENABLE_DTRACE=OFF} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DENABLE_DTRACE=OFF \
|
||||
-DCMAKE_C_FLAGS="%{optflags}" \
|
||||
-DCMAKE_CXX_FLAGS="%{optflags}" \
|
||||
-DINSTALL_LIBDIR="%{_lib}/mysql" \
|
||||
-DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \
|
||||
-DINSTALL_SQLBENCHDIR=share \
|
||||
-DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \
|
||||
-DFEATURE_SET="%{feature_set}" \
|
||||
-DWITH_EMBEDDED_SERVER=1 \
|
||||
@ -862,6 +888,10 @@ fi
|
||||
%attr(644, root, root) %{_mandir}/man1/mysql_client_test_embedded.1*
|
||||
%attr(644, root, root) %{_mandir}/man1/mysqltest_embedded.1*
|
||||
|
||||
%files bench
|
||||
%defattr(-, root, root, -)
|
||||
%{_datadir}/sql-bench
|
||||
|
||||
%files embedded
|
||||
%defattr(-, root, root, -)
|
||||
%dir %attr(755, root, root) %{_libdir}/mysql
|
||||
@ -881,6 +911,19 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 08 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.39-4
|
||||
- Remove perl(GD) and dtrace dependencies
|
||||
|
||||
* Tue Jul 01 2014 Bjorn Munch <bjorn.munch@oracle.com> - 5.5.39-3
|
||||
- Disable dtrace, as it fails on OEL6 boxes with Oracle dtrace installed
|
||||
|
||||
* Thu Jun 26 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.39-2
|
||||
- Resolve embedded-devel conflict issue
|
||||
|
||||
* Wed Jun 25 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.39-1
|
||||
- Add bench package
|
||||
- Enable dtrace
|
||||
|
||||
* Sun May 11 2014 Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com> - 5.5.38-2
|
||||
- Increment release version to resolve upgrade conflict issue
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
|
||||
IF(UNIX)
|
||||
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
SET(SPECFILENAME "mysql.${VERSION}.spec")
|
||||
IF("${VERSION}" MATCHES "-ndb-")
|
||||
STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}")
|
||||
SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec")
|
||||
ENDIF()
|
||||
|
||||
# Left in current directory, to be taken during build
|
||||
CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} @ONLY)
|
||||
|
||||
FOREACH(ulnfile filter-requires-mysql.sh generate-tarball.sh my.cnf my_config.h
|
||||
mysql-5.5-errno.patch mysql-5.5-fix-tests.patch mysql-5.5-libdir.patch
|
||||
mysql-5.5-mtr1.patch mysql-5.5-stack-guard.patch mysql-5.5-testing.patch
|
||||
mysql-chain-certs.patch mysql-embedded-check.c mysql-expired-certs.patch
|
||||
mysql.init mysql-install-test.patch mysql-strmov.patch scriptstub.c
|
||||
README.mysql-docs)
|
||||
CONFIGURE_FILE(${ulnfile} ${CMAKE_CURRENT_BINARY_DIR}/${ulnfile} COPYONLY)
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
@ -1,15 +0,0 @@
|
||||
In order to have RPMs of MySQL which are distributed via ULN for Oracle Linux
|
||||
to be as closely compatible to such RPMs built and distributed by RedHat,
|
||||
this directory contains additional files which originated at RedHat
|
||||
and are used only for such RPMs intended for distribution via ULN.
|
||||
|
||||
Especially, this directory contains the spec file used to build these RPMs,
|
||||
named "mysql.spec". Please regard the following note:
|
||||
|
||||
You are receiving a copy of the Red Hat spec file.
|
||||
The terms of the Oracle license do NOT apply to the Red Hat spec file;
|
||||
it is licensed under the
|
||||
GNU GENERAL PUBLIC LICENSE Version 2, June 1991
|
||||
separately from the Oracle programs you receive.
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
The official MySQL documentation is not freely redistributable, so we cannot
|
||||
include it in RHEL or Fedora. You can find it on-line at
|
||||
|
||||
http://dev.mysql.com/doc/
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/lib/rpm/perl.req $* | grep -v -e "perl(th" -e "perl(lib::mtr" -e "perl(mtr"
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION=$1
|
||||
|
||||
rm -rf mysql-$VERSION
|
||||
|
||||
tar xfz mysql-$VERSION.tar.gz || exit 1
|
||||
|
||||
rm mysql-$VERSION/Docs/mysql.info
|
||||
|
||||
tar cfz mysql-$VERSION-nodocs.tar.gz mysql-$VERSION || exit 1
|
||||
|
||||
rm -rf mysql-$VERSION
|
||||
|
||||
exit 0
|
@ -1,10 +0,0 @@
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/lib/mysql/mysql.sock
|
||||
user=mysql
|
||||
# Disabling symbolic-links is recommended to prevent assorted security risks
|
||||
symbolic-links=0
|
||||
|
||||
[mysqld_safe]
|
||||
log-error=/var/log/mysqld.log
|
||||
pid-file=/var/run/mysqld/mysqld.pid
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Kluge to support multilib installation of both 32- and 64-bit RPMS:
|
||||
* we need to arrange that header files that appear in both RPMs are
|
||||
* identical. Hence, this file is architecture-independent and calls
|
||||
* in an arch-dependent file that will appear in just one RPM.
|
||||
*
|
||||
* To avoid breaking arches not explicitly supported by Red Hat, we
|
||||
* use this indirection file *only* on known multilib arches.
|
||||
*
|
||||
* Note: this may well fail if user tries to use gcc's -I- option.
|
||||
* But that option is deprecated anyway.
|
||||
*/
|
||||
#if defined(__x86_64__)
|
||||
#include "my_config_x86_64.h"
|
||||
#elif defined(__i386__)
|
||||
#include "my_config_i386.h"
|
||||
#elif defined(__ppc64__) || defined(__powerpc64__)
|
||||
#include "my_config_ppc64.h"
|
||||
#elif defined(__ppc__) || defined(__powerpc__)
|
||||
#include "my_config_ppc.h"
|
||||
#elif defined(__s390x__)
|
||||
#include "my_config_s390x.h"
|
||||
#elif defined(__s390__)
|
||||
#include "my_config_s390.h"
|
||||
#elif defined(__sparc__) && defined(__arch64__)
|
||||
#include "my_config_sparc64.h"
|
||||
#elif defined(__sparc__)
|
||||
#include "my_config_sparc.h"
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
"extern int errno" is just a really bad idea.
|
||||
|
||||
|
||||
diff -Naur mysql-5.1.32.orig/include/my_sys.h mysql-5.1.32/include/my_sys.h
|
||||
--- mysql-5.1.32.orig/include/my_sys.h 2009-02-13 19:52:19.000000000 -0500
|
||||
+++ mysql-5.1.32/include/my_sys.h 2009-03-04 18:08:40.000000000 -0500
|
||||
@@ -199,13 +199,8 @@
|
||||
#define my_afree(PTR) my_free(PTR)
|
||||
#endif /* HAVE_ALLOCA */
|
||||
|
||||
-#ifndef errno /* did we already get it? */
|
||||
-#ifdef HAVE_ERRNO_AS_DEFINE
|
||||
#include <errno.h> /* errno is a define */
|
||||
-#else
|
||||
-extern int errno; /* declare errno */
|
||||
-#endif
|
||||
-#endif /* #ifndef errno */
|
||||
+
|
||||
extern char *home_dir; /* Home directory for user */
|
||||
extern const char *my_progname; /* program-name (printed in errors) */
|
||||
extern char curr_dir[]; /* Current directory for user */
|
@ -1,34 +0,0 @@
|
||||
Adapt tests (where needed) to RedHat conventions.
|
||||
|
||||
1) The RedHat convention uses the package name "mysql*" whereas upstream uses "MySQL*".
|
||||
Test "file_contents" constructs path names and needs to be adapted.
|
||||
|
||||
=== modified file 'mysql-test/t/file_contents.test'
|
||||
--- mysql-5.5.17-orig/mysql-test/t/file_contents.test 2011-10-10 12:03:29 +0000
|
||||
+++ mysql-5.5.17/mysql-test/t/file_contents.test 2011-11-16 18:07:55 +0000
|
||||
@@ -17,20 +17,20 @@ if ($dir_bin =~ m|/usr/|) {
|
||||
$dir_docs =~ s|/lib|/share/doc|;
|
||||
if(-d "$dir_docs/packages") {
|
||||
# SuSE: "packages/" in the documentation path
|
||||
- $dir_docs = glob "$dir_docs/packages/MySQL-server*";
|
||||
+ $dir_docs = glob "$dir_docs/packages/mysql-server*";
|
||||
} else {
|
||||
# RedHat: version number in directory name
|
||||
- $dir_docs = glob "$dir_docs/MySQL-server*";
|
||||
+ $dir_docs = glob "$dir_docs/mysql-server*";
|
||||
}
|
||||
} elsif ($dir_bin =~ m|/usr$|) {
|
||||
# RPM build during development
|
||||
$dir_docs = "$dir_bin/share/doc";
|
||||
if(-d "$dir_docs/packages") {
|
||||
# SuSE: "packages/" in the documentation path
|
||||
- $dir_docs = glob "$dir_docs/packages/MySQL-server*";
|
||||
+ $dir_docs = glob "$dir_docs/packages/mysql-server*";
|
||||
} else {
|
||||
# RedHat: version number in directory name
|
||||
- $dir_docs = glob "$dir_docs/MySQL-server*";
|
||||
+ $dir_docs = glob "$dir_docs/mysql-server*";
|
||||
}
|
||||
} else {
|
||||
# tar.gz package, Windows, or developer work (in BZR)
|
||||
|
@ -1,28 +0,0 @@
|
||||
The RPMs built by MySQL AB (-> Sun -> Oracle) put the libraries into "/usr/lib".
|
||||
Those built by RedHat put them into "/usr/lib/mysql".
|
||||
This patch is to modify the cmake files to follow the RedHat convention.
|
||||
Similar, the server is now in "/usr/libexec" (formerly "/usr/sbin").
|
||||
|
||||
|
||||
diff -Naur mysql-5.5.17.orig/cmake/install_layout.cmake mysql-5.5.17/cmake/install_layout.cmake
|
||||
--- mysql-5.5.17.orig/cmake/install_layout.cmake 2011-06-30 15:46:53 +0000
|
||||
+++ mysql-5.5.17/cmake/install_layout.cmake 2011-10-27 16:40:10 +0000
|
||||
@@ -140,14 +140,14 @@ SET(INSTALL_SBINDIR_RPM
|
||||
# be applied at build time via "rpmbuild".
|
||||
#
|
||||
SET(INSTALL_BINDIR_RPM "bin")
|
||||
-SET(INSTALL_SBINDIR_RPM "sbin")
|
||||
+SET(INSTALL_SBINDIR_RPM "libexec")
|
||||
SET(INSTALL_SCRIPTDIR_RPM "bin")
|
||||
#
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
- SET(INSTALL_LIBDIR_RPM "lib64")
|
||||
+ SET(INSTALL_LIBDIR_RPM "lib64/mysql")
|
||||
SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
|
||||
ELSE()
|
||||
- SET(INSTALL_LIBDIR_RPM "lib")
|
||||
+ SET(INSTALL_LIBDIR_RPM "lib/mysql")
|
||||
SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
|
||||
ENDIF()
|
||||
#
|
||||
|
@ -1,25 +0,0 @@
|
||||
Drop support for version 1 of "mysql-test-run.pl" from the RPMs:
|
||||
|
||||
1) The auto-generation of Perl dependencies will mishandle that code,
|
||||
probably because its run directory differs from its storage location.
|
||||
2) It does not provide several variables which are used in tests of MySQL 5.5
|
||||
|
||||
If you really need it, take it from the source tarball.
|
||||
|
||||
=== modified file 'mysql-test/mysql-test-run.pl'
|
||||
--- mysql-5.5.17-orig/mysql-test/mysql-test-run.pl 2011-10-03 11:16:40 +0000
|
||||
+++ mysql-5.5.17/mysql-test/mysql-test-run.pl 2011-11-16 19:06:38 +0000
|
||||
@@ -58,10 +58,9 @@ BEGIN {
|
||||
if ( $version == 1 )
|
||||
{
|
||||
print "=======================================================\n";
|
||||
- print " WARNING: Using mysql-test-run.pl version 1! \n";
|
||||
+ print " ERROR: Support for version 1 is dropped in this distribution! \n";
|
||||
print "=======================================================\n";
|
||||
- # Should use exec() here on *nix but this appears not to work on Windows
|
||||
- exit(system($^X, "lib/v1/mysql-test-run.pl", @ARGV) >> 8);
|
||||
+ exit(1);
|
||||
}
|
||||
elsif ( $version == 2 )
|
||||
{
|
||||
|
@ -1,140 +0,0 @@
|
||||
mysql is not accounting for the "guard page" when setting thread stack size
|
||||
requests. This is fatal on PPC systems, which may use guard pages as large
|
||||
as 64K. This patch also documents the IA64 situation a bit better.
|
||||
|
||||
Note: there are quite a few other setstacksize calls besides the two in
|
||||
mysqld.cc; is it important to fix any of the others?
|
||||
|
||||
Filed upstream at http://bugs.mysql.com/bug.php?id=35019
|
||||
|
||||
|
||||
diff -Naur mysql-5.1.30.orig/sql/mysqld.cc mysql-5.1.30/sql/mysqld.cc
|
||||
--- mysql-5.1.30.orig/sql/mysqld.cc 2008-11-14 11:37:13.000000000 -0500
|
||||
+++ mysql-5.1.30/sql/mysqld.cc 2009-01-13 12:08:35.000000000 -0500
|
||||
@@ -2653,6 +2653,70 @@
|
||||
}
|
||||
|
||||
|
||||
+/* pthread_attr_setstacksize without so much platform-dependency */
|
||||
+/* returns the actual stack size if possible */
|
||||
+static size_t my_setstacksize(pthread_attr_t *attr, size_t stacksize)
|
||||
+{
|
||||
+ size_t guard_size = 0;
|
||||
+
|
||||
+#if defined(__ia64__) || defined(__ia64)
|
||||
+ /*
|
||||
+ On IA64, half of the requested stack size is used for "normal stack"
|
||||
+ and half for "register stack". The space measured by check_stack_overrun
|
||||
+ is the "normal stack", so double the request to make sure we have the
|
||||
+ caller-expected amount of normal stack.
|
||||
+
|
||||
+ NOTE: there is no guarantee that the register stack can't grow faster
|
||||
+ than normal stack, so it's very unclear that we won't dump core due to
|
||||
+ stack overrun despite check_stack_overrun's efforts. Experimentation
|
||||
+ shows that in the execution_constants test, the register stack grows
|
||||
+ less than half as fast as normal stack, but perhaps other scenarios are
|
||||
+ less forgiving. If it turns out that more space is needed for the
|
||||
+ register stack, that could be forced (rather inefficiently) by using a
|
||||
+ multiplier higher than 2 here.
|
||||
+ */
|
||||
+ stacksize *= 2;
|
||||
+#endif
|
||||
+
|
||||
+ /*
|
||||
+ On many machines, the "guard space" is subtracted from the requested
|
||||
+ stack size, and that space is quite large on some platforms. So add
|
||||
+ it to our request, if we can find out what it is.
|
||||
+
|
||||
+ FIXME: autoconfiscate use of pthread_attr_getguardsize
|
||||
+ */
|
||||
+ if (pthread_attr_getguardsize(attr, &guard_size))
|
||||
+ guard_size = 0; /* if can't find it out, treat as 0 */
|
||||
+
|
||||
+ pthread_attr_setstacksize(attr, stacksize + guard_size);
|
||||
+
|
||||
+ /* Retrieve actual stack size if possible */
|
||||
+#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
+ {
|
||||
+ size_t real_stack_size= 0;
|
||||
+ /* We must ignore real_stack_size = 0 as Solaris 2.9 can return 0 here */
|
||||
+ if (pthread_attr_getstacksize(attr, &real_stack_size) == 0 &&
|
||||
+ real_stack_size > guard_size)
|
||||
+ {
|
||||
+ real_stack_size -= guard_size;
|
||||
+ if (real_stack_size < stacksize)
|
||||
+ {
|
||||
+ if (global_system_variables.log_warnings)
|
||||
+ sql_print_warning("Asked for %ld thread stack, but got %ld",
|
||||
+ (long) stacksize, (long) real_stack_size);
|
||||
+ stacksize= real_stack_size;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#if defined(__ia64__) || defined(__ia64)
|
||||
+ stacksize /= 2;
|
||||
+#endif
|
||||
+ return stacksize;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void start_signal_handler(void)
|
||||
{
|
||||
int error;
|
||||
@@ -2663,15 +2727,7 @@
|
||||
#if !defined(HAVE_DEC_3_2_THREADS)
|
||||
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
|
||||
(void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
|
||||
-#if defined(__ia64__) || defined(__ia64)
|
||||
- /*
|
||||
- Peculiar things with ia64 platforms - it seems we only have half the
|
||||
- stack size in reality, so we have to double it here
|
||||
- */
|
||||
- pthread_attr_setstacksize(&thr_attr,my_thread_stack_size*2);
|
||||
-#else
|
||||
- pthread_attr_setstacksize(&thr_attr,my_thread_stack_size);
|
||||
-#endif
|
||||
+ (void) my_setstacksize(&thr_attr,my_thread_stack_size);
|
||||
#endif
|
||||
|
||||
mysql_mutex_lock(&LOCK_thread_count);
|
||||
@@ -4445,37 +4501,7 @@
|
||||
unireg_abort(1); // Will do exit
|
||||
|
||||
init_signals();
|
||||
-#if defined(__ia64__) || defined(__ia64)
|
||||
- /*
|
||||
- Peculiar things with ia64 platforms - it seems we only have half the
|
||||
- stack size in reality, so we have to double it here
|
||||
- */
|
||||
- pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size*2);
|
||||
-#else
|
||||
- pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size);
|
||||
-#endif
|
||||
-#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
- {
|
||||
- /* Retrieve used stack size; Needed for checking stack overflows */
|
||||
- size_t stack_size= 0;
|
||||
- pthread_attr_getstacksize(&connection_attrib, &stack_size);
|
||||
-#if defined(__ia64__) || defined(__ia64)
|
||||
- stack_size/= 2;
|
||||
-#endif
|
||||
- /* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */
|
||||
- if (stack_size && stack_size < my_thread_stack_size)
|
||||
- {
|
||||
- if (global_system_variables.log_warnings)
|
||||
- sql_print_warning("Asked for %lu thread stack, but got %ld",
|
||||
- my_thread_stack_size, (long) stack_size);
|
||||
-#if defined(__ia64__) || defined(__ia64)
|
||||
- my_thread_stack_size= stack_size*2;
|
||||
-#else
|
||||
- my_thread_stack_size= stack_size;
|
||||
-#endif
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
+ my_thread_stack_size = my_setstacksize(&connection_attrib,my_thread_stack_size);
|
||||
|
||||
(void) thr_setconcurrency(concurrency); // 10 by default
|
||||
|
@ -1,23 +0,0 @@
|
||||
Hack the top-level Makefile to enable the openssl regression tests.
|
||||
(Why doesn't this happen automatically given the configure option??)
|
||||
|
||||
Also, increase the overall timeout for the regression tests to 12 hours,
|
||||
because on a slow or heavily-loaded build machine sometimes the default of
|
||||
5 hours isn't enough. (This has been demonstrated to fail in mass-rebuild
|
||||
scenarios, which aren't that uncommon for Fedora.) Similarly increase the
|
||||
per-testcase timeout to 30 minutes, since the default of 15 hasn't got a
|
||||
great deal of headroom either.
|
||||
|
||||
|
||||
diff -Naur mysql-5.1.32.orig/Makefile.am mysql-5.1.32/Makefile.am
|
||||
--- mysql-5.1.32.orig/Makefile.am 2009-02-13 19:51:56.000000000 -0500
|
||||
+++ mysql-5.1.32/Makefile.am 2009-03-04 18:12:36.000000000 -0500
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
test-ns:
|
||||
cd mysql-test ; \
|
||||
- @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed
|
||||
+ @PERL@ ./mysql-test-run.pl $(force) $(mem) --ssl --mysqld=--binlog-format=mixed --suite-timeout=720 --testcase-timeout=30
|
||||
|
||||
test-binlog-statement:
|
||||
cd mysql-test ; \
|
@ -1,45 +0,0 @@
|
||||
Fix things so that chains of certificates work in the server and client
|
||||
certificate files.
|
||||
|
||||
This only really works for OpenSSL-based builds, as yassl is unable to read
|
||||
multiple certificates from a file. The patch below to yassl/src/ssl.cpp
|
||||
doesn't fix that, but just arranges that the viosslfactories.c patch won't
|
||||
have any ill effects in a yassl build. Since we don't use yassl in Red Hat/
|
||||
Fedora builds, I'm not feeling motivated to try to fix yassl for this.
|
||||
|
||||
See RH bug #598656. Filed upstream at http://bugs.mysql.com/bug.php?id=54158
|
||||
|
||||
===
|
||||
|
||||
Joerg Bruehe, MySQL Build Team at Oracle: First patch adapted to code changes in MySQL 5.5
|
||||
|
||||
|
||||
diff -Naur mysql-5.5.29.orig/vio/viosslfactories.c mysql-5.5.29/vio/viosslfactories.c
|
||||
--- mysql-5.5.29.orig/vio/viosslfactories.c 2010-05-06 11:28:07.000000000 -0400
|
||||
+++ mysql-5.5.29/vio/viosslfactories.c 2010-05-26 23:23:46.000000000 -0400
|
||||
@@ -106,7 +106,7 @@
|
||||
key_file= cert_file;
|
||||
|
||||
if (cert_file &&
|
||||
- SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
|
||||
+ SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0)
|
||||
{
|
||||
*error= SSL_INITERR_CERT;
|
||||
DBUG_PRINT("error",("%s from file '%s'", sslGetErrString(*error), cert_file));
|
||||
diff -Naur mysql-5.1.47.orig/extra/yassl/src/ssl.cpp mysql-5.1.47/extra/yassl/src/ssl.cpp
|
||||
--- mysql-5.1.47.orig/extra/yassl/src/ssl.cpp 2010-05-06 11:24:26.000000000 -0400
|
||||
+++ mysql-5.1.47/extra/yassl/src/ssl.cpp 2010-05-26 23:29:13.000000000 -0400
|
||||
@@ -1606,10 +1606,10 @@
|
||||
}
|
||||
|
||||
|
||||
- int SSL_CTX_use_certificate_chain_file(SSL_CTX*, const char*)
|
||||
+ int SSL_CTX_use_certificate_chain_file(SSL_CTX* ctx, const char* file)
|
||||
{
|
||||
- // TDOD:
|
||||
- return SSL_SUCCESS;
|
||||
+ // For the moment, treat like use_certificate_file
|
||||
+ return read_file(ctx, file, SSL_FILETYPE_PEM, Cert);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user