mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Local merge of mariadb-5.5.39
bzr merge -r4264 maria/5.5 Text conflict in sql/mysqld.cc Text conflict in storage/xtradb/btr/btr0cur.c Text conflict in storage/xtradb/buf/buf0buf.c Text conflict in storage/xtradb/buf/buf0lru.c Text conflict in storage/xtradb/handler/ha_innodb.cc 5 conflicts encountered.
This commit is contained in:
@ -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)
|
||||
@ -432,7 +440,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()
|
||||
|
||||
|
@ -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
|
||||
@ -70,6 +70,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);
|
||||
@ -303,9 +304,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);
|
||||
@ -313,8 +314,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)
|
||||
@ -325,7 +330,7 @@ int main(int argc,char *argv[])
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
commands = argv;
|
||||
commands = temp_argv;
|
||||
if (tty_password)
|
||||
opt_password = get_tty_password(NullS);
|
||||
|
||||
@ -465,6 +470,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);
|
||||
@ -1165,6 +1177,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)
|
||||
{
|
||||
|
@ -1171,7 +1171,7 @@ check_consistent_binlog_pos(char *binlog_pos_file, char *binlog_pos_offset)
|
||||
|
||||
if (mysql_query_with_error_report(mysql, &res,
|
||||
"SHOW STATUS LIKE 'binlog_snapshot_%'"))
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
found= 0;
|
||||
while ((row= mysql_fetch_row(res)))
|
||||
@ -5645,7 +5645,23 @@ int main(int argc, char **argv)
|
||||
dump_all_tablespaces();
|
||||
dump_all_databases();
|
||||
}
|
||||
else if (argc > 1 && !opt_databases)
|
||||
else
|
||||
{
|
||||
// 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)
|
||||
@ -5659,6 +5675,7 @@ int main(int argc, char **argv)
|
||||
dump_tablespaces_for_databases(argv);
|
||||
dump_databases(argv);
|
||||
}
|
||||
}
|
||||
|
||||
/* add 'START SLAVE' to end of dump */
|
||||
if (opt_slave_apply && add_slave_statements())
|
||||
|
@ -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")
|
||||
|
@ -61,7 +61,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_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
|
||||
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
|
||||
ENDFOREACH()
|
||||
|
||||
# Remove support for exceptions
|
||||
@ -109,7 +117,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
|
||||
@ -37,7 +37,6 @@ ENDIF()
|
||||
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. 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
|
||||
@ -790,7 +790,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
|
||||
@ -36,7 +36,6 @@ ENDIF()
|
||||
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
|
||||
@ -294,8 +294,8 @@ private:
|
||||
byte* signature_;
|
||||
char issuer_[ASN_NAME_MAX]; // Names
|
||||
char subject_[ASN_NAME_MAX]; // Names
|
||||
char beforeDate_[MAX_DATE_SZ]; // valid before date
|
||||
char afterDate_[MAX_DATE_SZ]; // valid after date
|
||||
char beforeDate_[MAX_DATE_SZ+1]; // valid before date, +null term
|
||||
char afterDate_[MAX_DATE_SZ+1]; // valid after date, +null term
|
||||
bool verify_; // Default to yes, but could be off
|
||||
|
||||
void ReadHeader();
|
||||
|
@ -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
|
||||
@ -50,6 +50,8 @@ void thd_clear_errors(THD *thd);
|
||||
void thd_set_thread_stack(THD *thd, char *stack_start);
|
||||
void thd_lock_thread_count(THD *thd);
|
||||
void thd_unlock_thread_count(THD *thd);
|
||||
void thd_lock_thread_remove(THD *thd);
|
||||
void thd_unlock_thread_remove(THD *thd);
|
||||
void thd_close_connection(THD *thd);
|
||||
THD *thd_get_current_thd();
|
||||
void thd_lock_data(THD *thd);
|
||||
|
@ -385,7 +385,6 @@ SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIB
|
||||
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{
|
||||
|
0
mysql-test/collections/default.weekly
Executable file → Normal file
0
mysql-test/collections/default.weekly
Executable file → Normal file
@ -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;
|
||||
}
|
||||
|
@ -159,6 +159,7 @@ INSERT INTO global_suppressions VALUES
|
||||
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
||||
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
||||
("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"),
|
||||
("InnoDB: Warning: semaphore wait:"),
|
||||
|
||||
/*
|
||||
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
|
||||
|
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
|
||||
|
||||
|
@ -4277,5 +4277,38 @@ 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
|
||||
#
|
||||
|
@ -1237,5 +1237,38 @@ 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
|
||||
#
|
||||
|
@ -2950,6 +2950,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
|
||||
#
|
||||
|
@ -1941,9 +1941,139 @@ SELECT 1 FROM DUAL WHERE MINUTE(TIMEDIFF(NULL, '12:12:12'));
|
||||
SELECT 1 FROM DUAL WHERE SECOND(TIMEDIFF(NULL, '12:12:12'));
|
||||
1
|
||||
#
|
||||
# MDEV-4511 Assertion `scale <= precision' fails on GROUP BY TIMEDIFF with incorrect types
|
||||
#
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT a FROM t1 GROUP BY TIMEDIFF('2004-06-12',a) * 1;
|
||||
a
|
||||
2005-05-04
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '2004-06-12'
|
||||
Warning 1292 Truncated incorrect time value: '2004-06-12'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT a FROM t1 GROUP BY ADDTIME(a,'10')*1;
|
||||
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 SEC_TO_TIME(concat(a,'10'))*1;
|
||||
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 ADDTIME(timestamp('2001-01-01 00:00:00'),CAST(a AS SIGNED)&0xF)*1;
|
||||
a
|
||||
2005-05-04
|
||||
2000-02-23
|
||||
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 STR_TO_DATE(a,concat('%Y-%m-%d.%f',if(rand(),'','')))*1;
|
||||
a
|
||||
2000-02-23
|
||||
2005-05-04
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT
|
||||
STR_TO_DATE('2001-01-01', '%Y-%m-%d') AS date_only,
|
||||
STR_TO_DATE('10:10:10', '%H:%i:%s') AS time_only,
|
||||
STR_TO_DATE('10:10:10.123', '%H:%i:%s.%f') AS time_microsecond,
|
||||
STR_TO_DATE('2001-01-01 10:10:10', '%Y-%m-%d %H:%i:%s') AS date_time,
|
||||
STR_TO_DATE('2001-01-01 10:10:10.123', '%Y-%m-%d %H:%i:%s.%f') AS date_time_microsecond;
|
||||
SHOW COLUMNS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
date_only date YES NULL
|
||||
time_only time YES NULL
|
||||
time_microsecond time(6) YES NULL
|
||||
date_time datetime YES NULL
|
||||
date_time_microsecond datetime(6) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 AS SELECT
|
||||
SEC_TO_TIME(1)+0.1,
|
||||
SEC_TO_TIME(1.1)+0.1,
|
||||
SEC_TO_TIME(1.12)+0.1,
|
||||
SEC_TO_TIME(1.123456)+0.1,
|
||||
SEC_TO_TIME(1.1234567)+0.1;
|
||||
SHOW COLUMNS FROM t1;
|
||||
Field Type Null Key Default Extra
|
||||
SEC_TO_TIME(1)+0.1 decimal(12,1) YES NULL
|
||||
SEC_TO_TIME(1.1)+0.1 decimal(13,1) YES NULL
|
||||
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
|
||||
@ -2416,3 +2546,18 @@ c1 c2
|
||||
9923-03-10 22:47:10.0 NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: '2000000000000000000.0'
|
||||
#
|
||||
# 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;
|
||||
|
@ -3506,7 +3506,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
|
||||
@ -3534,7 +3534,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
|
||||
@ -3563,6 +3563,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 1 Using where; Using index for group-by
|
||||
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 9 NULL 59 Using where; Using index for group-by
|
||||
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 9 NULL 58 Using where; Using index for group-by
|
||||
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;
|
||||
|
20
mysql-test/r/innodb_load_xa.result
Normal file
20
mysql-test/r/innodb_load_xa.result
Normal file
@ -0,0 +1,20 @@
|
||||
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;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
|
||||
mysqld-bin.000001 # Query # # BEGIN
|
||||
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;
|
@ -824,8 +824,8 @@ The following options may be given as the first argument:
|
||||
How many threads we should keep in a cache for reuse
|
||||
--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;
|
@ -2521,3 +2521,47 @@ 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;
|
||||
|
@ -678,4 +678,32 @@ count(*)
|
||||
802
|
||||
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;
|
||||
set global default_storage_engine=default;
|
||||
|
@ -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
|
||||
|
@ -4791,6 +4791,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 );
|
||||
@ -5302,6 +5341,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
@ -126,3 +126,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: 1)
|
||||
#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;
|
||||
|
@ -128,3 +128,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
|
||||
|
@ -0,0 +1,147 @@
|
||||
--echo #
|
||||
--echo # Testing robustness against random compression failures
|
||||
--echo #
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--disable_query_log
|
||||
# record the file format in order to restore in the end.
|
||||
--let $file_format_save = `SELECT @@innodb_file_format`
|
||||
--let $file_format_max_save = `SELECT @@innodb_file_format_max`
|
||||
--let $simulate_comp_failures_save = `SELECT @@innodb_simulate_comp_failures`
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET GLOBAL INNODB_FILE_FORMAT='Barracuda';
|
||||
--enable_warnings
|
||||
|
||||
# since this test generates lot of errors in log, suppress checking errors
|
||||
call mtr.add_suppression(".*");
|
||||
--enable_query_log
|
||||
|
||||
# create the table with compressed pages of size 8K.
|
||||
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
|
||||
# percentage of compressions that will be forced to fail
|
||||
SET GLOBAL innodb_simulate_comp_failures = 25;
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
|
||||
let $num_inserts_ind = $num_inserts;
|
||||
while ($num_inserts_ind)
|
||||
{
|
||||
let $repeat = `select floor(rand() * 10)`;
|
||||
eval
|
||||
INSERT INTO t1(id, msg)
|
||||
VALUES ($num_inserts_ind, REPEAT('abcdefghijklmnopqrstuvwxyz', $repeat));
|
||||
dec $num_inserts_ind;
|
||||
}
|
||||
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
|
||||
# do random ops, making sure that some pages will get fragmented and reorganized.
|
||||
let $num_ops_ind = $num_ops;
|
||||
|
||||
while($num_ops_ind)
|
||||
{
|
||||
let $idx = `select floor(rand()*$num_inserts)`;
|
||||
let $insert_or_update = `select floor(rand()*3)`;
|
||||
|
||||
let $repeat = `select floor(rand() * 9) + 1`;
|
||||
|
||||
let $msg = query_get_value(`select repeat('abcdefghijklmnopqrstuvwxyz', $repeat) as x`, x, 1);
|
||||
|
||||
let $single_or_multi = `select floor(rand()*10)`;
|
||||
|
||||
if ($insert_or_update)
|
||||
{
|
||||
let $cnt = query_get_value(SELECT COUNT(*) cnt FROM t1 WHERE id=$idx, cnt, 1);
|
||||
|
||||
if ($cnt)
|
||||
{
|
||||
let $update = `select floor(rand()*2)`;
|
||||
|
||||
if ($update)
|
||||
{
|
||||
if ($single_or_multi)
|
||||
{
|
||||
eval UPDATE t1 SET msg=\"$msg\" WHERE id=$idx;
|
||||
}
|
||||
|
||||
if (!$single_or_multi)
|
||||
{
|
||||
eval UPDATE t1 SET msg=\"$msg\" WHERE id >= $idx - 100 AND id <= $idx + 100;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!$update)
|
||||
{
|
||||
if ($single_or_multi)
|
||||
{
|
||||
eval INSERT INTO t1(msg, id) VALUES (\"$msg\", $idx) ON DUPLICATE KEY UPDATE msg=VALUES(msg), id = VALUES(id);
|
||||
}
|
||||
|
||||
if (!$single_or_multi)
|
||||
{
|
||||
let $diff = 200;
|
||||
|
||||
while ($diff)
|
||||
{
|
||||
eval INSERT INTO t1(msg, id) VALUES (\"$msg\", $idx + 100 - $diff) ON DUPLICATE KEY UPDATE msg=VALUES(msg), id=VALUES(id);
|
||||
|
||||
dec $diff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$cnt)
|
||||
{
|
||||
let $null_msg = `select floor(rand()*2)`;
|
||||
|
||||
if ($null_msg)
|
||||
{
|
||||
eval INSERT INTO t1(id,msg) VALUES ($idx, NULL);
|
||||
}
|
||||
|
||||
if (!$null_msg)
|
||||
{
|
||||
eval INSERT INTO t1(id, msg) VALUES ($idx, \"$msg\");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$insert_or_update)
|
||||
{
|
||||
if ($single_or_multi)
|
||||
{
|
||||
eval DELETE from t1 WHERE id=$idx;
|
||||
}
|
||||
|
||||
if (!$single_or_multi)
|
||||
{
|
||||
eval DELETE from t1 WHERE id >= $idx - 100 AND id <= $idx + 100;
|
||||
}
|
||||
}
|
||||
|
||||
dec $num_ops_ind;
|
||||
}
|
||||
|
||||
# final cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
# restore innodb_file_format and innodb_file_format_max
|
||||
eval SET GLOBAL innodb_file_format = \"$file_format_save\";
|
||||
eval SET GLOBAL innodb_file_format_max = \"$file_format_max_save\";
|
||||
eval SET GLOBAL innodb_simulate_comp_failures = $simulate_comp_failures_save;
|
||||
|
||||
--enable_query_log
|
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;
|
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Testing robustness against random compression failures
|
||||
#
|
||||
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
SET GLOBAL innodb_simulate_comp_failures = 25;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
100000
|
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Testing robustness against random compression failures
|
||||
#
|
||||
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||
SET GLOBAL innodb_simulate_comp_failures = 25;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
10000
|
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;
|
||||
|
@ -0,0 +1,2 @@
|
||||
--innodb-file-per-table
|
||||
|
@ -0,0 +1,8 @@
|
||||
--source include/big_test.inc
|
||||
# test takes too long with valgrind
|
||||
--source include/not_valgrind.inc
|
||||
--let $num_inserts = 100000
|
||||
--let $num_ops = 30000
|
||||
--source suite/innodb/include/innodb_simulate_comp_failures.inc
|
||||
# clean exit
|
||||
--exit
|
@ -0,0 +1,2 @@
|
||||
--innodb-file-per-table
|
||||
|
@ -0,0 +1,5 @@
|
||||
--let $num_inserts = 10000
|
||||
--let $num_ops = 3000
|
||||
--source suite/innodb/include/innodb_simulate_comp_failures.inc
|
||||
# clean exit
|
||||
--exit
|
@ -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
|
@ -386,6 +386,7 @@ Rpl_semi_sync_slave_status ON
|
||||
include/stop_slave.inc
|
||||
[ on master ]
|
||||
set sql_log_bin=0;
|
||||
include/stop_dump_threads.inc
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
set sql_log_bin=1;
|
||||
SHOW VARIABLES LIKE 'rpl_semi_sync_master_enabled';
|
||||
@ -439,9 +440,8 @@ Rpl_semi_sync_slave_status OFF
|
||||
#
|
||||
# Clean up
|
||||
#
|
||||
include/uninstall_semisync.inc
|
||||
include/stop_slave.inc
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
change master to master_user='root',master_password='';
|
||||
include/start_slave.inc
|
||||
drop table t1;
|
||||
|
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
|
@ -548,6 +548,7 @@ source include/stop_slave.inc;
|
||||
connection master;
|
||||
echo [ on master ];
|
||||
set sql_log_bin=0;
|
||||
--source include/stop_dump_threads.inc
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
set sql_log_bin=1;
|
||||
enable_query_log;
|
||||
@ -601,19 +602,10 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
||||
--echo #
|
||||
--echo # Clean up
|
||||
--echo #
|
||||
--source include/uninstall_semisync.inc
|
||||
|
||||
connection slave;
|
||||
source include/stop_slave.inc;
|
||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||
|
||||
connection master;
|
||||
# The dump thread may still be running on the master, and so the following
|
||||
# UNINSTALL could generate a warning about the plugin is busy.
|
||||
disable_warnings;
|
||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||
enable_warnings;
|
||||
|
||||
connection slave;
|
||||
change master to master_user='root',master_password='';
|
||||
source include/start_slave.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';
|
||||
|
@ -0,0 +1,77 @@
|
||||
SET @start_global_value = @@global.innodb_simulate_comp_failures;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
0
|
||||
Valid values are between 0 and 99
|
||||
select @@global.innodb_simulate_comp_failures between 0 and 99;
|
||||
@@global.innodb_simulate_comp_failures between 0 and 99
|
||||
1
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
0
|
||||
select @@session.innodb_simulate_comp_failures;
|
||||
ERROR HY000: Variable 'innodb_simulate_comp_failures' is a GLOBAL variable
|
||||
show global variables like 'innodb_simulate_comp_failures';
|
||||
Variable_name Value
|
||||
innodb_simulate_comp_failures 0
|
||||
show session variables like 'innodb_simulate_comp_failures';
|
||||
Variable_name Value
|
||||
innodb_simulate_comp_failures 0
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_SIMULATE_COMP_FAILURES 0
|
||||
select * from information_schema.session_variables where variable_name='innodb_simulate_comp_failures';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_SIMULATE_COMP_FAILURES 0
|
||||
set global innodb_simulate_comp_failures=10;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
10
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_SIMULATE_COMP_FAILURES 10
|
||||
select * from information_schema.session_variables where variable_name='innodb_simulate_comp_failures';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_SIMULATE_COMP_FAILURES 10
|
||||
set session innodb_simulate_comp_failures=1;
|
||||
ERROR HY000: Variable 'innodb_simulate_comp_failures' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global innodb_simulate_comp_failures=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_simulate_comp_failures'
|
||||
set global innodb_simulate_comp_failures=1e1;
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_simulate_comp_failures'
|
||||
set global innodb_simulate_comp_failures="foo";
|
||||
ERROR 42000: Incorrect argument type to variable 'innodb_simulate_comp_failures'
|
||||
set global innodb_simulate_comp_failures=-7;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_simulate_comp_failures value: '-7'
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
0
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_SIMULATE_COMP_FAILURES 0
|
||||
set global innodb_simulate_comp_failures=106;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_simulate_comp_failures value: '106'
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
99
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_SIMULATE_COMP_FAILURES 99
|
||||
set global innodb_simulate_comp_failures=0;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
0
|
||||
set global innodb_simulate_comp_failures=99;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
99
|
||||
set global innodb_simulate_comp_failures=DEFAULT;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
0
|
||||
SET @@global.innodb_simulate_comp_failures = @start_global_value;
|
||||
SELECT @@global.innodb_simulate_comp_failures;
|
||||
@@global.innodb_simulate_comp_failures
|
||||
0
|
@ -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
|
||||
|
@ -0,0 +1,64 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
SET @start_global_value = @@global.innodb_simulate_comp_failures;
|
||||
SELECT @start_global_value;
|
||||
|
||||
#
|
||||
# exists as global only
|
||||
#
|
||||
|
||||
--echo Valid values are between 0 and 99
|
||||
select @@global.innodb_simulate_comp_failures between 0 and 99;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.innodb_simulate_comp_failures;
|
||||
|
||||
show global variables like 'innodb_simulate_comp_failures';
|
||||
show session variables like 'innodb_simulate_comp_failures';
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
select * from information_schema.session_variables where variable_name='innodb_simulate_comp_failures';
|
||||
|
||||
#
|
||||
# show that it's writable
|
||||
#
|
||||
|
||||
set global innodb_simulate_comp_failures=10;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
select * from information_schema.session_variables where variable_name='innodb_simulate_comp_failures';
|
||||
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
set session innodb_simulate_comp_failures=1;
|
||||
|
||||
#
|
||||
# incorrect types
|
||||
#
|
||||
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_simulate_comp_failures=1.1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_simulate_comp_failures=1e1;
|
||||
--error ER_WRONG_TYPE_FOR_VAR
|
||||
set global innodb_simulate_comp_failures="foo";
|
||||
|
||||
set global innodb_simulate_comp_failures=-7;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
set global innodb_simulate_comp_failures=106;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
select * from information_schema.global_variables where variable_name='innodb_simulate_comp_failures';
|
||||
|
||||
#
|
||||
# min/max/DEFAULT values
|
||||
#
|
||||
|
||||
set global innodb_simulate_comp_failures=0;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
set global innodb_simulate_comp_failures=99;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
set global innodb_simulate_comp_failures=DEFAULT;
|
||||
select @@global.innodb_simulate_comp_failures;
|
||||
|
||||
SET @@global.innodb_simulate_comp_failures = @start_global_value;
|
||||
SELECT @@global.innodb_simulate_comp_failures;
|
@ -837,6 +837,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 #
|
||||
|
@ -860,6 +860,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 #
|
||||
|
@ -1583,6 +1583,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 #
|
||||
|
@ -1186,13 +1186,93 @@ SELECT 1 FROM DUAL WHERE MINUTE(TIMEDIFF(NULL, '12:12:12'));
|
||||
SELECT 1 FROM DUAL WHERE SECOND(TIMEDIFF(NULL, '12:12:12'));
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4511 Assertion `scale <= precision' fails on GROUP BY TIMEDIFF with incorrect types
|
||||
--echo #
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT a FROM t1 GROUP BY TIMEDIFF('2004-06-12',a) * 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||
SELECT a FROM t1 GROUP BY ADDTIME(a,'10')*1;
|
||||
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 SEC_TO_TIME(concat(a,'10'))*1;
|
||||
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 ADDTIME(timestamp('2001-01-01 00:00:00'),CAST(a AS SIGNED)&0xF)*1;
|
||||
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 STR_TO_DATE(a,concat('%Y-%m-%d.%f',if(rand(),'','')))*1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 AS SELECT
|
||||
STR_TO_DATE('2001-01-01', '%Y-%m-%d') AS date_only,
|
||||
STR_TO_DATE('10:10:10', '%H:%i:%s') AS time_only,
|
||||
STR_TO_DATE('10:10:10.123', '%H:%i:%s.%f') AS time_microsecond,
|
||||
STR_TO_DATE('2001-01-01 10:10:10', '%Y-%m-%d %H:%i:%s') AS date_time,
|
||||
STR_TO_DATE('2001-01-01 10:10:10.123', '%Y-%m-%d %H:%i:%s.%f') AS date_time_microsecond;
|
||||
SHOW COLUMNS FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 AS SELECT
|
||||
SEC_TO_TIME(1)+0.1,
|
||||
SEC_TO_TIME(1.1)+0.1,
|
||||
SEC_TO_TIME(1.12)+0.1,
|
||||
SEC_TO_TIME(1.123456)+0.1,
|
||||
SEC_TO_TIME(1.1234567)+0.1;
|
||||
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
|
||||
@ -1472,3 +1552,12 @@ DROP TABLE t1;
|
||||
--echo # MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND)
|
||||
--echo #
|
||||
SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DATE_ADD('2001-01-01 10:20:30',INTERVAL 2000000000000000000.0 SECOND) AS c2;
|
||||
|
||||
|
||||
--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;
|
||||
|
@ -1403,6 +1403,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;
|
||||
|
@ -2780,3 +2780,45 @@ select * from t1 where hours_worked_per_week = 40 and weeks_worked_last_year = 5
|
||||
select * from t1 IGNORE INDEX(dob, weeks_worked_last_year, hours_worked_per_week) where hours_worked_per_week = 40 and weeks_worked_last_year = 52 and dob < '1949-11-21';
|
||||
|
||||
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;
|
||||
|
||||
|
@ -763,5 +763,32 @@ 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;
|
||||
|
||||
set global default_storage_engine=default;
|
||||
|
@ -1414,6 +1414,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
|
||||
@ -87,7 +87,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/
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user