mysql-5.5.28
This commit is contained in:
commit
ee9afef271
@ -317,6 +317,10 @@ IF(NOT WITHOUT_SERVER)
|
||||
ADD_SUBDIRECTORY(mysql-test)
|
||||
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
|
||||
ADD_SUBDIRECTORY(sql-bench)
|
||||
|
||||
IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
|
||||
ADD_SUBDIRECTORY(internal)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 2000-2009 MySQL AB
|
||||
Copyright 2000, 2010-2011, Oracle and/or its affiliates.
|
||||
Copyright 2000-2010 Monty Program Ab
|
||||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2012, 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
|
||||
@ -15,10 +15,6 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define COPYRIGHT_NOTICE "\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL v2 license\n"
|
||||
|
||||
/* mysql command tool
|
||||
* Commands compatible with mSQL by David J. Hughes
|
||||
*
|
||||
@ -111,6 +107,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "completion_hash.h"
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
#define PROMPT_CHAR '\\'
|
||||
#define DEFAULT_DELIMITER ";"
|
||||
@ -1193,7 +1190,7 @@ int main(int argc,char *argv[])
|
||||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||
put_info((char*) glob_buffer.ptr(),INFO_INFO);
|
||||
|
||||
put_info(COPYRIGHT_NOTICE, INFO_INFO);
|
||||
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
|
||||
|
||||
#ifdef HAVE_READLINE
|
||||
initialize_readline((char*) my_progname);
|
||||
@ -1624,7 +1621,7 @@ static void usage(int version)
|
||||
|
||||
if (version)
|
||||
return;
|
||||
printf("%s", COPYRIGHT_NOTICE);
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
print_defaults("my", load_default_groups);
|
||||
@ -2808,7 +2805,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
||||
char *line __attribute__((unused)), char *help_arg)
|
||||
{
|
||||
MYSQL_ROW cur;
|
||||
const char *server_cmd= buffer->ptr();
|
||||
const char *server_cmd;
|
||||
char cmd_buf[100 + 1];
|
||||
MYSQL_RES *result;
|
||||
int error;
|
||||
@ -2823,9 +2820,12 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
||||
*++end_arg= '\0';
|
||||
}
|
||||
(void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
|
||||
server_cmd= cmd_buf;
|
||||
}
|
||||
|
||||
else
|
||||
(void) strxnmov(cmd_buf, sizeof(cmd_buf), "help ", help_arg, NullS);
|
||||
|
||||
server_cmd= cmd_buf;
|
||||
|
||||
if (!status.batch)
|
||||
{
|
||||
old_buffer= *buffer;
|
||||
@ -2893,6 +2893,11 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
||||
else
|
||||
{
|
||||
put_info("\nNothing found", INFO_INFO);
|
||||
if (strncasecmp(server_cmd, "help 'contents'", 15) == 0)
|
||||
{
|
||||
put_info("\nPlease check if 'help tables' are loaded.\n", INFO_INFO);
|
||||
goto err;
|
||||
}
|
||||
put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2000 MySQL AB
|
||||
Copyright (c) 2006, 2011, Oracle and/or its affiliates.
|
||||
Copyright (C) 2010-2011 Monty Program Ab
|
||||
Copyright (c) 2006, 2012, Oracle and/or its affiliates.
|
||||
Copyright (C) 2010, 2012, 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
|
||||
@ -252,7 +251,7 @@ get_one_option(int optid, const struct my_option *opt,
|
||||
case '?':
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
||||
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("MariaDB utility for upgrading databases to new MariaDB versions.\n");
|
||||
my_print_help(my_long_options);
|
||||
die(0);
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2012, 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
|
||||
@ -22,6 +23,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <mysql.h>
|
||||
#include <sql_common.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
#define ADMIN_VERSION "9.0"
|
||||
#define MAX_MYSQL_VAR 512
|
||||
@ -702,9 +704,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
case ADMIN_VER:
|
||||
new_line=1;
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc,\n"
|
||||
"2009 Monty Program Ab");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
|
||||
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
|
||||
printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
|
||||
@ -1176,9 +1176,7 @@ static void print_version(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc,\n"
|
||||
"2009 Monty Program Ab");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("Administration program for the mysqld daemon.");
|
||||
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
|
@ -38,6 +38,9 @@
|
||||
#include "sql_priv.h"
|
||||
#include "log_event.h"
|
||||
#include "sql_common.h"
|
||||
#include "my_dir.h"
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
|
||||
#include "sql_string.h" // needed for Rpl_filter
|
||||
#include "sql_list.h" // needed for Rpl_filter
|
||||
@ -1501,10 +1504,7 @@ static void print_version()
|
||||
static void usage()
|
||||
{
|
||||
print_version();
|
||||
puts("By Monty and Sasha, for your professional use\n\
|
||||
This software comes with NO WARRANTY: This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("\
|
||||
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
|
||||
the mysql command line client.\n\n");
|
||||
@ -2073,6 +2073,7 @@ static Exit_status check_header(IO_CACHE* file,
|
||||
uchar header[BIN_LOG_HEADER_SIZE];
|
||||
uchar buf[PROBE_HEADER_LEN];
|
||||
my_off_t tmp_pos, pos;
|
||||
MY_STAT my_file_stat;
|
||||
|
||||
delete glob_description_event;
|
||||
if (!(glob_description_event= new Format_description_log_event(3)))
|
||||
@ -2082,7 +2083,16 @@ static Exit_status check_header(IO_CACHE* file,
|
||||
}
|
||||
|
||||
pos= my_b_tell(file);
|
||||
my_b_seek(file, (my_off_t)0);
|
||||
|
||||
/* fstat the file to check if the file is a regular file. */
|
||||
if (my_fstat(file->file, &my_file_stat, MYF(0)) == -1)
|
||||
{
|
||||
error("Unable to stat the file.");
|
||||
return ERROR_STOP;
|
||||
}
|
||||
if ((my_file_stat.st_mode & S_IFMT) == S_IFREG)
|
||||
my_b_seek(file, (my_off_t)0);
|
||||
|
||||
if (my_b_read(file, header, sizeof(header)))
|
||||
{
|
||||
error("Failed reading header; probably an empty file.");
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Copyright (C) 2000 MySQL AB & Jani Tolonen
|
||||
Copyright (c) 2001, 2011, Oracle and/or its affiliates.
|
||||
Copyright (C) 2010-2011 Monty Program Ab
|
||||
/*
|
||||
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2011, 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
|
||||
@ -25,6 +25,7 @@
|
||||
#include <mysql_version.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <sslopt-vars.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
/* Exit codes */
|
||||
|
||||
@ -229,13 +230,7 @@ static void usage(void)
|
||||
{
|
||||
DBUG_ENTER("usage");
|
||||
print_version();
|
||||
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
|
||||
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
||||
printf("OR %s [OPTIONS] --databases DB1 [DB2 DB3...]\n",
|
||||
my_progname);
|
||||
printf("OR %s [OPTIONS] --all-databases\n\n", my_progname);
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
|
||||
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
|
||||
puts("used at the same time. Not all options are supported by all storage engines.");
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2012, 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
|
||||
@ -616,8 +617,7 @@ static void short_usage_sub(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("By Igor Romanenko, Monty, Jani & Sinisa and others.");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("Dumping structure and contents of MySQL databases and tables.");
|
||||
short_usage_sub();
|
||||
print_defaults("my",load_default_groups);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2000, 2012, 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
|
||||
@ -208,7 +208,8 @@ static void usage(void)
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
puts("Copyright 2008-2011 Oracle and Monty Program Ab.");
|
||||
print_version();
|
||||
printf("\n\
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("\
|
||||
Loads tables from text files in various formats. The base name of the\n\
|
||||
text file must be the name of the table that should be used.\n\
|
||||
If one uses sockets to connect to the MySQL server, the server will open and\n\
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <sslopt-vars.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
static char * host=0, *opt_password=0, *user=0;
|
||||
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
|
||||
@ -266,9 +267,7 @@ static void print_version(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
puts("Copyright 2008-2011 Oracle and Monty Program Ab.");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
|
||||
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
|
||||
puts("\n\
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2005, 2012, 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
|
||||
@ -722,7 +722,7 @@ static void print_version(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005"));
|
||||
puts("Run a query multiple times against the server.\n");
|
||||
printf("Usage: %s [OPTIONS]\n",my_progname);
|
||||
print_defaults("my",load_default_groups);
|
||||
|
@ -54,6 +54,8 @@
|
||||
#include <signal.h>
|
||||
#include <my_stacktrace.h>
|
||||
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
#ifdef __WIN__
|
||||
#include <crtdbg.h>
|
||||
#define SIGNAL_FMT "exception 0x%x"
|
||||
@ -6961,8 +6963,7 @@ void print_version(void)
|
||||
void usage()
|
||||
{
|
||||
print_version();
|
||||
printf("MySQL AB, by Sasha, Matt, Monty & Jani and others\n");
|
||||
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
|
||||
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
|
@ -1,8 +1,7 @@
|
||||
#ifndef SQL_STRING_INCLUDED
|
||||
#define SQL_STRING_INCLUDED
|
||||
|
||||
/*
|
||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates
|
||||
/* Copyright (c) 2000, 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
|
||||
@ -194,8 +193,12 @@ public:
|
||||
}
|
||||
bool real_alloc(uint32 arg_length); // Empties old string
|
||||
bool realloc(uint32 arg_length);
|
||||
inline void shrink(uint32 arg_length) // Shrink buffer
|
||||
|
||||
// Shrink the buffer, but only if it is allocated on the heap.
|
||||
inline void shrink(uint32 arg_length)
|
||||
{
|
||||
if (!is_alloced())
|
||||
return;
|
||||
if (arg_length < Alloced_length)
|
||||
{
|
||||
char *new_ptr;
|
||||
@ -211,7 +214,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
bool is_alloced() { return alloced; }
|
||||
bool is_alloced() const { return alloced; }
|
||||
inline String& operator = (const String &s)
|
||||
{
|
||||
if (&s != this)
|
||||
|
@ -25,7 +25,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
|
||||
SET(SSL_LIBRARIES yassl taocrypt)
|
||||
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
|
||||
SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
||||
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
|
||||
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
|
||||
CHANGE_SSL_SETTINGS("bundled")
|
||||
#Remove -fno-implicit-templates
|
||||
#(yassl sources cannot be compiled with it)
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "../storage/ndb/src/kernel/error/ndbd_exit_codes.c"
|
||||
#include "../storage/ndb/include/mgmapi/mgmapi_error.h"
|
||||
#endif
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
static my_bool verbose, print_all_codes;
|
||||
|
||||
@ -114,7 +115,7 @@ static void print_version(void)
|
||||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
printf("Print a description for a system error code or a MySQL error code.\n");
|
||||
printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
|
||||
printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
|
||||
|
@ -12,7 +12,16 @@ before calling SSL_new();
|
||||
|
||||
*** end Note ***
|
||||
|
||||
yaSSL Release notes, version 2.1.2 (9/2/2011)
|
||||
yaSSL Release notes, version 2.2.2 (7/5/2012)
|
||||
|
||||
This release of yaSSL contains bug fixes and more security checks around
|
||||
malicious certificates.
|
||||
|
||||
See normal build instructions below under 1.0.6.
|
||||
See libcurl build instructions below under 1.3.0 and note in 1.5.8.
|
||||
|
||||
|
||||
*****************yaSSL Release notes, version 2.1.2 (9/2/2011)
|
||||
|
||||
This release of yaSSL contains bug fixes, better non-blocking support with
|
||||
SSL_write, and OpenSSL RSA public key format support.
|
||||
|
@ -27,7 +27,7 @@
|
||||
Visual Studio Source Annotations header (sourceannotations.h) fails
|
||||
to compile if outside of the global namespace.
|
||||
*/
|
||||
#ifdef YASSL_THREAD_SAFE
|
||||
#ifdef MULTI_THREADED
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@ -36,8 +36,9 @@
|
||||
namespace yaSSL {
|
||||
|
||||
|
||||
#ifdef YASSL_THREAD_SAFE
|
||||
#ifdef MULTI_THREADED
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
class Mutex {
|
||||
CRITICAL_SECTION cs_;
|
||||
@ -77,7 +78,7 @@ namespace yaSSL {
|
||||
};
|
||||
|
||||
#endif // _WIN32
|
||||
#else // YASSL_THREAD_SAFE (WE'RE SINGLE)
|
||||
#else // MULTI_THREADED (WE'RE SINGLE)
|
||||
|
||||
class Mutex {
|
||||
public:
|
||||
@ -87,7 +88,7 @@ namespace yaSSL {
|
||||
};
|
||||
};
|
||||
|
||||
#endif // YASSL_THREAD_SAFE
|
||||
#endif // MULTI_THREADED
|
||||
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "rsa.h"
|
||||
|
||||
|
||||
#define YASSL_VERSION "2.2.0"
|
||||
#define YASSL_VERSION "2.2.2"
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
@ -65,7 +65,7 @@ enum YasslError {
|
||||
enum Library { yaSSL_Lib = 0, CryptoLib, SocketLib };
|
||||
enum { MAX_ERROR_SZ = 80 };
|
||||
|
||||
void SetErrorString(unsigned long, char*);
|
||||
void SetErrorString(YasslError, char*);
|
||||
|
||||
/* remove for now, if go back to exceptions use this wrapper
|
||||
// Base class for all yaSSL exceptions
|
||||
|
@ -250,8 +250,7 @@ int CertManager::Validate()
|
||||
TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length());
|
||||
TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_);
|
||||
|
||||
int err = cert.GetError().What();
|
||||
if ( err )
|
||||
if (int err = cert.GetError().What())
|
||||
return err;
|
||||
|
||||
const TaoCrypt::PublicKey& key = cert.GetPublicKey();
|
||||
|
@ -26,7 +26,7 @@
|
||||
namespace yaSSL {
|
||||
|
||||
|
||||
#ifdef YASSL_THREAD_SAFE
|
||||
#ifdef MULTI_THREADED
|
||||
#ifdef _WIN32
|
||||
|
||||
Mutex::Mutex()
|
||||
@ -79,7 +79,7 @@ namespace yaSSL {
|
||||
|
||||
|
||||
#endif // _WIN32
|
||||
#endif // YASSL_THREAD_SAFE
|
||||
#endif // MULTI_THREADED
|
||||
|
||||
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
/* see man pages for function descriptions */
|
||||
|
||||
#include "runtime.hpp"
|
||||
@ -747,7 +746,7 @@ void SSL_CTX_set_verify(SSL_CTX* ctx, int mode, VerifyCallback vc)
|
||||
int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
|
||||
const char* path)
|
||||
{
|
||||
int ret = SSL_SUCCESS;
|
||||
int ret = SSL_FAILURE;
|
||||
const int HALF_PATH = 128;
|
||||
|
||||
if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);
|
||||
@ -1014,7 +1013,7 @@ char* ERR_error_string(unsigned long errNumber, char* buffer)
|
||||
static char* msg = (char*)"Please supply a buffer for error string";
|
||||
|
||||
if (buffer) {
|
||||
SetErrorString(errNumber, buffer);
|
||||
SetErrorString(YasslError(errNumber), buffer);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
@ -31,11 +31,6 @@
|
||||
#pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
|
||||
#pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
||||
namespace yaSSL {
|
||||
|
||||
|
||||
@ -60,7 +55,7 @@ Library Error::get_lib() const
|
||||
*/
|
||||
|
||||
|
||||
void SetErrorString(unsigned long error, char* buffer)
|
||||
void SetErrorString(YasslError error, char* buffer)
|
||||
{
|
||||
using namespace TaoCrypt;
|
||||
const int max = MAX_ERROR_SZ; // shorthand
|
||||
|
@ -92,7 +92,6 @@ typedef BlockCipher<ENCRYPTION, AES, CBC> AES_CBC_Encryption;
|
||||
typedef BlockCipher<DECRYPTION, AES, CBC> AES_CBC_Decryption;
|
||||
|
||||
|
||||
|
||||
} // naemspace
|
||||
|
||||
#endif // TAO_CRYPT_AES_HPP
|
||||
|
@ -48,9 +48,11 @@ word32 PBKDF2_HMAC<T>::DeriveKey(byte* derived, word32 dLen, const byte* pwd,
|
||||
word32 pLen, const byte* salt, word32 sLen,
|
||||
word32 iterations) const
|
||||
{
|
||||
if (dLen > MaxDerivedKeyLength())
|
||||
if (dLen > MaxDerivedKeyLength())
|
||||
return 0;
|
||||
|
||||
if (iterations < 0)
|
||||
return 0;
|
||||
|
||||
ByteBlock buffer(T::DIGEST_SIZE);
|
||||
HMAC<T> hmac;
|
||||
|
@ -154,6 +154,8 @@ word32 GetLength(Source& source)
|
||||
else
|
||||
length = b;
|
||||
|
||||
if (source.IsLeft(length) == false) return 0;
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
@ -832,7 +834,7 @@ void CertDecoder::GetName(NameType nt)
|
||||
if (email) {
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/emailAddress=", 14, length))) {
|
||||
source_.SetError(CONTENT_E);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,16 @@ void HexDecoder::Decode()
|
||||
byte b = coded_.next() - 0x30; // 0 starts at 0x30
|
||||
byte b2 = coded_.next() - 0x30;
|
||||
|
||||
// sanity checks
|
||||
if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) {
|
||||
coded_.SetError(PEM_E);
|
||||
return;
|
||||
}
|
||||
if (b2 >= sizeof(hexDecode)/sizeof(hexDecode[0])) {
|
||||
coded_.SetError(PEM_E);
|
||||
return;
|
||||
}
|
||||
|
||||
b = hexDecode[b];
|
||||
b2 = hexDecode[b2];
|
||||
|
||||
@ -178,6 +188,7 @@ void Base64Decoder::Decode()
|
||||
{
|
||||
word32 bytes = coded_.size();
|
||||
word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz);
|
||||
const byte maxIdx = (byte)sizeof(base64Decode) + 0x2B - 1;
|
||||
plainSz = ((plainSz * 3) / 4) + 3;
|
||||
decoded_.New(plainSz);
|
||||
|
||||
@ -200,6 +211,16 @@ void Base64Decoder::Decode()
|
||||
if (e4 == pad)
|
||||
pad4 = true;
|
||||
|
||||
if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) {
|
||||
coded_.SetError(PEM_E);
|
||||
return;
|
||||
}
|
||||
|
||||
if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) {
|
||||
coded_.SetError(PEM_E);
|
||||
return;
|
||||
}
|
||||
|
||||
e1 = base64Decode[e1 - 0x2B];
|
||||
e2 = base64Decode[e2 - 0x2B];
|
||||
e3 = (e3 == pad) ? 0 : base64Decode[e3 - 0x2B];
|
||||
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2000-2007 MySQL 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
|
||||
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; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
||||
MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/* put features that other apps expect from OpenSSL type crypto */
|
||||
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
// for libcurl configure test, these are the signatures they use
|
||||
// locking handled internally by library
|
||||
char CRYPTO_lock() { return 0;}
|
||||
char CRYPTO_add_lock() { return 0;}
|
||||
|
||||
|
||||
// for openvpn, test are the signatures they use
|
||||
char EVP_CIPHER_CTX_init() { return 0; }
|
||||
char CRYPTO_mem_ctrl() { return 0; }
|
||||
} // extern "C"
|
||||
|
||||
|
||||
|
@ -3,6 +3,21 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "benchmark"=.\benchmark\benchmark.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name taocrypt
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "taocrypt"=.\taocrypt.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
@ -15,7 +30,7 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "test"=.\test.dsp - Package Owner=<4>
|
||||
Project: "test"=.\test\test.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
|
@ -31,7 +31,7 @@
|
||||
To use MemoryTracker merely add this file to your project
|
||||
No need to instantiate anything
|
||||
|
||||
If your app is multi threaded define YASSL_THREAD_SAFE
|
||||
If your app is multi threaded define MULTI_THREADED
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
|
@ -37,12 +37,12 @@ RSC=rc.exe
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "test\Release"
|
||||
# PROP Intermediate_Dir "test\Release"
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /O2 /I "include" /I "mySTL" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /O2 /I "../include" /I "../mySTL" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@ -61,12 +61,12 @@ LINK32=link.exe
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "test\Debug"
|
||||
# PROP Intermediate_Dir "test\Debug"
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "include" /I "mySTL" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "../include" /I "../mySTL" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@ -87,7 +87,7 @@ LINK32=link.exe
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\test\test.cpp
|
||||
SOURCE=.\test.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
@ -90,7 +90,7 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "test"=.\taocrypt\test.dsp - Package Owner=<4>
|
||||
Project: "test"=.\taocrypt\test\test.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
@ -113,9 +113,6 @@ Package=<5>
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name taocrypt
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name yassl
|
||||
End Project Dependency
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <debug_sync.h>
|
||||
#include <sql_profile.h>
|
||||
#include <table.h>
|
||||
#include <sql_list.h>
|
||||
|
||||
/* Needed to get access to scheduler variables */
|
||||
void* thd_get_scheduler_data(THD *thd);
|
||||
@ -56,9 +57,14 @@ void thd_unlock_data(THD *thd);
|
||||
bool thd_is_transaction_active(THD *thd);
|
||||
int thd_connection_has_data(THD *thd);
|
||||
void thd_set_net_read_write(THD *thd, uint val);
|
||||
uint thd_get_net_read_write(THD *thd);
|
||||
void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
|
||||
ulong thd_get_net_wait_timeout(THD *thd);
|
||||
my_socket thd_get_fd(THD *thd);
|
||||
|
||||
THD *first_global_thread();
|
||||
THD *next_global_thread(THD *thd);
|
||||
|
||||
/* Print to the MySQL error log */
|
||||
void sql_print_error(const char *format, ...);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, 2011, Oracle and/or its affiliates.
|
||||
/* Copyright (c) 2010, 2012, 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
|
||||
@ -16,11 +16,14 @@
|
||||
#ifndef _welcome_copyright_notice_h_
|
||||
#define _welcome_copyright_notice_h_
|
||||
|
||||
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2012"
|
||||
|
||||
/*
|
||||
This define specifies copyright notice which is displayed by every MySQL
|
||||
program on start, or on help screen.
|
||||
*/
|
||||
#define ORACLE_WELCOME_COPYRIGHT_NOTICE(years) \
|
||||
"Copyright (c) " years ", Oracle, Monty Program Ab and others.\n"
|
||||
#define ORACLE_WELCOME_COPYRIGHT_NOTICE(first_year) \
|
||||
"Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR \
|
||||
", Oracle, Monty Program Ab and others.\n"
|
||||
|
||||
#endif /* _welcome_copyright_notice_h_ */
|
||||
|
@ -2867,3 +2867,16 @@ SET @@global.max_allowed_packet:= @tmp_max;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
SELECT @tmp_max:= @@global.max_allowed_packet;
|
||||
@tmp_max:= @@global.max_allowed_packet
|
||||
1048576
|
||||
SET @@global.max_allowed_packet=1024*1024*1024;
|
||||
SELECT @@global.max_allowed_packet;
|
||||
@@global.max_allowed_packet
|
||||
1073741824
|
||||
SELECT CHAR_LENGTH(EXPORT_SET(1,1,1,REPEAT(1,100000000)));
|
||||
CHAR_LENGTH(EXPORT_SET(1,1,1,REPEAT(1,100000000)))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated
|
||||
SET @@global.max_allowed_packet:= @tmp_max;
|
||||
|
@ -199,7 +199,7 @@ SELECT @@general_log, @@log;
|
||||
1 1
|
||||
SET GLOBAL log = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
|
||||
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
|
||||
SHOW VARIABLES LIKE 'general_log';
|
||||
Variable_name Value
|
||||
general_log OFF
|
||||
@ -230,7 +230,7 @@ SELECT @@slow_query_log, @@log_slow_queries;
|
||||
0 0
|
||||
SET GLOBAL log_slow_queries = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SHOW VARIABLES LIKE 'slow_query_log';
|
||||
Variable_name Value
|
||||
slow_query_log OFF
|
||||
@ -283,16 +283,16 @@ SET GLOBAL slow_query_log_file = @old_slow_query_log_file;
|
||||
deprecated:
|
||||
SET GLOBAL log = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
|
||||
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
|
||||
SET GLOBAL log_slow_queries = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SET GLOBAL log = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
|
||||
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
|
||||
SET GLOBAL log_slow_queries = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
not deprecated:
|
||||
SELECT @@global.general_log_file INTO @my_glf;
|
||||
SELECT @@global.slow_query_log_file INTO @my_sqlf;
|
||||
|
@ -44,9 +44,9 @@ ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1
|
||||
drop user ssl_user1@localhost, ssl_user2@localhost,
|
||||
ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
|
||||
drop table t1;
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
|
||||
SSL error: Unable to get private key from ''
|
||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: Unable to get private key
|
||||
SSL error: Unable to get certificate from ''
|
||||
|
@ -430,7 +430,7 @@ set @old_optimizer_switch = @@session.optimizer_switch,
|
||||
SET SESSION OPTIMIZER_SWITCH = 'materialization=off,semijoin=off,loosescan=off,firstmatch=off,mrr=on';
|
||||
SET SESSION engine_condition_pushdown = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT `time_nokey` G1 FROM t1 WHERE ( `varchar_nokey` , `varchar_key` ) IN (
|
||||
SELECT `varchar_nokey` , `varchar_nokey` ) AND `varchar_key` >= 'c' HAVING G1 ORDER
|
||||
BY `pk` ;
|
||||
@ -438,7 +438,7 @@ G1
|
||||
set @@session.optimizer_switch = @old_optimizer_switch,
|
||||
@@session.engine_condition_pushdown = @old_engine_condition_pushdown;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# During work with BUG#45863 I had problems with a query that was
|
||||
@ -625,7 +625,7 @@ SELECT @old_icp:=@@engine_condition_pushdown;
|
||||
#
|
||||
SET SESSION engine_condition_pushdown = 'ON';
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
|
||||
SELECT pk
|
||||
FROM t2
|
||||
@ -640,7 +640,7 @@ pk
|
||||
# Restore old value for Index condition pushdown
|
||||
SET SESSION engine_condition_pushdown=@old_icp;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 5.3 tests.
|
||||
@ -1351,7 +1351,7 @@ ON SUBQUERY2_t3.f2)
|
||||
GROUP BY t1.f4 ORDER BY t1.f1 LIMIT 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t2 system NULL NULL NULL NULL 1 Using temporary; Using filesort
|
||||
1 PRIMARY t1 index NULL f4 5 NULL 11 Using where
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 11 Using where
|
||||
2 DEPENDENT SUBQUERY SUBQUERY2_t1 system NULL NULL NULL NULL 1
|
||||
2 DEPENDENT SUBQUERY SUBQUERY2_t2 index NULL f4 5 NULL 11 Using index
|
||||
2 DEPENDENT SUBQUERY SUBQUERY2_t3 ALL NULL NULL NULL NULL 11 Using where; Using join buffer (flat, BNL join)
|
||||
|
@ -538,7 +538,7 @@ Warning 1292 Truncated incorrect read_buffer_size value: '100'
|
||||
set read_rnd_buffer_size=100;
|
||||
set global rpl_recovery_rank=100;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
set global server_id=100;
|
||||
set global slow_launch_time=100;
|
||||
set sort_buffer_size=100;
|
||||
@ -1060,7 +1060,7 @@ set global net_write_timeout =@my_net_write_timeout;
|
||||
set global net_read_timeout =@my_net_read_timeout;
|
||||
set global rpl_recovery_rank =@my_rpl_recovery_rank;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
set global server_id =@my_server_id;
|
||||
set global slow_launch_time =@my_slow_launch_time;
|
||||
set global default_storage_engine =@my_storage_engine;
|
||||
|
@ -1,5 +1,5 @@
|
||||
source include/have_archive.inc;
|
||||
source federated.inc;
|
||||
source suite/federated/include/federated.inc;
|
||||
|
||||
|
||||
connection slave;
|
||||
@ -54,5 +54,5 @@ connection slave;
|
||||
DROP TABLE federated.archive_table;
|
||||
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
source federated.inc;
|
||||
source suite/federated/include/federated.inc;
|
||||
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
@ -37,5 +37,5 @@ connection slave;
|
||||
DROP TABLE federated.bug_13118_table;
|
||||
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
||||
|
@ -4,7 +4,7 @@ if (!$MYSQL_BUG25714)
|
||||
skip Need bug25714 test program;
|
||||
}
|
||||
|
||||
source federated.inc;
|
||||
source suite/federated/include/federated.inc;
|
||||
|
||||
connection master;
|
||||
# Disable concurrent inserts to avoid test failures when reading
|
||||
@ -59,4 +59,4 @@ SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
|
||||
|
||||
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
source federated.inc;
|
||||
source include/federated.inc;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #32426: FEDERATED query returns corrupt results for ORDER BY
|
||||
@ -21,4 +21,4 @@ DROP TABLE federated.t1;
|
||||
|
||||
connection default;
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source include/federated_cleanup.inc;
|
||||
|
@ -9,7 +9,7 @@
|
||||
--echo # to complete while still indicating a problem. This fix applies to any non-fatal system
|
||||
--echo # error that occurs during a query against I_S.TABLES.de
|
||||
|
||||
--source federated.inc
|
||||
--source suite/federated/include/federated.inc
|
||||
|
||||
--disable_warnings
|
||||
# Federated database exists
|
||||
@ -74,4 +74,4 @@ DROP TABLE t1;
|
||||
--echo # Cleanup
|
||||
--echo #
|
||||
|
||||
--source federated_cleanup.inc
|
||||
--source suite/federated/include/federated_cleanup.inc
|
||||
|
@ -1,4 +1,4 @@
|
||||
source federated.inc;
|
||||
source include/federated.inc;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #585688: maridb crashes in federatedx code
|
||||
@ -49,5 +49,5 @@ DROP TABLE federated.t1;
|
||||
|
||||
connection default;
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source include/federated_cleanup.inc;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/long_test.inc
|
||||
--source federated.inc
|
||||
--source include/federated.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug#47525: MySQL crashed (Federated)
|
||||
@ -37,4 +37,4 @@ DROP TABLE t1;
|
||||
|
||||
connection default;
|
||||
--echo # Federated cleanup
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
@ -4,7 +4,7 @@
|
||||
# See Bug #40645 Test main.federated_innodb does not always clean up after itself
|
||||
|
||||
source include/have_innodb.inc;
|
||||
source federated.inc;
|
||||
source suite/federated/include/federated.inc;
|
||||
|
||||
#
|
||||
# Bug#25513 Federated transaction failures
|
||||
@ -36,4 +36,4 @@ connection slave;
|
||||
drop table federated.t1;
|
||||
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
@ -4,7 +4,7 @@
|
||||
source have_federatedx.inc;
|
||||
source include/have_partition.inc;
|
||||
source include/have_innodb.inc;
|
||||
source federated.inc;
|
||||
source include/federated.inc;
|
||||
|
||||
disable_warnings;
|
||||
drop table if exists t1;
|
||||
@ -50,4 +50,4 @@ drop table federated.t1_2;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source include/federated_cleanup.inc;
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Slow test, don't run during staging part
|
||||
-- source include/not_staging.inc
|
||||
-- source include/big_test.inc
|
||||
-- source federated.inc
|
||||
-- source include/federated.inc
|
||||
|
||||
connection slave;
|
||||
create database first_db;
|
||||
@ -343,4 +343,4 @@ drop table t1;
|
||||
drop server if exists s;
|
||||
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
@ -1,6 +1,6 @@
|
||||
source have_federatedx.inc;
|
||||
source include/have_innodb.inc;
|
||||
source federated.inc;
|
||||
source suite/federated/include/federated.inc;
|
||||
|
||||
connection slave;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
@ -36,4 +36,4 @@ INSERT INTO federated.t1 (id, name) VALUES (6, 'fig');
|
||||
SELECT * FROM federated.t1;
|
||||
DELETE FROM federated.t1;
|
||||
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
|
||||
--source federated.inc
|
||||
--source include/federated.inc
|
||||
--source have_federatedx.inc
|
||||
|
||||
connection default;
|
||||
@ -1999,4 +1999,4 @@ connection slave;
|
||||
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
|
||||
|
||||
connection default;
|
||||
source federated_cleanup.inc;
|
||||
source suite/federated/include/federated_cleanup.inc;
|
||||
|
@ -0,0 +1,130 @@
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
|
||||
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
|
||||
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
|
||||
INSERT INTO infoschema_buffer_test VALUES(9);
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test"
|
||||
and PAGE_STATE="file_page" and PAGE_TYPE="index";
|
||||
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
|
||||
test/infoschema_buffer_test GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX
|
||||
INSERT INTO infoschema_buffer_test VALUES(19);
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test"
|
||||
and PAGE_STATE="file_page" and PAGE_TYPE="index";
|
||||
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
|
||||
test/infoschema_buffer_test GEN_CLUST_INDEX 2 58 FILE_PAGE INDEX
|
||||
CREATE INDEX idx ON infoschema_buffer_test(col1);
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test"
|
||||
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
|
||||
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
|
||||
test/infoschema_buffer_test idx 2 32 FILE_PAGE INDEX
|
||||
DROP TABLE infoschema_buffer_test;
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test";
|
||||
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
|
||||
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
|
||||
ENGINE=INNODB;
|
||||
CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
|
||||
FOREIGN KEY (parent_id)
|
||||
REFERENCES infoschema_parent(id)
|
||||
ON DELETE CASCADE)
|
||||
ENGINE=INNODB;
|
||||
SELECT count(*)
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page"
|
||||
and PAGE_TYPE="index";
|
||||
count(*)
|
||||
2
|
||||
DROP TABLE infoschema_child;
|
||||
DROP TABLE infoschema_parent;
|
||||
show create table information_schema.innodb_buffer_page;
|
||||
Table Create Table
|
||||
INNODB_BUFFER_PAGE CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
|
||||
`POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`BLOCK_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGE_TYPE` varchar(64) DEFAULT NULL,
|
||||
`FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`IS_HASHED` varchar(3) DEFAULT NULL,
|
||||
`NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`TABLE_NAME` varchar(1024) DEFAULT NULL,
|
||||
`INDEX_NAME` varchar(1024) DEFAULT NULL,
|
||||
`NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGE_STATE` varchar(64) DEFAULT NULL,
|
||||
`IO_FIX` varchar(64) DEFAULT NULL,
|
||||
`IS_OLD` varchar(3) DEFAULT NULL,
|
||||
`FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
||||
show create table information_schema.innodb_buffer_page_lru;
|
||||
Table Create Table
|
||||
INNODB_BUFFER_PAGE_LRU CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
|
||||
`POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`LRU_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGE_TYPE` varchar(64) DEFAULT NULL,
|
||||
`FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`IS_HASHED` varchar(3) DEFAULT NULL,
|
||||
`NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`TABLE_NAME` varchar(1024) DEFAULT NULL,
|
||||
`INDEX_NAME` varchar(1024) DEFAULT NULL,
|
||||
`NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`COMPRESSED` varchar(3) DEFAULT NULL,
|
||||
`IO_FIX` varchar(64) DEFAULT NULL,
|
||||
`IS_OLD` varchar(3) DEFAULT NULL,
|
||||
`FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
||||
show create table information_schema.innodb_buffer_pool_stats;
|
||||
Table Create Table
|
||||
INNODB_BUFFER_POOL_STATS CREATE TEMPORARY TABLE `INNODB_BUFFER_POOL_STATS` (
|
||||
`POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`POOL_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`FREE_BUFFERS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`OLD_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`MODIFIED_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PENDING_DECOMPRESS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PENDING_READS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PENDING_FLUSH_LRU` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PENDING_FLUSH_LIST` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGES_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGES_NOT_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGES_MADE_YOUNG_RATE` double NOT NULL DEFAULT '0',
|
||||
`PAGES_MADE_NOT_YOUNG_RATE` double NOT NULL DEFAULT '0',
|
||||
`NUMBER_PAGES_READ` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`NUMBER_PAGES_CREATED` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`NUMBER_PAGES_WRITTEN` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`PAGES_READ_RATE` double NOT NULL DEFAULT '0',
|
||||
`PAGES_CREATE_RATE` double NOT NULL DEFAULT '0',
|
||||
`PAGES_WRITTEN_RATE` double NOT NULL DEFAULT '0',
|
||||
`NUMBER_PAGES_GET` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`HIT_RATE` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`NOT_YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`NUMBER_PAGES_READ_AHEAD` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`NUMBER_READ_AHEAD_EVICTED` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`READ_AHEAD_RATE` double NOT NULL DEFAULT '0',
|
||||
`READ_AHEAD_EVICTED_RATE` double NOT NULL DEFAULT '0',
|
||||
`LRU_IO_TOTAL` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`LRU_IO_CURRENT` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`UNCOMPRESS_TOTAL` bigint(21) unsigned NOT NULL DEFAULT '0',
|
||||
`UNCOMPRESS_CURRENT` bigint(21) unsigned NOT NULL DEFAULT '0'
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8
|
@ -1,11 +1,6 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
if (`select plugin_auth_version <= "1.0.17-13.01" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB 1.0.17-13.01 or earlier
|
||||
}
|
||||
|
||||
create table t1 (
|
||||
rowid int,
|
||||
f1 int,
|
||||
|
@ -0,0 +1,81 @@
|
||||
# Exercise the code path for INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS
|
||||
# and INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
if (`select plugin_auth_version <= "1.1.8-29.0" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in XtraDB 1.1.8-29.0 or earlier
|
||||
}
|
||||
|
||||
-- disable_result_log
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
|
||||
|
||||
# How many buffer pools we have
|
||||
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
|
||||
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
|
||||
|
||||
# This gives the over all buffer pool size
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
|
||||
|
||||
-- enable_result_log
|
||||
|
||||
# Create a table and check its page info behave correctly in the pool
|
||||
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
|
||||
|
||||
INSERT INTO infoschema_buffer_test VALUES(9);
|
||||
|
||||
# We should be able to see this table in the buffer pool if we check
|
||||
# right away
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test"
|
||||
and PAGE_STATE="file_page" and PAGE_TYPE="index";
|
||||
|
||||
# The NUMBER_RECORDS and DATA_SIZE should check with each insertion
|
||||
INSERT INTO infoschema_buffer_test VALUES(19);
|
||||
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test"
|
||||
and PAGE_STATE="file_page" and PAGE_TYPE="index";
|
||||
|
||||
CREATE INDEX idx ON infoschema_buffer_test(col1);
|
||||
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test"
|
||||
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
|
||||
|
||||
|
||||
# Check the buffer after dropping the table
|
||||
DROP TABLE infoschema_buffer_test;
|
||||
|
||||
SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_buffer_test";
|
||||
|
||||
# Do one more test
|
||||
#--replace_regex /'*[0-9]*'/'NUM'/
|
||||
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
|
||||
ENGINE=INNODB;
|
||||
|
||||
CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
|
||||
FOREIGN KEY (parent_id)
|
||||
REFERENCES infoschema_parent(id)
|
||||
ON DELETE CASCADE)
|
||||
ENGINE=INNODB;
|
||||
|
||||
SELECT count(*)
|
||||
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
|
||||
WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page"
|
||||
and PAGE_TYPE="index";
|
||||
|
||||
DROP TABLE infoschema_child;
|
||||
DROP TABLE infoschema_parent;
|
||||
|
||||
show create table information_schema.innodb_buffer_page;
|
||||
show create table information_schema.innodb_buffer_page_lru;
|
||||
show create table information_schema.innodb_buffer_pool_stats;
|
||||
|
@ -9,4 +9,3 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
misc : bug#14113704 24/04/2012 Mayank issue reported causing failure.
|
||||
|
@ -16,4 +16,6 @@ reset master;
|
||||
stop slave;
|
||||
reset slave;
|
||||
drop table if exists t;
|
||||
reset master;
|
||||
End of the tests
|
||||
include/rpl_end.inc
|
||||
|
@ -65,12 +65,11 @@ reset master;
|
||||
--connection slave
|
||||
stop slave;
|
||||
reset slave;
|
||||
# The table t may have been created on the slave from binlog. It does not exist
|
||||
# on the master.
|
||||
# "May", as it depends on whether the SQL thread had time do do the CREATE
|
||||
# TABLE before we stopped.
|
||||
--disable_warnings
|
||||
# Table was created from binlog, it may not be created if SQL thread is running
|
||||
# slowly and IO thread reaches incident before SQL thread applies it.
|
||||
drop table if exists t;
|
||||
--enable_warnings
|
||||
reset master;
|
||||
|
||||
--echo End of the tests
|
||||
--let $rpl_only_running_threads= 1
|
||||
--source include/rpl_end.inc
|
||||
|
@ -1,6 +1,6 @@
|
||||
set session debug="L";
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@debug' is deprecated and will be removed in MariaDB 5.6. Please use '@@debug_dbug' instead
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
select @@global.debug="1";
|
||||
@@global.debug="1"
|
||||
0
|
||||
|
@ -13,26 +13,26 @@ index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_inters
|
||||
'#--------------------FN_DYNVARS_028_01------------------------#'
|
||||
SET @@session.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SET @@session.engine_condition_pushdown = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
0
|
||||
SET @@global.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SET @@global.engine_condition_pushdown = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
1
|
||||
'#---------------------FN_DYNVARS_028_02-------------------------#'
|
||||
SET engine_condition_pushdown = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@engine_condition_pushdown;
|
||||
@@engine_condition_pushdown
|
||||
1
|
||||
@ -44,38 +44,38 @@ SELECT global.engine_condition_pushdown;
|
||||
ERROR 42S02: Unknown table 'global' in field list
|
||||
SET session engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
0
|
||||
SET global engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
0
|
||||
'#--------------------FN_DYNVARS_028_03------------------------#'
|
||||
SET @@session.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
0
|
||||
SET @@session.engine_condition_pushdown = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
1
|
||||
SET @@global.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
0
|
||||
SET @@global.engine_condition_pushdown = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
1
|
||||
@ -115,16 +115,16 @@ ERROR 42000: Variable 'engine_condition_pushdown' can't be set to the value of '
|
||||
'#-------------------FN_DYNVARS_028_05----------------------------#'
|
||||
SET @@global.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SET @@session.engine_condition_pushdown = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown AS res_is_0;
|
||||
res_is_0
|
||||
0
|
||||
SET @@global.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown AS res_is_1;
|
||||
res_is_1
|
||||
1
|
||||
@ -159,50 +159,50 @@ ON
|
||||
'#---------------------FN_DYNVARS_028_08-------------------------#'
|
||||
SET @@session.engine_condition_pushdown = OFF;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
0
|
||||
SET @@session.engine_condition_pushdown = ON;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
1
|
||||
SET @@global.engine_condition_pushdown = OFF;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
0
|
||||
SET @@global.engine_condition_pushdown = ON;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
1
|
||||
'#---------------------FN_DYNVARS_028_09----------------------#'
|
||||
SET @@session.engine_condition_pushdown = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
1
|
||||
SET @@session.engine_condition_pushdown = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
0
|
||||
SET @@global.engine_condition_pushdown = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
1
|
||||
SET @@global.engine_condition_pushdown = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
0
|
||||
@ -215,7 +215,7 @@ select @@session.engine_condition_pushdown,
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@session.engine_condition_pushdown = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@ -223,7 +223,7 @@ select @@session.engine_condition_pushdown,
|
||||
1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@session.engine_condition_pushdown = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@ -231,7 +231,7 @@ select @@session.engine_condition_pushdown,
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@global.engine_condition_pushdown = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@ -239,7 +239,7 @@ select @@session.engine_condition_pushdown,
|
||||
0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@global.engine_condition_pushdown = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@ -271,13 +271,13 @@ select @@session.engine_condition_pushdown,
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
SET @@session.engine_condition_pushdown = @session_start_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@session.engine_condition_pushdown;
|
||||
@@session.engine_condition_pushdown
|
||||
0
|
||||
SET @@global.engine_condition_pushdown = @global_start_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
|
||||
SELECT @@global.engine_condition_pushdown;
|
||||
@@global.engine_condition_pushdown
|
||||
0
|
||||
|
@ -8,10 +8,10 @@ INIT_VALUE
|
||||
1
|
||||
SET @@global.log = ON;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
|
||||
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
|
||||
SET global log = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
|
||||
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
|
||||
'#--------------------FN_DYNVARS_062_02-------------------------#'
|
||||
SELECT VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -20,4 +20,4 @@ VARIABLE_VALUE
|
||||
OFF
|
||||
SET @@global.log= @start_log;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead
|
||||
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
|
||||
|
@ -5,20 +5,20 @@ SELECT @start_value;
|
||||
'#---------------------FN_DYNVARS_004_01-------------------------#'
|
||||
SET @@global.log_slow_queries = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries = 0;
|
||||
@@global.log_slow_queries = 0
|
||||
1
|
||||
'#--------------------FN_DYNVARS_004_02------------------------#'
|
||||
SET @@global.log_slow_queries = ON;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
1
|
||||
SET @@global.log_slow_queries = OFF;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
0
|
||||
@ -61,7 +61,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
||||
'#---------------------FN_DYNVARS_004_06----------------------#'
|
||||
SET @@global.log_slow_queries = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
0
|
||||
@ -72,7 +72,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
||||
1
|
||||
SET @@global.log_slow_queries = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
1
|
||||
@ -84,7 +84,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
||||
'#---------------------FN_DYNVARS_004_07----------------------#'
|
||||
SET @@global.log_slow_queries = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
1
|
||||
@ -95,7 +95,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
||||
1
|
||||
SET @@global.log_slow_queries = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
0
|
||||
@ -107,7 +107,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
|
||||
'#---------------------FN_DYNVARS_004_08----------------------#'
|
||||
SET @@global.log_slow_queries = ON;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@log_slow_queries = @@global.log_slow_queries;
|
||||
@@log_slow_queries = @@global.log_slow_queries
|
||||
1
|
||||
@ -126,7 +126,7 @@ SELECT log_slow_queries = @@session.log_slow_queries;
|
||||
ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
|
||||
SET @@global.log_slow_queries = @start_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead
|
||||
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
|
||||
SELECT @@global.log_slow_queries;
|
||||
@@global.log_slow_queries
|
||||
1
|
||||
|
@ -9,101 +9,101 @@ SELECT @start_session_value;
|
||||
'#--------------------FN_DYNVARS_090_01-------------------------#'
|
||||
SET @@global.multi_range_count = 100;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SET @@global.multi_range_count = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
256
|
||||
SET @@session.multi_range_count = 200;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SET @@session.multi_range_count = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
256
|
||||
'#--------------------FN_DYNVARS_090_02-------------------------#'
|
||||
SET @@global.multi_range_count = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count = 256;
|
||||
@@global.multi_range_count = 256
|
||||
1
|
||||
SET @@session.multi_range_count = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count = 256;
|
||||
@@session.multi_range_count = 256
|
||||
1
|
||||
'#--------------------FN_DYNVARS_090_03-------------------------#'
|
||||
SET @@global.multi_range_count = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
1
|
||||
SET @@global.multi_range_count = 60020;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
60020
|
||||
SET @@global.multi_range_count = 65535;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
65535
|
||||
SET @@global.multi_range_count = 4294967295;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
4294967295
|
||||
SET @@global.multi_range_count = 4294967294;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
4294967294
|
||||
'#--------------------FN_DYNVARS_090_04-------------------------#'
|
||||
SET @@session.multi_range_count = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
1
|
||||
SET @@session.multi_range_count = 50050;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
50050
|
||||
SET @@session.multi_range_count = 65535;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
65535
|
||||
SET @@session.multi_range_count = 4294967295;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
4294967295
|
||||
SET @@session.multi_range_count = 4294967294;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
4294967294
|
||||
'#------------------FN_DYNVARS_090_05-----------------------#'
|
||||
SET @@global.multi_range_count = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1292 Truncated incorrect multi_range_count value: '0'
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
@ -114,7 +114,7 @@ SELECT @@global.multi_range_count;
|
||||
4294967295
|
||||
SET @@global.multi_range_count = -1024;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1292 Truncated incorrect multi_range_count value: '-1024'
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
@ -135,7 +135,7 @@ SELECT @@global.multi_range_count;
|
||||
4294967295
|
||||
SET @@session.multi_range_count = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1292 Truncated incorrect multi_range_count value: '0'
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
@ -146,7 +146,7 @@ SELECT @@session.multi_range_count;
|
||||
4294967295
|
||||
SET @@session.multi_range_count = -1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1292 Truncated incorrect multi_range_count value: '-1'
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
@ -178,13 +178,13 @@ WHERE VARIABLE_NAME='multi_range_count';
|
||||
'#------------------FN_DYNVARS_090_08-----------------------#'
|
||||
SET @@global.multi_range_count = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
1
|
||||
SET @@global.multi_range_count = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1292 Truncated incorrect multi_range_count value: '0'
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
@ -192,14 +192,14 @@ SELECT @@global.multi_range_count;
|
||||
'#---------------------FN_DYNVARS_090_09----------------------#'
|
||||
SET @@global.multi_range_count = 10;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@multi_range_count = @@global.multi_range_count;
|
||||
@@multi_range_count = @@global.multi_range_count
|
||||
0
|
||||
'#---------------------FN_DYNVARS_090_10----------------------#'
|
||||
SET @@multi_range_count = 100;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@multi_range_count = @@local.multi_range_count;
|
||||
@@multi_range_count = @@local.multi_range_count
|
||||
1
|
||||
@ -209,7 +209,7 @@ SELECT @@local.multi_range_count = @@session.multi_range_count;
|
||||
'#---------------------FN_DYNVARS_090_11----------------------#'
|
||||
SET multi_range_count = 1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@multi_range_count;
|
||||
@@multi_range_count
|
||||
1
|
||||
@ -221,13 +221,13 @@ SELECT multi_range_count = @@session.multi_range_count;
|
||||
ERROR 42S22: Unknown column 'multi_range_count' in 'field list'
|
||||
SET @@global.multi_range_count = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@global.multi_range_count;
|
||||
@@global.multi_range_count
|
||||
256
|
||||
SET @@session.multi_range_count = @start_session_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@multi_range_count' is deprecated and will be removed in MariaDB 5.7. Please use '@@mrr_buffer_size' instead
|
||||
Warning 1287 '@@multi_range_count' is deprecated and will be removed in a future release. Please use '@@mrr_buffer_size' instead
|
||||
SELECT @@session.multi_range_count;
|
||||
@@session.multi_range_count
|
||||
256
|
||||
|
@ -5,29 +5,29 @@ SELECT @start_global_value;
|
||||
'#--------------------FN_DYNVARS_142_01-------------------------#'
|
||||
SET @@global.rpl_recovery_rank = 500000;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SET @@global.rpl_recovery_rank = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
'#--------------------FN_DYNVARS_142_02-------------------------#'
|
||||
SET @@global.rpl_recovery_rank = 0;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = 1024;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
1024
|
||||
SET @@global.rpl_recovery_rank = 123456789;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
123456789
|
||||
@ -53,21 +53,21 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set
|
||||
'#------------------FN_DYNVARS_142_04-----------------------#'
|
||||
SET @@global.rpl_recovery_rank = -1;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = -2147483648;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
SET @@global.rpl_recovery_rank = -2147483649;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
@ -81,7 +81,7 @@ ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
|
||||
'#------------------FN_DYNVARS_142_05-----------------------#'
|
||||
SET @@global.rpl_recovery_rank = 3000;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='rpl_recovery_rank';
|
||||
@ -96,20 +96,20 @@ count(VARIABLE_VALUE)
|
||||
'#------------------FN_DYNVARS_142_07-----------------------#'
|
||||
SET @@global.rpl_recovery_rank = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
1
|
||||
SET @@global.rpl_recovery_rank = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
'#---------------------FN_DYNVARS_001_08----------------------#'
|
||||
SET @@global.rpl_recovery_rank = 512;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
|
||||
@@rpl_recovery_rank = @@global.rpl_recovery_rank
|
||||
1
|
||||
@ -123,10 +123,10 @@ SELECT @@rpl_recovery_rank;
|
||||
512
|
||||
SET global rpl_recovery_rank = 64;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SET @@global.rpl_recovery_rank = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0.
|
||||
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
|
||||
SELECT @@global.rpl_recovery_rank;
|
||||
@@global.rpl_recovery_rank
|
||||
0
|
||||
|
@ -5,7 +5,7 @@ SET @session_max_join_size = @@SESSION.max_join_size;
|
||||
SET @global_max_join_size = @@GLOBAL.max_join_size;
|
||||
SET SQL_MAX_JOIN_SIZE=9;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20));
|
||||
CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20));
|
||||
INSERT INTO t1 VALUES('aa','bb');
|
||||
|
@ -22,10 +22,10 @@ VARIABLE_NAME VARIABLE_VALUE
|
||||
SQL_MAX_JOIN_SIZE 18446744073709551615
|
||||
set global sql_max_join_size=10;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
set session sql_max_join_size=20;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
select @@global.sql_max_join_size;
|
||||
@@global.sql_max_join_size
|
||||
10
|
||||
@ -55,20 +55,20 @@ select @@sql_big_selects;
|
||||
0
|
||||
set sql_max_join_size=cast(-1 as unsigned int);
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
Note 1105 Cast to unsigned converted negative integer to it's positive complement
|
||||
select @@sql_big_selects;
|
||||
@@sql_big_selects
|
||||
1
|
||||
set sql_max_join_size=100;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
select @@sql_big_selects;
|
||||
@@sql_big_selects
|
||||
0
|
||||
SET @@global.sql_max_join_size = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
SELECT @@global.sql_max_join_size;
|
||||
@@global.sql_max_join_size
|
||||
18446744073709551615
|
||||
|
@ -17,7 +17,7 @@ INSERT INTO t2 VALUES('aa4','bb');
|
||||
'#--------------------FN_DYNVARS_161_01-------------------------#'
|
||||
SET SESSION sql_max_join_size=9;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
|
||||
@ -33,7 +33,7 @@ aa4 bb aa4 bb
|
||||
This should work
|
||||
SET SESSION sql_max_join_size=DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
DELETE FROM t2 WHERE a = 'aa4';
|
||||
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
|
||||
a b a b
|
||||
@ -45,7 +45,7 @@ This should work
|
||||
'#----------------------------FN_DYNVARS_136_05-------------------------#'
|
||||
SET GLOBAL sql_max_join_size = 4;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
** Connecting con_int1 using root **
|
||||
** Connection con_int1 **
|
||||
SELECT @@SESSION.sql_max_join_size;
|
||||
@ -54,7 +54,7 @@ SELECT @@SESSION.sql_max_join_size;
|
||||
4 Expected
|
||||
SET SESSION sql_max_join_size = 2;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
** Connecting con_int2 using root **
|
||||
** Connection con_int2 **
|
||||
SELECT @@SESSION.sql_max_join_size;
|
||||
@ -63,7 +63,7 @@ SELECT @@SESSION.sql_max_join_size;
|
||||
4 Expected
|
||||
SET SESSION sql_max_join_size = 10;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
** Connection con_int2 **
|
||||
SELECT @@SESSION.sql_max_join_size;
|
||||
@@SESSION.sql_max_join_size
|
||||
@ -82,10 +82,10 @@ SELECT @@GLOBAL.sql_max_join_size;
|
||||
Disconnecting Connections con_int1, con_int2
|
||||
SET @@SESSION.sql_max_join_size = @session_max_join_size;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
SET @@GLOBAL.sql_max_join_size = @global_max_join_size ;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead
|
||||
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release. Please use '@@max_join_size' instead
|
||||
SET @@SESSION.sql_big_selects = @session_sql_big_selects;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
@ -1506,3 +1506,14 @@ SET @@global.max_allowed_packet:= @tmp_max;
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# Bug#11765562 58545:
|
||||
# EXPORT_SET() CAN BE USED TO MAKE ENTIRE SERVER COMPLETELY UNRESPONSIVE
|
||||
#
|
||||
SELECT @tmp_max:= @@global.max_allowed_packet;
|
||||
SET @@global.max_allowed_packet=1024*1024*1024;
|
||||
SELECT @@global.max_allowed_packet;
|
||||
SELECT CHAR_LENGTH(EXPORT_SET(1,1,1,REPEAT(1,100000000)));
|
||||
SET @@global.max_allowed_packet:= @tmp_max;
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
# Can't run test of external client with embedded server
|
||||
-- source include/not_embedded.inc
|
||||
# Test lists tables in Information_schema, and InnoDB adds some
|
||||
-- source include/have_innodb.inc
|
||||
# Don't test when thread_pool active
|
||||
--source include/not_threadpool.inc
|
||||
|
||||
@ -30,4 +28,18 @@ select "---- -v -v -t ------" as "";
|
||||
--exec $MYSQL_SHOW test -v -v -t
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
if (`select count(*) from information_schema.plugins where plugin_name='innodb' and plugin_auth_version > "1.1.8-29.0"`)
|
||||
{
|
||||
# because of lp:1066512 this test shows xtradb I_S plugins, even when
|
||||
# xtradb is supposed to be disabled
|
||||
|
||||
#
|
||||
# Bug #19147: mysqlshow INFORMATION_SCHEMA does not work
|
||||
#
|
||||
--exec $MYSQL_SHOW information_schema
|
||||
--exec $MYSQL_SHOW INFORMATION_SCHEMA
|
||||
--exec $MYSQL_SHOW inf_rmation_schema
|
||||
}
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@ -74,25 +74,31 @@ drop table t1;
|
||||
#
|
||||
--exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
|
||||
# Handle that openssl gives different error messages from YaSSL.
|
||||
--replace_regex /error:00000001:lib\(0\):func\(0\):reason\(1\)/ASN: bad other signature confirmation/
|
||||
#--replace_regex /error:00000001:lib\(0\):func\(0\):reason\(1\)/ASN: bad other signature confirmation/
|
||||
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-ca=$MYSQL_TEST_DIR/std_data/untrusted-cacert.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
--echo
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a blank ca
|
||||
#
|
||||
--replace_regex /error:00000001:lib\(0\):func\(0\):reason\(1\)/ASN: bad other signature confirmation/
|
||||
#--replace_regex /error:00000001:lib\(0\):func\(0\):reason\(1\)/ASN: bad other signature confirmation/
|
||||
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
--echo
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
# a nonexistent ca file
|
||||
#
|
||||
--replace_regex /error:00000001:lib\(0\):func\(0\):reason\(1\)/ASN: bad other signature confirmation/
|
||||
#--replace_regex /error:00000001:lib\(0\):func\(0\):reason\(1\)/ASN: bad other signature confirmation/
|
||||
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
|
||||
--error 1
|
||||
--exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||
--echo
|
||||
|
||||
#
|
||||
# Test that we can't open connection to server if we are using
|
||||
|
@ -1527,8 +1527,13 @@ int _my_b_get(IO_CACHE *info)
|
||||
int _my_b_write(register IO_CACHE *info, const uchar *Buffer, size_t Count)
|
||||
{
|
||||
size_t rest_length,length;
|
||||
my_off_t pos_in_file= info->pos_in_file;
|
||||
|
||||
if (info->pos_in_file+info->buffer_length > info->end_of_file)
|
||||
DBUG_EXECUTE_IF("simulate_huge_load_data_file",
|
||||
{
|
||||
pos_in_file=(my_off_t)(5000000000ULL);
|
||||
});
|
||||
if (pos_in_file+info->buffer_length > info->end_of_file)
|
||||
{
|
||||
my_errno=errno=EFBIG;
|
||||
return info->error = -1;
|
||||
|
@ -720,6 +720,11 @@ static int setval(const struct my_option *opts, void *value, char *argument,
|
||||
}
|
||||
*(ulong*)value= arg;
|
||||
}
|
||||
else if (type < 0)
|
||||
{
|
||||
res= EXIT_AMBIGUOUS_OPTION;
|
||||
goto ret;
|
||||
}
|
||||
else
|
||||
*(ulong*)value= type - 1;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
#
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates
|
||||
# Copyright (c) 2007, 2012, 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
|
||||
@ -28,7 +28,7 @@ my $mysql; # How to call the mysql client
|
||||
my $rootpass = "";
|
||||
|
||||
|
||||
$SIG{QUIT} = $SIG{INT} = sub {
|
||||
$SIG{QUIT} = $SIG{INT} = $SIG{TERM} = $SIG{ABRT} = $SIG{HUP} = sub {
|
||||
print "\nAborting!\n\n";
|
||||
echo_on();
|
||||
cleanup();
|
||||
@ -242,7 +242,11 @@ sub reload_privilege_tables {
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
unlink($config,$command);
|
||||
print "Cleaning up...\n";
|
||||
|
||||
foreach my $file ($config, $command) {
|
||||
unlink $file or warn "Warning: Could not unlink $file: $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2002, 2010, Oracle and/or its affiliates
|
||||
# Copyright (c) 2002, 2012, 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
|
||||
@ -18,7 +18,7 @@
|
||||
config=".my.cnf.$$"
|
||||
command=".mysql.$$"
|
||||
|
||||
trap "interrupt" 2
|
||||
trap "interrupt" 1 2 3 6 15
|
||||
|
||||
rootpass=""
|
||||
echo_n=
|
||||
@ -286,13 +286,16 @@ set_root_password() {
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Password updated successfully!"
|
||||
echo "Reloading privilege tables.."
|
||||
reload_privilege_tables || exit 1
|
||||
reload_privilege_tables
|
||||
if [ $? -eq 1 ]; then
|
||||
clean_and_exit
|
||||
fi
|
||||
echo
|
||||
rootpass=$password1
|
||||
make_config
|
||||
else
|
||||
echo "Password update failed!"
|
||||
exit 1
|
||||
clean_and_exit
|
||||
fi
|
||||
|
||||
return 0
|
||||
@ -304,7 +307,7 @@ remove_anonymous_users() {
|
||||
echo " ... Success!"
|
||||
else
|
||||
echo " ... Failed!"
|
||||
exit 1
|
||||
clean_and_exit
|
||||
fi
|
||||
|
||||
return 0
|
||||
@ -364,6 +367,11 @@ cleanup() {
|
||||
rm -f $config $command
|
||||
}
|
||||
|
||||
# Remove the files before exiting.
|
||||
clean_and_exit() {
|
||||
cleanup
|
||||
exit 1
|
||||
}
|
||||
|
||||
# The actual script starts here
|
||||
|
||||
|
@ -272,23 +272,28 @@ if ( defined $opt{regexp} ) {
|
||||
}
|
||||
}
|
||||
|
||||
# --- get list of tables to hotcopy ---
|
||||
# --- get list of tables and views to hotcopy ---
|
||||
|
||||
my $hc_locks = "";
|
||||
my $hc_tables = "";
|
||||
my $hc_base_tables = "";
|
||||
my $hc_views = "";
|
||||
my $num_base_tables = 0;
|
||||
my $num_views = 0;
|
||||
my $num_tables = 0;
|
||||
my $num_files = 0;
|
||||
|
||||
foreach my $rdb ( @db_desc ) {
|
||||
my $db = $rdb->{src};
|
||||
my @dbh_tables = get_list_of_tables( $db );
|
||||
my @dbh_base_tables = get_list_of_tables( $db );
|
||||
my @dbh_views = get_list_of_views( $db );
|
||||
|
||||
## filter out certain system non-lockable tables.
|
||||
## keep in sync with mysqldump.
|
||||
if ($db =~ m/^mysql$/i)
|
||||
{
|
||||
@dbh_tables = grep
|
||||
{ !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_tables
|
||||
@dbh_base_tables = grep
|
||||
{ !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
|
||||
}
|
||||
|
||||
## generate regex for tables/files
|
||||
@ -303,11 +308,20 @@ foreach my $rdb ( @db_desc ) {
|
||||
|
||||
## filter (out) tables specified in t_regex
|
||||
print "Filtering tables with '$t_regex'\n" if $opt{debug};
|
||||
@dbh_tables = ( $negated
|
||||
? grep { $_ !~ $t_regex } @dbh_tables
|
||||
: grep { $_ =~ $t_regex } @dbh_tables );
|
||||
@dbh_base_tables = ( $negated
|
||||
? grep { $_ !~ $t_regex } @dbh_base_tables
|
||||
: grep { $_ =~ $t_regex } @dbh_base_tables );
|
||||
|
||||
## filter (out) views specified in t_regex
|
||||
print "Filtering tables with '$t_regex'\n" if $opt{debug};
|
||||
@dbh_views = ( $negated
|
||||
? grep { $_ !~ $t_regex } @dbh_views
|
||||
: grep { $_ =~ $t_regex } @dbh_views );
|
||||
}
|
||||
|
||||
## Now concatenate the base table and view arrays.
|
||||
my @dbh_tables = (@dbh_base_tables, @dbh_views);
|
||||
|
||||
## get list of files to copy
|
||||
my $db_dir = "$datadir/$db";
|
||||
opendir(DBDIR, $db_dir )
|
||||
@ -347,15 +361,25 @@ foreach my $rdb ( @db_desc ) {
|
||||
|
||||
$rdb->{files} = [ @db_files ];
|
||||
$rdb->{index} = [ @index_files ];
|
||||
my @hc_tables = map { quote_names("$db.$_") } @dbh_tables;
|
||||
my @hc_base_tables = map { quote_names("$db.$_") } @dbh_base_tables;
|
||||
my @hc_views = map { quote_names("$db.$_") } @dbh_views;
|
||||
|
||||
my @hc_tables = (@hc_base_tables, @hc_views);
|
||||
$rdb->{tables} = [ @hc_tables ];
|
||||
|
||||
$hc_locks .= ", " if ( length $hc_locks && @hc_tables );
|
||||
$hc_locks .= join ", ", map { "$_ READ" } @hc_tables;
|
||||
$hc_tables .= ", " if ( length $hc_tables && @hc_tables );
|
||||
$hc_tables .= join ", ", @hc_tables;
|
||||
|
||||
$num_tables += scalar @hc_tables;
|
||||
$hc_base_tables .= ", " if ( length $hc_base_tables && @hc_base_tables );
|
||||
$hc_base_tables .= join ", ", @hc_base_tables;
|
||||
$hc_views .= ", " if ( length $hc_views && @hc_views );
|
||||
$hc_views .= join " READ, ", @hc_views;
|
||||
|
||||
@hc_tables = (@hc_base_tables, @hc_views);
|
||||
|
||||
$num_base_tables += scalar @hc_base_tables;
|
||||
$num_views += scalar @hc_views;
|
||||
$num_tables += $num_base_tables + $num_views;
|
||||
$num_files += scalar @{$rdb->{files}};
|
||||
}
|
||||
|
||||
@ -467,7 +491,10 @@ if ( $opt{dryrun} ) {
|
||||
print "FLUSH TABLES /*!32323 $hc_tables */\n";
|
||||
}
|
||||
else {
|
||||
print "FLUSH TABLES $hc_tables WITH READ LOCK\n";
|
||||
# Lock base tables and views separately.
|
||||
print "FLUSH TABLES $hc_base_tables WITH READ LOCK\n"
|
||||
if ( $hc_base_tables );
|
||||
print "LOCK TABLES $hc_views READ\n" if ( $hc_views );
|
||||
}
|
||||
|
||||
print "FLUSH LOGS\n" if ( $opt{flushlog} );
|
||||
@ -484,16 +511,24 @@ else {
|
||||
# flush tables to make on-disk copy up to date
|
||||
$start = time;
|
||||
$dbh->do("FLUSH TABLES /*!32323 $hc_tables */");
|
||||
printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
|
||||
}
|
||||
else {
|
||||
$dbh->do("FLUSH TABLES $hc_tables WITH READ LOCK");
|
||||
printf "Locked $num_tables tables in %d seconds.\n", time-$start unless $opt{quiet};
|
||||
$hc_started = time; # count from time lock is granted
|
||||
# Lock base tables and views separately, as 'FLUSH TABLES <tbl_name>
|
||||
# ... WITH READ LOCK' (introduced in 5.5) would fail for views.
|
||||
# Also, flush tables to make on-disk copy up to date
|
||||
$dbh->do("FLUSH TABLES $hc_base_tables WITH READ LOCK")
|
||||
if ( $hc_base_tables );
|
||||
printf "Flushed $num_base_tables tables with read lock ($hc_base_tables) in %d seconds.\n",
|
||||
time-$start unless $opt{quiet};
|
||||
|
||||
# flush tables to make on-disk copy up to date
|
||||
$start = time;
|
||||
$dbh->do("LOCK TABLES $hc_views READ") if ( $hc_views );
|
||||
printf "Locked $num_views views ($hc_views) in %d seconds.\n",
|
||||
time-$start unless $opt{quiet};
|
||||
|
||||
$hc_started = time; # count from time lock is granted
|
||||
}
|
||||
printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
|
||||
$dbh->do( "FLUSH LOGS" ) if ( $opt{flushlog} );
|
||||
$dbh->do( "RESET MASTER" ) if ( $opt{resetmaster} );
|
||||
$dbh->do( "RESET SLAVE" ) if ( $opt{resetslave} );
|
||||
@ -802,14 +837,29 @@ sub get_list_of_tables {
|
||||
|
||||
my $tables =
|
||||
eval {
|
||||
$dbh->selectall_arrayref('SHOW TABLES FROM ' .
|
||||
$dbh->quote_identifier($db))
|
||||
$dbh->selectall_arrayref('SHOW FULL TABLES FROM ' .
|
||||
$dbh->quote_identifier($db) .
|
||||
' WHERE Table_type = \'BASE TABLE\'')
|
||||
} || [];
|
||||
warn "Unable to retrieve list of tables in $db: $@" if $@;
|
||||
|
||||
return (map { $_->[0] } @$tables);
|
||||
}
|
||||
|
||||
sub get_list_of_views {
|
||||
my ( $db ) = @_;
|
||||
|
||||
my $views =
|
||||
eval {
|
||||
$dbh->selectall_arrayref('SHOW FULL TABLES FROM ' .
|
||||
$dbh->quote_identifier($db) .
|
||||
' WHERE Table_type = \'VIEW\'')
|
||||
} || [];
|
||||
warn "Unable to retrieve list of views in $db: $@" if $@;
|
||||
|
||||
return (map { $_->[0] } @$views);
|
||||
}
|
||||
|
||||
sub quote_names {
|
||||
my ( $name ) = @_;
|
||||
# given a db.table name, add quotes
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2012, 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2000, 2012, 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
|
||||
@ -85,6 +85,7 @@ So, we can read full search-structure as 32-bit word
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
struct hash_lex_struct
|
||||
{
|
||||
@ -376,25 +377,9 @@ int main(int argc,char **argv)
|
||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
|
||||
|
||||
printf("\
|
||||
/* Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\
|
||||
Copyright (C) 2008-2011 Oracle\n\
|
||||
\n\
|
||||
This program is free software; you can redistribute it and/or modify\n\
|
||||
it under the terms of the GNU General Public License as published by\n\
|
||||
the Free Software Foundation; version 2 of the License.\n\
|
||||
\n\
|
||||
This program is distributed in the hope that it will be useful,\n\
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
|
||||
GNU General Public License for more details.\n\
|
||||
\n\
|
||||
You should have received a copy of the GNU General Public License\n\
|
||||
along with this program; see the file COPYING. If not, write to the\n\
|
||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston\n\
|
||||
MA 02110-1301 USA. */\n\
|
||||
\n\
|
||||
");
|
||||
puts("/*");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("*/");
|
||||
|
||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||
printf("/* Do " "not " "edit " "this " "file! This is generated by "
|
||||
|
@ -324,8 +324,7 @@ ha_partition::~ha_partition()
|
||||
for (i= 0; i < m_tot_parts; i++)
|
||||
delete m_file[i];
|
||||
}
|
||||
my_free(m_ordered_rec_buffer);
|
||||
m_ordered_rec_buffer= NULL;
|
||||
destroy_record_priority_queue();
|
||||
my_free(m_part_ids_sorted_by_num_of_records);
|
||||
|
||||
clear_handler_file();
|
||||
@ -2826,7 +2825,6 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
|
||||
{
|
||||
char *name_buffer_ptr;
|
||||
int error= HA_ERR_INITIALIZATION;
|
||||
uint alloc_len;
|
||||
handler **file;
|
||||
char name_buff[FN_REFLEN];
|
||||
bool is_not_tmp_table= (table_share->tmp_table == NO_TMP_TABLE);
|
||||
@ -2844,32 +2842,6 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
|
||||
m_start_key.length= 0;
|
||||
m_rec0= table->record[0];
|
||||
m_rec_length= table_share->stored_rec_length;
|
||||
alloc_len= m_tot_parts * (m_rec_length + PARTITION_BYTES_IN_POS);
|
||||
alloc_len+= table_share->max_key_length;
|
||||
if (!m_ordered_rec_buffer)
|
||||
{
|
||||
if (!(m_ordered_rec_buffer= (uchar*)my_malloc(alloc_len, MYF(MY_WME))))
|
||||
{
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
{
|
||||
/*
|
||||
We set-up one record per partition and each record has 2 bytes in
|
||||
front where the partition id is written. This is used by ordered
|
||||
index_read.
|
||||
We also set-up a reference to the first record for temporary use in
|
||||
setting up the scan.
|
||||
*/
|
||||
char *ptr= (char*)m_ordered_rec_buffer;
|
||||
uint i= 0;
|
||||
do
|
||||
{
|
||||
int2store(ptr, i);
|
||||
ptr+= m_rec_length + PARTITION_BYTES_IN_POS;
|
||||
} while (++i < m_tot_parts);
|
||||
m_start_key.key= (const uchar*)ptr;
|
||||
}
|
||||
}
|
||||
if (!m_part_ids_sorted_by_num_of_records)
|
||||
{
|
||||
if (!(m_part_ids_sorted_by_num_of_records=
|
||||
@ -2899,7 +2871,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
|
||||
|
||||
if (m_is_clone_of)
|
||||
{
|
||||
uint i;
|
||||
uint i, alloc_len;
|
||||
DBUG_ASSERT(m_clone_mem_root);
|
||||
/* Allocate an array of handler pointers for the partitions handlers. */
|
||||
alloc_len= (m_tot_parts + 1) * sizeof(handler*);
|
||||
@ -2977,12 +2949,6 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
|
||||
being opened once.
|
||||
*/
|
||||
clear_handler_file();
|
||||
/*
|
||||
Initialize priority queue, initialized to reading forward.
|
||||
*/
|
||||
if ((error= init_queue(&m_queue, m_tot_parts, (uint) PARTITION_BYTES_IN_POS,
|
||||
0, key_rec_cmp, (void*)this, 0, 0)))
|
||||
goto err_handler;
|
||||
|
||||
/*
|
||||
Use table_share->ha_part_data to share auto_increment_value among
|
||||
@ -3107,7 +3073,7 @@ int ha_partition::close(void)
|
||||
DBUG_ENTER("ha_partition::close");
|
||||
|
||||
DBUG_ASSERT(table->s == table_share);
|
||||
delete_queue(&m_queue);
|
||||
destroy_record_priority_queue();
|
||||
bitmap_free(&m_bulk_insert_started);
|
||||
if (!m_is_clone_of)
|
||||
bitmap_free(&(m_part_info->used_partitions));
|
||||
@ -4407,6 +4373,78 @@ int ha_partition::rnd_pos_by_record(uchar *record)
|
||||
subset of the partitions are used, then only use those partitions.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
Setup the ordered record buffer and the priority queue.
|
||||
*/
|
||||
|
||||
bool ha_partition::init_record_priority_queue()
|
||||
{
|
||||
DBUG_ENTER("ha_partition::init_record_priority_queue");
|
||||
DBUG_ASSERT(!m_ordered_rec_buffer);
|
||||
/*
|
||||
Initialize the ordered record buffer.
|
||||
*/
|
||||
if (!m_ordered_rec_buffer)
|
||||
{
|
||||
uint alloc_len;
|
||||
uint used_parts= bitmap_bits_set(&m_part_info->used_partitions);
|
||||
/* Allocate record buffer for each used partition. */
|
||||
alloc_len= used_parts * (m_rec_length + PARTITION_BYTES_IN_POS);
|
||||
/* Allocate a key for temporary use when setting up the scan. */
|
||||
alloc_len+= table_share->max_key_length;
|
||||
|
||||
if (!(m_ordered_rec_buffer= (uchar*)my_malloc(alloc_len, MYF(MY_WME))))
|
||||
DBUG_RETURN(true);
|
||||
|
||||
/*
|
||||
We set-up one record per partition and each record has 2 bytes in
|
||||
front where the partition id is written. This is used by ordered
|
||||
index_read.
|
||||
We also set-up a reference to the first record for temporary use in
|
||||
setting up the scan.
|
||||
*/
|
||||
char *ptr= (char*) m_ordered_rec_buffer;
|
||||
uint16 i= 0;
|
||||
do
|
||||
{
|
||||
if (bitmap_is_set(&m_part_info->used_partitions, i))
|
||||
{
|
||||
int2store(ptr, i);
|
||||
ptr+= m_rec_length + PARTITION_BYTES_IN_POS;
|
||||
}
|
||||
} while (++i < m_tot_parts);
|
||||
m_start_key.key= (const uchar*)ptr;
|
||||
/* Initialize priority queue, initialized to reading forward. */
|
||||
if (init_queue(&m_queue, used_parts, (uint) PARTITION_BYTES_IN_POS,
|
||||
0, key_rec_cmp, (void*)m_curr_key_info, 0, 0))
|
||||
{
|
||||
my_free(m_ordered_rec_buffer);
|
||||
m_ordered_rec_buffer= NULL;
|
||||
DBUG_RETURN(true);
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Destroy the ordered record buffer and the priority queue.
|
||||
*/
|
||||
|
||||
void ha_partition::destroy_record_priority_queue()
|
||||
{
|
||||
DBUG_ENTER("ha_partition::destroy_record_priority_queue");
|
||||
if (m_ordered_rec_buffer)
|
||||
{
|
||||
delete_queue(&m_queue);
|
||||
my_free(m_ordered_rec_buffer);
|
||||
m_ordered_rec_buffer= NULL;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Initialize handler before start of index scan
|
||||
|
||||
@ -4449,6 +4487,10 @@ int ha_partition::index_init(uint inx, bool sorted)
|
||||
}
|
||||
else
|
||||
m_curr_key_info[1]= NULL;
|
||||
|
||||
if (init_record_priority_queue())
|
||||
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
|
||||
|
||||
/*
|
||||
Some handlers only read fields as specified by the bitmap for the
|
||||
read set. For partitioned handlers we always require that the
|
||||
@ -4523,11 +4565,11 @@ int ha_partition::index_end()
|
||||
do
|
||||
{
|
||||
int tmp;
|
||||
/* TODO RONM: Change to index_end() when code is stable */
|
||||
if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
|
||||
if ((tmp= (*file)->ha_index_end()))
|
||||
error= tmp;
|
||||
} while (*(++file));
|
||||
destroy_record_priority_queue();
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
@ -5239,6 +5281,7 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order)
|
||||
uint i;
|
||||
uint j= queue_first_element(&m_queue);
|
||||
bool found= FALSE;
|
||||
uchar *part_rec_buf_ptr= m_ordered_rec_buffer;
|
||||
DBUG_ENTER("ha_partition::handle_ordered_index_scan");
|
||||
|
||||
m_top_entry= NO_CURRENT_PART_ID;
|
||||
@ -5249,7 +5292,7 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order)
|
||||
{
|
||||
if (!(bitmap_is_set(&(m_part_info->used_partitions), i)))
|
||||
continue;
|
||||
uchar *rec_buf_ptr= rec_buf(i);
|
||||
uchar *rec_buf_ptr= part_rec_buf_ptr + PARTITION_BYTES_IN_POS;
|
||||
int error;
|
||||
handler *file= m_file[i];
|
||||
|
||||
@ -5296,12 +5339,13 @@ int ha_partition::handle_ordered_index_scan(uchar *buf, bool reverse_order)
|
||||
/*
|
||||
Initialize queue without order first, simply insert
|
||||
*/
|
||||
queue_element(&m_queue, j++)= (uchar*)queue_buf(i);
|
||||
queue_element(&m_queue, j++)= part_rec_buf_ptr;
|
||||
}
|
||||
else if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
|
||||
{
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
part_rec_buf_ptr+= m_rec_length + PARTITION_BYTES_IN_POS;
|
||||
}
|
||||
if (found)
|
||||
{
|
||||
@ -5364,18 +5408,19 @@ int ha_partition::handle_ordered_next(uchar *buf, bool is_next_same)
|
||||
{
|
||||
int error;
|
||||
uint part_id= m_top_entry;
|
||||
uchar *rec_buf= queue_top(&m_queue) + PARTITION_BYTES_IN_POS;
|
||||
handler *file= m_file[part_id];
|
||||
DBUG_ENTER("ha_partition::handle_ordered_next");
|
||||
|
||||
if (m_index_scan_type == partition_read_range)
|
||||
{
|
||||
error= file->read_range_next();
|
||||
memcpy(rec_buf(part_id), table->record[0], m_rec_length);
|
||||
memcpy(rec_buf, table->record[0], m_rec_length);
|
||||
}
|
||||
else if (!is_next_same)
|
||||
error= file->ha_index_next(rec_buf(part_id));
|
||||
error= file->ha_index_next(rec_buf);
|
||||
else
|
||||
error= file->ha_index_next_same(rec_buf(part_id), m_start_key.key,
|
||||
error= file->ha_index_next_same(rec_buf, m_start_key.key,
|
||||
m_start_key.length);
|
||||
if (error)
|
||||
{
|
||||
@ -5418,10 +5463,11 @@ int ha_partition::handle_ordered_prev(uchar *buf)
|
||||
{
|
||||
int error;
|
||||
uint part_id= m_top_entry;
|
||||
uchar *rec_buf= queue_top(&m_queue) + PARTITION_BYTES_IN_POS;
|
||||
handler *file= m_file[part_id];
|
||||
DBUG_ENTER("ha_partition::handle_ordered_prev");
|
||||
|
||||
if ((error= file->ha_index_prev(rec_buf(part_id))))
|
||||
if ((error= file->ha_index_prev(rec_buf)))
|
||||
{
|
||||
if (error == HA_ERR_END_OF_FILE)
|
||||
{
|
||||
@ -7541,23 +7587,6 @@ int ha_partition::indexes_are_disabled(void)
|
||||
struct st_mysql_storage_engine partition_storage_engine=
|
||||
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
|
||||
|
||||
mysql_declare_plugin(partition)
|
||||
{
|
||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||
&partition_storage_engine,
|
||||
"partition",
|
||||
"Mikael Ronstrom, MySQL AB",
|
||||
"Partition Storage Engine Helper",
|
||||
PLUGIN_LICENSE_GPL,
|
||||
partition_initialize, /* Plugin Init */
|
||||
NULL, /* Plugin Deinit */
|
||||
0x0100, /* 1.0 */
|
||||
NULL, /* status variables */
|
||||
NULL, /* system variables */
|
||||
NULL, /* config options */
|
||||
0, /* flags */
|
||||
}
|
||||
mysql_declare_plugin_end;
|
||||
maria_declare_plugin(partition)
|
||||
{
|
||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||
|
@ -508,21 +508,13 @@ public:
|
||||
virtual int read_range_next();
|
||||
|
||||
private:
|
||||
bool init_record_priority_queue();
|
||||
void destroy_record_priority_queue();
|
||||
int common_index_read(uchar * buf, bool have_start_key);
|
||||
int common_first_last(uchar * buf);
|
||||
int partition_scan_set_up(uchar * buf, bool idx_read_flag);
|
||||
int handle_unordered_next(uchar * buf, bool next_same);
|
||||
int handle_unordered_scan_next_partition(uchar * buf);
|
||||
uchar *queue_buf(uint part_id)
|
||||
{
|
||||
return (m_ordered_rec_buffer +
|
||||
(part_id * (m_rec_length + PARTITION_BYTES_IN_POS)));
|
||||
}
|
||||
uchar *rec_buf(uint part_id)
|
||||
{
|
||||
return (queue_buf(part_id) +
|
||||
PARTITION_BYTES_IN_POS);
|
||||
}
|
||||
int handle_ordered_index_scan(uchar * buf, bool reverse_order);
|
||||
int handle_ordered_next(uchar * buf, bool next_same);
|
||||
int handle_ordered_prev(uchar * buf);
|
||||
|
@ -4559,7 +4559,20 @@ int handler::read_range_first(const key_range *start_key,
|
||||
DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
|
||||
? HA_ERR_END_OF_FILE
|
||||
: result);
|
||||
DBUG_RETURN (compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);
|
||||
|
||||
if (compare_key(end_range) <= 0)
|
||||
{
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
The last read row does not fall in the range. So request
|
||||
storage engine to release row lock if possible.
|
||||
*/
|
||||
unlock_row();
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4591,7 +4604,20 @@ int handler::read_range_next()
|
||||
result= ha_index_next(table->record[0]);
|
||||
if (result)
|
||||
DBUG_RETURN(result);
|
||||
DBUG_RETURN(compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);
|
||||
|
||||
if (compare_key(end_range) <= 0)
|
||||
{
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
The last read row does not fall in the range. So request
|
||||
storage engine to release row lock if possible.
|
||||
*/
|
||||
unlock_row();
|
||||
DBUG_RETURN(HA_ERR_END_OF_FILE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -3299,23 +3299,21 @@ err:
|
||||
String* Item_func_export_set::val_str(String* str)
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
ulonglong the_set = (ulonglong) args[0]->val_int();
|
||||
String yes_buf, *yes;
|
||||
yes = args[1]->val_str(&yes_buf);
|
||||
String no_buf, *no;
|
||||
no = args[2]->val_str(&no_buf);
|
||||
String *sep = NULL, sep_buf ;
|
||||
String yes_buf, no_buf, sep_buf;
|
||||
const ulonglong the_set = (ulonglong) args[0]->val_int();
|
||||
const String *yes= args[1]->val_str(&yes_buf);
|
||||
const String *no= args[2]->val_str(&no_buf);
|
||||
const String *sep= NULL;
|
||||
|
||||
uint num_set_values = 64;
|
||||
ulonglong mask = 0x1;
|
||||
str->length(0);
|
||||
str->set_charset(collation.collation);
|
||||
|
||||
/* Check if some argument is a NULL value */
|
||||
if (args[0]->null_value || args[1]->null_value || args[2]->null_value)
|
||||
{
|
||||
null_value=1;
|
||||
return 0;
|
||||
null_value= true;
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
Arg count can only be 3, 4 or 5 here. This is guaranteed from the
|
||||
@ -3328,37 +3326,56 @@ String* Item_func_export_set::val_str(String* str)
|
||||
num_set_values=64;
|
||||
if (args[4]->null_value)
|
||||
{
|
||||
null_value=1;
|
||||
return 0;
|
||||
null_value= true;
|
||||
return NULL;
|
||||
}
|
||||
/* Fall through */
|
||||
case 4:
|
||||
if (!(sep = args[3]->val_str(&sep_buf))) // Only true if NULL
|
||||
{
|
||||
null_value=1;
|
||||
return 0;
|
||||
null_value= true;
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
/* errors is not checked - assume "," can always be converted */
|
||||
uint errors;
|
||||
sep_buf.copy(STRING_WITH_LEN(","), &my_charset_bin, collation.collation, &errors);
|
||||
sep_buf.copy(STRING_WITH_LEN(","), &my_charset_bin,
|
||||
collation.collation, &errors);
|
||||
sep = &sep_buf;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DBUG_ASSERT(0); // cannot happen
|
||||
}
|
||||
null_value=0;
|
||||
null_value= false;
|
||||
|
||||
for (uint i = 0; i < num_set_values; i++, mask = (mask << 1))
|
||||
const ulong max_allowed_packet= current_thd->variables.max_allowed_packet;
|
||||
const uint num_separators= num_set_values > 0 ? num_set_values - 1 : 0;
|
||||
const ulonglong max_total_length=
|
||||
num_set_values * max(yes->length(), no->length()) +
|
||||
num_separators * sep->length();
|
||||
|
||||
if (unlikely(max_total_length > max_allowed_packet))
|
||||
{
|
||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
|
||||
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
|
||||
func_name(), max_allowed_packet);
|
||||
null_value= true;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint ix;
|
||||
ulonglong mask;
|
||||
for (ix= 0, mask=0x1; ix < num_set_values; ++ix, mask = (mask << 1))
|
||||
{
|
||||
if (the_set & mask)
|
||||
str->append(*yes);
|
||||
else
|
||||
str->append(*no);
|
||||
if (i != num_set_values - 1)
|
||||
if (ix != num_separators)
|
||||
str->append(*sep);
|
||||
}
|
||||
return str;
|
||||
|
@ -2003,7 +2003,7 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN * join,
|
||||
}
|
||||
else
|
||||
{
|
||||
Item *item= (Item*) select_lex->item_list.head();
|
||||
Item *item= (Item*) select_lex->item_list.head()->real_item();
|
||||
|
||||
if (select_lex->table_list.elements)
|
||||
{
|
||||
|
@ -304,7 +304,7 @@ public:
|
||||
before_stmt_pos= MY_OFF_T_UNDEF;
|
||||
}
|
||||
|
||||
void set_binlog_cache_info(ulong param_max_binlog_cache_size,
|
||||
void set_binlog_cache_info(my_off_t param_max_binlog_cache_size,
|
||||
ulong *param_ptr_binlog_cache_use,
|
||||
ulong *param_ptr_binlog_cache_disk_use)
|
||||
{
|
||||
@ -381,7 +381,7 @@ private:
|
||||
is configured. This corresponds to either
|
||||
. max_binlog_cache_size or max_binlog_stmt_cache_size.
|
||||
*/
|
||||
ulong saved_max_binlog_cache_size;
|
||||
my_off_t saved_max_binlog_cache_size;
|
||||
|
||||
/*
|
||||
Stores a pointer to the status variable that keeps track of the in-memory
|
||||
@ -419,8 +419,8 @@ private:
|
||||
|
||||
class binlog_cache_mngr {
|
||||
public:
|
||||
binlog_cache_mngr(ulong param_max_binlog_stmt_cache_size,
|
||||
ulong param_max_binlog_cache_size,
|
||||
binlog_cache_mngr(my_off_t param_max_binlog_stmt_cache_size,
|
||||
my_off_t param_max_binlog_cache_size,
|
||||
ulong *param_ptr_binlog_stmt_cache_use,
|
||||
ulong *param_ptr_binlog_stmt_cache_disk_use,
|
||||
ulong *param_ptr_binlog_cache_use,
|
||||
|
120
sql/mdl.cc
120
sql/mdl.cc
@ -378,7 +378,8 @@ public:
|
||||
|
||||
bool has_pending_conflicting_lock(enum_mdl_type type);
|
||||
|
||||
bool can_grant_lock(enum_mdl_type type, MDL_context *requstor_ctx) const;
|
||||
bool can_grant_lock(enum_mdl_type type, MDL_context *requstor_ctx,
|
||||
bool ignore_lock_priority) const;
|
||||
|
||||
inline static MDL_lock *create(const MDL_key *key);
|
||||
|
||||
@ -392,14 +393,24 @@ public:
|
||||
virtual bool needs_notification(const MDL_ticket *ticket) const = 0;
|
||||
virtual void notify_conflicting_locks(MDL_context *ctx) = 0;
|
||||
|
||||
virtual bitmap_t hog_lock_types_bitmap() const = 0;
|
||||
|
||||
/** List of granted tickets for this lock. */
|
||||
Ticket_list m_granted;
|
||||
/** Tickets for contexts waiting to acquire a lock. */
|
||||
Ticket_list m_waiting;
|
||||
|
||||
/**
|
||||
Number of times high priority lock requests have been granted while
|
||||
low priority lock requests were waiting.
|
||||
*/
|
||||
ulong m_hog_lock_count;
|
||||
|
||||
public:
|
||||
|
||||
MDL_lock(const MDL_key *key_arg)
|
||||
: key(key_arg),
|
||||
m_hog_lock_count(0),
|
||||
m_ref_usage(0),
|
||||
m_ref_release(0),
|
||||
m_is_destroyed(FALSE),
|
||||
@ -484,6 +495,15 @@ public:
|
||||
}
|
||||
virtual void notify_conflicting_locks(MDL_context *ctx);
|
||||
|
||||
/*
|
||||
In scoped locks, only IX lock request would starve because of X/S. But that
|
||||
is practically very rare case. So just return 0 from this function.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
static const bitmap_t m_granted_incompatible[MDL_TYPE_END];
|
||||
static const bitmap_t m_waiting_incompatible[MDL_TYPE_END];
|
||||
@ -536,6 +556,18 @@ public:
|
||||
}
|
||||
virtual void notify_conflicting_locks(MDL_context *ctx);
|
||||
|
||||
/*
|
||||
To prevent starvation, these lock types that are only granted
|
||||
max_write_lock_count times in a row while other lock types are
|
||||
waiting.
|
||||
*/
|
||||
virtual bitmap_t hog_lock_types_bitmap() const
|
||||
{
|
||||
return (MDL_BIT(MDL_SHARED_NO_WRITE) |
|
||||
MDL_BIT(MDL_SHARED_NO_READ_WRITE) |
|
||||
MDL_BIT(MDL_EXCLUSIVE));
|
||||
}
|
||||
|
||||
private:
|
||||
static const bitmap_t m_granted_incompatible[MDL_TYPE_END];
|
||||
static const bitmap_t m_waiting_incompatible[MDL_TYPE_END];
|
||||
@ -1268,6 +1300,41 @@ void MDL_lock::reschedule_waiters()
|
||||
{
|
||||
MDL_lock::Ticket_iterator it(m_waiting);
|
||||
MDL_ticket *ticket;
|
||||
bool skip_high_priority= false;
|
||||
bitmap_t hog_lock_types= hog_lock_types_bitmap();
|
||||
|
||||
if (m_hog_lock_count >= max_write_lock_count)
|
||||
{
|
||||
/*
|
||||
If number of successively granted high-prio, strong locks has exceeded
|
||||
max_write_lock_count give a way to low-prio, weak locks to avoid their
|
||||
starvation.
|
||||
*/
|
||||
|
||||
if ((m_waiting.bitmap() & ~hog_lock_types) != 0)
|
||||
{
|
||||
/*
|
||||
Even though normally when m_hog_lock_count is non-0 there is
|
||||
some pending low-prio lock, we still can encounter situation
|
||||
when m_hog_lock_count is non-0 and there are no pending low-prio
|
||||
locks. This, for example, can happen when a ticket for pending
|
||||
low-prio lock was removed from waiters list due to timeout,
|
||||
and reschedule_waiters() is called after that to update the
|
||||
waiters queue. m_hog_lock_count will be reset to 0 at the
|
||||
end of this call in such case.
|
||||
|
||||
Note that it is not an issue if we fail to wake up any pending
|
||||
waiters for weak locks in the loop below. This would mean that
|
||||
all of them are either killed, timed out or chosen as a victim
|
||||
by deadlock resolver, but have not managed to remove ticket
|
||||
from the waiters list yet. After tickets will be removed from
|
||||
the waiters queue there will be another call to
|
||||
reschedule_waiters() with pending bitmap updated to reflect new
|
||||
state of waiters queue.
|
||||
*/
|
||||
skip_high_priority= true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Find the first (and hence the oldest) waiting request which
|
||||
@ -1289,7 +1356,16 @@ void MDL_lock::reschedule_waiters()
|
||||
*/
|
||||
while ((ticket= it++))
|
||||
{
|
||||
if (can_grant_lock(ticket->get_type(), ticket->get_ctx()))
|
||||
/*
|
||||
Skip high-prio, strong locks if earlier we have decided to give way to
|
||||
low-prio, weaker locks.
|
||||
*/
|
||||
if (skip_high_priority &&
|
||||
((MDL_BIT(ticket->get_type()) & hog_lock_types) != 0))
|
||||
continue;
|
||||
|
||||
if (can_grant_lock(ticket->get_type(), ticket->get_ctx(),
|
||||
skip_high_priority))
|
||||
{
|
||||
if (! ticket->get_ctx()->m_wait.set_status(MDL_wait::GRANTED))
|
||||
{
|
||||
@ -1303,6 +1379,13 @@ void MDL_lock::reschedule_waiters()
|
||||
*/
|
||||
m_waiting.remove_ticket(ticket);
|
||||
m_granted.add_ticket(ticket);
|
||||
|
||||
/*
|
||||
Increase counter of successively granted high-priority strong locks,
|
||||
if we have granted one.
|
||||
*/
|
||||
if ((MDL_BIT(ticket->get_type()) & hog_lock_types) != 0)
|
||||
m_hog_lock_count++;
|
||||
}
|
||||
/*
|
||||
If we could not update the wait slot of the waiter,
|
||||
@ -1314,6 +1397,24 @@ void MDL_lock::reschedule_waiters()
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_waiting.bitmap() & ~hog_lock_types) == 0)
|
||||
{
|
||||
/*
|
||||
Reset number of successively granted high-prio, strong locks
|
||||
if there are no pending low-prio, weak locks.
|
||||
This ensures:
|
||||
- That m_hog_lock_count is correctly reset after strong lock
|
||||
is released and weak locks are granted (or there are no
|
||||
other lock requests).
|
||||
- That situation when SNW lock is granted along with some SR
|
||||
locks, but SW locks are still blocked are handled correctly.
|
||||
- That m_hog_lock_count is zero in most cases when there are no pending
|
||||
weak locks (see comment at the start of this method for example of
|
||||
exception). This allows to save on checks at the start of this method.
|
||||
*/
|
||||
m_hog_lock_count= 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1468,8 +1569,9 @@ MDL_object_lock::m_waiting_incompatible[MDL_TYPE_END] =
|
||||
Check if request for the metadata lock can be satisfied given its
|
||||
current state.
|
||||
|
||||
@param type_arg The requested lock type.
|
||||
@param requestor_ctx The MDL context of the requestor.
|
||||
@param type_arg The requested lock type.
|
||||
@param requestor_ctx The MDL context of the requestor.
|
||||
@param ignore_lock_priority Ignore lock priority.
|
||||
|
||||
@retval TRUE Lock request can be satisfied
|
||||
@retval FALSE There is some conflicting lock.
|
||||
@ -1481,19 +1583,21 @@ MDL_object_lock::m_waiting_incompatible[MDL_TYPE_END] =
|
||||
|
||||
bool
|
||||
MDL_lock::can_grant_lock(enum_mdl_type type_arg,
|
||||
MDL_context *requestor_ctx) const
|
||||
MDL_context *requestor_ctx,
|
||||
bool ignore_lock_priority) const
|
||||
{
|
||||
bool can_grant= FALSE;
|
||||
bitmap_t waiting_incompat_map= incompatible_waiting_types_bitmap()[type_arg];
|
||||
bitmap_t granted_incompat_map= incompatible_granted_types_bitmap()[type_arg];
|
||||
|
||||
/*
|
||||
New lock request can be satisfied iff:
|
||||
- There are no incompatible types of satisfied requests
|
||||
in other contexts
|
||||
- There are no waiting requests which have higher priority
|
||||
than this request.
|
||||
than this request when priority was not ignored.
|
||||
*/
|
||||
if (! (m_waiting.bitmap() & waiting_incompat_map))
|
||||
if (ignore_lock_priority || !(m_waiting.bitmap() & waiting_incompat_map))
|
||||
{
|
||||
if (! (m_granted.bitmap() & granted_incompat_map))
|
||||
can_grant= TRUE;
|
||||
@ -1789,7 +1893,7 @@ MDL_context::try_acquire_lock_impl(MDL_request *mdl_request,
|
||||
|
||||
ticket->m_lock= lock;
|
||||
|
||||
if (lock->can_grant_lock(mdl_request->type, this))
|
||||
if (lock->can_grant_lock(mdl_request->type, this, false))
|
||||
{
|
||||
lock->m_granted.add_ticket(ticket);
|
||||
|
||||
|
@ -860,4 +860,10 @@ extern mysql_mutex_t LOCK_open;
|
||||
extern ulong mdl_locks_cache_size;
|
||||
static const ulong MDL_LOCKS_CACHE_SIZE_DEFAULT = 1024;
|
||||
|
||||
/*
|
||||
Metadata locking subsystem tries not to grant more than
|
||||
max_write_lock_count high-prio, strong locks successively,
|
||||
to avoid starving out weak, low-prio locks.
|
||||
*/
|
||||
extern "C" ulong max_write_lock_count;
|
||||
#endif
|
||||
|
@ -273,6 +273,8 @@ extern "C" sig_handler handle_fatal_signal(int sig);
|
||||
|
||||
/* Constants */
|
||||
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
|
||||
|
||||
static const char *tc_heuristic_recover_names[]=
|
||||
@ -618,6 +620,21 @@ I_List<THD> threads;
|
||||
Rpl_filter* rpl_filter;
|
||||
Rpl_filter* binlog_filter;
|
||||
|
||||
THD *first_global_thread()
|
||||
{
|
||||
if (threads.is_empty())
|
||||
return NULL;
|
||||
return threads.head();
|
||||
}
|
||||
|
||||
THD *next_global_thread(THD *thd)
|
||||
{
|
||||
if (threads.is_last(thd))
|
||||
return NULL;
|
||||
struct ilink *next= thd->next;
|
||||
return static_cast<THD*>(next);
|
||||
}
|
||||
|
||||
struct system_variables global_system_variables;
|
||||
struct system_variables max_system_variables;
|
||||
struct system_status_var global_status_var;
|
||||
@ -7157,14 +7174,8 @@ static void usage(void)
|
||||
if (!default_collation_name)
|
||||
default_collation_name= (char*) default_charset_info->name;
|
||||
print_version();
|
||||
puts("\
|
||||
Copyright (C) 2000-2008 MySQL AB, by Monty and others.\n\
|
||||
Copyright (C) 2000, 2011 Oracle.\n\
|
||||
Copyright (C) 2009-2011 Monty Program Ab.\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n\n\
|
||||
Starts the MariaDB database server.\n");
|
||||
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
|
||||
puts("Starts the MariaDB database server.\n");
|
||||
printf("Usage: %s [OPTIONS]\n", my_progname);
|
||||
if (!opt_verbose)
|
||||
puts("\nFor more help options (several pages), use mysqld --verbose --help.");
|
||||
|
@ -3853,27 +3853,28 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
|
||||
ppar->cur_subpart_fields+= ppar->is_subpart_keypart[key_tree_part];
|
||||
*(ppar->arg_stack_end++)= key_tree;
|
||||
|
||||
if (ignore_part_fields)
|
||||
{
|
||||
/*
|
||||
We come here when a condition on the first partitioning
|
||||
fields led to evaluating the partitioning condition
|
||||
(due to finding a condition of the type a < const or
|
||||
b > const). Thus we must ignore the rest of the
|
||||
partitioning fields but we still want to analyse the
|
||||
subpartitioning fields.
|
||||
*/
|
||||
if (key_tree->next_key_part)
|
||||
res= find_used_partitions(ppar, key_tree->next_key_part);
|
||||
else
|
||||
res= -1;
|
||||
goto pop_and_go_right;
|
||||
}
|
||||
|
||||
if (key_tree->type == SEL_ARG::KEY_RANGE)
|
||||
{
|
||||
if (ppar->part_info->get_part_iter_for_interval &&
|
||||
key_tree->part <= ppar->last_part_partno)
|
||||
{
|
||||
if (ignore_part_fields)
|
||||
{
|
||||
/*
|
||||
We come here when a condition on the first partitioning
|
||||
fields led to evaluating the partitioning condition
|
||||
(due to finding a condition of the type a < const or
|
||||
b > const). Thus we must ignore the rest of the
|
||||
partitioning fields but we still want to analyse the
|
||||
subpartitioning fields.
|
||||
*/
|
||||
if (key_tree->next_key_part)
|
||||
res= find_used_partitions(ppar, key_tree->next_key_part);
|
||||
else
|
||||
res= -1;
|
||||
goto pop_and_go_right;
|
||||
}
|
||||
/* Collect left and right bound, their lengths and flags */
|
||||
uchar *min_key= ppar->cur_min_key;
|
||||
uchar *max_key= ppar->cur_max_key;
|
||||
@ -4114,6 +4115,13 @@ int find_used_partitions(PART_PRUNE_PARAM *ppar, SEL_ARG *key_tree)
|
||||
res= -1;
|
||||
goto pop_and_go_right;
|
||||
}
|
||||
/*
|
||||
No meaning in continuing with rest of partitioning key parts.
|
||||
Will try to continue with subpartitioning key parts.
|
||||
*/
|
||||
ppar->ignore_part_fields= true;
|
||||
did_set_ignore_part_fields= true;
|
||||
goto process_next_key_part;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,9 +134,9 @@ void sys_var_end()
|
||||
put your additional checks here
|
||||
@param on_update_func a function to be called at the end of sys_var::update,
|
||||
any post-update activity should happen here
|
||||
@param deprecated_version if not 0 - when this variable will go away
|
||||
@param substitute if not 0 - what one should use instead when this
|
||||
deprecated variable
|
||||
@param substitute If non-NULL, this variable is deprecated and the
|
||||
string describes what one should use instead. If an empty string,
|
||||
the variable is deprecated but no replacement is offered.
|
||||
*/
|
||||
sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
|
||||
const char *comment, int flags_arg, ptrdiff_t off,
|
||||
@ -145,11 +145,12 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
|
||||
PolyLock *lock, enum binlog_status_enum binlog_status_arg,
|
||||
on_check_function on_check_func,
|
||||
on_update_function on_update_func,
|
||||
uint deprecated_version, const char *substitute) :
|
||||
const char *substitute) :
|
||||
next(0),
|
||||
binlog_status(binlog_status_arg),
|
||||
flags(flags_arg), show_val_type(show_val_type_arg),
|
||||
guard(lock), offset(off), on_check(on_check_func), on_update(on_update_func),
|
||||
deprecation_substitute(substitute),
|
||||
is_os_charset(FALSE)
|
||||
{
|
||||
/*
|
||||
@ -175,12 +176,6 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
|
||||
option.value= (uchar **)global_var_ptr();
|
||||
option.def_value= def_val;
|
||||
|
||||
deprecated.version= deprecated_version;
|
||||
deprecated.substitute= substitute;
|
||||
DBUG_ASSERT((deprecated_version != 0) || (substitute == 0));
|
||||
DBUG_ASSERT(deprecated_version % 100 == 0);
|
||||
DBUG_ASSERT(!deprecated_version || MYSQL_VERSION_ID < deprecated_version);
|
||||
|
||||
if (chain->last)
|
||||
chain->last->next= this;
|
||||
else
|
||||
@ -275,21 +270,24 @@ bool sys_var::set_default(THD *thd, enum_var_type type)
|
||||
|
||||
void sys_var::do_deprecated_warning(THD *thd)
|
||||
{
|
||||
if (deprecated.version)
|
||||
if (deprecation_substitute != NULL)
|
||||
{
|
||||
char buf1[NAME_CHAR_LEN + 3], buf2[10];
|
||||
char buf1[NAME_CHAR_LEN + 3];
|
||||
strxnmov(buf1, sizeof(buf1)-1, "@@", name.str, 0);
|
||||
my_snprintf(buf2, sizeof(buf2), "%d.%d", deprecated.version/100/100,
|
||||
deprecated.version/100%100);
|
||||
uint errmsg= deprecated.substitute
|
||||
? ER_WARN_DEPRECATED_SYNTAX_WITH_VER
|
||||
: ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT;
|
||||
|
||||
/*
|
||||
if deprecation_substitute is an empty string,
|
||||
there is no replacement for the syntax
|
||||
*/
|
||||
uint errmsg= deprecation_substitute[0] == '\0'
|
||||
? ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
|
||||
: ER_WARN_DEPRECATED_SYNTAX;
|
||||
if (thd)
|
||||
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_WARN_DEPRECATED_SYNTAX, ER(errmsg),
|
||||
buf1, buf2, deprecated.substitute);
|
||||
buf1, deprecation_substitute);
|
||||
else
|
||||
sql_print_warning(ER_DEFAULT(errmsg), buf1, buf2, deprecated.substitute);
|
||||
sql_print_warning(ER_DEFAULT(errmsg), buf1, deprecation_substitute);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ protected:
|
||||
ptrdiff_t offset; ///< offset to the value from global_system_variables
|
||||
on_check_function on_check;
|
||||
on_update_function on_update;
|
||||
struct { uint version; const char *substitute; } deprecated;
|
||||
const char *const deprecation_substitute;
|
||||
bool is_os_charset; ///< true if the value is in character_set_filesystem
|
||||
|
||||
public:
|
||||
@ -88,7 +88,7 @@ public:
|
||||
enum get_opt_arg_type getopt_arg_type, SHOW_TYPE show_val_type_arg,
|
||||
longlong def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg,
|
||||
on_check_function on_check_func, on_update_function on_update_func,
|
||||
uint deprecated_version, const char *substitute);
|
||||
const char *substitute);
|
||||
|
||||
virtual ~sys_var() {}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<charsets max-id="99">
|
||||
|
||||
<copyright>
|
||||
Copyright (C) 2003 MySQL AB
|
||||
Copyright (c) 2003, 2012, 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
|
||||
|
@ -6342,8 +6342,8 @@ ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
|
||||
ER_PATH_LENGTH
|
||||
eng "The path specified for %.64s is too long."
|
||||
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
|
||||
eng "The syntax '%s' is deprecated and will be removed in MariaDB %s."
|
||||
ger "Die Syntax '%s' ist veraltet und wird in MariaDB %s entfernt."
|
||||
eng "'%s' is deprecated and will be removed in a future release."
|
||||
ger "'%s' ist veraltet und wird in einer zukünftigen Version entfernt werden."
|
||||
|
||||
ER_WRONG_NATIVE_TABLE_STRUCTURE
|
||||
eng "Native table '%-.64s'.'%-.64s' has the wrong structure"
|
||||
|
@ -601,7 +601,8 @@ uint Gis_line_string::init_from_wkb(const char *wkb, uint len,
|
||||
Gis_point p;
|
||||
|
||||
if (len < 4 ||
|
||||
(n_points= wkb_get_uint(wkb, bo))<1)
|
||||
(n_points= wkb_get_uint(wkb, bo)) < 1 ||
|
||||
n_points > max_n_points)
|
||||
return 0;
|
||||
proper_length= 4 + n_points * POINT_DATA_SIZE;
|
||||
|
||||
@ -1334,9 +1335,9 @@ uint Gis_multi_point::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
|
||||
Gis_point p;
|
||||
const char *wkb_end;
|
||||
|
||||
if (len < 4)
|
||||
if (len < 4 ||
|
||||
(n_points= wkb_get_uint(wkb, bo)) > max_n_points)
|
||||
return 0;
|
||||
n_points= wkb_get_uint(wkb, bo);
|
||||
proper_size= 4 + n_points * (WKB_HEADER_SIZE + POINT_DATA_SIZE);
|
||||
|
||||
if (len < proper_size || res->reserve(proper_size))
|
||||
|
@ -391,6 +391,10 @@ public:
|
||||
|
||||
class Gis_line_string: public Geometry
|
||||
{
|
||||
// Maximum number of points in LineString that can fit into String
|
||||
static const uint32 max_n_points=
|
||||
(uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
|
||||
POINT_DATA_SIZE;
|
||||
public:
|
||||
Gis_line_string() {} /* Remove gcc warning */
|
||||
virtual ~Gis_line_string() {} /* Remove gcc warning */
|
||||
@ -451,6 +455,10 @@ public:
|
||||
|
||||
class Gis_multi_point: public Geometry
|
||||
{
|
||||
// Maximum number of points in MultiPoint that can fit into String
|
||||
static const uint32 max_n_points=
|
||||
(uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
|
||||
(WKB_HEADER_SIZE + POINT_DATA_SIZE);
|
||||
public:
|
||||
Gis_multi_point() {} /* Remove gcc warning */
|
||||
virtual ~Gis_multi_point() {} /* Remove gcc warning */
|
||||
|
@ -5004,8 +5004,6 @@ restart:
|
||||
*/
|
||||
if (thd->locked_tables_mode <= LTM_LOCK_TABLES)
|
||||
{
|
||||
bool need_prelocking= FALSE;
|
||||
TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
|
||||
/*
|
||||
Process elements of the prelocking set which are present there
|
||||
since parsing stage or were added to it by invocations of
|
||||
@ -5018,10 +5016,19 @@ restart:
|
||||
for (Sroutine_hash_entry *rt= *sroutine_to_open; rt;
|
||||
sroutine_to_open= &rt->next, rt= rt->next)
|
||||
{
|
||||
bool need_prelocking= false;
|
||||
TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
|
||||
|
||||
error= open_and_process_routine(thd, thd->lex, rt, prelocking_strategy,
|
||||
has_prelocking_list, &ot_ctx,
|
||||
&need_prelocking);
|
||||
|
||||
if (need_prelocking && ! thd->lex->requires_prelocking())
|
||||
thd->lex->mark_as_requiring_prelocking(save_query_tables_last);
|
||||
|
||||
if (need_prelocking && ! *start)
|
||||
*start= thd->lex->query_tables;
|
||||
|
||||
if (error)
|
||||
{
|
||||
if (ot_ctx.can_recover_from_failed_open())
|
||||
@ -5042,12 +5049,6 @@ restart:
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if (need_prelocking && ! thd->lex->requires_prelocking())
|
||||
thd->lex->mark_as_requiring_prelocking(save_query_tables_last);
|
||||
|
||||
if (need_prelocking && ! *start)
|
||||
*start= thd->lex->query_tables;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5320,6 +5321,12 @@ static bool check_lock_and_start_stmt(THD *thd,
|
||||
thr_lock_type lock_type;
|
||||
DBUG_ENTER("check_lock_and_start_stmt");
|
||||
|
||||
/*
|
||||
Prelocking placeholder is not set for TABLE_LIST that
|
||||
are directly used by TOP level statement.
|
||||
*/
|
||||
DBUG_ASSERT(table_list->prelocking_placeholder == false);
|
||||
|
||||
/*
|
||||
TL_WRITE_DEFAULT and TL_READ_DEFAULT are supposed to be parser only
|
||||
types of locks so they should be converted to appropriate other types
|
||||
|
@ -275,6 +275,64 @@ bool Foreign_key::validate(List<Create_field> &table_fields)
|
||||
/****************************************************************************
|
||||
** Thread specific functions
|
||||
****************************************************************************/
|
||||
#ifdef ONLY_FOR_MYSQL_CLOSED_SOURCE_SCHEDULED
|
||||
/**
|
||||
Get reference to scheduler data object
|
||||
|
||||
@param thd THD object
|
||||
|
||||
@retval Scheduler data object on THD
|
||||
*/
|
||||
void *thd_get_scheduler_data(THD *thd)
|
||||
{
|
||||
return thd->scheduler.data;
|
||||
}
|
||||
|
||||
/**
|
||||
Set reference to Scheduler data object for THD object
|
||||
|
||||
@param thd THD object
|
||||
@param psi Scheduler data object to set on THD
|
||||
*/
|
||||
void thd_set_scheduler_data(THD *thd, void *data)
|
||||
{
|
||||
thd->scheduler.data= data;
|
||||
}
|
||||
|
||||
/**
|
||||
Get reference to Performance Schema object for THD object
|
||||
|
||||
@param thd THD object
|
||||
|
||||
@retval Performance schema object for thread on THD
|
||||
*/
|
||||
PSI_thread *thd_get_psi(THD *thd)
|
||||
{
|
||||
return thd->scheduler.m_psi;
|
||||
}
|
||||
|
||||
/**
|
||||
Get net_wait_timeout for THD object
|
||||
|
||||
@param thd THD object
|
||||
|
||||
@retval net_wait_timeout value for thread on THD
|
||||
*/
|
||||
ulong thd_get_net_wait_timeout(THD* thd)
|
||||
{
|
||||
return thd->variables.net_wait_timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
Set reference to Performance Schema object for THD object
|
||||
|
||||
@param thd THD object
|
||||
@param psi Performance schema object for thread
|
||||
*/
|
||||
void thd_set_psi(THD *thd, PSI_thread *psi)
|
||||
{
|
||||
thd->scheduler.m_psi= psi;
|
||||
}
|
||||
|
||||
/**
|
||||
Set the state on connection to killed
|
||||
@ -406,6 +464,17 @@ void thd_set_net_read_write(THD *thd, uint val)
|
||||
thd->net.reading_or_writing= val;
|
||||
}
|
||||
|
||||
/**
|
||||
Get reading/writing on socket from THD object
|
||||
@param thd THD object
|
||||
|
||||
@retval net.reading_or_writing value for thread on THD.
|
||||
*/
|
||||
uint thd_get_net_read_write(THD *thd)
|
||||
{
|
||||
return thd->net.reading_or_writing;
|
||||
}
|
||||
|
||||
/**
|
||||
Set reference to mysys variable in THD object
|
||||
|
||||
@ -428,6 +497,7 @@ my_socket thd_get_fd(THD *thd)
|
||||
{
|
||||
return thd->net.vio->sd;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
Get thread attributes for connection threads
|
||||
|
@ -667,6 +667,9 @@ public:
|
||||
inline void empty() { first= &last; last.prev= &first; }
|
||||
base_ilist() { empty(); }
|
||||
inline bool is_empty() { return first == &last; }
|
||||
// Returns true if p is the last "real" object in the list,
|
||||
// i.e. p->next points to the sentinel.
|
||||
inline bool is_last(ilink *p) { return p->next == NULL || p->next == &last; }
|
||||
inline void append(ilink *a)
|
||||
{
|
||||
first->prev= &a->next;
|
||||
@ -742,6 +745,7 @@ class I_List :private base_ilist
|
||||
{
|
||||
public:
|
||||
I_List() :base_ilist() {}
|
||||
inline bool is_last(T *p) { return base_ilist::is_last(p); }
|
||||
inline void empty() { base_ilist::empty(); }
|
||||
inline bool is_empty() { return base_ilist::is_empty(); }
|
||||
inline void append(T* a) { base_ilist::append(a); }
|
||||
|
@ -274,7 +274,7 @@ public:
|
||||
(plugin_var_arg->flags & PLUGIN_VAR_THDLOCAL ? SESSION : GLOBAL) |
|
||||
(plugin_var_arg->flags & PLUGIN_VAR_READONLY ? READONLY : 0),
|
||||
0, -1, NO_ARG, pluginvar_show_type(plugin_var_arg), 0, 0,
|
||||
VARIABLE_NOT_IN_BINLOG, 0, 0, 0, 0),
|
||||
VARIABLE_NOT_IN_BINLOG, NULL, NULL, NULL),
|
||||
plugin_var(plugin_var_arg), orig_pluginvar_name(plugin_var_arg->name)
|
||||
{ plugin_var->name= name_arg; }
|
||||
sys_var_pluginvar *cast_pluginvar() { return this; }
|
||||
@ -2157,7 +2157,8 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_STRING *name)
|
||||
struct st_plugin_int *plugin;
|
||||
mysql_mutex_assert_owner(&LOCK_plugin);
|
||||
|
||||
if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)))
|
||||
if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)) ||
|
||||
plugin->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_DYING))
|
||||
{
|
||||
my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str);
|
||||
return 1;
|
||||
|
@ -878,6 +878,14 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array,
|
||||
param->set_param_func(param, &read_pos, (uint) (data_end - read_pos));
|
||||
if (param->state == Item_param::NO_VALUE)
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (param->limit_clause_param && param->item_type != Item::INT_ITEM)
|
||||
{
|
||||
param->set_int(param->val_int(), MY_INT64_NUM_DECIMAL_DIGITS);
|
||||
param->item_type= Item::INT_ITEM;
|
||||
if (!param->unsigned_flag && param->value.integer < 0)
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -1667,12 +1667,19 @@ JOIN::optimize()
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Calculate a possible 'limit' of table rows for 'GROUP BY': 'need_tmp'
|
||||
implies that there will be more postprocessing so the specified
|
||||
'limit' should not be enforced yet in the call to
|
||||
'test_if_skip_sort_order'.
|
||||
*/
|
||||
const ha_rows limit = need_tmp ? HA_POS_ERROR : unit->select_limit_cnt;
|
||||
|
||||
if (!(select_options & SELECT_BIG_RESULT) &&
|
||||
((group_list &&
|
||||
(!simple_group ||
|
||||
!test_if_skip_sort_order(&join_tab[const_tables], group_list,
|
||||
unit->select_limit_cnt, 0,
|
||||
limit, 0,
|
||||
&join_tab[const_tables].table->
|
||||
keys_in_use_for_group_by))) ||
|
||||
select_distinct) &&
|
||||
@ -8017,6 +8024,7 @@ get_store_key(THD *thd, KEYUSE *keyuse, table_map used_tables,
|
||||
key_part->length,
|
||||
((Item_field*) keyuse->val->real_item())->field,
|
||||
keyuse->val->real_item()->full_name());
|
||||
|
||||
return new store_key_item(thd,
|
||||
key_part->field,
|
||||
key_buff + maybe_null,
|
||||
|
@ -2,8 +2,8 @@
|
||||
#define SQL_STRING_INCLUDED
|
||||
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008-2011 Monty Program Ab
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2011, 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
|
||||
@ -279,8 +279,11 @@ public:
|
||||
}
|
||||
return realloc_with_extra(arg_length);
|
||||
}
|
||||
inline void shrink(uint32 arg_length) // Shrink buffer
|
||||
// Shrink the buffer, but only if it is allocated on the heap.
|
||||
inline void shrink(uint32 arg_length)
|
||||
{
|
||||
if (!is_alloced())
|
||||
return;
|
||||
if (ALIGN_SIZE(arg_length+1) < Alloced_length)
|
||||
{
|
||||
char *new_ptr;
|
||||
@ -296,7 +299,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
bool is_alloced() { return alloced; }
|
||||
bool is_alloced() const { return alloced; }
|
||||
inline String& operator = (const String &s)
|
||||
{
|
||||
if (&s != this)
|
||||
|
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