lots of post-merge changes

This commit is contained in:
Sergei Golubchik 2011-04-25 17:22:25 +02:00
parent 37f87d73ae
commit 0accbd0364
738 changed files with 9206 additions and 10972 deletions
BUILD
client
cmake
config.h.cmake
config/ac-macros
configure.in
dbug
extra
include
libmysql
libmysqld
mysql-test

View file

@ -161,7 +161,7 @@ base_configs="--prefix=$prefix --enable-assembler "
base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
base_configs="$base_configs --with-big-tables $maintainer_mode"
base_configs="$base_configs --with-plugin-aria --with-aria-tmp-tables --without-plugin-innodb_plugin"
base_configs="$base_configs --with-plugin-aria --with-aria-tmp-tables"
# Compile our client programs with static libraries to allow them to be moved
base_configs="$base_configs --with-mysqld-ldflags=-static --with-client-ldflags=-static"

View file

@ -74,5 +74,3 @@ PROPERTIES HAS_CXX TRUE)
ADD_DEFINITIONS(-DHAVE_DLOPEN)
INSTALL(TARGETS mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow
mysqlbinlog mysqladmin mysqlslap echo DESTINATION bin COMPONENT runtime)

View file

@ -63,6 +63,7 @@ mysqlbinlog_SOURCES = mysqlbinlog.cc \
$(top_srcdir)/mysys/my_bit.c \
$(top_srcdir)/mysys/my_bitmap.c \
$(top_srcdir)/mysys/base64.c
mysqlbinlog_CXXFLAGS= -I$(top_srcdir)/sql
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqldump_SOURCES= mysqldump.c \
@ -102,14 +103,8 @@ DEFS = -DMYSQL_CLIENT_NO_THREADS \
-DDEFAULT_MYSQL_HOME='"$(prefix)"' \
-DMYSQL_DATADIR='"$(localstatedir)"'
sql_src=log_event.h sql_priv.h rpl_constants.h \
rpl_tblmap.h rpl_tblmap.cc \
log_event.cc my_decimal.h my_decimal.cc \
log_event_old.h log_event_old.cc \
rpl_record_old.h rpl_record_old.cc \
rpl_utility.h rpl_utility.cc \
transaction.h sql_const.h \
sql_list.h rpl_filter.h sql_list.cc rpl_filter.cc
sql_src=rpl_tblmap.cc log_event.cc my_decimal.cc log_event_old.cc \
rpl_record_old.cc rpl_utility.cc sql_list.cc rpl_filter.cc
strings_src=decimal.c dtoa.c
link_sources:

View file

@ -4327,7 +4327,7 @@ extern "C" char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,
s= get_tty_password("");
strnmov(buf, s, buf_len);
buf[buf_len-1]= 0;
my_free(s, MYF(0));
my_free(s);
}
else
{

View file

@ -35,10 +35,10 @@
static char mysql_path[FN_REFLEN];
static char mysqlcheck_path[FN_REFLEN];
static my_bool opt_force, debug_info_flag, debug_check_flag,
static my_bool opt_force, opt_verbose, debug_info_flag, debug_check_flag,
opt_systables_only;
static my_bool opt_not_used; /* For compatiblity */
static uint my_end_arg= 0, opt_verbose;
static my_bool opt_not_used, opt_silent;
static uint my_end_arg= 0;
static char *opt_user= (char*)"root";
static DYNAMIC_STRING ds_args;
@ -59,6 +59,8 @@ static my_bool not_used; /* Can't use GET_BOOL without a value pointer */
static my_bool opt_write_binlog;
#define OPT_SILENT OPT_MAX_CLIENT_OPTION
static struct my_option my_long_options[]=
{
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
@ -118,7 +120,7 @@ static struct my_option my_long_options[]=
"Base name of shared memory.", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"silent", 's', "Print less information", &opt_silent,
{"silent", OPT_SILENT, "Print less information", &opt_silent,
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "The socket file to use for connection.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@ -282,10 +284,13 @@ get_one_option(int optid, const struct my_option *opt,
}
add_option= 0;
break;
case 's':
case OPT_SILENT:
opt_verbose= 0;
add_option= 0;
break;
case 's':
add_option= 0;
break;
case 'f': /* --force */
add_option= FALSE;
break;

View file

@ -663,7 +663,6 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
REFRESH_MASTER | REFRESH_TABLE_STATS |
REFRESH_INDEX_STATS |
REFRESH_USER_STATS |
REFRESH_SLOW_QUERY_LOG |
REFRESH_CLIENT_STATS)))
{
my_printf_error(0, "refresh failed; error: '%s'", error_flags,
@ -869,7 +868,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
}
case ADMIN_FLUSH_SLOW_LOG:
{
if (mysql_query(mysql,"flush slow query logs"))
if (mysql_query(mysql,"flush slow logs"))
{
my_printf_error(0, "flush failed; error: '%s'", error_flags,
mysql_error(mysql));

View file

@ -28,6 +28,7 @@
#define MYSQL_CLIENT
#undef MYSQL_SERVER
#define TABLE TABLE_CLIENT
#include "client_priv.h"
#include <my_time.h>
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
@ -1136,7 +1137,7 @@ static struct my_option my_long_options[] =
0, 0},
{"result-file", 'r', "Direct output to a given file.", 0, 0, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-id", OPT_SERVER_ID,
{"server-id", 0,
"Extract only binlog entries created by the server having the given id.",
&server_id, &server_id, 0, GET_ULONG,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@ -2247,6 +2248,7 @@ void *sql_alloc(size_t size)
the server
*/
#undef TABLE
#include "my_decimal.h"
#include "decimal.c"
#include "my_decimal.cc"

View file

@ -777,7 +777,7 @@ static void print_result()
we have to run upgrade on it. In this case we write a nicer message
than "Please do "REPAIR TABLE""...
*/
if (!strcmp(row[2],"error") && strinstr(row[3],"REPAIR TABLE") != 0)
if (!strcmp(row[2],"error") && strstr(row[3],"REPAIR TABLE"))
printf("%-50s %s", row[0], "Needs upgrade");
else
printf("%s\n%-9s: %s", row[0], row[2], row[3]);

View file

@ -4207,7 +4207,7 @@ static char *get_actual_table_name(const char *old_table_name, MEM_ROOT *root)
}
mysql_free_result(table_res);
}
DBUG_PRINT("exit", ("new_table_name: %s", val_or_null(name)));
DBUG_PRINT("exit", ("new_table_name: %s", name));
DBUG_RETURN(name);
}

View file

@ -103,7 +103,6 @@ static int opt_max_connect_retries;
static int opt_result_format_version;
static int opt_max_connections= DEFAULT_MAX_CONN;
static my_bool opt_compress= 0, silent= 0, verbose= 0;
static int opt_connect_timeout= -1;
static my_bool debug_info_flag= 0, debug_check_flag= 0;
static my_bool tty_password= 0;
static my_bool opt_mark_progress= 0;
@ -556,8 +555,7 @@ public:
void open(const char* dir, const char* name, const char* ext)
{
DBUG_ENTER("LogFile::open");
DBUG_PRINT("enter", ("dir: '%s', name: '%s'",
val_or_null(dir), val_or_null(name)));
DBUG_PRINT("enter", ("dir: '%s', name: '%s'", dir, name));
if (!name)
{
m_file= stdout;
@ -648,9 +646,8 @@ public:
DBUG_VOID_RETURN;
}
IF_DBUG(buf[bytes]= '\0';)
DBUG_PRINT("info", ("Read %lu bytes from file, buf: %s",
(unsigned long)bytes, buf));
DBUG_PRINT("info", ("Read %zu bytes from file, buf: %.*s",
bytes, (int)bytes, buf));
char* show_from= buf + bytes;
while(show_from > buf && lines > 0 )
@ -5420,9 +5417,6 @@ void do_connect(struct st_command *command)
if (opt_charsets_dir)
mysql_options(&con_slot->mysql, MYSQL_SET_CHARSET_DIR,
opt_charsets_dir);
if (opt_connect_timeout >= 0)
mysql_options(&con_slot->mysql, MYSQL_OPT_CONNECT_TIMEOUT,
&opt_connect_timeout);
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl || con_ssl)
@ -6249,9 +6243,6 @@ static struct my_option my_long_options[] =
GET_INT, REQUIRED_ARG, 0, 0, 10000, 0, 0, 0},
{"test-file", 'x', "Read test from/in this file (default stdin).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"connect-timeout", OPT_MY_CONNECT_TIMEOUT, "Client connection timeout",
(uchar**) &opt_connect_timeout, (uchar**) &opt_connect_timeout, 0,
GET_INT, REQUIRED_ARG, -1, -1, 0, 0, 0, 0},
{"timer-file", 'm', "File where the timing in microseconds is stored.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 't', "Temporary directory where sockets are put.",

View file

@ -18,9 +18,6 @@
/* This file is originally from the mysql distribution. Coded by monty */
#ifndef CLIENT_SQL_STRING_H
#define CLIENT_SQL_STRING_H
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class implementation */
#endif

View file

@ -135,11 +135,11 @@ MACRO(MYSQL_ADD_PLUGIN)
IF(ARG_MANDATORY)
SET (mysql_mandatory_plugins
"${mysql_mandatory_plugins} builtin_${target}_plugin,"
"${mysql_mandatory_plugins} builtin_maria_${target}_plugin,"
PARENT_SCOPE)
ELSE()
SET (mysql_optional_plugins
"${mysql_optional_plugins} builtin_${target}_plugin,"
"${mysql_optional_plugins} builtin_maria_${target}_plugin,"
PARENT_SCOPE)
ENDIF()
ELSEIF(NOT WITHOUT_${plugin} AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)

View file

@ -594,6 +594,8 @@
#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
# define HAVE_NDB_BINLOG 1
#endif
#cmakedefine WITH_ARIA_STORAGE_ENGINE 1
#cmakedefine USE_ARIA_FOR_TMP_TABLES 1
#cmakedefine DEFAULT_MYSQL_HOME "@DEFAULT_MYSQL_HOME@"
#cmakedefine SHAREDIR "@SHAREDIR@"

View file

@ -88,7 +88,7 @@ AC_DEFUN([MYSQL_CHECK_LIBEVENT], [
AC_SUBST(libevent_libs)
AC_SUBST(libevent_includes)
AC_SUBST(libevent_test_option)
AC_DEFINE([HAVE_LIBEVENT], [1], [If we want to use libevent and have connection pooling])
dnl AC_DEFINE([HAVE_LIBEVENT], [1], [If we want to use libevent and have connection pooling])
fi
AM_CONDITIONAL([HAVE_LIBEVENT], [ test "$with_libevent" != "disabled" ])
])

View file

@ -40,7 +40,6 @@ AC_CANONICAL_SYSTEM
# TAR files, the path name is split into two parts, a 155 chacater
# first part and a 100 character second part.
AM_INIT_AUTOMAKE([1.9 tar-ustar])
AC_PROG_LIBTOOL
AM_CONFIG_HEADER([include/config.h])
@ -229,6 +228,7 @@ CFLAGS="$CFLAGS $C_EXTRA_FLAGS "
CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS "
dnl Checks for programs.
AC_PROG_LIBTOOL
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CXX
@ -1713,8 +1713,8 @@ AC_SYS_RESTARTABLE_SYSCALLS
# First check for gcc and g++
if test "$GCC" = "yes"
then
DEBUG_CFLAGS="-g"
DEBUG_OPTIMIZE_CC="-O"
DEBUG_CFLAGS="-ggdb3"
DEBUG_OPTIMIZE_CC=""
OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE"
else
DEBUG_CFLAGS="-g"
@ -1730,8 +1730,8 @@ else
fi
if test "$GXX" = "yes"
then
DEBUG_CXXFLAGS="-g"
DEBUG_OPTIMIZE_CXX="-O"
DEBUG_CXXFLAGS="-ggdb3"
DEBUG_OPTIMIZE_CXX=""
OPTIMIZE_CXXFLAGS="$MAX_CXX_OPTIMIZE"
else
DEBUG_OPTIMIZE_CXX=""
@ -1764,7 +1764,7 @@ AC_ARG_WITH(debug,
[AS_HELP_STRING([--with-debug], [Add debug code @<:@default=no@:>@])],
[with_debug=$withval],
[with_debug=no])
if test "$with_debug" = "yes"
if test "$with_debug" != "no"
then
AC_DEFINE([DBUG_ON], [1], [Use libdbug])
AC_DEFINE([SAFE_MUTEX], [1], [Use safe mutexes])

View file

@ -84,7 +84,6 @@
in pthread_mutex_lock
*/
#undef SAFE_MUTEX
#include <my_global.h>
#undef SAFE_MUTEX
#include <m_string.h>
@ -374,7 +373,7 @@ static CODE_STATE *code_state(void)
if (!init_done)
{
init_done=TRUE;
pthread_mutex_init(&THR_LOCK_dbug,MY_MUTEX_INIT_FAST);
pthread_mutex_init(&THR_LOCK_dbug, NULL);
bzero(&init_settings, sizeof(init_settings));
init_settings.out_file=stderr;
init_settings.flags=OPEN_APPEND;
@ -500,6 +499,7 @@ int DbugParse(CODE_STATE *cs, const char *control)
if (control[0] == '-' && control[1] == '#')
control+=2;
rel= control[0] == '+' || control[0] == '-';
if ((!rel || (!stack->out_file && !stack->next)))
{
@ -879,6 +879,7 @@ void _db_push_(const char *control)
FixTraceFlags(old_fflags, cs);
}
/**
Returns TRUE if session-local settings have been set.
*/
@ -1233,7 +1234,6 @@ void _db_return_(uint _line_, struct _db_stack_frame_ *_stack_frame_)
my_snprintf(buf, sizeof(buf), ERR_MISSING_RETURN, cs->func);
DbugExit(buf);
}
#ifndef THREAD
if (DoProfile(cs))
(void) fprintf(cs->stack->prof_file, PROF_XFMT, Clock(), cs->func);

View file

@ -78,5 +78,3 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(mysql_waitpid mysys)
ENDIF()
MESSAGE("TODO: Support libevent")

View file

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
}
}
free_buffer();
my_free(replace, MYF(0));
my_free(replace);
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
exit(error ? 2 : 0);
return 0; /* No compiler warning */

View file

@ -27,11 +27,6 @@
typedef declarations, even when identical, the definition may not be
repeated.
*/
#ifndef CHARSET_INFO_DEFINED
#define CHARSET_INFO_DEFINED
typedef struct charset_info_st CHARSET_INFO;
#endif /* CHARSET_INFO_DEFINED */
#ifdef __cplusplus
extern "C" {
#endif

View file

@ -195,7 +195,7 @@ extern my_bool multi_key_cache_set(const uchar *key, uint length,
extern void multi_key_cache_change(KEY_CACHE *old_data,
KEY_CACHE *new_data);
extern int reset_key_cache_counters(const char *name,
KEY_CACHE *key_cache);
KEY_CACHE *key_cache, void *);
extern int repartition_key_cache(KEY_CACHE *keycache,
uint key_cache_block_size,
size_t use_mem,

View file

@ -54,7 +54,6 @@ extern "C" {
#define MY_PUT_MB2(s, code) { (s)[0]= code >> 8; (s)[1]= code & 0xFF; }
#endif
typedef const struct charset_info_st CHARSET_INFO;
typedef const struct my_charset_handler_st MY_CHARSET_HANDLER;
typedef const struct my_collation_handler_st MY_COLLATION_HANDLER;
@ -286,13 +285,6 @@ struct my_charset_handler_st
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
/*
We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
typedef in hash.c, which will cause a compiler error.
*/
#define CHARSET_INFO_DEFINED
/* See strings/CHARSET_INFO.txt about information on this structure */
struct charset_info_st
{

View file

@ -207,13 +207,7 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
}
#endif
/*
LEX_STRING -- a pair of a C-string and its length.
(it's part of the plugin API as a MYSQL_LEX_STRING)
*/
#include <mysql/plugin.h>
typedef struct st_mysql_lex_string LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))

View file

@ -1,3 +1,5 @@
#ifndef MY_ATOMIC_INCLUDED
#define MY_ATOMIC_INCLUDED
/* Copyright (C) 2006 MySQL AB
This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,8 @@
#ifndef MY_BIT_INCLUDED
#define MY_BIT_INCLUDED
#include <my_global.h>
/*
Some useful bit functions
*/

View file

@ -19,6 +19,9 @@
#define MY_BIT_NONE (~(uint) 0)
#include <m_string.h>
#ifdef THREAD
#include <my_pthread.h>
#endif
typedef uint32 my_bitmap_map;

View file

@ -880,6 +880,7 @@ typedef long long my_ptrdiff_t;
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A), sizeof(double)))
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
/*
Custom version of standard offsetof() macro which can be used to get
@ -1007,6 +1008,10 @@ typedef unsigned long my_off_t;
typedef ulonglong table_map; /* Used for table bits in join */
typedef ulong nesting_map; /* Used for flags of nesting constructs */
/* often used type names - opaque declarations */
typedef const struct charset_info_st CHARSET_INFO;
typedef struct st_mysql_lex_string LEX_STRING;
#if defined(__WIN__)
#define socket_errno WSAGetLastError()
#define SOCKET_EINTR WSAEINTR
@ -1444,6 +1449,8 @@ do { doubleget_union _tmp; \
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
/*
Only Linux is known to need an explicit sync of the directory to make sure a
file creation/deletion/renaming in(from,to) this directory durable.

View file

@ -480,8 +480,7 @@ typedef struct st_safe_mutex_info_t
#endif /* SAFE_MUTEX_DETECT_DESTROY */
int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
const char *name, myf my_flags,
const char *file, uint line);
const char *name, const char *file, uint line);
int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
@ -509,10 +508,8 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
#undef pthread_cond_wait
#undef pthread_cond_timedwait
#undef pthread_mutex_trylock
#define my_pthread_mutex_init(A,B,C,D) safe_mutex_init((A),(B),(C),(D),__FILE__,__LINE__)
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,0,__FILE__,__LINE__)
#define pthread_mutex_lock(A) safe_mutex_lock((A), 0, __FILE__, __LINE__)
#define my_pthread_mutex_lock(A,B) safe_mutex_lock((A), (B), __FILE__, __LINE__)
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),#A,__FILE__,__LINE__)
#define pthread_mutex_lock(A) safe_mutex_lock((A),0,__FILE__, __LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
@ -527,7 +524,6 @@ void safe_mutex_free_deadlock_data(safe_mutex_t *mp);
! pthread_equal(pthread_self(), (mp)->thread))
#else
#define my_pthread_mutex_init(A,B,C,D) pthread_mutex_init((A),(B))
#define my_pthread_mutex_lock(A,B) pthread_mutex_lock(A)
#define safe_mutex_assert_owner(mp) do {} while(0)
#define safe_mutex_assert_not_owner(mp) do {} while(0)
#define safe_mutex_free_deadlock_data(mp) do {} while(0)
@ -767,11 +763,9 @@ struct st_my_thread_var
my_bool init;
struct st_my_thread_var *next,**prev;
void *opt_info;
//uint lock_type; /* used by conditional release the queue */
uint lock_type; /* used by conditional release the queue */
void *stack_ends_here;
safe_mutex_t *mutex_in_use;
void (*scheduler_before_lock_wait)(void);
void (*scheduler_after_lock_wait)(void);
#ifndef DBUG_OFF
void *dbug;
char name[THREAD_NAME_SIZE+1];

View file

@ -17,6 +17,7 @@
#define _my_sys_h
#include "my_global.h" /* C_MODE_START, C_MODE_END */
#include "my_valgrind.h"
C_MODE_START
@ -102,7 +103,9 @@ extern int my_errno; /* Last error in mysys */
#define ME_COLOUR1 ((1 << ME_HIGHBYTE)) /* Possibly error-colours */
#define ME_COLOUR2 ((2 << ME_HIGHBYTE))
#define ME_COLOUR3 ((3 << ME_HIGHBYTE))
#define ME_FATALERROR 1024 /* Fatal statement error */
#define ME_JUST_INFO 1024 /**< not error but just info */
#define ME_JUST_WARNING 2048 /**< not error but just warning */
#define ME_FATALERROR 4096 /* Fatal statement error */
/* Bits in last argument to fn_format */
#define MY_REPLACE_DIR 1 /* replace dir in name with 'dir' */
@ -191,7 +194,7 @@ extern void my_large_free(uchar *ptr);
#endif /* HAVE_ALLOCA */
#define my_safe_alloca(size, min_length) ((size <= min_length) ? my_alloca(size) : my_malloc(size,MYF(MY_FAE)))
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr)
#define my_safe_afree(ptr, size, min_length) ((size <= min_length) ? (void)0 : my_free(ptr))
#ifndef errno /* did we already get it? */
#ifdef HAVE_ERRNO_AS_DEFINE
@ -547,7 +550,7 @@ my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
*(info)->current_pos)
typedef uint32 ha_checksum;
extern ha_checksum my_crc_dbug_check;
extern ulong my_crc_dbug_check;
/* Define the type of function to be passed to process_default_option_files */
typedef int (*Process_option_func)(void *ctx, const char *group_name,
@ -764,9 +767,6 @@ extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length);
extern my_off_t my_b_filelength(IO_CACHE *info);
extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
extern int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
const char *default_val);
extern int init_intvar_from_file(int* var, IO_CACHE* f, int default_val);
extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
const char *prefix, size_t cache_size,
myf cache_myflags);

View file

@ -29,7 +29,7 @@
#define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
#define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
#else /* HAVE_VALGRIND */
# define MEM_UNDEFINED(a,len) bfill(A, B, 0x8F)
# define MEM_UNDEFINED(a,len) bfill(a, len, 0x8F)
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)

View file

@ -155,7 +155,7 @@ typedef struct st_handler_check_param
IO_CACHE read_cache;
enum_handler_stats_method stats_method;
#ifdef THREAD
pthread_mutex_t print_msg_mutex;
mysql_mutex_t print_msg_mutex;
my_bool need_print_msg_lock;
#endif
} HA_CHECK;

View file

@ -28,7 +28,7 @@ typedef struct st_net {
unsigned char reading_or_writing;
char save_char;
char net_skip_rest_factor;
my_bool unused;
my_bool unused1;
my_bool compress;
my_bool unused3;
unsigned char *unused;

View file

@ -591,7 +591,7 @@ char *thd_security_context(MYSQL_THD thd, char *buffer, unsigned int length,
void thd_inc_row_count(MYSQL_THD thd);
#define thd_proc_info(thd, msg) set_thd_proc_info(thd, msg, __func__, __FILE__, __LINE__)
const char *set_thd_proc_info(MYSQL_THD, const char * info, const char *func,
const char *set_thd_proc_info(void *, const char * info, const char *func,
const char *file, const unsigned int line);
/**

View file

@ -95,6 +95,22 @@ struct st_mysql_plugin
struct st_mysql_sys_var **system_vars;
void * __reserved1;
};
struct st_maria_plugin
{
int type;
void *info;
const char *name;
const char *author;
const char *descr;
int license;
int (*init)(void *);
int (*deinit)(void *);
unsigned int version;
struct st_mysql_show_var *status_vars;
struct st_mysql_sys_var **system_vars;
const char *version_info;
unsigned int maturity;
};
#include "plugin_ftparser.h"
#include "plugin.h"
enum enum_ftparser_mode
@ -124,16 +140,16 @@ typedef struct st_mysql_ftparser_boolean_info
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
char *doc, int doc_len);
const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
char *word, int word_len,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
struct charset_info_st *cs;
char *doc;
const struct charset_info_st *cs;
const char *doc;
int length;
int flags;
unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
struct st_mysql_ftparser
@ -171,13 +187,14 @@ int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);
long long thd_test_options(const void* thd, long long test_options);
int thd_sql_command(const void* thd);
const char *thd_proc_info(void* thd, const char *info);
void **thd_ha_data(const void* thd, const struct handlerton *hton);
void thd_storage_lock_wait(void* thd, long long value);
int thd_tx_isolation(const void* thd);
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
const char *set_thd_proc_info(void*, const char * info, const char *func,
const char *file, const unsigned int line);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
unsigned long thd_get_thread_id(const void* thd);

View file

@ -31,6 +31,27 @@ void *thd_memdup(void* thd, const void* str, unsigned int size);
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
const char *str, unsigned int size,
int allocate_lex_string);
#include <mysql/service_thd_wait.h>
typedef enum _thd_wait_type_e {
THD_WAIT_MUTEX= 1,
THD_WAIT_DISKIO= 2,
THD_WAIT_ROW_TABLE_LOCK= 3,
THD_WAIT_GLOBAL_LOCK= 4
} thd_wait_type;
extern struct thd_wait_service_st {
void (*thd_wait_begin_func)(void*, thd_wait_type);
void (*thd_wait_end_func)(void*);
} *thd_wait_service;
void thd_wait_begin(void* thd, thd_wait_type wait_type);
void thd_wait_end(void* thd);
#include <mysql/service_thread_scheduler.h>
struct scheduler_functions;
extern struct my_thread_scheduler_service {
int (*set)(struct scheduler_functions *scheduler);
int (*reset)();
} *my_thread_scheduler_service;
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
int my_thread_scheduler_reset();
struct st_mysql_xid {
long formatID;
long gtrid_length;
@ -90,6 +111,8 @@ struct st_maria_plugin
const char *version_info;
unsigned int maturity;
};
#include "plugin_ftparser.h"
#include "plugin.h"
enum enum_ftparser_mode
{
MYSQL_FTPARSER_SIMPLE_MODE= 0,
@ -114,19 +137,18 @@ typedef struct st_mysql_ftparser_boolean_info
char prev;
char *quot;
} MYSQL_FTPARSER_BOOLEAN_INFO;
typedef int mysql_ft_size_t;
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
const unsigned char *doc, mysql_ft_size_t doc_len);
const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
const unsigned char *word, mysql_ft_size_t word_len,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
const struct charset_info_st *cs;
const unsigned char *doc;
mysql_ft_size_t length;
const char *doc;
int length;
unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
@ -137,11 +159,6 @@ struct st_mysql_ftparser
int (*init)(MYSQL_FTPARSER_PARAM *param);
int (*deinit)(MYSQL_FTPARSER_PARAM *param);
};
struct st_mysql_storage_engine
{
int interface_version;
};
struct handlerton;
struct st_mysql_daemon
{
int interface_version;
@ -150,18 +167,28 @@ struct st_mysql_information_schema
{
int interface_version;
};
struct st_mysql_storage_engine
{
int interface_version;
};
struct handlerton;
struct Mysql_replication {
int interface_version;
};
struct st_mysql_value
{
int (*value_type)(struct st_mysql_value *);
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
int (*val_real)(struct st_mysql_value *, double *realbuf);
int (*val_int)(struct st_mysql_value *, long long *intbuf);
int (*is_unsigned)(struct st_mysql_value *);
};
int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);
long long thd_test_options(const void* thd, long long test_options);
int thd_sql_command(const void* thd);
void **thd_ha_data(const void* thd, const struct handlerton *hton);
void thd_storage_lock_wait(void* thd, long long value);
int thd_tx_isolation(const void* thd);
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);

View file

@ -177,16 +177,16 @@ typedef struct st_mysql_ftparser_boolean_info
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
char *doc, int doc_len);
const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
char *word, int word_len,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
struct charset_info_st *cs;
char *doc;
const struct charset_info_st *cs;
const char *doc;
int length;
int flags;
unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;

View file

@ -95,6 +95,22 @@ struct st_mysql_plugin
struct st_mysql_sys_var **system_vars;
void * __reserved1;
};
struct st_maria_plugin
{
int type;
void *info;
const char *name;
const char *author;
const char *descr;
int license;
int (*init)(void *);
int (*deinit)(void *);
unsigned int version;
struct st_mysql_show_var *status_vars;
struct st_mysql_sys_var **system_vars;
const char *version_info;
unsigned int maturity;
};
#include "plugin_ftparser.h"
struct st_mysql_daemon
{
@ -124,13 +140,14 @@ int thd_in_lock_tables(const void* thd);
int thd_tablespace_op(const void* thd);
long long thd_test_options(const void* thd, long long test_options);
int thd_sql_command(const void* thd);
const char *thd_proc_info(void* thd, const char *info);
void **thd_ha_data(const void* thd, const struct handlerton *hton);
void thd_storage_lock_wait(void* thd, long long value);
int thd_tx_isolation(const void* thd);
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
const char *set_thd_proc_info(void*, const char * info, const char *func,
const char *file, const unsigned int line);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
unsigned long thd_get_thread_id(const void* thd);
@ -168,16 +185,16 @@ typedef struct st_mysql_ftparser_boolean_info
typedef struct st_mysql_ftparser_param
{
int (*mysql_parse)(struct st_mysql_ftparser_param *,
char *doc, int doc_len);
const char *doc, int doc_len);
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
char *word, int word_len,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
void *ftparser_state;
void *mysql_ftparam;
struct charset_info_st *cs;
char *doc;
const struct charset_info_st *cs;
const char *doc;
int length;
int flags;
unsigned int flags;
enum enum_ftparser_mode mode;
} MYSQL_FTPARSER_PARAM;
struct st_mysql_ftparser

View file

@ -235,7 +235,7 @@ typedef struct st_mysql_cond mysql_cond_t;
#ifdef HAVE_PSI_INTERFACE
#ifdef SAFE_MUTEX
#define mysql_mutex_init(K, M, A) \
inline_mysql_mutex_init(K, M, A, __FILE__, __LINE__)
inline_mysql_mutex_init(K, M, A, #M, __FILE__, __LINE__)
#else
#define mysql_mutex_init(K, M, A) \
inline_mysql_mutex_init(K, M, A)
@ -243,7 +243,7 @@ typedef struct st_mysql_cond mysql_cond_t;
#else
#ifdef SAFE_MUTEX
#define mysql_mutex_init(K, M, A) \
inline_mysql_mutex_init(M, A, __FILE__, __LINE__)
inline_mysql_mutex_init(M, A, #M, __FILE__, __LINE__)
#else
#define mysql_mutex_init(K, M, A) \
inline_mysql_mutex_init(M, A)
@ -585,7 +585,7 @@ static inline int inline_mysql_mutex_init(
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *src_file, uint src_line
, const char *src_name, const char *src_file, uint src_line
#endif
)
{
@ -596,7 +596,7 @@ static inline int inline_mysql_mutex_init(
that->m_psi= NULL;
#endif
#ifdef SAFE_MUTEX
return safe_mutex_init(&that->m_mutex, attr, src_file, src_line);
return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif

View file

@ -474,9 +474,6 @@ struct my_rnd_struct;
enum Item_result
{
STRING_RESULT=0, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT
#ifdef MYSQL_SERVER
,IMPOSSIBLE_RESULT /* Yes, we know this is ugly, don't tell us */
#endif
};
typedef struct st_udf_args

View file

@ -149,8 +149,6 @@ enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
uint count, THR_LOCK_INFO *owner,
ulong lock_wait_timeout);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count, uint unlock_flags);
#error keep both thr_merge* or what?
void thr_lock_merge_status(THR_LOCK_DATA **data, uint count);
void thr_merge_locks(THR_LOCK_DATA **data, uint org_count, uint new_count);
void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
@ -162,6 +160,8 @@ void thr_downgrade_write_lock(THR_LOCK_DATA *data,
enum thr_lock_type new_lock_type);
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
ulong lock_wait_timeout);
void thr_set_lock_wait_callback(void (*before_wait)(void),
void (*after_wait)(void));
#ifdef __cplusplus
}
#endif

View file

@ -18,7 +18,7 @@ void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread);
void wqueue_add_and_wait(WQUEUE *wqueue,
struct st_my_thread_var *thread,
pthread_mutex_t *lock);
mysql_mutex_t *lock);
void wqueue_release_queue(WQUEUE *wqueue);
void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue);

View file

@ -149,7 +149,7 @@ ADD_CONVENIENCE_LIBRARY(clientlib ${CLIENT_SOURCES})
DTRACE_INSTRUMENT(clientlib)
ADD_DEPENDENCIES(clientlib GenError)
SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES})
SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL})
# Merge several convenience libraries into one big mysqlclient
# and link them together into shared library.

View file

@ -47,7 +47,7 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo dtoa.lo
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo dtoa.lo \
strmov_overlapp.lo
mystringsextra= strto.c

View file

@ -28,7 +28,7 @@ extern char * mysql_unix_port;
CLIENT_PROTOCOL_41 | \
CLIENT_SECURE_CONNECTION | \
CLIENT_MULTI_RESULTS | \
CLIENT_PS_MULTI_RESULTS \
CLIENT_PS_MULTI_RESULTS | \
CLIENT_PLUGIN_AUTH)
sig_handler my_pipe_sig_handler(int sig);

View file

@ -384,9 +384,9 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
if (rc == 0)
{
/* Free old connect information */
my_free(saved_user, MYF(MY_ALLOW_ZERO_PTR));
my_free(saved_passwd, MYF(MY_ALLOW_ZERO_PTR));
my_free(saved_db, MYF(MY_ALLOW_ZERO_PTR));
my_free(saved_user);
my_free(saved_passwd);
my_free(saved_db);
/* alloc new connect information */
mysql->user= my_strdup(mysql->user, MYF(MY_WME));
@ -986,8 +986,8 @@ mysql_get_server_info(MYSQL *mysql)
my_bool STDCALL mariadb_connection(MYSQL *mysql)
{
return (strinstr(mysql->server_version, "MariaDB") != 0 ||
strinstr(mysql->server_version, "-maria-") != 0);
return (strstr(mysql->server_version, "MariaDB") ||
strstr(mysql->server_version, "-maria-"));
}
const char * STDCALL

View file

@ -69,7 +69,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_list.cc ../sql/sql_load.cc ../sql/sql_locale.cc
../sql/sql_binlog.cc ../sql/sql_manager.cc
../sql/sql_parse.cc ../sql/sql_partition.cc ../sql/sql_plugin.cc
../sql/debug_sync.cc
../sql/debug_sync.cc ../sql/opt_table_elimination.cc
../sql/sql_prepare.cc ../sql/sql_rename.cc ../sql/sql_repl.cc
../sql/sql_select.cc ../sql/sql_servers.cc
../sql/sql_show.cc ../sql/sql_state.c ../sql/sql_string.cc

View file

@ -80,7 +80,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
rpl_injector.cc my_user.c partition_info.cc sql_alter.cc \
sql_servers.cc event_parse_data.cc sql_signal.cc \
rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc \
sql_partition_admin.cc
sql_partition_admin.cc \
create_options.cc opt_table_elimination.cc \
multi_range_read.cc opt_index_cond_pushdown.cc \
sql_expression_cache.cc

View file

@ -1241,26 +1241,3 @@ int vprint_msg_to_log(enum loglevel level __attribute__((unused)),
return 0;
}
bool Protocol::net_store_data(const uchar *from, size_t length,
CHARSET_INFO *from_cs, CHARSET_INFO *to_cs)
{
uint conv_length= to_cs->mbmaxlen * length / from_cs->mbminlen;
uint dummy_error;
char *field_buf;
if (!thd->mysql) // bootstrap file handling
return false;
if (!(field_buf= (char*) alloc_root(alloc, conv_length + sizeof(uint) + 1)))
return true;
*next_field= field_buf + sizeof(uint);
length= copy_and_convert(*next_field, conv_length, to_cs,
(const char*) from, length, from_cs, &dummy_error);
*(uint *) field_buf= length;
(*next_field)[length]= 0;
if (next_mysql_field->max_length < length)
next_mysql_field->max_length= length;
++next_field;
++next_mysql_field;
return false;
}

View file

@ -94,6 +94,7 @@ SELECT COUNT(*) FROM mysqltest1.t1;
INSERT INTO mysqltest1.t1 SET f1= 2;
CREATE TEMPORARY TABLE mysqltest1.tmp2(a INT);
ROLLBACK;
--replace_result MyISAM InnoDB
SHOW CREATE TABLE mysqltest1.tmp2;
--echo ######### Must return no rows here #########
SELECT COUNT(*) FROM mysqltest1.t1;

View file

@ -1,5 +1,5 @@
# Slow test, don't run during staging part
source include/not_staging.inc
source include/not_staging.inc;
#
# Bug#6148 ()

View file

@ -157,4 +157,3 @@ INSERT INTO t1 VALUES (1);
DROP TEMPORARY TABLE t1;
--sync_slave_with_master

View file

@ -1,3 +1,5 @@
SET TIME_ZONE = _latin1 '+03:00';
--echo #
--echo # Start of WL#2649 Number-to-string conversions
--echo #

View file

@ -54,12 +54,10 @@
--echo Comparing tables $diff_table_1 and $diff_table_2
disable_query_log;
disable_warnings;
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1
--error 0,1
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
enable_warnings;
let $_diff_table=$diff_table_2;

View file

@ -1,9 +0,0 @@
#
# Whether server supports dynamic loading.
#
if (`SELECT @@have_dynamic_loading != 'YES'`) {
--skip The test requires dynamic loading
}
disable_query_log;
show variables like 'have_dynamic_loading';
enable_query_log;

View file

@ -8,7 +8,6 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
# Check if the variable HA_EXAMPLE_SO is set
#
--require r/have_example_plugin.require
disable_query_log;
eval select LENGTH('$HA_EXAMPLE_SO') > 0 as 'have_example_plugin';
enable_query_log;
if (`SELECT LENGTH('$HA_EXAMPLE_SO') = 0`) {
--skip Need example plugin
}

View file

@ -1,2 +1,2 @@
--loose-innodb
--plugin-load=$HA_XTRADB_SO
--plugin-load=$HA_INNODB_SO

View file

@ -6,16 +6,10 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
}
#
# Check if the variable SEMISYNC_MASTER_PLUGIN is set
# Check if the variable SEMISYNC_MASTER_SO is set
#
if (`select LENGTH('$SEMISYNC_MASTER_PLUGIN') = 0`)
if (`select LENGTH('$SEMISYNC_MASTER_SO') = 0`)
{
skip Need semisync plugins;
}
#
# Check if --plugin-dir was setup for semisync
#
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SEMISYNC_PLUGIN_OPT'`) {
--skip SEMISYNC plugin requires that --plugin-dir is set to the semisync plugin dir (either the .opt file does not contain \$SEMISYNC_PLUGIN_OPT or another plugin is in use)
}

View file

@ -8,7 +8,6 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
# Check if the variable MYPLUGLIB_SO is set
#
--require r/have_simple_parser.require
disable_query_log;
eval select LENGTH('$MYPLUGLIB_SO') > 0 as 'have_simple_parser';
enable_query_log;
if (`SELECT LENGTH('$MYPLUGLIB_SO') = 0`) {
--skip simple parser is not built (no mypluglib.so)
}

View file

@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
#
# Check if the variable UDF_EXAMPLE_SO is set
#
--require r/have_udf_example.require
disable_query_log;
eval select LENGTH('$UDF_EXAMPLE_SO') > 0 as 'have_udf_example_lib';
enable_query_log;
#
if (`SELECT LENGTH('$UDF_EXAMPLE_SO') = 0`) {
--skip Need udf example
}

View file

@ -1,4 +1,5 @@
disable_query_log;
--require r/true.require
SELECT (plugin_description LIKE '%xtradb%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active';
enable_query_log;
if (!`SELECT count(*) FROM information_schema.plugins WHERE
plugin_name = 'innodb' AND plugin_status = 'active' AND
plugin_description LIKE '%xtradb%'`){
skip Needs XtraDB engine;
}

View file

@ -14,7 +14,7 @@ perl;
log-slow-queries pid-file slow-query-log-file
datadir slave-load-tmpdir tmpdir/;
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
thread-concurrency super-large-pages mutex-deadlock-detector null-audit/;
thread-concurrency super-large-pages mutex-deadlock-detector null-audit maria aria pbxt oqgraph sphinx/;
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR /;
$re1=join('|', @skipvars, @plugins);
$re2=join('|', @plugins);

View file

@ -982,6 +982,17 @@ sub collect_one_test_case {
}
}
if ( $tinfo->{'need_ipv6'} )
{
# This is a test that needs ssl
if ( ! $::have_ipv6 ) {
# IPv6 is not supported, skip it
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "No IPv6";
return $tinfo;
}
}
# ----------------------------------------------------------------------
# Find config file to use if not already selected in <testname>.opt file
# ----------------------------------------------------------------------
@ -1075,6 +1086,7 @@ my @tags=
["include/have_example_plugin.inc", "example_plugin_test", 1],
["include/have_oqgraph_engine.inc", "oqgraph_test", 1],
["include/have_ssl.inc", "need_ssl", 1],
["include/check_ipv6.inc", "need_ipv6", 1],
);

View file

@ -2158,7 +2158,6 @@ sub environment_setup () {
# ----------------------------------------------------
$ENV{'MY_PERROR'}= mtr_native_path($exe_perror);
#warning remove the below
# ----------------------------------------------------
# Add the path where mysqld will find udf_example.so
# ----------------------------------------------------

View file

@ -160,7 +160,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
# If you add a new suite, please check TEST_DIRS in Makefile.am.
#
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,maria,parts,innodb,innodb_plugin,percona,ndb,vcol,oqgraph,sphinx,perfschema";
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,maria,parts,innodb,percona,ndb,vcol,oqgraph,sphinx,perfschema";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@ -182,6 +182,7 @@ my $opt_ssl;
my $opt_skip_ssl;
my @opt_skip_test_list;
our $opt_ssl_supported;
our $have_ipv6;
my $opt_ps_protocol;
my $opt_sp_protocol;
my $opt_cursor_protocol;
@ -377,6 +378,7 @@ sub main {
}
check_ndbcluster_support(\%mysqld_variables);
check_ssl_support(\%mysqld_variables);
check_ipv6_support();
check_debug_support(\%mysqld_variables);
executable_setup();
@ -2428,7 +2430,8 @@ sub setup_vardir() {
}
else
{
for (<../storage/*/.libs/*.so>,<../plugin/*/.libs/*.so>,<../sql/.libs/*.so>)
for (<../storage/*/.libs/*.so>,<../plugin/*/.libs/*.so>,<../sql/.libs/*.so>,
<../storage/*/*.so>,<../plugin/*/*.so>,<../sql/*.so>)
{
my $pname=basename($_);
symlink rel2abs($_), "$plugindir/$pname";
@ -2516,6 +2519,11 @@ sub check_ssl_support ($) {
$opt_ssl_supported= 1;
}
sub check_ipv6_support {
use Socket;
$have_ipv6 = socket SOCK, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
close SOCK;
}
sub check_debug_support ($) {
my $mysqld_variables= shift;
@ -4377,6 +4385,9 @@ sub extract_warning_lines ($) {
qr|Table \./test/bug53592 has a primary key in InnoDB data dictionary, but not in MySQL|,
qr|mysqld: Table '\./mtr/test_suppressions' is marked as crashed and should be repaired|,
qr|InnoDB: Error: table 'test/bug39438'|,
qr|'user' entry '.*' ignored in --skip-name-resolve mode|,
qr|mysqld got signal 6|,
qr|Error while setting value 'pool-of-threads' to 'thread_handling'|,
);
my $matched_lines= [];
@ -4868,8 +4879,8 @@ sub mysqld_arguments ($$$) {
if (!using_extern() and $mysql_version_id >= 50106 && !$opt_user_args)
{
# Turn on logging to file and tables
mtr_add_arg($args, "%s--log-output=table,file");
# Turn on logging to file
mtr_add_arg($args, "%s--log-output=file");
}
# Check if "extra_opt" contains --log-bin
@ -5285,7 +5296,7 @@ sub start_servers($) {
for (all_servers()) {
next unless $_->{WAIT} and started($_);
if ($_->{WAIT}->($_)) {
$tinfo->{comment}= "Failed to start ".$_->name();
$tinfo->{comment}= "Failed to start ".$_->name()."\n";
return 1;
}
}

View file

@ -12736,7 +12736,8 @@ INSERT INTO t1 (col1, col2) VALUES (1, "value");
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
test.t1 repair status Table is already up to date
DROP TABLE t1;
#
# BUG#48757 - missing .ARZ file causes server crash
@ -12800,12 +12801,3 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
DROP TABLE t1;
select * from t1;
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
select sum(length(a)),sum(b) from t1;
sum(length(a)) sum(b)
8670 187
drop table t1;

View file

@ -1882,7 +1882,7 @@ drop table if exists t1,t2,t3;
# Fix modified for MariaDB: we support this syntax
create table t1 (a int) transactional=0;
Warnings:
Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
create table t2 (a int) page_checksum=1;
create table t3 (a int) row_format=page;
drop table t1,t2,t3;

View file

@ -2,6 +2,7 @@ set names binary;
#
# Start of 5.5 tests
#
SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#

View file

@ -84,6 +84,7 @@ DROP TABLE t1;
#
# Start of 5.5 tests
#
SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#

View file

@ -412,6 +412,7 @@ End of 5.0 tests
#
# Start of 5.5 tests
#
SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#

View file

@ -1239,7 +1239,9 @@ WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
DROP VIEW v1;
DROP TABLE t1;
End of 5.0 tests
Start of 5.1 tests
#
# Start of 5.1 tests
#
SET NAMES utf8;
CREATE TABLE t1 (
a varchar(10) CHARACTER SET ucs2 COLLATE ucs2_czech_ci,
@ -1284,10 +1286,14 @@ hex(a)
0064017E
DROP TABLE t1;
#
# End of 5.1 tests
#
#
# Start of 5.5 tests
#
SET NAMES latin1;
SET collation_connection=ucs2_general_ci;
SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#

View file

@ -1,3 +1,4 @@
SET TIME_ZONE='+03:00';
DROP TABLE IF EXISTS t1;
#
# Start of 5.5 tests

View file

@ -1,3 +1,4 @@
SET TIME_ZONE = '+03:00';
DROP TABLE IF EXISTS t1;
#
# Start of 5.5 tests

View file

@ -1,3 +1,4 @@
SET TIME_ZONE='+03:00';
drop table if exists t1,t2,t3,t4;
drop database if exists mysqltest;
drop table if exists t1,t2;
@ -2090,6 +2091,7 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
SET NAMES utf8;
SET TIME_ZONE = _latin1 '+03:00';
#
# Start of WL#2649 Number-to-string conversions
#

View file

@ -383,9 +383,9 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
y
0
Warnings:
Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: 'str1'
Warning 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1366 Incorrect decimal value: '' for column '' at row 0
Warning 1292 Truncated incorrect DECIMAL value: 'str2'
SELECT c DIV 900 y FROM t1 GROUP BY y;
y

View file

@ -14,7 +14,7 @@ GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
grant delete on mysqltest.* to mysqltest_1@localhost;
select * from mysql.user where user="mysqltest_1";
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin auth_string
localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0
localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED EDH-RSA-DES-CBC3-SHA 0 0 0 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
@ -45,14 +45,14 @@ flush privileges;
grant usage on *.* to mysqltest_1@localhost with max_queries_per_hour 10;
select * from mysql.user where user="mysqltest_1";
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin auth_string
localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0
localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 0 0 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30;
select * from mysql.user where user="mysqltest_1";
Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin auth_string
localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0
localhost mysqltest_1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 0
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30

View file

@ -255,6 +255,24 @@ WHERE
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
`TESTID`='' AND `UCCHECK`='';
drop table t1;
#
# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
#
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
INSERT INTO t1 VALUES (2);
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
SELECT t1.f1 FROM t1
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
f1
2
EXPLAIN SELECT t1.f1 FROM t1
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
2 DEPENDENT SUBQUERY t2 index_merge f2,f3 f3,f2 2,5 NULL 1 Using intersect(f3,f2); Using where; Using index
DROP TABLE t1,t2;
#
# BUG#56862/640419: Wrong result with sort_union index merge when one
# of the merged index scans is the primary key scan
@ -291,7 +309,7 @@ SELECT COUNT(*) FROM
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 11419 Using sort_union(idx,PRIMARY); Using where
2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 6144 Using sort_union(idx,PRIMARY); Using where
SELECT COUNT(*) FROM
(SELECT * FROM t1
WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
@ -310,21 +328,3 @@ WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
COUNT(*)
6145
DROP TABLE t1;
#
# Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
#
CREATE TABLE t1 (f1 INT, PRIMARY KEY (f1));
INSERT INTO t1 VALUES (2);
CREATE TABLE t2 (f1 INT, f2 INT, f3 char(1),
PRIMARY KEY (f1), KEY (f2), KEY (f3) );
INSERT INTO t2 VALUES (1, 1, 'h'), (2, 3, 'h'), (3, 2, ''), (4, 2, '');
SELECT t1.f1 FROM t1
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
f1
2
EXPLAIN SELECT t1.f1 FROM t1
WHERE (SELECT COUNT(*) FROM t2 WHERE t2.f3 = 'h' AND t2.f2 = t1.f1) = 0 AND t1.f1 = 2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 Using index
2 DEPENDENT SUBQUERY t2 index_merge f2,f3 f3,f2 2,5 NULL 1 Using intersect(f3,f2); Using where; Using index
DROP TABLE t1,t2;

View file

@ -42,8 +42,8 @@ insert into t5 values (10);
create view v1 (c) as
SELECT table_name FROM information_schema.TABLES
WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND
table_name not like 'ndb_%' AND table_name not like 'innodb_%';
and table_name not like 'pbxt%'
table_name not like 'ndb_%' AND table_name not like 'innodb_%' AND
table_name not like 'pbxt_%' AND table_name not like 'xtradb_%';
select * from v1;
c
CHARACTER_SETS
@ -81,8 +81,6 @@ TRIGGERS
USER_PRIVILEGES
USER_STATISTICS
VIEWS
XTRADB_ADMIN_COMMAND
XTRADB_ENHANCEMENTS
columns_priv
db
event
@ -827,8 +825,6 @@ TABLES CREATE_TIME datetime
TABLES UPDATE_TIME datetime
TABLES CHECK_TIME datetime
TRIGGERS CREATED datetime
INNODB_TRX trx_started datetime
INNODB_TRX trx_wait_started datetime
event execute_at datetime
event last_executed datetime
event starts datetime
@ -870,8 +866,6 @@ COLUMNS TABLE_NAME select
COLUMN_PRIVILEGES TABLE_NAME select
FILES TABLE_NAME select
INDEX_STATISTICS TABLE_NAME select
INNODB_INDEX_STATS table_name select
INNODB_TABLE_STATS table_name select
KEY_COLUMN_USAGE TABLE_NAME select
PARTITIONS TABLE_NAME select
REFERENTIAL_CONSTRAINTS TABLE_NAME select
@ -1256,12 +1250,12 @@ DROP PROCEDURE p1;
DROP USER mysql_bug20230@localhost;
SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test');
MAX(table_name)
XTRADB_ENHANCEMENTS
VIEWS
SELECT table_name from information_schema.tables
WHERE table_name=(SELECT MAX(table_name)
FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'));
table_name
XTRADB_ENHANCEMENTS
VIEWS
DROP TABLE IF EXISTS bug23037;
DROP FUNCTION IF EXISTS get_value;
SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037';

View file

@ -1,57 +0,0 @@
set global innodb_table_locks=1;
select @@innodb_table_locks;
@@innodb_table_locks
1
drop table if exists t1;
set @@innodb_table_locks=1;
create table t1 (id integer, x integer) engine=INNODB;
insert into t1 values(0, 0);
set autocommit=0;
SELECT * from t1 where id = 0 FOR UPDATE;
id x
0 0
set autocommit=0;
lock table t1 write;
update t1 set x=1 where id = 0;
select * from t1;
id x
0 1
commit;
update t1 set x=2 where id = 0;
commit;
unlock tables;
select * from t1;
id x
0 2
commit;
drop table t1;
set @@innodb_table_locks=0;
create table t1 (id integer primary key, x integer) engine=INNODB;
insert into t1 values(0, 0),(1,1),(2,2);
commit;
SELECT * from t1 where id = 0 FOR UPDATE;
id x
0 0
set autocommit=0;
set @@innodb_table_locks=0;
lock table t1 write;
update t1 set x=10 where id = 2;
SELECT * from t1 where id = 2;
id x
2 2
UPDATE t1 set x=3 where id = 2;
commit;
SELECT * from t1;
id x
0 0
1 1
2 3
commit;
unlock tables;
commit;
select * from t1;
id x
0 0
1 1
2 10
drop table t1;

View file

@ -1,47 +0,0 @@
drop table if exists t1,t2;
set binlog_format=mixed;
set session transaction isolation level repeatable read;
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
set autocommit=0;
select * from t1 where a=3 lock in share mode;
a
3
set binlog_format=mixed;
set session transaction isolation level repeatable read;
set autocommit=0;
update t1 set a=10 where a=5;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit;
set session transaction isolation level read committed;
update t1 set a=10 where a=5;
select * from t1 where a=2 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1 where a=2 limit 1 for update;
a
2
update t1 set a=11 where a=6;
update t1 set a=12 where a=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
update t1 set a=13 where a=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit;
update t1 set a=14 where a=1;
commit;
select * from t1;
a
14
2
3
4
10
11
7
drop table t1;
create table t1 (a int, b int) engine=myisam;
create table t2 (c int, d int, key (c)) engine=innodb;
insert into t1 values (1,1);
insert into t2 values (1,2);
set session transaction isolation level read committed;
delete from t1 using t1 join t2 on t1.a = t2.c where t2.d in (1);
drop table t1, t2;

View file

@ -1,421 +0,0 @@
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
create table t0(a int primary key) engine=innodb row_format=compressed;
Warnings:
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t1(a int primary key) engine=innodb row_format=dynamic;
Warnings:
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t2(a int primary key) engine=innodb row_format=redundant;
create table t3(a int primary key) engine=innodb row_format=compact;
create table t4(a int primary key) engine=innodb key_block_size=9;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
create table t5(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_per_table=on;
create table t6(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_format=`1`;
create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t8(a int primary key) engine=innodb
key_block_size=1 row_format=fixed;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t9(a int primary key) engine=innodb
key_block_size=1 row_format=compact;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t10(a int primary key) engine=innodb
key_block_size=1 row_format=dynamic;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t11(a int primary key) engine=innodb
key_block_size=1 row_format=compressed;
create table t12(a int primary key) engine=innodb
key_block_size=1;
create table t13(a int primary key) engine=innodb
row_format=compressed;
create table t14(a int primary key) engine=innodb key_block_size=9;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t0 Compact
test t00 Compact
test t1 Compact
test t10 Dynamic
test t11 Compressed
test t12 Compressed
test t13 Compressed
test t14 Compact
test t2 Redundant
test t3 Compact
test t4 Compact
test t5 Redundant
test t6 Redundant
test t7 Redundant
test t8 Compact
test t9 Compact
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
alter table t1 key_block_size=0;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
alter table t1 row_format=dynamic;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Dynamic
alter table t1 row_format=compact;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Compact
alter table t1 row_format=redundant;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Redundant
drop table t1;
create table t1(a int not null, b text, index(b(10))) engine=innodb
key_block_size=1;
create table t2(b text)engine=innodb;
insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000)));
insert into t1 select 1, b from t2;
commit;
begin;
update t1 set b=repeat('B',100);
select a,left(b,40) from t1 natural join t2;
a left(b,40)
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
rollback;
select a,left(b,40) from t1 natural join t2;
a left(b,40)
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Compressed
test t2 Compact
drop table t1,t2;
SET SESSION innodb_strict_mode = off;
CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL,
PRIMARY KEY (c(767),d(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL,
PRIMARY KEY (c(767),d(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
CREATE TABLE t1(
c TEXT NOT NULL, d TEXT NOT NULL,
PRIMARY KEY (c(767),d(767)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
drop table t1;
CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438)))
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
DROP TABLE t1;
create table t1( c1 int not null, c2 blob, c3 blob, c4 blob,
primary key(c1, c2(22), c3(22)))
engine = innodb row_format = dynamic;
begin;
insert into t1 values(1, repeat('A', 20000), repeat('B', 20000),
repeat('C', 20000));
update t1 set c3 = repeat('D', 20000) where c1 = 1;
commit;
select count(*) from t1 where c2 = repeat('A', 20000);
count(*)
1
select count(*) from t1 where c3 = repeat('D', 20000);
count(*)
1
select count(*) from t1 where c4 = repeat('C', 20000);
count(*)
1
update t1 set c3 = repeat('E', 20000) where c1 = 1;
drop table t1;
set global innodb_file_format=`0`;
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=`1`;
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=`2`;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=`-1`;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=`Antelope`;
set global innodb_file_format=`Barracuda`;
set global innodb_file_format=`Cheetah`;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=`abc`;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=`1a`;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=``;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=0.
drop table t1;
set innodb_strict_mode = on;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16]
Error 1005 Can't create table 'test.t1' (errno: 1478)
create table t2 (id int primary key) engine = innodb key_block_size = 9;
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
Error 1005 Can't create table 'test.t2' (errno: 1478)
create table t3 (id int primary key) engine = innodb key_block_size = 1;
create table t4 (id int primary key) engine = innodb key_block_size = 2;
create table t5 (id int primary key) engine = innodb key_block_size = 4;
create table t6 (id int primary key) engine = innodb key_block_size = 8;
create table t7 (id int primary key) engine = innodb key_block_size = 16;
create table t8 (id int primary key) engine = innodb row_format = compressed;
create table t9 (id int primary key) engine = innodb row_format = dynamic;
create table t10(id int primary key) engine = innodb row_format = compact;
create table t11(id int primary key) engine = innodb row_format = redundant;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t10 Compact
test t11 Redundant
test t3 Compressed
test t4 Compressed
test t5 Compressed
test t6 Compressed
test t7 Compressed
test t8 Compressed
test t9 Dynamic
drop table t3, t4, t5, t6, t7, t8, t9, t10, t11;
create table t1 (id int primary key) engine = innodb
key_block_size = 8 row_format = compressed;
create table t2 (id int primary key) engine = innodb
key_block_size = 8 row_format = redundant;
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t2' (errno: 1478)
create table t3 (id int primary key) engine = innodb
key_block_size = 8 row_format = compact;
ERROR HY000: Can't create table 'test.t3' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t3' (errno: 1478)
create table t4 (id int primary key) engine = innodb
key_block_size = 8 row_format = dynamic;
ERROR HY000: Can't create table 'test.t4' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t4' (errno: 1478)
create table t5 (id int primary key) engine = innodb
key_block_size = 8 row_format = default;
ERROR HY000: Can't create table 'test.t5' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t5' (errno: 1478)
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t1 Compressed
drop table t1;
create table t1 (id int primary key) engine = innodb
key_block_size = 9 row_format = redundant;
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t1' (errno: 1478)
create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = compact;
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t2' (errno: 1478)
create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = dynamic;
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
Error 1005 Can't create table 'test.t2' (errno: 1478)
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
set global innodb_file_per_table = off;
create table t1 (id int primary key) engine = innodb key_block_size = 1;
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table 'test.t1' (errno: 1478)
create table t2 (id int primary key) engine = innodb key_block_size = 2;
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table 'test.t2' (errno: 1478)
create table t3 (id int primary key) engine = innodb key_block_size = 4;
ERROR HY000: Can't create table 'test.t3' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table 'test.t3' (errno: 1478)
create table t4 (id int primary key) engine = innodb key_block_size = 8;
ERROR HY000: Can't create table 'test.t4' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table 'test.t4' (errno: 1478)
create table t5 (id int primary key) engine = innodb key_block_size = 16;
ERROR HY000: Can't create table 'test.t5' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table 'test.t5' (errno: 1478)
create table t6 (id int primary key) engine = innodb row_format = compressed;
ERROR HY000: Can't create table 'test.t6' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Error 1005 Can't create table 'test.t6' (errno: 1478)
create table t7 (id int primary key) engine = innodb row_format = dynamic;
ERROR HY000: Can't create table 'test.t7' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
Error 1005 Can't create table 'test.t7' (errno: 1478)
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t8 Compact
test t9 Redundant
drop table t8, t9;
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
create table t1 (id int primary key) engine = innodb key_block_size = 1;
ERROR HY000: Can't create table 'test.t1' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t1' (errno: 1478)
create table t2 (id int primary key) engine = innodb key_block_size = 2;
ERROR HY000: Can't create table 'test.t2' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t2' (errno: 1478)
create table t3 (id int primary key) engine = innodb key_block_size = 4;
ERROR HY000: Can't create table 'test.t3' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t3' (errno: 1478)
create table t4 (id int primary key) engine = innodb key_block_size = 8;
ERROR HY000: Can't create table 'test.t4' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t4' (errno: 1478)
create table t5 (id int primary key) engine = innodb key_block_size = 16;
ERROR HY000: Can't create table 'test.t5' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t5' (errno: 1478)
create table t6 (id int primary key) engine = innodb row_format = compressed;
ERROR HY000: Can't create table 'test.t6' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t6' (errno: 1478)
create table t7 (id int primary key) engine = innodb row_format = dynamic;
ERROR HY000: Can't create table 'test.t7' (errno: 1478)
show warnings;
Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
Error 1005 Can't create table 'test.t7' (errno: 1478)
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
SELECT table_schema, table_name, row_format
FROM information_schema.tables WHERE engine='innodb';
table_schema table_name row_format
test t8 Compact
test t9 Redundant
drop table t8, t9;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
set global innodb_file_format_check=`Antelope`;
create table normal_table (
c1 int
) engine = innodb;
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
create table zip_table (
c1 int
) engine = innodb key_block_size = 8;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=`Antelope`;
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
show table status;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
drop table normal_table, zip_table;

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
SET storage_engine=InnoDB;

View file

@ -1,24 +0,0 @@
set @old_innodb_file_format_check=@@innodb_file_format_check;
select @old_innodb_file_format_check;
@old_innodb_file_format_check
Antelope
set global innodb_file_format_check = Barracuda;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check = DEFAULT;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check = @old_innodb_file_format_check;
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format_check = cheetah;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = Bear;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = off;
ERROR HY000: Incorrect arguments to SET

View file

@ -1,44 +0,0 @@
call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value");
select @@innodb_file_format;
@@innodb_file_format
Antelope
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format=antelope;
set global innodb_file_format=barracuda;
set global innodb_file_format=cheetah;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=default;
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=off;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format_check=antelope;
set global innodb_file_format_check=barracuda;
set global innodb_file_format_check=cheetah;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=default;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format=on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format=off;
ERROR HY000: Incorrect arguments to SET
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=antelope;

View file

@ -4114,6 +4114,9 @@ FROM t1 JOIN t2 ON t2.v
ORDER BY t2.v;
MAX(t1.i)
NULL
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'x'
Warning 1292 Truncated incorrect INTEGER value: 'y'
EXPLAIN
SELECT MAX(t1.i)

View file

@ -33,5 +33,5 @@ SELECT STRAIGHT_JOIN g.id FROM t2 a, t3 g USE INDEX(groups_dt)
WHERE g.domain = 'queue' AND g.type = a.type;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a ALL NULL NULL NULL NULL 2
1 SIMPLE g ref groups_dt groups_dt 70 const,test.a.type 13 Using where
1 SIMPLE g ref groups_dt groups_dt 70 const,test.a.type 13 Using index condition
drop table t0,t1,t2,t3;

View file

@ -946,25 +946,29 @@ group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
Warning 1260 Row 1 was cut by GROUP_CONCAT()
Warning 1260 Row 2 was cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
Warning 1260 Row 1 was cut by GROUP_CONCAT()
Warning 1260 Row 2 was cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
Warning 1260 Row 1 was cut by GROUP_CONCAT()
Warning 1260 Row 2 was cut by GROUP_CONCAT()
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
group_concat(t1.b,t2.c)
aaaaa
bbbbb
Warnings:
Warning 1260 2 line(s) were cut by GROUP_CONCAT()
Warning 1260 Row 1 was cut by GROUP_CONCAT()
Warning 1260 Row 2 was cut by GROUP_CONCAT()
drop table t1, t2;
set group_concat_max_len=default;
create table t1 (gid smallint(5) unsigned not null, x int(11) not null, y int(11) not null, art int(11) not null, primary key (gid,x,y));
@ -1238,6 +1242,7 @@ show status like 'Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 5
Handler_read_last 0
Handler_read_next 9
Handler_read_prev 0
Handler_read_rnd 3
@ -1306,7 +1311,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
1 SIMPLE t2 system NULL NULL NULL NULL 1 100.00
Warnings:
Note 1003 select '1' AS `f1`,NULL AS `f2`,'3' AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t1` left join `test`.`t2` on(multiple equal(NULL)) where ((coalesce('1',NULL),'3') in ((1,3),(2,2)))
Note 1003 select '1' AS `f1`,NULL AS `f2`,'3' AS `f3`,NULL AS `f1`,NULL AS `f2` from `test`.`t2` where ((coalesce('1',NULL),'3') in ((1,3),(2,2)))
SELECT * FROM t1 LEFT JOIN t2 ON t1.f2 = t2.f2
WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
f1 f2 f3 f1 f2

View file

@ -1,6 +1,6 @@
select @@log_slow_filter;
@@log_slow_filter
admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
select @@log_slow_rate_limit;
@@log_slow_rate_limit
1
@ -9,10 +9,9 @@ select @@log_slow_verbosity;
show variables like "log_slow%";
Variable_name Value
log_slow_filter
log_slow_filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
log_slow_queries ON
log_slow_rate_limit 1
log_slow_time 10.000000
log_slow_verbosity
set @@log_slow_filter= "filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk,admin";
select @@log_slow_filter;
@ -56,6 +55,6 @@ last_insert_id int(11) NO NULL
insert_id int(11) NO NULL
server_id int(10) unsigned NO NULL
sql_text mediumtext NO NULL
flush slow query logs;
flush slow logs;
set @@log_slow_filter=default;
set @@log_slow_verbosity=default;

View file

@ -41,6 +41,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK

View file

@ -10,11 +10,11 @@ INSERT INTO crashed VALUES (10);
INSERT INTO t2 VALUES (20);
INSERT INTO t3 VALUES (30);
LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, crashed WRITE;
SET GLOBAL debug="+d,*,myisam_pretend_crashed_table_on_open";
SET GLOBAL debug="+d,myisam_pretend_crashed_table_on_open";
CREATE TRIGGER t1_ai AFTER INSERT ON crashed FOR EACH ROW INSERT INTO t2 VALUES(29);
SET GLOBAL debug=@orig_debug;
INSERT INTO t4 VALUES (39);
ERROR HY000: Table 't4' was not locked with LOCK TABLES
ERROR HY000: Table 'crashed' was not locked with LOCK TABLES
INSERT INTO crashed VALUES (11);
ERROR HY000: Table 'crashed' was not locked with LOCK TABLES
INSERT INTO t2 VALUES (21);

View file

@ -2258,7 +2258,7 @@ Key Start Len Index Type
DROP TABLE t1;
create table t1 (n int not null, c char(1)) transactional=1;
Warnings:
Error 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (

View file

@ -28,6 +28,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@ -63,6 +64,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@ -98,6 +100,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@ -136,6 +139,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@ -177,6 +181,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@ -221,6 +226,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK
@ -231,3 +237,5 @@ GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
DROP USER 'user3'@'%';
End of 5.1 tests
The --upgrade-system-tables option was used, databases won't be touched.
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK

View file

@ -1,15 +1,18 @@
#
# Bug#55672 mysql_upgrade dies with internal error
#
Phase 1/3: Fixing table and database names
Phase 2/3: Checking and upgrading tables
Processing databases
information_schema
mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log
Error : You can't use locks with log tables.
status : OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
@ -20,9 +23,6 @@ mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.servers OK
mysql.slow_log
Error : You can't use locks with log tables.
status : OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
@ -30,3 +30,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
performance_schema
test
Phase 3/3: Running 'mysql_fix_privilege_tables'...
OK

View file

@ -97,6 +97,16 @@ The following options may be given as the first argument:
--date-format=name The DATE format (ignored)
--datetime-format=name
The DATETIME format (ignored)
--deadlock-search-depth-long=#
Long search depth for the two-step deadlock detection
--deadlock-search-depth-short=#
Short search depth for the two-step deadlock detection
--deadlock-timeout-long=#
Long timeout for the two-step deadlock detection (in
microseconds)
--deadlock-timeout-short=#
Short timeout for the two-step deadlock detection (in
microseconds)
--default-storage-engine=name
The default storage engine for new tables
--default-time-zone=name
@ -141,6 +151,11 @@ The following options may be given as the first argument:
With this option enabled you can run myisamchk to test
(not repair) tables while the MySQL server is running.
Disable with --skip-external-locking.
--extra-max-connections=#
The number of connections on extra-port
--extra-port=# Extra port number to use for tcp connections in a
one-thread-per-connection manner. 0 means don't use
another port
--flush Flush MyISAM tables to disk between SQL commands
--flush-time=# A dedicated thread is created to flush all tables at the
given interval
@ -180,6 +195,10 @@ The following options may be given as the first argument:
interactive connection before closing it
--join-buffer-size=#
The size of the buffer that is used for full joins
--join-cache-level=#
Controls what join operations can be executed with join
buffers. Odd numbers are used for plain join buffers
while even numbers are used for linked buffers
--keep-files-on-create
Don't overwrite stale .MYD and .MYI even if no directory
is specified
@ -197,6 +216,8 @@ The following options may be given as the first argument:
The default size of key cache blocks
--key-cache-division-limit=#
The minimum percentage of warm blocks in key cache
--key-cache-segments=#
The number of segments in a key cache
-L, --language=name Client error messages in given language. May be given as
a full path. Deprecated. Use --lc-messages-dir instead.
--large-pages Enable support for large pages
@ -243,15 +264,28 @@ The following options may be given as the first argument:
--log-slow-admin-statements
Log slow OPTIMIZE, ANALYZE, ALTER and other
administrative statements to the slow log if it is open.
--log-slow-filter=name
Log only certain types of queries. Multiple flags can be
specified, separated by commas. Valid values are admin,
slave, filesort, filesort_on_disk, full_join, full_scan,
query_cache, query_cache_miss, tmp_table,
tmp_table_on_disk
--log-slow-queries[=name]
Log slow queries to a table or log file. Defaults logging
to table mysql.slow_log or hostname-slow.log if
--log-output=file is used. Must be enabled to activate
other slow log options. Deprecated option, use
--slow-query-log/--slow-query-log-file instead.
--log-slow-rate-limit=#
Write to slow log every #th slow query. Set to 1 to log
everything. Increase it to reduce the size of the slow or
the performance impact of slow logging
--log-slow-slave-statements
Log slow statements executed by slave thread to the slow
log if it is open.
--log-slow-verbosity=name
log-slow-verbosity=[value[,value ...]] where value is one
of 'innodb', 'query_plan'
--log-tc=name Path to transaction coordinator log (used for
transactions that affect more than one storage engine,
when binary log is disabled).
@ -327,8 +361,7 @@ The following options may be given as the first argument:
--min-examined-row-limit=#
Don't write queries to slow log that examine fewer rows
than that
--multi-range-count=#
Number of key ranges to request at once
--mrr-buffer-size=# Size of buffer to use when using MRR with range access
--myisam-block-size=#
Block size to be used for MyISAM index pages
--myisam-data-pointer-size=#
@ -404,8 +437,15 @@ The following options may be given as the first argument:
optimizer_switch=option=val[,option=val...], where option
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
engine_condition_pushdown} and val is one of {on, off,
default}
engine_condition_pushdown, index_condition_pushdown,
firstmatch, loosescan, materialization, semijoin,
partial_match_rowid_merge, partial_match_table_scan,
subquery_cache} and val is one of {on, off, default}
--optimizer-use-mrr=name
Whether the server should use multi-read-range
optimization when resolving queries, one of AUTO (as
appropriate), FORCE (always where applicable), DISABLE
(never)
--performance-schema
Enable the performance schema.
--performance-schema-events-waits-history-long-size=#
@ -444,6 +484,9 @@ The following options may be given as the first argument:
where each plugin is identified as name=library, where
name is the plugin name and library is the plugin library
in plugin_dir.
--plugin-maturity=name
The lowest desirable plugin maturity. Plugins less mature
than that will not be installed or loaded.
-P, --port=# Port number to use for connection or 0 to default to,
my.cnf, $MYSQL_TCP_PORT, /etc/services, built-in default
(3306), whatever comes first
@ -578,6 +621,9 @@ The following options may be given as the first argument:
not sure, leave this option unset
--report-user=name The account user name of the slave to be reported to the
master during slave registration
--rowid-merge-buff-size=#
The size of the buffers used [NOT] IN evaluation via
partial matching
--rpl-recovery-rank=#
Unused, will be removed
--safe-mode Skip some optimize stages (for testing).
@ -593,13 +639,14 @@ The following options may be given as the first argument:
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
--skip-bdb Deprecated option; Exist only for compatiblity with old
my.cnf files
--skip-grant-tables Start without grant tables. This gives all users FULL
ACCESS to all tables.
--skip-host-cache Don't cache host names.
--skip-name-resolve Don't resolve hostnames. All hostnames are IP's or
'localhost'.
--skip-networking Don't allow connection with TCP/IP
--skip-new Don't use new, possibly wrong routines.
--skip-show-database
Don't allow 'SHOW DATABASE' commands
--skip-slave-start If set, slave is not autostarted.
@ -688,14 +735,14 @@ The following options may be given as the first argument:
How many threads we should keep in a cache for reuse
--thread-handling=name
Define threads usage for handling queries, one of
one-thread-per-connection, no-threads, loaded-dynamically
one-thread-per-connection, no-threads
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
currently supported)
--tmp-table-size=# If an internal in-memory temporary table exceeds this
size, MySQL will automatically convert it to an on-disk
MyISAM table
MyISAM or Aria table
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
separated by a colon (:), in this case they are used in a
round-robin fashion
@ -715,6 +762,9 @@ The following options may be given as the first argument:
of the underlying table and the query uses a LIMIT clause
(usually get from GUI tools)
-u, --user=name Run mysqld daemon as user.
--userstat Enables statistics gathering for USER_STATISTICS,
CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS
tables in the INFORMATION_SCHEMA
-v, --verbose Used with --help option for detailed help.
-V, --version Output version information and exit.
--wait-timeout=# The number of seconds the server waits for activity on a
@ -746,7 +796,11 @@ connect-timeout 10
console FALSE
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
default-storage-engine InnoDB
deadlock-search-depth-long 15
deadlock-search-depth-short 4
deadlock-timeout-long 50000000
deadlock-timeout-short 10000
default-storage-engine myisam
default-time-zone (No default value)
default-week-format 0
delay-key-write ON
@ -759,6 +813,8 @@ engine-condition-pushdown TRUE
event-scheduler OFF
expire-logs-days 0
external-locking FALSE
extra-max-connections 1
extra-port 0
flush FALSE
flush-time 0
ft-boolean-syntax + -><()~*:""&|
@ -777,11 +833,13 @@ init-rpl-role MASTER
init-slave
interactive-timeout 28800
join-buffer-size 131072
join-cache-level 1
keep-files-on-create FALSE
key-buffer-size 8388608
key-buffer-size 134217728
key-cache-age-threshold 300
key-cache-block-size 1024
key-cache-division-limit 100
key-cache-segments 0
language MYSQL_SHAREDIR/
large-pages FALSE
lc-messages en_US
@ -799,7 +857,10 @@ log-queries-not-using-indexes FALSE
log-short-format FALSE
log-slave-updates FALSE
log-slow-admin-statements FALSE
log-slow-filter admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
log-slow-rate-limit 1
log-slow-slave-statements FALSE
log-slow-verbosity
log-tc tc.log
log-tc-size 24576
log-warnings 1
@ -829,12 +890,12 @@ max-user-connections 0
max-write-lock-count 18446744073709551615
memlock FALSE
min-examined-row-limit 0
multi-range-count 256
mrr-buffer-size 262144
myisam-block-size 1024
myisam-data-pointer-size 6
myisam-max-sort-file-size 9223372036853727232
myisam-mmap-size 18446744073709551615
myisam-recover-options OFF
myisam-recover-options DEFAULT
myisam-repair-threads 1
myisam-sort-buffer-size 8388608
myisam-stats-method nulls_unequal
@ -850,7 +911,8 @@ old-passwords FALSE
old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on
optimizer-use-mrr force
performance-schema FALSE
performance-schema-events-waits-history-long-size 10000
performance-schema-events-waits-history-size 10
@ -868,6 +930,7 @@ performance-schema-max-table-instances 50000
performance-schema-max-thread-classes 50
performance-schema-max-thread-instances 1000
plugin-load (No default value)
plugin-maturity unknown
port 3306
port-open-timeout 0
preload-buffer-size 32768
@ -894,6 +957,7 @@ report-host (No default value)
report-password (No default value)
report-port 3306
report-user (No default value)
rowid-merge-buff-size 8388608
rpl-recovery-rank 0
safe-user-create FALSE
secure-auth FALSE
@ -919,7 +983,7 @@ sporadic-binlog-dump-fail FALSE
sql-mode
symbolic-links FALSE
sync-binlog 0
sync-frm TRUE
sync-frm FALSE
sync-master-info 0
sync-relay-log 0
sync-relay-log-info 0
@ -930,7 +994,7 @@ table-open-cache 400
tc-heuristic-recover COMMIT
thread-cache-size 0
thread-handling one-thread-per-connection
thread-stack 262144
thread-stack 294912
time-format %H:%i:%s
timed-mutexes FALSE
tmp-table-size 16777216
@ -938,6 +1002,7 @@ transaction-alloc-block-size 8192
transaction-isolation REPEATABLE-READ
transaction-prealloc-size 4096
updatable-views-with-limit YES
userstat FALSE
verbose TRUE
wait-timeout 28800

View file

@ -3,7 +3,7 @@ FLUSH TABLES;
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'partition'
TRUNCATE TABLE t1;
ERROR 42000: Unknown storage engine 'partition'
ERROR 42S02: Table 'test.t1' doesn't exist
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze Error Unknown storage engine 'partition'

View file

@ -1,99 +0,0 @@
#
# Generic @@optimizer_switch tests
#
#
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='index_merge=off,index_merge_union=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='index_merge_union=on';
select @@optimizer_switch;
@@optimizer_switch
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,index_merge_sort_union=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch=4;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of '4'
set optimizer_switch=NULL;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
set optimizer_switch='default,index_merge';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
set optimizer_switch='index_merge=index_merge';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=index_merge'
set optimizer_switch='index_merge=on,but...';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'but...'
set optimizer_switch='index_merge=';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge='
set optimizer_switch='index_merge';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
set optimizer_switch='on';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'on'
set optimizer_switch='index_merge=on,index_merge=off';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=off'
set optimizer_switch='index_merge_union=on,index_merge_union=default';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge_union=default'
set optimizer_switch='default,index_merge=on,index_merge=off,default';
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=off,default'
set optimizer_switch=default;
set optimizer_switch='index_merge=off,index_merge_union=off,default';
select @@optimizer_switch;
@@optimizer_switch
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch=default;
select @@global.optimizer_switch;
@@global.optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set @@global.optimizer_switch=default;
select @@global.optimizer_switch;
@@global.optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
#
# Check index_merge's @@optimizer_switch flags
#
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
BUG#37120 optimizer_switch allowable values not according to specification
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,materialization=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=off,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,semijoin=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,semijoin=off,materialization=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,materialization=off,semijoin=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,semijoin=off,materialization=off,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,semijoin=off,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch='default,materialization=off,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_condition_pushdown=on,firstmatch=on,loosescan=off,materialization=off,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on
set optimizer_switch=default;

View file

@ -2,4 +2,4 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on

View file

@ -2,4 +2,4 @@ select @@session.engine_condition_pushdown,
@@global.engine_condition_pushdown,
@@session.optimizer_switch, @@global.optimizer_switch;
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=on,firstmatch=on,loosescan=on,materialization=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,table_elimination=on

View file

@ -5,6 +5,8 @@ drop table if exists t1, t2;
#
SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
SET GLOBAL innodb_thread_concurrency = 1;
set global default_storage_engine='innodb';
set session default_storage_engine='innodb';
CREATE TABLE t1
(user_num BIGINT,
hours SMALLINT,
@ -489,3 +491,4 @@ Warning 1265 Data truncated for column 'b' at row 1
Error 1067 Invalid default value for 'b'
SET SESSION sql_mode = @old_mode;
DROP TABLE t1;
set global default_storage_engine=default;

View file

@ -52,7 +52,7 @@ SELECT COUNT(b) FROM t1 WHERE b >= 0;
COUNT(b)
2048
Zero key reads?
No!
Yes!
INSERT t2 SELECT a,b,c FROM t1;
reads vs requests
reads == requests
@ -63,7 +63,7 @@ SELECT COUNT(b) FROM t2 WHERE b >= 0;
COUNT(b)
2048
Zero key reads?
No!
Yes!
FLUSH TABLES;
# Setting the default key cache to 1M
SET GLOBAL key_buffer_size = 1024*1024;

View file

@ -1429,7 +1429,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using where; Using index
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
# Disabling warnings for the invalid date
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31';
id select_type table partitions type possible_keys key key_len ref rows Extra

Some files were not shown because too many files have changed in this diff Show more