Merge branch '10.0' into 10.0-galera
This commit is contained in:
commit
8a1efa1bdd
@ -1,11 +1,11 @@
|
||||
MariaDB is in most aspects identical to MySQL.
|
||||
|
||||
Differences between MySQL and MariaDB can be found at:
|
||||
http://kb.askmonty.org/en/mariadb-versus-mysql-features/
|
||||
http://kb.askmonty.org/en/mariadb-versus-mysql-compatibility/
|
||||
https://mariadb.com/kb/en/mariadb-vs-mysql-features/
|
||||
https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/
|
||||
|
||||
The MariaDB manual can be found at:
|
||||
http://kb.askmonty.org/
|
||||
https://mariadb.com/kb/
|
||||
|
||||
The MySQL Reference Manual is available in various formats on
|
||||
http://dev.mysql.com/doc.
|
||||
|
@ -243,7 +243,7 @@
|
||||
in the caller's frame is set in the new context as well.
|
||||
4) For each instruction, call its execute() method.
|
||||
The result is a pointer to the next instruction to execute (or NULL)
|
||||
if an error occured.
|
||||
if an error occurred.
|
||||
5) On success, set the new values of the OUT and INOUT parameters in
|
||||
the caller's frame.
|
||||
|
||||
@ -853,7 +853,7 @@
|
||||
// '*nextp' will be set to the index of the next instruction
|
||||
// to execute. (For most instruction this will be the
|
||||
// instruction following this one.)
|
||||
// Returns 0 on success, non-zero if some error occured.
|
||||
// Returns 0 on success, non-zero if some error occurred.
|
||||
virtual int execute(THD *, uint *nextp)
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Instructions for building MariaDB can be found at:
|
||||
https://kb.askmonty.org/en/compiling-mariadb-from-source/
|
||||
https://mariadb.com/kb/en/compiling-mariadb-from-source
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Up-to-date instructions about building MariaDB on Windows can be found
|
||||
at: http://kb.askmonty.org/en/building-mariadb-on-windows
|
||||
at: https://mariadb.com/kb/en/Building_MariaDB_on_Windows
|
||||
|
||||
|
2
VERSION
2
VERSION
@ -1,3 +1,3 @@
|
||||
MYSQL_VERSION_MAJOR=10
|
||||
MYSQL_VERSION_MINOR=0
|
||||
MYSQL_VERSION_PATCH=24
|
||||
MYSQL_VERSION_PATCH=25
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
Copyright (c) 2013, 2014, SkySQL Ab
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -96,9 +95,16 @@ extern "C" {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(HAVE_VIDATTR)
|
||||
#undef vidattr
|
||||
#define vidattr(A) {} // Can't get this to work
|
||||
#ifdef HAVE_VIDATTR
|
||||
static int have_curses= 0;
|
||||
static void my_vidattr(chtype attrs)
|
||||
{
|
||||
if (have_curses)
|
||||
vidattr(attrs);
|
||||
}
|
||||
#else
|
||||
#undef HAVE_SETUPTERM
|
||||
#define my_vidattr(A) {} // Can't get this to work
|
||||
#endif
|
||||
|
||||
#ifdef FN_NO_CASE_SENSE
|
||||
@ -3358,7 +3364,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
||||
|
||||
end:
|
||||
|
||||
/* Show warnings if any or error occured */
|
||||
/* Show warnings if any or error occurred */
|
||||
if (show_warnings == 1 && (warnings >= 1 || error))
|
||||
print_warnings();
|
||||
|
||||
@ -4740,9 +4746,9 @@ com_status(String *buffer __attribute__((unused)),
|
||||
|
||||
if (skip_updates)
|
||||
{
|
||||
vidattr(A_BOLD);
|
||||
my_vidattr(A_BOLD);
|
||||
tee_fprintf(stdout, "\nAll updates ignored to this database\n");
|
||||
vidattr(A_NORMAL);
|
||||
my_vidattr(A_NORMAL);
|
||||
}
|
||||
#ifdef USE_POPEN
|
||||
tee_fprintf(stdout, "Current pager:\t\t%s\n", pager);
|
||||
@ -4810,9 +4816,9 @@ com_status(String *buffer __attribute__((unused)),
|
||||
}
|
||||
if (safe_updates)
|
||||
{
|
||||
vidattr(A_BOLD);
|
||||
my_vidattr(A_BOLD);
|
||||
tee_fprintf(stdout, "\nNote that you are running in safe_update_mode:\n");
|
||||
vidattr(A_NORMAL);
|
||||
my_vidattr(A_NORMAL);
|
||||
tee_fprintf(stdout, "\
|
||||
UPDATEs and DELETEs that don't use a key in the WHERE clause are not allowed.\n\
|
||||
(One can force an UPDATE/DELETE by adding LIMIT # at the end of the command.)\n\
|
||||
@ -4905,10 +4911,11 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
|
||||
{
|
||||
if (!inited)
|
||||
{
|
||||
inited=1;
|
||||
#ifdef HAVE_SETUPTERM
|
||||
(void) setupterm((char *)0, 1, (int *) 0);
|
||||
int errret;
|
||||
have_curses= setupterm((char *)0, 1, &errret) != ERR;
|
||||
#endif
|
||||
inited=1;
|
||||
}
|
||||
if (info_type == INFO_ERROR)
|
||||
{
|
||||
@ -4920,7 +4927,7 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
|
||||
putchar('\a'); /* This should make a bell */
|
||||
#endif
|
||||
}
|
||||
vidattr(A_STANDOUT);
|
||||
my_vidattr(A_STANDOUT);
|
||||
if (error)
|
||||
{
|
||||
if (sqlstate)
|
||||
@ -4939,9 +4946,9 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
|
||||
tee_fputs(": ", file);
|
||||
}
|
||||
else
|
||||
vidattr(A_BOLD);
|
||||
my_vidattr(A_BOLD);
|
||||
(void) tee_puts(str, file);
|
||||
vidattr(A_NORMAL);
|
||||
my_vidattr(A_NORMAL);
|
||||
}
|
||||
if (unbuffered)
|
||||
fflush(file);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2006, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, MariaDB
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -649,7 +649,7 @@ static int get_upgrade_info_file_name(char* name)
|
||||
/*
|
||||
Read the content of mysql_upgrade_info file and
|
||||
compare the version number form file against
|
||||
version number wich mysql_upgrade was compiled for
|
||||
version number which mysql_upgrade was compiled for
|
||||
|
||||
NOTE
|
||||
This is an optimization to avoid running mysql_upgrade
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, MariaDB
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -34,6 +34,7 @@
|
||||
#define TABLE TABLE_CLIENT
|
||||
#include "client_priv.h"
|
||||
#include <my_time.h>
|
||||
#include <sslopt-vars.h>
|
||||
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
|
||||
#include "sql_priv.h"
|
||||
#include "log_event.h"
|
||||
@ -1392,6 +1393,7 @@ static struct my_option my_options[] =
|
||||
{"socket", 'S', "The socket file to use for connection.",
|
||||
&sock, &sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"start-datetime", OPT_START_DATETIME,
|
||||
"Start reading the binlog at first event having a datetime equal or "
|
||||
"posterior to the argument; the argument must be a date and time "
|
||||
@ -1599,6 +1601,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
break;
|
||||
#endif
|
||||
#include <sslopt-case.h>
|
||||
case 'd':
|
||||
one_database = 1;
|
||||
break;
|
||||
@ -1748,6 +1751,18 @@ static Exit_status safe_connect()
|
||||
return ERROR_STOP;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (opt_use_ssl)
|
||||
{
|
||||
mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
}
|
||||
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
#endif /*HAVE_OPENSSL*/
|
||||
|
||||
if (opt_plugindir && *opt_plugindir)
|
||||
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugindir);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2001, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, MariaDB
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -277,8 +277,8 @@ static void usage(void)
|
||||
printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
||||
printf("OR %s [OPTIONS] --databases DB1 [DB2 DB3...]\n",
|
||||
my_progname);
|
||||
puts("Please consult the MariaDB/MySQL knowledgebase at");
|
||||
puts("http://kb.askmonty.org/v/mysqlcheck for latest information about");
|
||||
puts("Please consult the MariaDB Knowledge Base at");
|
||||
puts("https://mariadb.com/kb/en/mysqlcheck for latest information about");
|
||||
puts("this program.");
|
||||
print_defaults("my", load_default_groups);
|
||||
puts("");
|
||||
@ -523,7 +523,6 @@ static int is_view(const char *table)
|
||||
{
|
||||
fprintf(stderr, "Failed to %s\n", query);
|
||||
fprintf(stderr, "Error: %s\n", mysql_error(sock));
|
||||
my_free(query);
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
res= mysql_store_result(sock);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, Monty Program Ab.
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2011, 2015, MariaDB
|
||||
Copyright (c) 2011, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, MariaDB
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, MariaDB
|
||||
Copyright (c) 2010, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
Copyright (c) 2009, 2016, 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
|
||||
@ -1104,7 +1104,7 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query,
|
||||
Run query and dump the result to stderr in vertical format
|
||||
|
||||
NOTE! This function should be safe to call when an error
|
||||
has occured and thus any further errors will be ignored(although logged)
|
||||
has occurred and thus any further errors will be ignored (although logged)
|
||||
|
||||
SYNOPSIS
|
||||
show_query
|
||||
@ -1170,7 +1170,7 @@ static void show_query(MYSQL* mysql, const char* query)
|
||||
is added to the warning stack, only print @@warning_count-1 warnings.
|
||||
|
||||
NOTE! This function should be safe to call when an error
|
||||
has occured and this any further errors will be ignored(although logged)
|
||||
has occurred and this any further errors will be ignored(although logged)
|
||||
|
||||
SYNOPSIS
|
||||
show_warnings_before_error
|
||||
@ -4701,7 +4701,7 @@ void do_sync_with_master2(struct st_command *command, long offset,
|
||||
master_pos_wait returned NULL. This indicates that
|
||||
slave SQL thread is not started, the slave's master
|
||||
information is not initialized, the arguments are
|
||||
incorrect, or an error has occured
|
||||
incorrect, or an error has occurred
|
||||
*/
|
||||
die("%.*s failed: '%s' returned NULL " \
|
||||
"indicating slave SQL thread failure",
|
||||
|
@ -40,8 +40,8 @@ SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_SUMMARY}
|
||||
It is GPL v2 licensed, which means you can use the it free of charge under the
|
||||
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
|
||||
|
||||
MariaDB documentation can be found at http://kb.askmonty.org/
|
||||
MariaDB bug reports should be submitted through https://mariadb.atlassian.net/
|
||||
MariaDB documentation can be found at https://mariadb.com/kb
|
||||
MariaDB bug reports should be submitted through https://jira.mariadb.org
|
||||
|
||||
")
|
||||
|
||||
|
@ -202,8 +202,11 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
IF(CPACK_COMPONENTS_ALL AND
|
||||
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT} AND
|
||||
NOT WITH_WSREP)
|
||||
IF (ARG_STORAGE_ENGINE)
|
||||
SET(ver " = %{version}-%{release}")
|
||||
ENDIF()
|
||||
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE)
|
||||
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB" PARENT_SCOPE)
|
||||
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB${ver}" PARENT_SCOPE)
|
||||
|
||||
IF (NOT ARG_CONFIG)
|
||||
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
|
||||
|
4
debian/additions/innotop/innotop
vendored
4
debian/additions/innotop/innotop
vendored
@ -1503,7 +1503,7 @@ my %exprs = (
|
||||
|
||||
my %columns = (
|
||||
active_secs => { hdr => 'SecsActive', num => 1, label => 'Seconds transaction has been active', },
|
||||
add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additonal pool allocated' },
|
||||
add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additional pool allocated' },
|
||||
attempted_op => { hdr => 'Action', num => 0, label => 'The action that caused the error' },
|
||||
awe_mem_alloc => { hdr => 'AWE Memory', num => 1, label => '[Windows] AWE memory allocated' },
|
||||
binlog_cache_overflow => { hdr => 'Binlog Cache', num => 1, label => 'Transactions too big for binlog cache that went to disk' },
|
||||
@ -10365,7 +10365,7 @@ show you something like this:
|
||||
pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m
|
||||
buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo
|
||||
total_mem_alloc Memory Total memory allocate IB_bp_total_m
|
||||
add_pool_alloc Add'l Pool Additonal pool alloca IB_bp_add_poo
|
||||
add_pool_alloc Add'l Pool Additional pool alloca IB_bp_add_poo
|
||||
|
||||
The first line shows which table you're editing, and reminds you again to press
|
||||
'?' for a list of key mappings. The rest is a tabular representation of the
|
||||
|
2
debian/additions/innotop/innotop.1
vendored
2
debian/additions/innotop/innotop.1
vendored
@ -1579,7 +1579,7 @@ show you something like this:
|
||||
\& pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m
|
||||
\& buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo
|
||||
\& total_mem_alloc Memory Total memory allocate IB_bp_total_m
|
||||
\& add_pool_alloc Add\*(Aql Pool Additonal pool alloca IB_bp_add_poo
|
||||
\& add_pool_alloc Add\*(Aql Pool Additional pool alloca IB_bp_add_poo
|
||||
.Ve
|
||||
.PP
|
||||
The first line shows which table you're editing, and reminds you again to press
|
||||
|
2
debian/additions/mysqlreport
vendored
2
debian/additions/mysqlreport
vendored
@ -350,7 +350,7 @@ sub read_relative_infiles
|
||||
|
||||
# The infile must begin with the system variable values.
|
||||
# Therefore, the first occurance of Aborted_clients indicates the beginning
|
||||
# of the first set of status values if no sets have occured yet ($stat_n == 0).
|
||||
# of the first set of status values if no sets have occurred yet ($stat_n == 0).
|
||||
# In this case, the following status values are printed to the current fh,
|
||||
# along with the system variable values read thus far, until Aborted_clients
|
||||
# occurs again. Then begins the second and subsequent sets of status values.
|
||||
|
2
debian/copyright
vendored
2
debian/copyright
vendored
@ -9,7 +9,7 @@ The MariaDB packages were initally made by http://ourdelta.org/, and
|
||||
are now managed by the MariaDB development team,
|
||||
maria-developers@lists.launchpad.net
|
||||
|
||||
MariaDB can be downloaded from http://downloads.askmonty.org/mariadb/
|
||||
MariaDB can be downloaded from https://downloads.mariadb.org/
|
||||
|
||||
Copyright:
|
||||
|
||||
|
@ -266,8 +266,10 @@ db_stop # in case invoke failes
|
||||
|
||||
# If we upgrade from MySQL mysql.service may be masked, which also
|
||||
# means init.d script is disabled. Unmask mysql service explicitely.
|
||||
# Ignore exit code as command is not available everywhere.
|
||||
deb-systemd-helper unmask mysql.service > /dev/null || true
|
||||
# Check first that the command exists, to avoid emitting any warning messages.
|
||||
if [ -x "$(command -v deb-systemd-helper)" ]; then
|
||||
deb-systemd-helper unmask mysql.service > /dev/null
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
@ -282,8 +282,10 @@ db_stop # in case invoke failes
|
||||
|
||||
# If we upgrade from MySQL mysql.service may be masked, which also
|
||||
# means init.d script is disabled. Unmask mysql service explicitely.
|
||||
# Ignore exit code as command is not available everywhere.
|
||||
deb-systemd-helper unmask mysql.service > /dev/null || true
|
||||
# Check first that the command exists, to avoid emitting any warning messages.
|
||||
if [ -x "$(command -v deb-systemd-helper)" ]; then
|
||||
deb-systemd-helper unmask mysql.service > /dev/null
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
@ -10,18 +10,11 @@
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
test -x /usr/bin/mysqladmin || exit 0
|
||||
test -x /usr/bin/mysqladmin || exit 0
|
||||
|
||||
# If this fails, check debian.conf!
|
||||
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
||||
if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then
|
||||
# Really no mysqld or rather a missing debian-sys-maint user?
|
||||
# If this occurs and is not a error please report a bug.
|
||||
if ps cax | grep -q mysqld; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
$MYADMIN flush-logs
|
||||
fi
|
||||
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
|
||||
# If this fails, check debian.conf!
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
|
||||
fi
|
||||
endscript
|
||||
}
|
||||
|
2
debian/mariadb-galera-test-10.0.dirs
vendored
2
debian/mariadb-galera-test-10.0.dirs
vendored
@ -50,8 +50,6 @@ usr/share/mysql/mysql-test/suite/ndb
|
||||
usr/share/mysql/mysql-test/suite/ndb/t
|
||||
usr/share/mysql/mysql-test/suite/ndb/r
|
||||
usr/share/mysql/mysql-test/suite/maria
|
||||
usr/share/mysql/mysql-test/suite/maria/t
|
||||
usr/share/mysql/mysql-test/suite/maria/r
|
||||
usr/share/mysql/mysql-test/suite/funcs_2
|
||||
usr/share/mysql/mysql-test/suite/funcs_2/lib
|
||||
usr/share/mysql/mysql-test/suite/funcs_2/t
|
||||
|
@ -12,6 +12,12 @@ before calling SSL_new();
|
||||
|
||||
*** end Note ***
|
||||
|
||||
yaSSL Release notes, version 2.3.9b (2/03/2016)
|
||||
This release of yaSSL fixes the OpenSSL compatibility function
|
||||
X509_NAME_get_index_by_NID() to use the actual index of the common name
|
||||
instead of searching on the format prefix. Thanks for the report from
|
||||
yashwant.sahu@oracle.com . Anyone using this function should update.
|
||||
|
||||
yaSSL Release notes, version 2.3.9 (12/01/2015)
|
||||
This release of yaSSL fixes two client side Diffie-Hellman problems.
|
||||
yaSSL was only handling the cases of zero or one leading zeros for the key
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "rsa.h"
|
||||
|
||||
|
||||
#define YASSL_VERSION "2.3.9"
|
||||
#define YASSL_VERSION "2.3.9b"
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -191,14 +191,18 @@ private:
|
||||
class X509_NAME {
|
||||
char* name_;
|
||||
size_t sz_;
|
||||
int cnPosition_; // start of common name, -1 is none
|
||||
int cnLen_; // length of above
|
||||
ASN1_STRING entry_;
|
||||
public:
|
||||
X509_NAME(const char*, size_t sz);
|
||||
X509_NAME(const char*, size_t sz, int pos, int len);
|
||||
~X509_NAME();
|
||||
|
||||
const char* GetName() const;
|
||||
ASN1_STRING* GetEntry(int i);
|
||||
size_t GetLength() const;
|
||||
int GetCnPosition() const { return cnPosition_; }
|
||||
int GetCnLength() const { return cnLen_; }
|
||||
private:
|
||||
X509_NAME(const X509_NAME&); // hide copy
|
||||
X509_NAME& operator=(const X509_NAME&); // and assign
|
||||
@ -226,7 +230,7 @@ class X509 {
|
||||
StringHolder afterDate_; // not valid after
|
||||
public:
|
||||
X509(const char* i, size_t, const char* s, size_t,
|
||||
ASN1_STRING *b, ASN1_STRING *a);
|
||||
ASN1_STRING *b, ASN1_STRING *a, int, int, int, int);
|
||||
~X509() {}
|
||||
|
||||
X509_NAME* GetIssuer();
|
||||
|
@ -304,7 +304,10 @@ int CertManager::Validate()
|
||||
afterDate.type= cert.GetAfterDateType();
|
||||
afterDate.length= strlen((char *) afterDate.data) + 1;
|
||||
peerX509_ = NEW_YS X509(cert.GetIssuer(), iSz, cert.GetCommonName(),
|
||||
sSz, &beforeDate, &afterDate);
|
||||
sSz, &beforeDate, &afterDate,
|
||||
cert.GetIssuerCnStart(), cert.GetIssuerCnLength(),
|
||||
cert.GetSubjectCnStart(), cert.GetSubjectCnLength()
|
||||
);
|
||||
|
||||
if (err == TaoCrypt::SIG_OTHER_E && verifyCallback_) {
|
||||
X509_STORE_CTX store;
|
||||
@ -350,7 +353,9 @@ int CertManager::SetPrivateKey(const x509& key)
|
||||
afterDate.type= cd.GetAfterDateType();
|
||||
afterDate.length= strlen((char *) afterDate.data) + 1;
|
||||
selfX509_ = NEW_YS X509(cd.GetIssuer(), iSz, cd.GetCommonName(),
|
||||
sSz, &beforeDate, &afterDate);
|
||||
sSz, &beforeDate, &afterDate,
|
||||
cd.GetIssuerCnStart(), cd.GetIssuerCnLength(),
|
||||
cd.GetSubjectCnStart(), cd.GetSubjectCnLength());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -367,7 +372,9 @@ void CertManager::setPeerX509(X509* x)
|
||||
ASN1_STRING* after = x->GetAfter();
|
||||
|
||||
peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(),
|
||||
subject->GetName(), subject->GetLength(), before, after);
|
||||
subject->GetName(), subject->GetLength(), before, after,
|
||||
issuer->GetCnPosition(), issuer->GetCnLength(),
|
||||
subject->GetCnPosition(), subject->GetCnLength());
|
||||
}
|
||||
|
||||
|
||||
|
@ -1351,15 +1351,13 @@ int ASN1_STRING_type(ASN1_STRING *x)
|
||||
int X509_NAME_get_index_by_NID(X509_NAME* name,int nid, int lastpos)
|
||||
{
|
||||
int idx = -1; // not found
|
||||
const char* start = &name->GetName()[lastpos + 1];
|
||||
int cnPos = -1;
|
||||
|
||||
switch (nid) {
|
||||
case NID_commonName:
|
||||
const char* found = strstr(start, "/CN=");
|
||||
if (found) {
|
||||
found += 4; // advance to str
|
||||
idx = found - start + lastpos + 1;
|
||||
}
|
||||
cnPos = name->GetCnPosition();
|
||||
if (lastpos < cnPos)
|
||||
idx = cnPos;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1471,10 +1469,6 @@ int SSL_peek(SSL* ssl, void* buffer, int sz)
|
||||
|
||||
int SSL_pending(SSL* ssl)
|
||||
{
|
||||
// Just in case there's pending data that hasn't been processed yet...
|
||||
char c;
|
||||
SSL_peek(ssl, &c, 1);
|
||||
|
||||
return ssl->bufferedData();
|
||||
}
|
||||
|
||||
|
@ -121,11 +121,11 @@ void SetErrorString(YasslError error, char* buffer)
|
||||
break;
|
||||
|
||||
case certificate_error :
|
||||
strncpy(buffer, "unable to proccess cerificate", max);
|
||||
strncpy(buffer, "unable to process cerificate", max);
|
||||
break;
|
||||
|
||||
case privateKey_error :
|
||||
strncpy(buffer, "unable to proccess private key, bad format", max);
|
||||
strncpy(buffer, "unable to process private key, bad format", max);
|
||||
break;
|
||||
|
||||
case badVersion_error :
|
||||
|
@ -1554,8 +1554,9 @@ void SSL_SESSION::CopyX509(X509* x)
|
||||
ASN1_TIME* after = x->GetAfter();
|
||||
|
||||
peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(),
|
||||
subject->GetName(), subject->GetLength(),
|
||||
before, after);
|
||||
subject->GetName(), subject->GetLength(), before, after,
|
||||
issuer->GetCnPosition(), issuer->GetCnLength(),
|
||||
subject->GetCnPosition(), subject->GetCnLength());
|
||||
}
|
||||
|
||||
|
||||
@ -2472,8 +2473,8 @@ void Security::set_resuming(bool b)
|
||||
}
|
||||
|
||||
|
||||
X509_NAME::X509_NAME(const char* n, size_t sz)
|
||||
: name_(0), sz_(sz)
|
||||
X509_NAME::X509_NAME(const char* n, size_t sz, int pos, int len)
|
||||
: name_(0), sz_(sz), cnPosition_(pos), cnLen_(len)
|
||||
{
|
||||
if (sz) {
|
||||
name_ = NEW_YS char[sz];
|
||||
@ -2503,8 +2504,10 @@ size_t X509_NAME::GetLength() const
|
||||
|
||||
|
||||
X509::X509(const char* i, size_t iSz, const char* s, size_t sSz,
|
||||
ASN1_STRING *b, ASN1_STRING *a)
|
||||
: issuer_(i, iSz), subject_(s, sSz),
|
||||
ASN1_STRING *b, ASN1_STRING *a,
|
||||
int issPos, int issLen,
|
||||
int subPos, int subLen)
|
||||
: issuer_(i, iSz, issPos, issLen), subject_(s, sSz, subPos, subLen),
|
||||
beforeDate_((char *) b->data, b->length, b->type),
|
||||
afterDate_((char *) a->data, a->length, a->type)
|
||||
{}
|
||||
@ -2539,17 +2542,19 @@ ASN1_STRING* X509_NAME::GetEntry(int i)
|
||||
if (i < 0 || i >= int(sz_))
|
||||
return 0;
|
||||
|
||||
if (i != cnPosition_ || cnLen_ <= 0) // only entry currently supported
|
||||
return 0;
|
||||
|
||||
if (cnLen_ > int(sz_-i)) // make sure there's room in read buffer
|
||||
return 0;
|
||||
|
||||
if (entry_.data)
|
||||
ysArrayDelete(entry_.data);
|
||||
entry_.data = NEW_YS byte[sz_]; // max size;
|
||||
entry_.data = NEW_YS byte[cnLen_+1]; // max size;
|
||||
|
||||
memcpy(entry_.data, &name_[i], sz_ - i);
|
||||
if (entry_.data[sz_ -i - 1]) {
|
||||
entry_.data[sz_ - i] = 0;
|
||||
entry_.length = int(sz_) - i;
|
||||
}
|
||||
else
|
||||
entry_.length = int(sz_) - i - 1;
|
||||
memcpy(entry_.data, &name_[i], cnLen_);
|
||||
entry_.data[cnLen_] = 0;
|
||||
entry_.length = cnLen_;
|
||||
entry_.type = 0;
|
||||
|
||||
return &entry_;
|
||||
|
@ -285,6 +285,10 @@ public:
|
||||
byte GetBeforeDateType() const { return beforeDateType_; }
|
||||
const char* GetAfterDate() const { return afterDate_; }
|
||||
byte GetAfterDateType() const { return afterDateType_; }
|
||||
int GetSubjectCnStart() const { return subCnPos_; }
|
||||
int GetIssuerCnStart() const { return issCnPos_; }
|
||||
int GetSubjectCnLength() const { return subCnLen_; }
|
||||
int GetIssuerCnLength() const { return issCnLen_; }
|
||||
|
||||
void DecodeToKey();
|
||||
private:
|
||||
@ -294,6 +298,10 @@ private:
|
||||
word32 sigLength_; // length of signature
|
||||
word32 signatureOID_; // sum of algorithm object id
|
||||
word32 keyOID_; // sum of key algo object id
|
||||
int subCnPos_; // subject common name start, -1 is none
|
||||
int subCnLen_; // length of above
|
||||
int issCnPos_; // issuer common name start, -1 is none
|
||||
int issCnLen_; // length of above
|
||||
byte subjectHash_[SHA_SIZE]; // hash of all Names
|
||||
byte issuerHash_[SHA_SIZE]; // hash of all Names
|
||||
byte* signature_;
|
||||
|
@ -482,8 +482,9 @@ void DH_Decoder::Decode(DH& key)
|
||||
|
||||
CertDecoder::CertDecoder(Source& s, bool decode, SignerList* signers,
|
||||
bool noVerify, CertType ct)
|
||||
: BER_Decoder(s), certBegin_(0), sigIndex_(0), sigLength_(0),
|
||||
signature_(0), verify_(!noVerify)
|
||||
: BER_Decoder(s), certBegin_(0), sigIndex_(0), sigLength_(0), subCnPos_(-1),
|
||||
subCnLen_(0), issCnPos_(-1), issCnLen_(0), signature_(0),
|
||||
verify_(!noVerify)
|
||||
{
|
||||
issuer_[0] = 0;
|
||||
subject_[0] = 0;
|
||||
@ -804,6 +805,13 @@ void CertDecoder::GetName(NameType nt)
|
||||
case COMMON_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/CN=", 4, strLen)))
|
||||
return;
|
||||
if (nt == ISSUER) {
|
||||
issCnPos_ = (int)(ptr - strLen - issuer_);
|
||||
issCnLen_ = (int)strLen;
|
||||
} else {
|
||||
subCnPos_ = (int)(ptr - strLen - subject_);
|
||||
subCnLen_ = (int)strLen;
|
||||
}
|
||||
break;
|
||||
case SUR_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/SN=", 4, strLen)))
|
||||
|
@ -470,10 +470,28 @@ inline void showPeer(SSL* ssl)
|
||||
char* issuer = X509_NAME_oneline(X509_get_issuer_name(peer), 0, 0);
|
||||
char* subject = X509_NAME_oneline(X509_get_subject_name(peer), 0, 0);
|
||||
|
||||
printf("peer's cert info:\n issuer : %s\n subject: %s\n", issuer,
|
||||
subject);
|
||||
X509_NAME_ENTRY* se = NULL;
|
||||
ASN1_STRING* sd = NULL;
|
||||
char* subCN = NULL;
|
||||
|
||||
X509_NAME* sub = X509_get_subject_name(peer);
|
||||
int lastpos = -1;
|
||||
if (sub)
|
||||
lastpos = X509_NAME_get_index_by_NID(sub, NID_commonName, lastpos);
|
||||
if (lastpos >= 0) {
|
||||
se = X509_NAME_get_entry(sub, lastpos);
|
||||
if (se)
|
||||
sd = X509_NAME_ENTRY_get_data(se);
|
||||
if (sd)
|
||||
subCN = (char*)ASN1_STRING_data(sd);
|
||||
}
|
||||
|
||||
printf("peer's cert info:\n issuer : %s\n subject: %s\n"
|
||||
" subject cn: %s\n", issuer, subject, subCN);
|
||||
|
||||
free(subject);
|
||||
free(issuer);
|
||||
|
||||
}
|
||||
else
|
||||
printf("peer has no cert!\n");
|
||||
|
@ -178,7 +178,7 @@ struct mysql_async_context {
|
||||
resumed, eg. whether we woke up due to connection completed or timeout
|
||||
in mysql_real_connect_cont().
|
||||
*/
|
||||
unsigned int events_occured;
|
||||
unsigned int events_occurred;
|
||||
/*
|
||||
This is set to the result of the whole asynchronous operation when it
|
||||
completes. It uses a union, as different calls have different return
|
||||
|
@ -22,7 +22,7 @@
|
||||
if requested.
|
||||
|
||||
The functions are documented at
|
||||
http://kb.askmonty.org/en/progress-reporting#how-to-add-support-for-progress-reporting-to-a-storage-engine
|
||||
https://mariadb.com/kb/en/progress-reporting/#how-to-add-support-for-progress-reporting-to-a-storage-engine
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -274,6 +274,25 @@ SET(CLIENT_API_FUNCTIONS
|
||||
)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
IF (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING)
|
||||
|
||||
INCLUDE (CheckCSourceCompiles)
|
||||
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.ld"
|
||||
"VERSION {\nlibmysqlclient_18 {\nglobal: *;\n};\n}\n")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "-Wl,src.ld")
|
||||
CHECK_C_SOURCE_COMPILES("int main() { return 0; }"
|
||||
SUPPORTS_VERSION_IN_LINK_SCRIPT)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
IF (NOT SUPPORTS_VERSION_IN_LINK_SCRIPT)
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=16895
|
||||
MESSAGE(SEND_ERROR "Your current linker does not support VERSION "
|
||||
"command in linker scripts like a GNU ld or any compatible linker "
|
||||
"should. Perhaps you're using gold? Either switch to GNU ld compatible "
|
||||
"linker or run cmake with -DDISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING=TRUE "
|
||||
"to be able to complete the build")
|
||||
ENDIF (NOT SUPPORTS_VERSION_IN_LINK_SCRIPT)
|
||||
|
||||
# When building RPM, or DEB package on Debian, use ELF symbol versioning
|
||||
# for compatibility with distribution packages, so client shared library can
|
||||
# painlessly replace the one supplied by the distribution.
|
||||
@ -358,14 +377,26 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
make_scrambled_password_323
|
||||
)
|
||||
|
||||
# Linker script to version symbols in Fedora- and Debian- compatible way, MDEV-5529
|
||||
SET(VERSION_SCRIPT_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/libmysql_versions.ld.in)
|
||||
|
||||
# Generate version script.
|
||||
# Create semicolon separated lists of functions to export from
|
||||
# Since RPM packages use separate versioning for 5.1 API
|
||||
# and 5.5 API (libmysqlclient_16 vs libmysqlclient_18),
|
||||
# we need 2 lists.
|
||||
SET (VERSION_HEADER
|
||||
"VERSION {
|
||||
libmysqlclient_18 {
|
||||
global:")
|
||||
SET (VERSION_FOOTER
|
||||
" local:
|
||||
*;
|
||||
};
|
||||
|
||||
libmysqlclient_16 {
|
||||
/* empty here. aliases are added above */
|
||||
};
|
||||
}
|
||||
")
|
||||
|
||||
SET (CLIENT_API_5_1_LIST)
|
||||
SET (CLIENT_API_5_1_ALIASES)
|
||||
FOREACH (f ${CLIENT_API_FUNCTIONS_5_1} ${CLIENT_API_5_1_EXTRA})
|
||||
@ -378,6 +409,13 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\t${f};\n")
|
||||
ENDFOREACH()
|
||||
|
||||
ELSE (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING)
|
||||
SET (CLIENT_API_5_1_ALIASES "/* Versioning disabled per user request. MDEV-5982 */")
|
||||
ENDIF (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING)
|
||||
|
||||
# Linker script to version symbols in Fedora- and Debian- compatible way, MDEV-5529
|
||||
SET(VERSION_SCRIPT_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/libmysql_versions.ld.in)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${VERSION_SCRIPT_TEMPLATE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld
|
||||
@ -386,7 +424,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
SET(VERSION_SCRIPT_LINK_FLAGS
|
||||
"-Wl,${CMAKE_CURRENT_BINARY_DIR}/libmysql_versions.ld")
|
||||
|
||||
ENDIF()
|
||||
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
|
||||
SET(CLIENT_SOURCES
|
||||
|
@ -2232,7 +2232,7 @@ static int stmt_read_row_buffered(MYSQL_STMT *stmt, unsigned char **row)
|
||||
|
||||
/*
|
||||
Read one row from network: unbuffered non-cursor fetch.
|
||||
If last row was read, or error occured, erase this statement
|
||||
If last row was read, or error occurred, erase this statement
|
||||
from record pointing to object unbuffered fetch is performed from.
|
||||
|
||||
SYNOPSIS
|
||||
|
@ -27,19 +27,7 @@ mysql_get_charset_by_csname = get_charset_by_csname;
|
||||
mysql_net_realloc = net_realloc;
|
||||
mysql_client_errors = client_errors;
|
||||
|
||||
VERSION {
|
||||
|
||||
libmysqlclient_18 {
|
||||
global:
|
||||
@VERSION_HEADER@
|
||||
@CLIENT_API_5_1_LIST@
|
||||
@CLIENT_API_5_5_LIST@
|
||||
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
||||
libmysqlclient_16 {
|
||||
/* empty here. aliases are added above */
|
||||
};
|
||||
|
||||
}
|
||||
@VERSION_FOOTER@
|
||||
|
@ -1602,7 +1602,7 @@ may fail in total, as each repetition is considered a new test case, which may i
|
||||
\fB\-\-retry\-failure=\fR\fB\fIN\fR\fR
|
||||
.sp
|
||||
When using the \fB-\-retry\fR option to retry failed tests,
|
||||
stop when N failures have occured (default 2)\&. Setting it to 0 or 1 effectively turns off retries\&.
|
||||
stop when N failures have occurred (default 2)\&. Setting it to 0 or 1 effectively turns off retries\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
|
@ -11,7 +11,7 @@ All tests must pass. If one or more of them fail on your system, please
|
||||
read the following manual section for instructions on how to report the
|
||||
problem:
|
||||
|
||||
http://kb.askmonty.org/v/reporting-bugs
|
||||
https://mariadb.com/kb/en/reporting-bugs
|
||||
|
||||
If you want to use an already running MySQL server for specific tests,
|
||||
use the --extern option to mysql-test-run. Please note that in this mode,
|
||||
|
@ -375,7 +375,7 @@ source include/start_slave.inc;
|
||||
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
||||
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
|
||||
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
|
||||
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occurred on the master. Message: error writing to the binary log");
|
||||
|
||||
connection master;
|
||||
TRUNCATE t1;
|
||||
|
@ -1818,6 +1818,12 @@ SELECT f1() FROM t1 LEFT JOIN (SELECT 1 AS a FROM t1 LIMIT 0) AS d ON 1 GROUP BY
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
|
||||
--echo #
|
||||
SELECT @@collation_connection;
|
||||
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5702 Incorrect results are returned with NULLIF()
|
||||
--echo #
|
||||
|
@ -1,4 +1,5 @@
|
||||
-- require r/have_crypt.require
|
||||
disable_query_log;
|
||||
show variables like 'have_crypt';
|
||||
enable_query_log;
|
||||
# encrypt('a') is NULL if crypt(3) is not available
|
||||
# encrypt('a') is "*0" in fips mode
|
||||
if (`select length(encrypt('a')) > 3 IS NOT TRUE`) {
|
||||
skip No crypt(3);
|
||||
}
|
||||
|
6
mysql-test/include/have_des.inc
Normal file
6
mysql-test/include/have_des.inc
Normal file
@ -0,0 +1,6 @@
|
||||
# in the FIPS mode, OpenSSL disables DES and other weak algorithms
|
||||
source include/have_ssl_crypto_functs.inc;
|
||||
|
||||
if (`select des_encrypt("a", "b") IS NULL`) {
|
||||
skip DES is disabled (fips mode?);
|
||||
}
|
@ -136,7 +136,7 @@ INSERT INTO global_suppressions VALUES
|
||||
("Slave: Query caused different errors on master and slave"),
|
||||
("Slave: Table .* doesn't exist"),
|
||||
("Slave: Table width mismatch"),
|
||||
("Slave: The incident LOST_EVENTS occured on the master"),
|
||||
("Slave: The incident LOST_EVENTS occurred on the master"),
|
||||
("Slave: Unknown error.* 1105"),
|
||||
("Slave: Can't drop database.* database doesn't exist"),
|
||||
("Time-out in NDB"),
|
||||
|
@ -34,7 +34,7 @@ package My::SafeProcess;
|
||||
# will zap the "monitored process" and exit
|
||||
# - the "monitored process" to exit, in which case it will exit
|
||||
# itself with same exit code as the "monitored process"
|
||||
# - the parent process to send the "shutdown" signal in wich case
|
||||
# - the parent process to send the "shutdown" signal in which case
|
||||
# monitor will kill the "monitored process" hard and exit
|
||||
#
|
||||
#
|
||||
|
@ -309,7 +309,7 @@ sub mtr_report_stats ($) {
|
||||
/Slave: Query caused different errors on master and slave/ or
|
||||
/Slave: Table .* doesn't exist/ or
|
||||
/Slave: Table width mismatch/ or
|
||||
/Slave: The incident LOST_EVENTS occured on the master/ or
|
||||
/Slave: The incident LOST_EVENTS occurred on the master/ or
|
||||
/Slave: Unknown error.* 1105/ or
|
||||
/Slave: Can't drop database.* database doesn't exist/ or
|
||||
/Slave SQL:.*(?:error.* \d+|Query:.*)/ or
|
||||
|
@ -3643,7 +3643,7 @@ sub mysql_install_db {
|
||||
|
||||
# Create mtr database
|
||||
mtr_tofile($bootstrap_sql_file,
|
||||
"CREATE DATABASE mtr;\n");
|
||||
"CREATE DATABASE mtr CHARSET=latin1;\n");
|
||||
|
||||
# Add help tables and data for warning detection and supression
|
||||
mtr_tofile($bootstrap_sql_file,
|
||||
@ -6609,7 +6609,7 @@ Misc options
|
||||
failures before stopping, set with the --retry-failure
|
||||
option
|
||||
retry-failure=N When using the --retry option to retry failed tests,
|
||||
stop when N failures have occured (default $opt_retry_failure)
|
||||
stop when N failures have occurred (default $opt_retry_failure)
|
||||
reorder Reorder tests to get fewer server restarts
|
||||
help Get this help text
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t2,t3;
|
||||
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
||||
insert into t1 (a) values (1),(2),(3);
|
||||
alter online table t1 modify b int default 5;
|
||||
@ -62,3 +61,15 @@ create table t3 (a int not null primary key, b int, c varchar(80)) engine=merge
|
||||
alter online table t3 union=(t1,t2);
|
||||
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
||||
drop table t1,t2,t3;
|
||||
create table t1 (i int) partition by hash(i) partitions 2;
|
||||
alter online table t1 comment 'test';
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
alter online table t1 modify a int comment 'test';
|
||||
drop table t1;
|
||||
create table t1 (a int) engine=innodb;
|
||||
alter online table t1 modify a int comment 'test';
|
||||
drop table t1;
|
||||
create table t1 (a int) partition by hash(a) partitions 2;
|
||||
alter online table t1 modify a int comment 'test';
|
||||
drop table t1;
|
||||
|
@ -502,3 +502,9 @@ a
|
||||
SELECT * FROM t1 WHERE a IN (0.8,0.9);
|
||||
a
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9372 select 100 between 1 and 9223372036854775808 returns false
|
||||
#
|
||||
SELECT 100 BETWEEN 1 AND 9223372036854775808;
|
||||
100 BETWEEN 1 AND 9223372036854775808
|
||||
1
|
||||
|
@ -8,4 +8,17 @@ a
|
||||
Warnings:
|
||||
Note 1003 2000-01-01
|
||||
Note 1003 2000-01-06
|
||||
set debug_dbug='';
|
||||
drop table t1;
|
||||
create table t1 (id int not null, ut timestamp(6) not null);
|
||||
insert into t1 values(1, '2001-01-01 00:00:00.2');
|
||||
insert into t1 values(1, '2001-01-01 00:00:00.1');
|
||||
select * from t1;
|
||||
id ut
|
||||
1 2001-01-01 00:00:00.200000
|
||||
1 2001-01-01 00:00:00.100000
|
||||
select (select max(m2.ut) from t1 m2 where m1.id <> 0) from t1 m1;
|
||||
(select max(m2.ut) from t1 m2 where m1.id <> 0)
|
||||
2001-01-01 00:00:00.200000
|
||||
2001-01-01 00:00:00.200000
|
||||
drop table t1;
|
||||
|
@ -231,3 +231,16 @@ case t1.f1 when '00:00:00' then 1 end
|
||||
1
|
||||
NULL
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-9745 Crash with CASE WHEN TRUE THEN COALESCE(CAST(NULL AS UNSIGNED)) ELSE 4 END
|
||||
#
|
||||
CREATE TABLE t1 SELECT CASE WHEN TRUE THEN COALESCE(CAST(NULL AS UNSIGNED)) ELSE 4 END AS a;
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
a decimal(1,0) YES NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 SELECT CASE WHEN TRUE THEN COALESCE(CAST(NULL AS UNSIGNED)) ELSE 40 END AS a;
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
a decimal(2,0) YES NULL
|
||||
DROP TABLE t1;
|
||||
|
@ -3,12 +3,12 @@ Name Location Comment
|
||||
Booking.com http://www.booking.com Founding member of the MariaDB Foundation
|
||||
MariaDB Corporation https://mariadb.com Founding member of the MariaDB Foundation
|
||||
Auttomattic http://automattic.com Member of the MariaDB Foundation
|
||||
Parallels http://www.parallels.com/products/plesk Founding member of the MariaDB Foundation
|
||||
Visma http://visma.com Member of the MariaDB Foundation
|
||||
Nexedi http://www.nexedi.com Member of the MariaDB Foundation
|
||||
Acronis http://www.acronis.com Member of the MariaDB Foundation
|
||||
Verkkokauppa.com Finland Sponsor of the MariaDB Foundation
|
||||
Webyog Bangalore Sponsor of the MariaDB Foundation
|
||||
Wikimedia Foundation USA Sponsor of the MariaDB Foundation
|
||||
Google USA Sponsoring parallel replication and GTID
|
||||
Google USA Sponsoring encryption, parallel replication and GTID
|
||||
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
|
||||
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction
|
||||
Sheeri Kritzer Boston, Mass. USA EFF contribution for UC2006 Auction
|
||||
|
@ -2887,6 +2887,15 @@ f1()
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
binary
|
||||
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
|
||||
CASE 1 WHEN 2 THEN ( - '3' ) END
|
||||
NULL
|
||||
#
|
||||
# MDEV-5702 Incorrect results are returned with NULLIF()
|
||||
#
|
||||
CREATE TABLE t1 (d DATE);
|
||||
|
@ -3279,6 +3279,15 @@ f1()
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
cp1251_general_ci
|
||||
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
|
||||
CASE 1 WHEN 2 THEN ( - '3' ) END
|
||||
NULL
|
||||
#
|
||||
# MDEV-5702 Incorrect results are returned with NULLIF()
|
||||
#
|
||||
CREATE TABLE t1 (d DATE);
|
||||
|
14
mysql-test/r/ctype_cp850.result
Normal file
14
mysql-test/r/ctype_cp850.result
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Start of 5.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-9862 Illegal mix of collation, when comparing column with CASE expression
|
||||
#
|
||||
SET NAMES cp850;
|
||||
CREATE TABLE t1 (a CHAR(1) CHARACTER SET latin1);
|
||||
SELECT a FROM t1 WHERE CASE a WHEN 'aaaa' THEN 'Y' WHEN 'aaaa' THEN 'Y' ELSE NULL END <> a;
|
||||
a
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
@ -3563,6 +3563,15 @@ f1()
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
latin1_swedish_ci
|
||||
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
|
||||
CASE 1 WHEN 2 THEN ( - '3' ) END
|
||||
NULL
|
||||
#
|
||||
# MDEV-5702 Incorrect results are returned with NULLIF()
|
||||
#
|
||||
CREATE TABLE t1 (d DATE);
|
||||
|
@ -4470,6 +4470,15 @@ f1()
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
ucs2_general_ci
|
||||
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
|
||||
CASE 1 WHEN 2 THEN ( - '3' ) END
|
||||
NULL
|
||||
#
|
||||
# MDEV-5702 Incorrect results are returned with NULLIF()
|
||||
#
|
||||
CREATE TABLE t1 (d DATE);
|
||||
|
@ -5338,6 +5338,15 @@ f1()
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
@@collation_connection
|
||||
utf8_general_ci
|
||||
SELECT CASE 1 WHEN 2 THEN ( - '3' ) END;
|
||||
CASE 1 WHEN 2 THEN ( - '3' ) END
|
||||
NULL
|
||||
#
|
||||
# MDEV-5702 Incorrect results are returned with NULLIF()
|
||||
#
|
||||
CREATE TABLE t1 (d DATE);
|
||||
|
@ -379,7 +379,7 @@ SELECT * FROM t1 WHERE a=0;
|
||||
a
|
||||
# Connection con1
|
||||
# Sending:
|
||||
ALTER TABLE t1 COMMENT 'test';
|
||||
ALTER TABLE t1 MODIFY a INT UNSIGNED;;
|
||||
# Connection default
|
||||
# Wait until ALTER TABLE is blocked on table 't1'.
|
||||
INSERT DELAYED INTO t1 VALUES (3);
|
||||
|
@ -1,10 +1,10 @@
|
||||
drop database if exists events_test;
|
||||
create database events_test;
|
||||
use events_test;
|
||||
create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5;
|
||||
create event e_26 on schedule at '2027-01-01 00:00:00' disable do set @a = 5;
|
||||
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
|
||||
db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
|
||||
events_test e_26 set @a = 5 root@localhost 2017-01-01 00:00:00 DROP
|
||||
events_test e_26 set @a = 5 root@localhost 2027-01-01 00:00:00 DROP
|
||||
drop event e_26;
|
||||
create event e_26 on schedule at NULL disable do set @a = 5;
|
||||
ERROR HY000: Incorrect AT value: 'NULL'
|
||||
|
@ -602,7 +602,7 @@ INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp(
|
||||
ROLLBACK;
|
||||
END IF;
|
||||
END;|
|
||||
Sleep till the first INSERT into events_test.event_log occured
|
||||
Sleep till the first INSERT into events_test.event_log occurred
|
||||
SELECT COUNT(*) > 0 AS "Expect 1" FROM events_test.event_log;
|
||||
Expect 1
|
||||
1
|
||||
|
@ -15,3 +15,15 @@ CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci,
|
||||
FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES(0xA3C2);
|
||||
DROP TABLE t1;
|
||||
create table t1 (
|
||||
id varchar(255),
|
||||
business_name text null collate utf8mb4_unicode_ci,
|
||||
street_address text,
|
||||
fulltext index ft (business_name),
|
||||
fulltext index ft2 (street_address)
|
||||
);
|
||||
select * from t1 where match (business_name, street_address) against ('some business name and address here');
|
||||
ERROR HY000: Can't find FULLTEXT index matching the column list
|
||||
select * from t1 where match (business_name, street_address) against ('some business name and address here' in boolean mode);
|
||||
id business_name street_address
|
||||
drop table t1;
|
||||
|
@ -660,9 +660,14 @@ ERROR 22003: BIGINT UNSIGNED value is out of range in '(18446744073709551615 DIV
|
||||
CREATE TABLE t1(a BIGINT, b BIGINT UNSIGNED);
|
||||
INSERT INTO t1 VALUES(-9223372036854775808, 9223372036854775809);
|
||||
SELECT -a FROM t1;
|
||||
ERROR 22003: BIGINT value is out of range in '-(-9223372036854775808)'
|
||||
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`a`)'
|
||||
SELECT -b FROM t1;
|
||||
ERROR 22003: BIGINT value is out of range in '-(9223372036854775809)'
|
||||
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`b`)'
|
||||
INSERT INTO t1 VALUES(0,0);
|
||||
SELECT -a FROM t1;
|
||||
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`a`)'
|
||||
SELECT -b FROM t1;
|
||||
ERROR 22003: BIGINT value is out of range in '-(`test`.`t1`.`b`)'
|
||||
DROP TABLE t1;
|
||||
SET @a:=999999999999999999999999999999999999999999999999999999999999999999999999999999999;
|
||||
SELECT @a + @a;
|
||||
|
@ -1,2 +1,18 @@
|
||||
SHOW GRANTS FOR root@invalid_host;
|
||||
ERROR 42000: There is no such grant defined for user 'root' on host 'invalid_host'
|
||||
create user test;
|
||||
create user foo;
|
||||
create role foo;
|
||||
grant foo to test;
|
||||
set role foo;
|
||||
show grants for test;
|
||||
Grants for test@%
|
||||
GRANT foo TO 'test'@'%'
|
||||
GRANT USAGE ON *.* TO 'test'@'%'
|
||||
show grants for foo;
|
||||
Grants for foo
|
||||
GRANT USAGE ON *.* TO 'foo'
|
||||
show grants for foo@'%';
|
||||
ERROR 42000: Access denied for user 'test'@'%' to database 'mysql'
|
||||
drop user test, foo;
|
||||
drop role foo;
|
||||
|
@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_crypt YES
|
@ -1595,7 +1595,7 @@ explain select * from t1 where a=10 and b=10 or c=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge a,b,c a,c 5,5 NULL 54 Using union(a,c); Using where
|
||||
This will switch to sort-union (intersection will be gone, too,
|
||||
thats a known limitation:
|
||||
that's a known limitation:
|
||||
set optimizer_switch='default,index_merge_union=off';
|
||||
explain select * from t1 where a=10 and b=10 or c=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
30
mysql-test/r/insert_innodb.result
Normal file
30
mysql-test/r/insert_innodb.result
Normal file
@ -0,0 +1,30 @@
|
||||
#
|
||||
# BUG#22037930: INSERT IGNORE FAILS TO IGNORE
|
||||
# FOREIGN KEY CONSTRAINT
|
||||
# Setup.
|
||||
CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
CREATE TABLE t2 (fld2 INT, FOREIGN KEY (fld2) REFERENCES t1 (fld1))
|
||||
ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES(0);
|
||||
INSERT INTO t2 VALUES(0);
|
||||
# Without fix, an error is reported.
|
||||
INSERT IGNORE INTO t2 VALUES(1);
|
||||
Warnings:
|
||||
Warning 1452 Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
|
||||
UPDATE IGNORE t2 SET fld2=20 WHERE fld2=0;
|
||||
UPDATE IGNORE t1 SET fld1=20 WHERE fld1=0;
|
||||
# Test for multi update.
|
||||
UPDATE IGNORE t1, t2 SET t2.fld2= t2.fld2 + 3;
|
||||
UPDATE IGNORE t1, t2 SET t1.fld1= t1.fld1 + 3;
|
||||
# Reports an error since IGNORE is not used.
|
||||
INSERT INTO t2 VALUES(1);
|
||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
|
||||
UPDATE t2 SET fld2=20 WHERE fld2=0;
|
||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
|
||||
UPDATE t1 SET fld1=20 WHERE fld1=0;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
|
||||
UPDATE t1, t2 SET t2.fld2= t2.fld2 + 3;
|
||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
|
||||
UPDATE t1, t2 SET t1.fld1= t1.fld1 + 3;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
|
||||
DROP TABLE t2, t1;
|
@ -90,6 +90,17 @@ SELECT DATE_FORMAT('2001-01-07', '%w %a %W');
|
||||
DATE_FORMAT('2001-01-07', '%w %a %W')
|
||||
0 Du Duminică
|
||||
End of 5.4 tests
|
||||
SET NAMES utf8;
|
||||
SET lc_time_names=de_AT;
|
||||
SELECT monthname('2001-01-01');
|
||||
monthname('2001-01-01')
|
||||
Jänner
|
||||
SELECT monthname('2001-02-01');
|
||||
monthname('2001-02-01')
|
||||
Februar
|
||||
SELECT monthname('2001-03-01');
|
||||
monthname('2001-03-01')
|
||||
März
|
||||
#
|
||||
# Start of 5.6 tests
|
||||
#
|
||||
|
@ -1,5 +1,4 @@
|
||||
drop table if exists t1,t2,t3;
|
||||
drop view if exists v2,v3;
|
||||
set @@debug_dbug= 'd,opt';
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (
|
||||
f1 DATE,
|
||||
|
@ -1170,10 +1170,8 @@ binlog-stmt-cache-size 32768
|
||||
bulk-insert-buffer-size 8388608
|
||||
character-set-client-handshake TRUE
|
||||
character-set-filesystem binary
|
||||
character-set-server latin1
|
||||
character-sets-dir MYSQL_CHARSETSDIR/
|
||||
chroot (No default value)
|
||||
collation-server latin1_swedish_ci
|
||||
completion-type NO_CHAIN
|
||||
concurrent-insert AUTO
|
||||
console FALSE
|
||||
@ -1427,7 +1425,7 @@ sysdate-is-now FALSE
|
||||
table-cache 400
|
||||
table-definition-cache 400
|
||||
table-open-cache 400
|
||||
tc-heuristic-recover COMMIT
|
||||
tc-heuristic-recover OFF
|
||||
thread-cache-size 0
|
||||
thread-pool-idle-timeout 60
|
||||
thread-pool-max-threads 500
|
||||
|
@ -1821,7 +1821,7 @@ a b
|
||||
Osnabrück Köln
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
# Bug#15328 Segmentation fault occurred if my.cnf is invalid for escape sequence
|
||||
#
|
||||
--fields-optionally-enclosed-by="
|
||||
#
|
||||
|
@ -207,3 +207,12 @@ Variable_name Value
|
||||
Ssl_cipher DHE-RSA-AES256-SHA
|
||||
DROP USER bug42158@localhost;
|
||||
End of 5.1 tests
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
|
||||
|
@ -6,7 +6,7 @@ insert into t1 values (2,2), (1,1);
|
||||
create table t2 (a int);
|
||||
insert into t2 values (2), (3);
|
||||
set session join_cache_level=3;
|
||||
set @@debug_dbug= 'd:t:O,/tmp/trace.out';
|
||||
set @@debug_dbug= 'd,opt';
|
||||
explain select t1.b from t1,t2 where t1.b=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
|
158
mysql-test/r/set_password_plugin-9835.result
Normal file
158
mysql-test/r/set_password_plugin-9835.result
Normal file
@ -0,0 +1,158 @@
|
||||
create user natauth@localhost identified via 'mysql_native_password' using '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
|
||||
create user newpass@localhost identified by password '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
|
||||
create user newpassnat@localhost identified via 'mysql_native_password';
|
||||
set password for newpassnat@localhost = '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
|
||||
create user oldauth@localhost identified with 'mysql_old_password' using '378b243e220ca493';
|
||||
create user oldpass@localhost identified by password '378b243e220ca493';
|
||||
create user oldpassold@localhost identified with 'mysql_old_password';
|
||||
set password for oldpassold@localhost = '378b243e220ca493';
|
||||
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
|
||||
user host password plugin authentication_string
|
||||
natauth localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
|
||||
newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
|
||||
newpassnat localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
|
||||
oldauth localhost mysql_old_password 378b243e220ca493
|
||||
oldpass localhost 378b243e220ca493
|
||||
oldpassold localhost 378b243e220ca493
|
||||
connect con,localhost,natauth,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
natauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpass,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpassnat,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpassnat@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldauth,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpass,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpassold,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpassold@localhost
|
||||
disconnect con;
|
||||
connection default;
|
||||
flush privileges;
|
||||
connect con,localhost,natauth,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
natauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpass,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpassnat,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpassnat@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldauth,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpass,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpassold,test,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpassold@localhost
|
||||
disconnect con;
|
||||
connection default;
|
||||
set password for natauth@localhost = PASSWORD('test2');
|
||||
set password for newpass@localhost = PASSWORD('test2');
|
||||
set password for newpassnat@localhost = PASSWORD('test2');
|
||||
set password for oldauth@localhost = PASSWORD('test2');
|
||||
set password for oldpass@localhost = PASSWORD('test2');
|
||||
set password for oldpassold@localhost = PASSWORD('test2');
|
||||
select user, host, password, plugin, authentication_string from mysql.user where user != 'root';
|
||||
user host password plugin authentication_string
|
||||
natauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
|
||||
newpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
|
||||
newpassnat localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
|
||||
oldauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
|
||||
oldpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
|
||||
oldpassold localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E
|
||||
connect con,localhost,natauth,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
natauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpass,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpassnat,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpassnat@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldauth,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpass,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpassold,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpassold@localhost
|
||||
disconnect con;
|
||||
connection default;
|
||||
flush privileges;
|
||||
connect con,localhost,natauth,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
natauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpass,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,newpassnat,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
newpassnat@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldauth,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpass,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpassold,test2,;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpassold@localhost
|
||||
disconnect con;
|
||||
connection default;
|
||||
drop user natauth@localhost, newpass@localhost, newpassnat@localhost;
|
||||
drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
|
@ -71,7 +71,7 @@ connection default;
|
||||
set password for u1 = PASSWORD('SOMETHINGELSE');
|
||||
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
|
||||
user host password plugin authentication_string
|
||||
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 mysql_native_password *7AFEFD08B6B720E781FB000CAA418F54FA662626
|
||||
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
|
||||
#
|
||||
# Here we should use the password field, as that primes over
|
||||
# the authentication_string field.
|
||||
@ -115,7 +115,7 @@ connection default;
|
||||
update mysql.user set authentication_string = '' where user='u1';
|
||||
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
|
||||
user host password plugin authentication_string
|
||||
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 mysql_native_password
|
||||
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
|
||||
flush privileges;
|
||||
show grants for u1;
|
||||
Grants for u1@%
|
||||
@ -127,7 +127,7 @@ GRANT SELECT ON `mysql`.* TO 'u1'@'%'
|
||||
connect con1, localhost, u1,'SOMETHINGELSE',;
|
||||
select user, host, password, plugin, authentication_string from mysql.user where user = 'u1';
|
||||
user host password plugin authentication_string
|
||||
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 mysql_native_password
|
||||
u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6
|
||||
disconnect con1;
|
||||
connection default;
|
||||
#
|
||||
|
@ -32,12 +32,9 @@ update t1, t2 set val= 1 where id1=id2;
|
||||
call bug9486();
|
||||
lock tables t2 write;
|
||||
call bug9486();
|
||||
show processlist;
|
||||
Id User Host db Command Time State Info Progress
|
||||
# root localhost test Sleep # NULL 0.000
|
||||
# root localhost test Query # Waiting for table metadata lock update t1, t2 set val= 1 where id1=id2 0.000
|
||||
# root localhost test Query # init show processlist 0.000
|
||||
# root localhost test Sleep # NULL 0.000
|
||||
SELECT state,info FROM information_schema.processlist WHERE id=con1root_id;
|
||||
state info
|
||||
Waiting for table metadata lock update t1, t2 set val= 1 where id1=id2
|
||||
unlock tables;
|
||||
drop procedure bug9486;
|
||||
drop table t1, t2;
|
||||
|
7
mysql-test/r/ssl_timeout-9836.result
Normal file
7
mysql-test/r/ssl_timeout-9836.result
Normal file
@ -0,0 +1,7 @@
|
||||
SET @@net_read_timeout=1;
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
@ -439,6 +439,41 @@ select 1 from t1 as t1_0 inner join t1 as t2 on (t1_0.a <=> now()) join t1 on 1;
|
||||
1
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-9521 Least function returns 0000-00-00 for null date columns instead of null
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id BIGINT NOT NULL,
|
||||
date_debut DATE NOT NULL,
|
||||
date_fin DATE DEFAULT NULL);
|
||||
CREATE TABLE t2(
|
||||
id BIGINT NOT NULL,
|
||||
date_debut DATE NOT NULL,
|
||||
date_fin DATE DEFAULT NULL);
|
||||
INSERT INTO t1 VALUES (1,'2016-01-01','2016-01-31');
|
||||
INSERT INTO t1 VALUES (2,'2016-02-01',null);
|
||||
INSERT INTO t1 VALUES (3,'2016-03-01','2016-03-31');
|
||||
INSERT INTO t1 VALUES (4,'2016-04-01',null);
|
||||
INSERT INTO t2 VALUES (1,'2016-01-01','2016-01-31');
|
||||
INSERT INTO t2 VALUES (2,'2016-02-01','2016-01-28');
|
||||
INSERT INTO t2 VALUES (3,'2016-03-01',null);
|
||||
INSERT INTO t2 VALUES (4,'2016-04-01',null);
|
||||
SELECT t1.id,
|
||||
GREATEST(t2.date_debut, t1.date_debut) AS date_debut,
|
||||
LEAST(IFNULL(t2.date_fin, IFNULL(t1.date_fin, NULL)),
|
||||
IFNULL(t1.date_fin, IFNULL(t2.date_fin, NULL))) AS date_fin
|
||||
FROM t1 LEFT JOIN t2 ON (t1.id=t2.id);
|
||||
id date_debut date_fin
|
||||
1 2016-01-01 2016-01-31 00:00:00
|
||||
2 2016-02-01 2016-01-28 00:00:00
|
||||
3 2016-03-01 2016-03-31 00:00:00
|
||||
4 2016-04-01 NULL
|
||||
DROP TABLE t1,t2;
|
||||
SELECT
|
||||
LEAST(COALESCE(DATE(NULL), DATE(NULL)), COALESCE(DATE(NULL), DATE(NULL))) AS d0,
|
||||
LEAST(IFNULL(DATE(NULL), DATE(NULL)), IFNULL(DATE(NULL), DATE(NULL))) AS d1;
|
||||
d0 d1
|
||||
NULL NULL
|
||||
#
|
||||
# MDEV-9511 Valgrind warnings 'Invalid read' in Field_newdate::cmp and Field_newdate::val_str
|
||||
#
|
||||
CREATE TABLE t1 (f1 DATE, f2 VARCHAR(1));
|
||||
|
@ -644,6 +644,15 @@ SELECT MAX(dt) = '2011-01-06 12:34:30' FROM t1;
|
||||
MAX(dt) = '2011-01-06 12:34:30'
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-9413 "datetime >= coalesce(c1(NULL))" doesn't return expected NULL
|
||||
#
|
||||
CREATE TABLE t1(c1 TIMESTAMP(6) NULL DEFAULT NULL);
|
||||
INSERT INTO t1 VALUES(NULL);
|
||||
SELECT c1, '2016-06-13 20:00:00.000003' >= COALESCE( c1 ) FROM t1;
|
||||
c1 '2016-06-13 20:00:00.000003' >= COALESCE( c1 )
|
||||
NULL NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
#
|
||||
# MDEV-7254: Assigned expression is evaluated twice when updating column TIMESTAMP NOT NULL
|
||||
|
3
mysql-test/r/wait_timeout_not_windows.result
Normal file
3
mysql-test/r/wait_timeout_not_windows.result
Normal file
@ -0,0 +1,3 @@
|
||||
set global log_warnings=2;
|
||||
set @@wait_timeout=1;
|
||||
set global log_warnings=@@log_warnings;
|
@ -153,3 +153,9 @@ t1 CREATE TABLE `t1` (
|
||||
PARTITIONS 5 */
|
||||
#Cleanup.
|
||||
DROP TABLE t1;
|
||||
create database mysqltest1;
|
||||
create table mysqltest1.t1 (a int not null, b int not null) engine=archive
|
||||
partition by list(a) subpartition by hash(b)
|
||||
(partition p1 values in (1),
|
||||
partition p2 values in (2));
|
||||
drop database mysqltest1;
|
||||
|
@ -147,3 +147,10 @@ SHOW CREATE TABLE t1;
|
||||
|
||||
--echo #Cleanup.
|
||||
DROP TABLE t1;
|
||||
|
||||
create database mysqltest1;
|
||||
create table mysqltest1.t1 (a int not null, b int not null) engine=archive
|
||||
partition by list(a) subpartition by hash(b)
|
||||
(partition p1 values in (1),
|
||||
partition p2 values in (2));
|
||||
drop database mysqltest1;
|
||||
|
@ -683,7 +683,7 @@ master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
)
|
||||
) ENGINE=MyISAM
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.user)
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
|
21
mysql-test/suite/innodb/r/innodb-agregate.result
Normal file
21
mysql-test/suite/innodb/r/innodb-agregate.result
Normal file
@ -0,0 +1,21 @@
|
||||
create table t2 (a smallint(6) not null, b int(10) not null, name varchar(20), primary key(a,b), key(name)) engine=InnoDB;
|
||||
insert into t2 values (8355,3,"sanja"),(8355,4,"wlad"),(8366,5, "lawrin"),(8366,6,"markusjm");
|
||||
select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
|
||||
count(distinct name)
|
||||
1
|
||||
select count(distinct name) from t2 where a=8366 and b=5;
|
||||
count(distinct name)
|
||||
1
|
||||
select count(distinct name) from t2 where a=8366 and b between 5 and 5.5;
|
||||
count(distinct name)
|
||||
1
|
||||
select sum(distinct a) from t2 where a=8366 and b>=5 and b<=5;
|
||||
sum(distinct a)
|
||||
8366
|
||||
select sum(distinct a) from t2 where a=8366 and b=5;
|
||||
sum(distinct a)
|
||||
8366
|
||||
select sum(distinct a) from t2 where a=8366 and b between 5 and 5.5;
|
||||
sum(distinct a)
|
||||
8366
|
||||
drop table t2;
|
49
mysql-test/suite/innodb/r/innodb-corrupted-table.result
Normal file
49
mysql-test/suite/innodb/r/innodb-corrupted-table.result
Normal file
@ -0,0 +1,49 @@
|
||||
call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MySQL.*");
|
||||
call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MySQL.*");
|
||||
create table t1 (pk int, i int, key(i)) engine=InnoDB;
|
||||
insert into t1 values (1,1),(2,2);
|
||||
flush tables;
|
||||
# Save the .frm file without the PK
|
||||
alter table t1 add primary key (pk);
|
||||
# Stop the server, replace the frm with the old one and restart the server
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`pk` int(11) DEFAULT NULL,
|
||||
`i` int(11) DEFAULT NULL,
|
||||
KEY `i` (`i`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
Warnings:
|
||||
Warning 1082 InnoDB: Table test/t1 has a primary key in InnoDB data dictionary, but not in MySQL!
|
||||
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL
|
||||
select * from t1;
|
||||
pk i
|
||||
1 1
|
||||
2 2
|
||||
alter table t1 add j int;
|
||||
Warnings:
|
||||
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1082 InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`pk` int(11) DEFAULT NULL,
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`j` int(11) DEFAULT NULL,
|
||||
KEY `i` (`i`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
alter table t1 add primary key (pk);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`pk` int(11) NOT NULL DEFAULT '0',
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`j` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `i` (`i`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
@ -70,6 +70,50 @@ Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key c
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
CREATE DATABASE kg_test1;
|
||||
CREATE DATABASE kg_test2;
|
||||
CREATE TABLE `kg_test1`.`group` (
|
||||
Id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `kg_test1`.`person` (
|
||||
`Id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `group` (`Id`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
show create table `kg_test1`.`person`;
|
||||
Table Create Table
|
||||
person CREATE TABLE `person` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `group` (`Id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
CREATE TABLE `kg_test2`.`person2` (
|
||||
`Id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `group` (`Id`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
ERROR HY000: Can't create table `kg_test2`.`person2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
CREATE TABLE `kg_test2`.`person2` (
|
||||
`Id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `kg_test1`.`group` (`Id`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
show create table `kg_test2`.`person2`;
|
||||
Table Create Table
|
||||
person2 CREATE TABLE `person2` (
|
||||
`Id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `kg_test1`.`group` (`Id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
DROP DATABASE kg_test2;
|
||||
DROP DATABASE kg_test1;
|
||||
CREATE TABLE `#departaments` (
|
||||
`id_depart` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`id_depart`)
|
||||
|
18
mysql-test/suite/innodb/t/innodb-agregate.test
Normal file
18
mysql-test/suite/innodb/t/innodb-agregate.test
Normal file
@ -0,0 +1,18 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# MDEV-9667: Server hangs after select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
|
||||
#
|
||||
|
||||
create table t2 (a smallint(6) not null, b int(10) not null, name varchar(20), primary key(a,b), key(name)) engine=InnoDB;
|
||||
|
||||
insert into t2 values (8355,3,"sanja"),(8355,4,"wlad"),(8366,5, "lawrin"),(8366,6,"markusjm");
|
||||
|
||||
select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
|
||||
select count(distinct name) from t2 where a=8366 and b=5;
|
||||
select count(distinct name) from t2 where a=8366 and b between 5 and 5.5;
|
||||
select sum(distinct a) from t2 where a=8366 and b>=5 and b<=5;
|
||||
select sum(distinct a) from t2 where a=8366 and b=5;
|
||||
select sum(distinct a) from t2 where a=8366 and b between 5 and 5.5;
|
||||
|
||||
drop table t2;
|
46
mysql-test/suite/innodb/t/innodb-corrupted-table.test
Normal file
46
mysql-test/suite/innodb/t/innodb-corrupted-table.test
Normal file
@ -0,0 +1,46 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# MDEV-9918: [ERROR] mysqld got signal 11 during ALTER TABLE `name` COLUMN ADD
|
||||
#
|
||||
|
||||
call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MySQL.*");
|
||||
call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MySQL.*");
|
||||
|
||||
create table t1 (pk int, i int, key(i)) engine=InnoDB;
|
||||
insert into t1 values (1,1),(2,2);
|
||||
|
||||
--let $datadir= `select @@datadir`
|
||||
|
||||
flush tables;
|
||||
|
||||
--echo # Save the .frm file without the PK
|
||||
|
||||
--copy_file $datadir/test/t1.frm $MYSQLTEST_VARDIR/tmp/t1.frm
|
||||
|
||||
alter table t1 add primary key (pk);
|
||||
|
||||
--echo # Stop the server, replace the frm with the old one and restart the server
|
||||
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--remove_file $datadir/test/t1.frm
|
||||
--copy_file $MYSQLTEST_VARDIR/tmp/t1.frm $datadir/test/t1.frm
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
show create table t1;
|
||||
select * from t1;
|
||||
alter table t1 add j int;
|
||||
show warnings;
|
||||
show create table t1;
|
||||
alter table t1 add primary key (pk);
|
||||
show warnings;
|
||||
show create table t1;
|
||||
# Cleanup
|
||||
drop table t1;
|
@ -125,6 +125,47 @@ show warnings;
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-9142 :Adding Constraint with no database reference
|
||||
# results in ERROR 1046 (3D000) at line 13: No database selected
|
||||
#
|
||||
CREATE DATABASE kg_test1;
|
||||
CREATE DATABASE kg_test2;
|
||||
|
||||
CREATE TABLE `kg_test1`.`group` (
|
||||
Id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `kg_test1`.`person` (
|
||||
`Id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `group` (`Id`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
|
||||
show create table `kg_test1`.`person`;
|
||||
|
||||
--error 1005
|
||||
CREATE TABLE `kg_test2`.`person2` (
|
||||
`Id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `group` (`Id`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `kg_test2`.`person2` (
|
||||
`Id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`Name` VARCHAR(50) NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
CONSTRAINT `fk_person_group` FOREIGN KEY (`Id`) REFERENCES `kg_test1`.`group` (`Id`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||
|
||||
show create table `kg_test2`.`person2`;
|
||||
|
||||
SHOW WARNINGS;
|
||||
DROP DATABASE kg_test2;
|
||||
DROP DATABASE kg_test1;
|
||||
|
||||
#
|
||||
# MDEV-7627: Some symbols in table name can cause to Error Code: 1050 when created FK
|
||||
#
|
||||
|
@ -337,7 +337,7 @@ START SLAVE;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
--replace_result $gtid GTID
|
||||
eval SELECT MASTER_GTID_WAIT("$gtid", 30);
|
||||
# The bug occured here, the slave would get an out-of-order binlog error
|
||||
# The bug occurred here, the slave would get an out-of-order binlog error
|
||||
# due to trying to re-apply the 100-x-x transaction.
|
||||
|
||||
# Restart stopped multi-source connections, and sync up.
|
||||
|
@ -1651,7 +1651,7 @@ if($print_details)
|
||||
--enable_result_log
|
||||
--horizontal_results
|
||||
--echo # Dump detailed differences after - before statement execution
|
||||
--echo # 1. The statement executing connection and hopefully noone else
|
||||
--echo # 1. The statement executing connection and hopefully no one else
|
||||
SELECT @default_object_instance_begin;
|
||||
SELECT EVENT_NAME, OBJECT_INSTANCE_BEGIN,
|
||||
COUNT_READ, SUM_NUMBER_OF_BYTES_READ,
|
||||
|
@ -1663,7 +1663,7 @@ if($print_details)
|
||||
--enable_result_log
|
||||
--horizontal_results
|
||||
--echo # Dump detailed differences after - before statement execution
|
||||
--echo # 1. The statement executing connection and hopefully noone else
|
||||
--echo # 1. The statement executing connection and hopefully no one else
|
||||
SELECT @default_object_instance_begin;
|
||||
SELECT EVENT_NAME, OBJECT_INSTANCE_BEGIN,
|
||||
COUNT_READ, SUM_NUMBER_OF_BYTES_READ,
|
||||
|
@ -153,7 +153,7 @@ slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t4` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
)
|
||||
) ENGINE=MyISAM
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t5` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
|
@ -39,7 +39,7 @@ master-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` (
|
||||
`a_in_temporary` int(11) DEFAULT NULL
|
||||
)
|
||||
) ENGINE=MyISAM
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
||||
binlog from server 2
|
||||
@ -72,7 +72,7 @@ slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE table t1 like t2
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE OR REPLACE TABLE `t1` (
|
||||
`a_in_temporary` int(11) DEFAULT NULL
|
||||
)
|
||||
) ENGINE=MyISAM
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
|
||||
#
|
||||
@ -175,7 +175,7 @@ slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t4` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
)
|
||||
) ENGINE=MyISAM
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t5` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
|
@ -153,7 +153,7 @@ slave-bin.000001 # Query # # COMMIT
|
||||
slave-bin.000001 # Gtid # # GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t4` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
)
|
||||
) ENGINE=MyISAM
|
||||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
slave-bin.000001 # Query # # use `test`; CREATE TABLE `t5` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
|
@ -142,7 +142,7 @@ ERROR HY000: Can't generate a unique log-filename master-bin.(1-999)
|
||||
SET debug_dbug= @old_dbug;
|
||||
INSERT INTO t4 VALUES (2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1590]
|
||||
Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: error writing to the binary log'
|
||||
Last_SQL_Error = 'The incident LOST_EVENTS occurred on the master. Message: error writing to the binary log'
|
||||
SELECT * FROM t4 ORDER BY a;
|
||||
a
|
||||
1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user