Merge tag 'mariadb-10.0.30' into bb-sachin-10.0-galera-merge
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
This commit is contained in:
commit
f66395f7c0
2
.gitignore
vendored
2
.gitignore
vendored
@ -214,7 +214,7 @@ support-files/mysql.spec
|
||||
support-files/mysqld_multi.server
|
||||
support-files/wsrep.cnf
|
||||
support-files/wsrep_notify
|
||||
support-files/SELinux/centos6-mariadb.pp
|
||||
support-files/SELinux/mariadb.pp
|
||||
tags
|
||||
tests/async_queries
|
||||
tests/bug25714
|
||||
|
@ -356,6 +356,9 @@ SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
||||
|
||||
# Common defines and includes
|
||||
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
||||
IF(_FILE_OFFSET_BITS)
|
||||
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=${_FILE_OFFSET_BITS})
|
||||
ENDIF()
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
|
||||
# Add bundled or system zlib.
|
||||
|
22
CREDITS
22
CREDITS
@ -3,16 +3,18 @@ organization registered in the USA.
|
||||
|
||||
The current main sponsors of the MariaDB Foundation are:
|
||||
|
||||
Booking.com http://www.booking.com (2013 - 2016)
|
||||
Development Bank of Singapore http://dbs.com (2016)
|
||||
MariaDB Corporation https://www.mariadb.com (2013 - 2016)
|
||||
Visma http://visma.com (2015 - 2016)
|
||||
Acronis http://acronis.com (2016)
|
||||
Nexedi https://www.nexedi.com (2016)
|
||||
Automattic https://automattic.com (2014 - 2016)
|
||||
Tencent Game DBA http://tencentdba.com/about (2016)
|
||||
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
|
||||
Virtuozzo https://virtuozzo.com (2016)
|
||||
Alibaba Cloud https://intl.aliyun.com (2017)
|
||||
Booking.com https://www.booking.com (2013 - 2017)
|
||||
Development Bank of Singapore https://dbs.com (2016 - 2017)
|
||||
MariaDB Corporation https://www.mariadb.com (2013 - 2017)
|
||||
Visma https://visma.com (2015 - 2017)
|
||||
Acronis http://acronis.com (2016 - 2017)
|
||||
Nexedi https://www.nexedi.com (2016 - 2017)
|
||||
Automattic https://automattic.com (2014 - 2017)
|
||||
Tencent Game DBA http://tencentdba.com/about (2016 - 2017)
|
||||
Tencent TDSQL http://tdsql.org/ (2016 - 2017)
|
||||
Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2017)
|
||||
Virtuozzo https://virtuozzo.com (2016 - 2017)
|
||||
|
||||
For a full list of sponsors, see
|
||||
https://mariadb.org/about/supporters/
|
||||
|
2
VERSION
2
VERSION
@ -1,3 +1,3 @@
|
||||
MYSQL_VERSION_MAJOR=10
|
||||
MYSQL_VERSION_MINOR=0
|
||||
MYSQL_VERSION_PATCH=29
|
||||
MYSQL_VERSION_PATCH=30
|
||||
|
@ -38,8 +38,8 @@ char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
|
||||
ulonglong last_values[MAX_MYSQL_VAR];
|
||||
static int interval=0;
|
||||
static my_bool option_force=0,interrupted=0,new_line=0,
|
||||
opt_compress=0, opt_relative=0, opt_verbose=0, opt_vertical=0,
|
||||
tty_password= 0, opt_nobeep;
|
||||
opt_compress= 0, opt_local= 0, opt_relative= 0, opt_verbose= 0,
|
||||
opt_vertical= 0, tty_password= 0, opt_nobeep;
|
||||
static my_bool debug_info_flag= 0, debug_check_flag= 0;
|
||||
static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
|
||||
static uint opt_count_iterations= 0, my_end_arg;
|
||||
@ -102,9 +102,12 @@ enum commands {
|
||||
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
|
||||
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
|
||||
ADMIN_START_ALL_SLAVES, ADMIN_STOP_ALL_SLAVES,
|
||||
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD, ADMIN_FLUSH_SLOW_LOG,
|
||||
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD, ADMIN_FLUSH_BINARY_LOG,
|
||||
ADMIN_FLUSH_ENGINE_LOG, ADMIN_FLUSH_ERROR_LOG, ADMIN_FLUSH_GENERAL_LOG,
|
||||
ADMIN_FLUSH_RELAY_LOG, ADMIN_FLUSH_SLOW_LOG,
|
||||
ADMIN_FLUSH_TABLE_STATISTICS, ADMIN_FLUSH_INDEX_STATISTICS,
|
||||
ADMIN_FLUSH_USER_STATISTICS, ADMIN_FLUSH_CLIENT_STATISTICS,
|
||||
ADMIN_FLUSH_USER_RESOURCES,
|
||||
ADMIN_FLUSH_ALL_STATUS, ADMIN_FLUSH_ALL_STATISTICS
|
||||
};
|
||||
static const char *command_names[]= {
|
||||
@ -116,9 +119,10 @@ static const char *command_names[]= {
|
||||
"ping", "extended-status", "flush-status",
|
||||
"flush-privileges", "start-slave", "stop-slave",
|
||||
"start-all-slaves", "stop-all-slaves",
|
||||
"flush-threads", "old-password", "flush-slow-log",
|
||||
"flush-threads", "old-password", "flush-binary-log", "flush-engine-log",
|
||||
"flush-error-log", "flush-general-log", "flush-relay-log", "flush-slow-log",
|
||||
"flush-table-statistics", "flush-index-statistics",
|
||||
"flush-user-statistics", "flush-client-statistics",
|
||||
"flush-user-statistics", "flush-client-statistics", "flush-user-resources",
|
||||
"flush-all-status", "flush-all-statistics",
|
||||
NullS
|
||||
};
|
||||
@ -160,6 +164,9 @@ static struct my_option my_long_options[] =
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"local", 'l', "Local command, don't write to binlog.",
|
||||
&opt_local, &opt_local, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
|
||||
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"password", 'p',
|
||||
@ -617,6 +624,18 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
*/
|
||||
|
||||
struct my_rnd_struct rand_st;
|
||||
char buff[FN_REFLEN + 20];
|
||||
|
||||
if (opt_local)
|
||||
{
|
||||
sprintf(buff, "set local sql_log_bin=0");
|
||||
if (mysql_query(mysql, buff))
|
||||
{
|
||||
my_printf_error(0, "SET LOCAL SQL_LOG_BIN=0 failed; error: '%-.200s'",
|
||||
error_flags, mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
for (; argc > 0 ; argv++,argc--)
|
||||
{
|
||||
@ -624,7 +643,6 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
switch ((command= find_type(argv[0],&command_typelib,FIND_TYPE_BASIC))) {
|
||||
case ADMIN_CREATE:
|
||||
{
|
||||
char buff[FN_REFLEN+20];
|
||||
if (argc < 2)
|
||||
{
|
||||
my_printf_error(0, "Too few arguments to create", error_flags);
|
||||
@ -902,6 +920,56 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_BINARY_LOG:
|
||||
{
|
||||
if (mysql_query(mysql, "flush binary logs"))
|
||||
{
|
||||
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||
mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_ENGINE_LOG:
|
||||
{
|
||||
if (mysql_query(mysql,"flush engine logs"))
|
||||
{
|
||||
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||
mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_ERROR_LOG:
|
||||
{
|
||||
if (mysql_query(mysql, "flush error logs"))
|
||||
{
|
||||
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||
mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_GENERAL_LOG:
|
||||
{
|
||||
if (mysql_query(mysql, "flush general logs"))
|
||||
{
|
||||
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||
mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_RELAY_LOG:
|
||||
{
|
||||
if (mysql_query(mysql, "flush relay logs"))
|
||||
{
|
||||
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||
mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_SLOW_LOG:
|
||||
{
|
||||
if (mysql_query(mysql,"flush slow logs"))
|
||||
@ -972,6 +1040,16 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_USER_RESOURCES:
|
||||
{
|
||||
if (mysql_query(mysql, "flush user_resources"))
|
||||
{
|
||||
my_printf_error(0, "flush failed; error: '%s'", error_flags,
|
||||
mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ADMIN_FLUSH_CLIENT_STATISTICS:
|
||||
{
|
||||
if (mysql_query(mysql,"flush client_statistics"))
|
||||
@ -1295,12 +1373,18 @@ static void usage(void)
|
||||
flush-index-statistics Flush index statistics\n\
|
||||
flush-logs Flush all logs\n\
|
||||
flush-privileges Reload grant tables (same as reload)\n\
|
||||
flush-binary-log Flush binary log\n\
|
||||
flush-engine-log Flush engine log(s)\n\
|
||||
flush-error-log Flush error log\n\
|
||||
flush-general-log Flush general log\n\
|
||||
flush-relay-log Flush relay log\n\
|
||||
flush-slow-log Flush slow query log\n\
|
||||
flush-status Clear status variables\n\
|
||||
flush-status Clear status variables\n\
|
||||
flush-table-statistics Clear table statistics\n\
|
||||
flush-tables Flush all tables\n\
|
||||
flush-threads Flush the thread cache\n\
|
||||
flush-user-statistics Flush user statistics\n\
|
||||
flush-user-resources Flush user resources\n\
|
||||
kill id,id,... Kill mysql threads");
|
||||
#if MYSQL_VERSION_ID >= 32200
|
||||
puts("\
|
||||
|
@ -106,7 +106,7 @@ static const char* sock= 0;
|
||||
static char *opt_plugindir= 0, *opt_default_auth= 0;
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
static char *shared_memory_base_name= 0;
|
||||
static const char *shared_memory_base_name= 0;
|
||||
#endif
|
||||
static char* user = 0;
|
||||
static char* pass = 0;
|
||||
|
@ -698,8 +698,9 @@ static void write_header(FILE *sql_file, char *db_name)
|
||||
"-- MySQL dump %s Distrib %s, for %s (%s)\n--\n",
|
||||
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
|
||||
MACHINE_TYPE);
|
||||
print_comment(sql_file, 0, "-- Host: %s Database: %s\n",
|
||||
fix_for_comment(current_host ? current_host : "localhost"),
|
||||
print_comment(sql_file, 0, "-- Host: %s ",
|
||||
fix_for_comment(current_host ? current_host : "localhost"));
|
||||
print_comment(sql_file, 0, "Database: %s\n",
|
||||
fix_for_comment(db_name ? db_name : ""));
|
||||
print_comment(sql_file, 0,
|
||||
"-- ------------------------------------------------------\n"
|
||||
|
@ -3341,6 +3341,8 @@ void do_exec(struct st_command *command)
|
||||
DBUG_ENTER("do_exec");
|
||||
DBUG_PRINT("enter", ("cmd: '%s'", cmd));
|
||||
|
||||
var_set_int("$sys_errno",0);
|
||||
|
||||
/* Skip leading space */
|
||||
while (*cmd && my_isspace(charset_info, *cmd))
|
||||
cmd++;
|
||||
@ -3457,6 +3459,7 @@ void do_exec(struct st_command *command)
|
||||
report_or_die("command \"%s\" failed with wrong error: %d",
|
||||
command->first_argument, status);
|
||||
}
|
||||
var_set_int("$sys_errno",status);
|
||||
}
|
||||
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
|
||||
command->expected_errors.err[0].code.errnum != 0)
|
||||
|
@ -485,7 +485,6 @@
|
||||
#cmakedefine _LARGE_FILES 1
|
||||
#cmakedefine _LARGEFILE_SOURCE 1
|
||||
#cmakedefine _LARGEFILE64_SOURCE 1
|
||||
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
|
||||
|
||||
#cmakedefine TIME_WITH_SYS_TIME 1
|
||||
|
||||
|
@ -14,7 +14,8 @@
|
||||
|
||||
if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then
|
||||
# If this fails, check debian.conf!
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf flush-logs
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
|
||||
flush-engine-log flush-general-log flush-slow-log
|
||||
fi
|
||||
endscript
|
||||
}
|
||||
|
@ -774,7 +774,6 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
|
||||
const char* path)
|
||||
{
|
||||
int ret = SSL_FAILURE;
|
||||
const int HALF_PATH = 128;
|
||||
|
||||
if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);
|
||||
|
||||
|
@ -1084,10 +1084,9 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */
|
||||
static inline char *dlerror(void)
|
||||
{
|
||||
static char win_errormsg[2048];
|
||||
if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, GetLastError(), 0, win_errormsg, 2048, NULL))
|
||||
return win_errormsg;
|
||||
return "";
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, GetLastError(), 0, win_errormsg, 2048, NULL);
|
||||
return win_errormsg;
|
||||
}
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_DLERROR 1
|
||||
|
@ -64,9 +64,9 @@ typedef struct my_aio_result {
|
||||
#define MY_FAE 8 /* Fatal if any error */
|
||||
#define MY_WME 16 /* Write message on error */
|
||||
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
|
||||
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
|
||||
#define MY_UNUSED 64 /* Unused (was support for RAID) */
|
||||
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
|
||||
#define MY_IGNORE_BADFD 32 /* my_sync(): ignore 'bad descriptor' errors */
|
||||
#define MY_NOSYMLINKS 512 /* my_open(): don't follow symlinks */
|
||||
#define MY_FULL_IO 512 /* my_read(): loop intil I/O is complete */
|
||||
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
|
||||
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
|
||||
#define MY_COPYTIME 64 /* my_redel() copys time */
|
||||
@ -253,7 +253,7 @@ extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
||||
extern ulong my_file_total_opened;
|
||||
extern ulong my_sync_count;
|
||||
extern uint mysys_usage_id;
|
||||
extern my_bool my_init_done;
|
||||
extern my_bool my_init_done, my_thr_key_mysys_exists;
|
||||
extern my_bool my_assert_on_error;
|
||||
extern myf my_global_flags; /* Set to MY_WME for more error messages */
|
||||
/* Point to current my_message() */
|
||||
@ -567,6 +567,7 @@ my_off_t my_b_safe_tell(IO_CACHE* info); /* picks the correct tell() */
|
||||
typedef uint32 ha_checksum;
|
||||
extern ulong my_crc_dbug_check;
|
||||
|
||||
extern int (*mysys_test_invalid_symlink)(const char *filename);
|
||||
#include <my_alloc.h>
|
||||
|
||||
/* Prototypes for mysys and my_func functions */
|
||||
@ -594,9 +595,11 @@ extern int my_realpath(char *to, const char *filename, myf MyFlags);
|
||||
extern File my_create_with_symlink(const char *linkname, const char *filename,
|
||||
int createflags, int access_flags,
|
||||
myf MyFlags);
|
||||
extern int my_delete_with_symlink(const char *name, myf MyFlags);
|
||||
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
|
||||
extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
|
||||
extern int my_handler_delete_with_symlink(PSI_file_key key, const char *name,
|
||||
const char *ext, myf sync_dir);
|
||||
|
||||
extern size_t my_read(File Filedes,uchar *Buffer,size_t Count,myf MyFlags);
|
||||
extern size_t my_pread(File Filedes,uchar *Buffer,size_t Count,my_off_t offset,
|
||||
myf MyFlags);
|
||||
|
@ -441,20 +441,6 @@
|
||||
inline_mysql_file_create_with_symlink(P1, P2, P3, P4, P5)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_file_delete_with_symlink(K, P1, P2)
|
||||
Instrumented delete with symbolic link.
|
||||
@c mysql_file_delete_with_symlink is a replacement
|
||||
for @c my_delete_with_symlink.
|
||||
*/
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
#define mysql_file_delete_with_symlink(K, P1, P2) \
|
||||
inline_mysql_file_delete_with_symlink(K, __FILE__, __LINE__, P1, P2)
|
||||
#else
|
||||
#define mysql_file_delete_with_symlink(K, P1, P2) \
|
||||
inline_mysql_file_delete_with_symlink(P1, P2)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_file_rename_with_symlink(K, P1, P2, P3)
|
||||
Instrumented rename with symbolic link.
|
||||
@ -1337,31 +1323,6 @@ inline_mysql_file_create_with_symlink(
|
||||
return file;
|
||||
}
|
||||
|
||||
static inline int
|
||||
inline_mysql_file_delete_with_symlink(
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
PSI_file_key key, const char *src_file, uint src_line,
|
||||
#endif
|
||||
const char *name, myf flags)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||
struct PSI_file_locker *locker;
|
||||
PSI_file_locker_state state;
|
||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||
(&state, key, PSI_FILE_DELETE, name, &locker);
|
||||
if (likely(locker != NULL))
|
||||
{
|
||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||
result= my_delete_with_symlink(name, flags);
|
||||
PSI_FILE_CALL(end_file_close_wait)(locker, result);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
result= my_delete_with_symlink(name, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int
|
||||
inline_mysql_file_rename_with_symlink(
|
||||
|
@ -417,7 +417,7 @@ enum PSI_file_operation
|
||||
PSI_FILE_FSTAT= 12,
|
||||
/** File chsize, as in @c my_chsize(). */
|
||||
PSI_FILE_CHSIZE= 13,
|
||||
/** File delete, such as @c my_delete() or @c my_delete_with_symlink(). */
|
||||
/** File delete, such as @c my_delete() or @c my_handler_delete_with_symlink(). */
|
||||
PSI_FILE_DELETE= 14,
|
||||
/** File rename, such as @c my_rename() or @c my_rename_with_symlink(). */
|
||||
PSI_FILE_RENAME= 15,
|
||||
|
@ -816,6 +816,18 @@ Connect to the MariaDB server on the given host\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqladmin: local option
|
||||
.\" local option: mysqladmin
|
||||
\fB\-\-local\fR,
|
||||
\fB\-l\fR
|
||||
.sp
|
||||
Suppress the SQL command(s) from being written to the binary log by enabled sql_log_bin=0 for the session\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.\" mysqladmin: no-beep option
|
||||
.\" no-beep option: mysqladmin
|
||||
\fB\-\-no\-beep\fR,
|
||||
|
27
mysql-test/include/gap_lock_error_all.inc
Normal file
27
mysql-test/include/gap_lock_error_all.inc
Normal file
@ -0,0 +1,27 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/gap_lock_error_init.inc
|
||||
|
||||
let $select_lock=for update;
|
||||
let $autocommit = 0;
|
||||
--source include/gap_lock_error_select.inc
|
||||
let $autocommit = 1;
|
||||
--source include/gap_lock_error_select.inc
|
||||
|
||||
let $select_lock=lock in share mode;
|
||||
let $autocommit = 0;
|
||||
--source include/gap_lock_error_select.inc
|
||||
let $autocommit = 1;
|
||||
--source include/gap_lock_error_select.inc
|
||||
|
||||
let $select_lock=;
|
||||
let $autocommit = 0;
|
||||
--source include/gap_lock_error_select.inc
|
||||
let $autocommit = 1;
|
||||
--source include/gap_lock_error_select.inc
|
||||
|
||||
let $autocommit = 0;
|
||||
--source include/gap_lock_error_update.inc
|
||||
let $autocommit = 1;
|
||||
--source include/gap_lock_error_update.inc
|
||||
|
||||
--source include/gap_lock_error_cleanup.inc
|
1
mysql-test/include/gap_lock_error_cleanup.inc
Normal file
1
mysql-test/include/gap_lock_error_cleanup.inc
Normal file
@ -0,0 +1 @@
|
||||
drop table gap1, gap2, gap3, gap4;
|
24
mysql-test/include/gap_lock_error_init.inc
Normal file
24
mysql-test/include/gap_lock_error_init.inc
Normal file
@ -0,0 +1,24 @@
|
||||
eval CREATE TABLE gap1 (id1 INT, id2 INT, id3 INT, c1 INT, value INT,
|
||||
PRIMARY KEY (id1, id2, id3),
|
||||
INDEX i (c1)) ENGINE=$engine;
|
||||
CREATE TABLE gap2 like gap1;
|
||||
eval CREATE TABLE gap3 (id INT, value INT,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY ui(value)) ENGINE=$engine;
|
||||
eval CREATE TABLE gap4 (id INT, value INT,
|
||||
PRIMARY KEY (id)) ENGINE=$engine
|
||||
PARTITION BY HASH(id) PARTITIONS 2;
|
||||
--disable_query_log
|
||||
let $max = 1000;
|
||||
let $i = 1;
|
||||
while ($i <= $max) {
|
||||
eval INSERT INTO gap1 (id1, id2, id3, c1, value)
|
||||
VALUES ($i div 2, $i div 10, $i, $i, $i);
|
||||
eval INSERT INTO gap2 (id1, id2, id3, c1, value)
|
||||
VALUES ($i div 2, $i div 10, $i, $i, $i);
|
||||
inc $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
insert into gap3 values (1,1), (2,2),(3,3),(4,4),(5,5);
|
||||
insert into gap4 values (1,1), (2,2),(3,3),(4,4),(5,5);
|
89
mysql-test/include/gap_lock_error_select.inc
Normal file
89
mysql-test/include/gap_lock_error_select.inc
Normal file
@ -0,0 +1,89 @@
|
||||
eval set session autocommit=$autocommit;
|
||||
let $is_gaplock_target = `SELECT @@autocommit = 0 && '$select_lock' != '' && '$expect_gap_lock_errors' = 1`;
|
||||
|
||||
if ($is_gaplock_target)
|
||||
{
|
||||
# rnd_init
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 limit 1 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where value != 100 limit 1 $select_lock;
|
||||
# index_read_map
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where id1=1 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where id1=1 and id2= 1 $select_lock;
|
||||
# read_range_first
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where id1=1 and id2= 1 and id3 != 1 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where id1=1 and id2= 1 and id3
|
||||
between 1 and 3 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where id1=1 and id2= 1 order by id3 asc
|
||||
limit 1 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 where id1=1 and id2= 1 order by id3 desc
|
||||
limit 1 $select_lock;
|
||||
# index_first
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 order by id1 asc limit 1 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 order by id1 asc, id2 asc, id3 asc limit 1 $select_lock;
|
||||
# index_last
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 order by id1 desc limit 1 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 order by id1 desc, id2 desc, id3 desc
|
||||
limit 1 $select_lock;
|
||||
# secondary index lookup
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap1 force index(i) where c1=1 $select_lock;
|
||||
# unique index lookup, ensure no gap lock errors as this is effectively a
|
||||
# single point select that does not lock ranges or gaps of keys
|
||||
eval select * from gap3 force index(ui) where value=1 $select_lock;
|
||||
# primary key lookup, ensure no gap lock errors as these are effectively
|
||||
# single point selects that do not lock ranges or gaps of keys
|
||||
eval select * from gap1 where id1=1 and id2=1 and id3=1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2=1 and id3 in (1, 2, 3) $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2=1 and id3=1 and value=1
|
||||
order by c1 $select_lock;
|
||||
eval select * from gap3 where id=1 $select_lock;
|
||||
eval select * from gap4 where id=1 $select_lock;
|
||||
eval select * from gap4 where id in (1, 2, 3) $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap4 $select_lock;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
eval select * from gap4 where id between 3 and 7 $select_lock;
|
||||
}
|
||||
|
||||
if (!$is_gaplock_target)
|
||||
{
|
||||
eval select * from gap1 limit 1 $select_lock;
|
||||
eval select * from gap1 where value != 100 limit 1 $select_lock;
|
||||
eval select * from gap1 where id1=1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2= 1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2= 1 and id3 != 1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2= 1 and id3
|
||||
between 1 and 3 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2= 1 order by id3 asc
|
||||
limit 1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2= 1 order by id3 desc
|
||||
limit 1 $select_lock;
|
||||
eval select * from gap1 order by id1 asc limit 1 $select_lock;
|
||||
eval select * from gap1 order by id1 asc, id2 asc, id3 asc limit 1 $select_lock;
|
||||
eval select * from gap1 order by id1 desc limit 1 $select_lock;
|
||||
eval select * from gap1 order by id1 desc, id2 desc, id3 desc
|
||||
limit 1 $select_lock;
|
||||
eval select * from gap1 force index(i) where c1=1 $select_lock;
|
||||
eval select * from gap3 force index(ui) where value=1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2=1 and id3=1 $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2=1 and id3 in (1, 2, 3) $select_lock;
|
||||
eval select * from gap1 where id1=1 and id2=1 and id3=1 and value=1
|
||||
order by c1 $select_lock;
|
||||
eval select * from gap3 where id=1 $select_lock;
|
||||
eval select * from gap4 where id=1 $select_lock;
|
||||
eval select * from gap4 where id in (1, 2, 3) $select_lock;
|
||||
eval select * from gap4 $select_lock;
|
||||
eval select * from gap4 where id between 3 and 7 $select_lock;
|
||||
}
|
91
mysql-test/include/gap_lock_error_update.inc
Normal file
91
mysql-test/include/gap_lock_error_update.inc
Normal file
@ -0,0 +1,91 @@
|
||||
eval set session autocommit=$autocommit;
|
||||
let $is_gaplock_target = `SELECT @@autocommit = 0 && '$expect_gap_lock_errors' = 1`;
|
||||
|
||||
if ($is_gaplock_target)
|
||||
{
|
||||
## single-table insert,update,delete
|
||||
insert into gap1 (id1, id2, id3) values (-1,-1,-1);
|
||||
insert into gap1 (id1, id2, id3) values (-1,-1,-1)
|
||||
on duplicate key update value=100;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
update gap1 set value=100 where id1=1;
|
||||
update gap1 set value=100 where id1=1 and id2=1 and id3=1;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
delete from gap1 where id1=2;
|
||||
delete from gap1 where id1=-1 and id2=-1 and id3=-1;
|
||||
commit;
|
||||
|
||||
## multi-table statements (preventing all gap locks with autocommit)
|
||||
# insert into select
|
||||
--error ER_UNKNOWN_ERROR
|
||||
insert into gap2 select * from gap1;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
insert into gap2 select * from gap1 where id1=1;
|
||||
insert into gap2 select * from gap1 where id1=1 and id2=1 and id3=1;
|
||||
|
||||
# create table select
|
||||
create table t4 select * from gap1 where id1=1 and id2=1 and id3=1;
|
||||
drop table t4;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
create table t4 select * from gap1;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
create table t4 select * from gap1 where id1=1;
|
||||
|
||||
# update join
|
||||
update gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 set gap1.value=100 where gap2.id1=3
|
||||
and gap2.id2=3 and gap2.id3=3;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
update gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 set gap1.value=100 where gap2.id1=3;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
update gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 join gap3 on gap1.id1=gap3.id
|
||||
set gap1.value=100 where gap2.id1=3;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
update gap1 set gap1.value= (select count(*) from gap2);
|
||||
|
||||
# delete join
|
||||
delete gap1 from gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 where gap2.id1=3
|
||||
and gap2.id2=3 and gap2.id3=3;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
delete gap1 from gap1 join gap2 on gap1.id1 and gap1.id2=gap2.id2 where gap2.id1=3;
|
||||
|
||||
# select join / self join
|
||||
--error ER_UNKNOWN_ERROR
|
||||
select * from gap1, gap2 limit 1 for update;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
select * from gap1 a, gap1 b limit 1 for update;
|
||||
|
||||
# unique secondary key
|
||||
create table u1(
|
||||
c1 int,
|
||||
c2 int,
|
||||
c3 int,
|
||||
c4 int,
|
||||
primary key (c1, c2, c3),
|
||||
unique key (c3, c1)
|
||||
);
|
||||
begin;
|
||||
insert into u1 values (1,1,1,1);
|
||||
commit;
|
||||
begin;
|
||||
insert into u1 values (1,2,1,1) on duplicate key update c4=10;
|
||||
commit;
|
||||
begin;
|
||||
select * from u1 where c3=1 and c1 = 1 for update;
|
||||
--error ER_UNKNOWN_ERROR
|
||||
select * from u1 where c3=1 for update;
|
||||
commit;
|
||||
drop table u1;
|
||||
}
|
||||
|
||||
if (!$is_gaplock_target)
|
||||
{
|
||||
# autocommit doesn't prevent single table operations
|
||||
insert into gap1 (id1, id2, id3) values (-1,-1,-1);
|
||||
insert into gap1 (id1, id2, id3) values (-1,-1,-1)
|
||||
on duplicate key update value=100;
|
||||
update gap1 set value=100 where id1=1;
|
||||
update gap1 set value=100 where id1=1 and id2=1 and id3=1;
|
||||
delete from gap1 where id1=2;
|
||||
delete from gap1 where id1=-1 and id2=-1 and id3=-1;
|
||||
commit;
|
||||
}
|
19
mysql-test/include/kill_and_restart_mysqld.inc
Normal file
19
mysql-test/include/kill_and_restart_mysqld.inc
Normal file
@ -0,0 +1,19 @@
|
||||
--let $_server_id= `SELECT @@server_id`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
|
||||
if ($restart_parameters)
|
||||
{
|
||||
--echo # Kill and restart: $restart_parameters
|
||||
--exec echo "restart: $restart_parameters" > $_expect_file_name
|
||||
}
|
||||
if (!$restart_parameters)
|
||||
{
|
||||
--echo # Kill and restart
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
}
|
||||
|
||||
--shutdown_server 0
|
||||
--source include/wait_until_disconnected.inc
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
--disable_reconnect
|
7
mysql-test/include/kill_mysqld.inc
Normal file
7
mysql-test/include/kill_mysqld.inc
Normal file
@ -0,0 +1,7 @@
|
||||
--let $_server_id= `SELECT @@server_id`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
|
||||
--echo # Kill the server
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
--shutdown_server 0
|
||||
--source include/wait_until_disconnected.inc
|
@ -293,6 +293,7 @@ CREATE DEFINER=root@localhost
|
||||
PROCEDURE add_suppression(pattern VARCHAR(255))
|
||||
BEGIN
|
||||
INSERT INTO test_suppressions (pattern) VALUES (pattern);
|
||||
FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions;
|
||||
END
|
||||
*/||
|
||||
|
||||
|
@ -35,7 +35,14 @@ if ($shutdown_timeout == 0)
|
||||
shutdown_server $server_shutdown_timeout;
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
if ($restart_parameters)
|
||||
{
|
||||
--exec echo "restart: $restart_parameters" > $_expect_file_name
|
||||
}
|
||||
if (!$restart_parameters)
|
||||
{
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
}
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
@ -60,25 +60,36 @@
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
|
||||
die "SEARCH_FILE not set" unless $ENV{'SEARCH_FILE'};
|
||||
my @search_files= glob($ENV{'SEARCH_FILE'});
|
||||
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
|
||||
my $search_range= $ENV{'SEARCH_RANGE'};
|
||||
my $file_content;
|
||||
my $content;
|
||||
$search_range= 50000 unless $search_range =~ /-?[0-9]+/;
|
||||
open(FILE, '<', $search_file) or die("Unable to open '$search_file': $!\n");
|
||||
if ($search_range >= 0) {
|
||||
read(FILE, $file_content, $search_range, 0);
|
||||
} else {
|
||||
my $size= -s $search_file;
|
||||
$search_range = -$size if $size > -$search_range;
|
||||
seek(FILE, $search_range, 2);
|
||||
read(FILE, $file_content, -$search_range, 0);
|
||||
foreach my $search_file (@search_files) {
|
||||
open(FILE, '<', $search_file) or die("Unable to open '$search_file': $!\n");
|
||||
my $file_content;
|
||||
if ($search_range >= 0) {
|
||||
read(FILE, $file_content, $search_range, 0);
|
||||
} else {
|
||||
my $size= -s $search_file;
|
||||
$search_range = -$size if $size > -$search_range;
|
||||
seek(FILE, $search_range, 2);
|
||||
read(FILE, $file_content, -$search_range, 0);
|
||||
}
|
||||
close(FILE);
|
||||
$content.= $file_content;
|
||||
}
|
||||
close(FILE);
|
||||
$search_file =~ s{^.*?([^/\\]+)$}{$1};
|
||||
if ($file_content =~ m{$search_pattern}) {
|
||||
print "FOUND /$search_pattern/ in $search_file\n"
|
||||
$ENV{'SEARCH_FILE'} =~ s{^.*?([^/\\]+)$}{$1};
|
||||
if ($content =~ m{$search_pattern}) {
|
||||
die "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
if $ENV{SEARCH_ABORT} eq 'FOUND';
|
||||
print "FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
unless defined $ENV{SEARCH_ABORT};
|
||||
} else {
|
||||
print "NOT FOUND /$search_pattern/ in $search_file\n"
|
||||
die "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
if $ENV{SEARCH_ABORT} eq 'NOT FOUND';
|
||||
print "NOT FOUND /$search_pattern/ in $ENV{'SEARCH_FILE'}\n"
|
||||
unless defined $ENV{SEARCH_ABORT};
|
||||
}
|
||||
EOF
|
||||
|
@ -1,7 +1,14 @@
|
||||
# Include this script only after using shutdown_mysqld.inc
|
||||
# where $_expect_file_name was initialized.
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
if ($restart_parameters)
|
||||
{
|
||||
--exec echo "restart: $restart_parameters" > $_expect_file_name
|
||||
}
|
||||
if (!$restart_parameters)
|
||||
{
|
||||
--exec echo "restart" > $_expect_file_name
|
||||
}
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
@ -53,9 +53,19 @@ sub _verify_binpath {
|
||||
sub _gdb {
|
||||
my ($core_name)= @_;
|
||||
|
||||
print "\nTrying 'gdb' to get a backtrace\n";
|
||||
# Check that gdb exists
|
||||
`gdb --version`;
|
||||
if ($?) {
|
||||
print "gdb not found, cannot get the stack trace\n";
|
||||
return;
|
||||
}
|
||||
|
||||
return unless -f $core_name;
|
||||
if (-f $core_name) {
|
||||
print "\nTrying 'gdb' to get a backtrace from coredump $core_name\n";
|
||||
} else {
|
||||
print "\nCoredump $core_name does not exist, cannot run 'gdb'\n";
|
||||
return;
|
||||
}
|
||||
|
||||
# Find out name of binary that generated core
|
||||
`gdb -c '$core_name' --batch 2>&1` =~
|
||||
|
@ -1059,7 +1059,7 @@ sub print_global_resfile {
|
||||
resfile_global("gprof", $opt_gprof ? 1 : 0);
|
||||
resfile_global("valgrind", $opt_valgrind ? 1 : 0);
|
||||
resfile_global("callgrind", $opt_callgrind ? 1 : 0);
|
||||
resfile_global("mem", $opt_mem ? 1 : 0);
|
||||
resfile_global("mem", $opt_mem);
|
||||
resfile_global("tmpdir", $opt_tmpdir);
|
||||
resfile_global("vardir", $opt_vardir);
|
||||
resfile_global("fast", $opt_fast ? 1 : 0);
|
||||
@ -1458,12 +1458,14 @@ sub command_line_setup {
|
||||
|
||||
# Search through list of locations that are known
|
||||
# to be "fast disks" to find a suitable location
|
||||
# Use --mem=<dir> as first location to look.
|
||||
my @tmpfs_locations= ($opt_mem,"/run/shm", "/dev/shm", "/tmp");
|
||||
my @tmpfs_locations= ("/run/shm", "/dev/shm", "/tmp");
|
||||
|
||||
# Use $ENV{'MTR_MEM'} as first location to look (if defined)
|
||||
unshift(@tmpfs_locations, $ENV{'MTR_MEM'}) if defined $ENV{'MTR_MEM'};
|
||||
|
||||
foreach my $fs (@tmpfs_locations)
|
||||
{
|
||||
if ( -d $fs )
|
||||
if ( -d $fs && ! -l $fs )
|
||||
{
|
||||
my $template= "var_${opt_build_thread}_XXXX";
|
||||
$opt_mem= tempdir( $template, DIR => $fs, CLEANUP => 0);
|
||||
@ -4798,6 +4800,7 @@ sub extract_warning_lines ($$) {
|
||||
qr/InnoDB: Error: table `test`.`t[12]` .*does not exist in the InnoDB internal/,
|
||||
qr/InnoDB: Warning: Setting innodb_use_sys_malloc/,
|
||||
qr/InnoDB: Warning: a long semaphore wait:/,
|
||||
qr/InnoDB: Warning: Writer thread is waiting this semaphore:/,
|
||||
qr/Slave: Unknown table 't1' .* 1051/,
|
||||
qr/Slave SQL:.*(Internal MariaDB error code: [[:digit:]]+|Query:.*)/,
|
||||
qr/slave SQL thread aborted/,
|
||||
@ -6433,9 +6436,9 @@ Options to control directories to use
|
||||
vardir=DIR The directory where files generated from the test run
|
||||
is stored (default: ./var). Specifying a ramdisk or
|
||||
tmpfs will speed up tests.
|
||||
mem Run testsuite in "memory" using tmpfs or ramdisk
|
||||
Attempts to find a suitable location
|
||||
using a builtin list of standard locations
|
||||
mem[=DIR] Run testsuite in "memory" using tmpfs or ramdisk
|
||||
Attempts to use DIR first if specified else
|
||||
uses a builtin list of standard locations
|
||||
for tmpfs (/run/shm, /dev/shm, /tmp)
|
||||
The option can also be set using environment
|
||||
variable MTR_MEM=[DIR]
|
||||
|
@ -2091,3 +2091,24 @@ Warnings:
|
||||
Note 1061 Duplicate key name 'id1'
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-6390 CONVERT TO CHARACTER SET utf8 doesn't change DEFAULT CHARSET.
|
||||
#
|
||||
CREATE TABLE t1 (id int(11) NOT NULL, a int(11) NOT NULL, b int(11))
|
||||
ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`a` int(11) NOT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
|
@ -1,15 +1,17 @@
|
||||
SHOW CONTRIBUTORS;
|
||||
Name Location Comment
|
||||
Booking.com http://www.booking.com Founding member, Platinum Sponsor of the MariaDB Foundation
|
||||
Booking.com https://www.booking.com Founding member, Platinum Sponsor of the MariaDB Foundation
|
||||
Alibaba Cloud https://intl.aliyun.com Platinum Sponsor of the MariaDB Foundation
|
||||
MariaDB Corporation https://mariadb.com Founding member, Gold Sponsor of the MariaDB Foundation
|
||||
Visma http://visma.com Gold Sponsor of the MariaDB Foundation
|
||||
DBS http://dbs.com Gold Sponsor of the MariaDB Foundation
|
||||
Visma https://visma.com Gold Sponsor of the MariaDB Foundation
|
||||
DBS https://dbs.com Gold Sponsor of the MariaDB Foundation
|
||||
Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation
|
||||
Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation
|
||||
Auttomattic https://automattic.com Bronze Sponsor of the MariaDB Foundation
|
||||
Verkkokauppa.com https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation
|
||||
Virtuozzo https://virtuozzo.com/ Bronze Sponsor of the MariaDB Foundation
|
||||
Tencent Game DBA http://tencentdba.com/about/ Bronze Sponsor of the MariaDB Foundation
|
||||
Verkkokauppa.com https://www.verkkokauppa.com Bronze Sponsor of the MariaDB Foundation
|
||||
Virtuozzo https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation
|
||||
Tencent Game DBA http://tencentdba.com/about Bronze Sponsor of the MariaDB Foundation
|
||||
Tencent TDSQL http://tdsql.org Bronze Sponsor of the MariaDB Foundation
|
||||
Google USA Sponsoring encryption, parallel replication and GTID
|
||||
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
|
||||
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction
|
||||
|
@ -1014,4 +1014,27 @@ David Yes 210
|
||||
Edward Yes 150
|
||||
DROP TABLE example1463;
|
||||
set sql_mode= @save_sql_mode;
|
||||
#
|
||||
# MDEV-9028: SELECT DISTINCT constant column of derived table
|
||||
# used as the second operand of LEFT JOIN
|
||||
#
|
||||
create table t1 (id int, data varchar(255));
|
||||
insert into t1 values (1,'yes'),(2,'yes');
|
||||
select distinct t1.id, tt.id, tt.data
|
||||
from t1
|
||||
left join
|
||||
(select t1.id, 'yes' as data from t1) as tt
|
||||
on t1.id = tt.id;
|
||||
id id data
|
||||
1 1 yes
|
||||
2 2 yes
|
||||
select distinct t1.id, tt.id, tt.data
|
||||
from t1
|
||||
left join
|
||||
(select t1.id, 'yes' as data from t1 where id > 1) as tt
|
||||
on t1.id = tt.id;
|
||||
id id data
|
||||
2 2 yes
|
||||
1 NULL NULL
|
||||
drop table t1;
|
||||
# end of 5.5
|
||||
|
@ -2526,6 +2526,54 @@ DROP USER mysqltest_u1@localhost;
|
||||
|
||||
# End of Bug#38347.
|
||||
|
||||
#
|
||||
# BUG#11759114 - '51401: GRANT TREATS NONEXISTENT FUNCTIONS/PRIVILEGES
|
||||
# DIFFERENTLY'.
|
||||
#
|
||||
drop database if exists mysqltest_db1;
|
||||
create database mysqltest_db1;
|
||||
create user mysqltest_u1;
|
||||
# Both GRANT statements below should fail with the same error.
|
||||
grant execute on function mysqltest_db1.f1 to mysqltest_u1;
|
||||
ERROR 42000: FUNCTION or PROCEDURE f1 does not exist
|
||||
grant execute on procedure mysqltest_db1.p1 to mysqltest_u1;
|
||||
ERROR 42000: FUNCTION or PROCEDURE p1 does not exist
|
||||
# Let us show that GRANT behaviour for routines is consistent
|
||||
# with GRANT behaviour for tables. Attempt to grant privilege
|
||||
# on non-existent table also results in an error.
|
||||
grant select on mysqltest_db1.t1 to mysqltest_u1;
|
||||
ERROR 42S02: Table 'mysqltest_db1.t1' doesn't exist
|
||||
show grants for mysqltest_u1;
|
||||
Grants for mysqltest_u1@%
|
||||
GRANT USAGE ON *.* TO 'mysqltest_u1'@'%'
|
||||
drop database mysqltest_db1;
|
||||
drop user mysqltest_u1;
|
||||
#
|
||||
# Bug#12766319 - 61865: RENAME USER DOES NOT WORK CORRECTLY -
|
||||
# REQUIRES FLUSH PRIVILEGES
|
||||
#
|
||||
CREATE USER foo@'127.0.0.1';
|
||||
GRANT ALL ON *.* TO foo@'127.0.0.1';
|
||||
# First attempt, should connect successfully
|
||||
SELECT user(), current_user();
|
||||
user() current_user()
|
||||
foo@localhost foo@127.0.0.1
|
||||
# Rename the user
|
||||
RENAME USER foo@'127.0.0.1' to foo@'127.0.0.0/255.0.0.0';
|
||||
# Second attempt, should connect successfully as its valid mask
|
||||
# This was failing without fix
|
||||
SELECT user(), current_user();
|
||||
user() current_user()
|
||||
foo@localhost foo@127.0.0.0/255.0.0.0
|
||||
# Rename the user back to original
|
||||
RENAME USER foo@'127.0.0.0/255.0.0.0' to foo@'127.0.0.1';
|
||||
# Third attempt, should connect successfully
|
||||
SELECT user(), current_user();
|
||||
user() current_user()
|
||||
foo@localhost foo@127.0.0.1
|
||||
# Clean-up
|
||||
DROP USER foo@'127.0.0.1';
|
||||
# End of Bug#12766319
|
||||
#
|
||||
# Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS
|
||||
# DATABASE SECURITY
|
||||
@ -2552,25 +2600,3 @@ ERROR 42000: Access denied for user 'untrusted'@'localhost' to database 'secret'
|
||||
# Connection default
|
||||
DROP USER untrusted@localhost;
|
||||
DROP DATABASE secret;
|
||||
#
|
||||
# BUG#11759114 - '51401: GRANT TREATS NONEXISTENT FUNCTIONS/PRIVILEGES
|
||||
# DIFFERENTLY'.
|
||||
#
|
||||
drop database if exists mysqltest_db1;
|
||||
create database mysqltest_db1;
|
||||
create user mysqltest_u1;
|
||||
# Both GRANT statements below should fail with the same error.
|
||||
grant execute on function mysqltest_db1.f1 to mysqltest_u1;
|
||||
ERROR 42000: FUNCTION or PROCEDURE f1 does not exist
|
||||
grant execute on procedure mysqltest_db1.p1 to mysqltest_u1;
|
||||
ERROR 42000: FUNCTION or PROCEDURE p1 does not exist
|
||||
# Let us show that GRANT behaviour for routines is consistent
|
||||
# with GRANT behaviour for tables. Attempt to grant privilege
|
||||
# on non-existent table also results in an error.
|
||||
grant select on mysqltest_db1.t1 to mysqltest_u1;
|
||||
ERROR 42S02: Table 'mysqltest_db1.t1' doesn't exist
|
||||
show grants for mysqltest_u1;
|
||||
Grants for mysqltest_u1@%
|
||||
GRANT USAGE ON *.* TO 'mysqltest_u1'@'%'
|
||||
drop database mysqltest_db1;
|
||||
drop user mysqltest_u1;
|
||||
|
@ -1870,4 +1870,99 @@ f4
|
||||
NULL
|
||||
NULL
|
||||
DROP TABLE t1,t2,t3,t4,t5;
|
||||
#
|
||||
# MDEV-7992: Nested left joins + 'not exists' optimization
|
||||
#
|
||||
CREATE TABLE t1(
|
||||
K1 INT PRIMARY KEY,
|
||||
Name VARCHAR(15)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1,'T1Row1'), (2,'T1Row2');
|
||||
CREATE TABLE t2(
|
||||
K2 INT PRIMARY KEY,
|
||||
K1r INT,
|
||||
rowTimestamp DATETIME,
|
||||
Event VARCHAR(15)
|
||||
);
|
||||
INSERT INTO t2 VALUES
|
||||
(1, 1, '2015-04-13 10:42:11' ,'T1Row1Event1'),
|
||||
(2, 1, '2015-04-13 10:42:12' ,'T1Row1Event2'),
|
||||
(3, 1, '2015-04-13 10:42:12' ,'T1Row1Event3');
|
||||
SELECT t1a.*, t2a.*,
|
||||
t2i.K2 AS K2B, t2i.K1r AS K1rB,
|
||||
t2i.rowTimestamp AS rowTimestampB, t2i.Event AS EventB
|
||||
FROM
|
||||
t1 t1a JOIN t2 t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
( t1 t1i LEFT JOIN t2 t2i ON t2i.K1r = t1i.K1)
|
||||
ON (t1i.K1 = 1) AND
|
||||
(((t2i.K1r = t1a.K1 AND t2i.rowTimestamp > t2a.rowTimestamp ) OR
|
||||
(t2i.rowTimestamp = t2a.rowTimestamp AND t2i.K2 > t2a.K2))
|
||||
OR (t2i.K2 IS NULL))
|
||||
WHERE
|
||||
t2a.K1r = 1 AND t2i.K2 IS NULL;
|
||||
K1 Name K2 K1r rowTimestamp Event K2B K1rB rowTimestampB EventB
|
||||
1 T1Row1 3 1 2015-04-13 10:42:12 T1Row1Event3 NULL NULL NULL NULL
|
||||
EXPLAIN EXTENDED SELECT t1a.*, t2a.*,
|
||||
t2i.K2 AS K2B, t2i.K1r AS K1rB,
|
||||
t2i.rowTimestamp AS rowTimestampB, t2i.Event AS EventB
|
||||
FROM
|
||||
t1 t1a JOIN t2 t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
( t1 t1i LEFT JOIN t2 t2i ON t2i.K1r = t1i.K1)
|
||||
ON (t1i.K1 = 1) AND
|
||||
(((t2i.K1r = t1a.K1 AND t2i.rowTimestamp > t2a.rowTimestamp ) OR
|
||||
(t2i.rowTimestamp = t2a.rowTimestamp AND t2i.K2 > t2a.K2))
|
||||
OR (t2i.K2 IS NULL))
|
||||
WHERE
|
||||
t2a.K1r = 1 AND t2i.K2 IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1a const PRIMARY PRIMARY 4 const 1 100.00
|
||||
1 SIMPLE t2a ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1i const PRIMARY PRIMARY 4 const 1 100.00 Using index
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 3 100.00 Using where; Not exists
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `K1`,'T1Row1' AS `Name`,`test`.`t2a`.`K2` AS `K2`,`test`.`t2a`.`K1r` AS `K1r`,`test`.`t2a`.`rowTimestamp` AS `rowTimestamp`,`test`.`t2a`.`Event` AS `Event`,`test`.`t2i`.`K2` AS `K2B`,`test`.`t2i`.`K1r` AS `K1rB`,`test`.`t2i`.`rowTimestamp` AS `rowTimestampB`,`test`.`t2i`.`Event` AS `EventB` from `test`.`t1` `t1a` join `test`.`t2` `t2a` left join (`test`.`t1` `t1i` left join `test`.`t2` `t2i` on((`test`.`t2i`.`K1r` = 1))) on(((`test`.`t1i`.`K1` = 1) and (((`test`.`t2i`.`K1r` = 1) and (`test`.`t2i`.`rowTimestamp` > `test`.`t2a`.`rowTimestamp`)) or ((`test`.`t2i`.`rowTimestamp` = `test`.`t2a`.`rowTimestamp`) and (`test`.`t2i`.`K2` > `test`.`t2a`.`K2`)) or isnull(`test`.`t2i`.`K2`)))) where ((`test`.`t2a`.`K1r` = 1) and isnull(`test`.`t2i`.`K2`))
|
||||
CREATE VIEW v1 AS
|
||||
SELECT t2i.*
|
||||
FROM t1 as t1i LEFT JOIN t2 as t2i ON t2i.K1r = t1i.K1
|
||||
WHERE t1i.K1 = 1 ;
|
||||
SELECT
|
||||
t1a.*, t2a.*, t2b.K2 as K2B, t2b.K1r as K1rB,
|
||||
t2b.rowTimestamp as rowTimestampB, t2b.Event as EventB
|
||||
FROM
|
||||
t1 as t1a JOIN t2 as t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
v1 as t2b
|
||||
ON ((t2b.K1r = t1a.K1 AND t2b.rowTimestamp > t2a.rowTimestamp) OR
|
||||
(t2b.rowTimestamp = t2a.rowTimestamp AND t2b.K2 > t2a.K2))
|
||||
OR (t2b.K2 IS NULL)
|
||||
WHERE
|
||||
t1a.K1 = 1 AND
|
||||
t2b.K2 IS NULL;
|
||||
K1 Name K2 K1r rowTimestamp Event K2B K1rB rowTimestampB EventB
|
||||
1 T1Row1 3 1 2015-04-13 10:42:12 T1Row1Event3 NULL NULL NULL NULL
|
||||
EXPLAIN EXTENDED SELECT
|
||||
t1a.*, t2a.*, t2b.K2 as K2B, t2b.K1r as K1rB,
|
||||
t2b.rowTimestamp as rowTimestampB, t2b.Event as EventB
|
||||
FROM
|
||||
t1 as t1a JOIN t2 as t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
v1 as t2b
|
||||
ON ((t2b.K1r = t1a.K1 AND t2b.rowTimestamp > t2a.rowTimestamp) OR
|
||||
(t2b.rowTimestamp = t2a.rowTimestamp AND t2b.K2 > t2a.K2))
|
||||
OR (t2b.K2 IS NULL)
|
||||
WHERE
|
||||
t1a.K1 = 1 AND
|
||||
t2b.K2 IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1a const PRIMARY PRIMARY 4 const 1 100.00
|
||||
1 SIMPLE t2a ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1i const PRIMARY PRIMARY 4 const 1 100.00 Using index
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 3 100.00 Using where; Not exists
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `K1`,'T1Row1' AS `Name`,`t2a`.`K2` AS `K2`,`t2a`.`K1r` AS `K1r`,`t2a`.`rowTimestamp` AS `rowTimestamp`,`t2a`.`Event` AS `Event`,`test`.`t2i`.`K2` AS `K2B`,`test`.`t2i`.`K1r` AS `K1rB`,`test`.`t2i`.`rowTimestamp` AS `rowTimestampB`,`test`.`t2i`.`Event` AS `EventB` from `test`.`t1` `t1a` join `test`.`t2` `t2a` left join (`test`.`t1` `t1i` left join `test`.`t2` `t2i` on((`test`.`t2i`.`K1r` = 1))) on(((`test`.`t1i`.`K1` = 1) and (((`test`.`t2i`.`K1r` = 1) and (`test`.`t2i`.`rowTimestamp` > `t2a`.`rowTimestamp`)) or ((`test`.`t2i`.`rowTimestamp` = `t2a`.`rowTimestamp`) and (`test`.`t2i`.`K2` > `t2a`.`K2`)) or isnull(`test`.`t2i`.`K2`)))) where ((`t2a`.`K1r` = 1) and isnull(`test`.`t2i`.`K2`))
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
set optimizer_search_depth= @tmp_mdev621;
|
||||
|
@ -1881,6 +1881,101 @@ f4
|
||||
NULL
|
||||
NULL
|
||||
DROP TABLE t1,t2,t3,t4,t5;
|
||||
#
|
||||
# MDEV-7992: Nested left joins + 'not exists' optimization
|
||||
#
|
||||
CREATE TABLE t1(
|
||||
K1 INT PRIMARY KEY,
|
||||
Name VARCHAR(15)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1,'T1Row1'), (2,'T1Row2');
|
||||
CREATE TABLE t2(
|
||||
K2 INT PRIMARY KEY,
|
||||
K1r INT,
|
||||
rowTimestamp DATETIME,
|
||||
Event VARCHAR(15)
|
||||
);
|
||||
INSERT INTO t2 VALUES
|
||||
(1, 1, '2015-04-13 10:42:11' ,'T1Row1Event1'),
|
||||
(2, 1, '2015-04-13 10:42:12' ,'T1Row1Event2'),
|
||||
(3, 1, '2015-04-13 10:42:12' ,'T1Row1Event3');
|
||||
SELECT t1a.*, t2a.*,
|
||||
t2i.K2 AS K2B, t2i.K1r AS K1rB,
|
||||
t2i.rowTimestamp AS rowTimestampB, t2i.Event AS EventB
|
||||
FROM
|
||||
t1 t1a JOIN t2 t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
( t1 t1i LEFT JOIN t2 t2i ON t2i.K1r = t1i.K1)
|
||||
ON (t1i.K1 = 1) AND
|
||||
(((t2i.K1r = t1a.K1 AND t2i.rowTimestamp > t2a.rowTimestamp ) OR
|
||||
(t2i.rowTimestamp = t2a.rowTimestamp AND t2i.K2 > t2a.K2))
|
||||
OR (t2i.K2 IS NULL))
|
||||
WHERE
|
||||
t2a.K1r = 1 AND t2i.K2 IS NULL;
|
||||
K1 Name K2 K1r rowTimestamp Event K2B K1rB rowTimestampB EventB
|
||||
1 T1Row1 3 1 2015-04-13 10:42:12 T1Row1Event3 NULL NULL NULL NULL
|
||||
EXPLAIN EXTENDED SELECT t1a.*, t2a.*,
|
||||
t2i.K2 AS K2B, t2i.K1r AS K1rB,
|
||||
t2i.rowTimestamp AS rowTimestampB, t2i.Event AS EventB
|
||||
FROM
|
||||
t1 t1a JOIN t2 t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
( t1 t1i LEFT JOIN t2 t2i ON t2i.K1r = t1i.K1)
|
||||
ON (t1i.K1 = 1) AND
|
||||
(((t2i.K1r = t1a.K1 AND t2i.rowTimestamp > t2a.rowTimestamp ) OR
|
||||
(t2i.rowTimestamp = t2a.rowTimestamp AND t2i.K2 > t2a.K2))
|
||||
OR (t2i.K2 IS NULL))
|
||||
WHERE
|
||||
t2a.K1r = 1 AND t2i.K2 IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1a const PRIMARY PRIMARY 4 const 1 100.00
|
||||
1 SIMPLE t2a ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1i const PRIMARY PRIMARY 4 const 1 100.00 Using index
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 3 100.00 Using where; Not exists
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `K1`,'T1Row1' AS `Name`,`test`.`t2a`.`K2` AS `K2`,`test`.`t2a`.`K1r` AS `K1r`,`test`.`t2a`.`rowTimestamp` AS `rowTimestamp`,`test`.`t2a`.`Event` AS `Event`,`test`.`t2i`.`K2` AS `K2B`,`test`.`t2i`.`K1r` AS `K1rB`,`test`.`t2i`.`rowTimestamp` AS `rowTimestampB`,`test`.`t2i`.`Event` AS `EventB` from `test`.`t1` `t1a` join `test`.`t2` `t2a` left join (`test`.`t1` `t1i` left join `test`.`t2` `t2i` on((`test`.`t2i`.`K1r` = 1))) on(((`test`.`t1i`.`K1` = 1) and (((`test`.`t2i`.`K1r` = 1) and (`test`.`t2i`.`rowTimestamp` > `test`.`t2a`.`rowTimestamp`)) or ((`test`.`t2i`.`rowTimestamp` = `test`.`t2a`.`rowTimestamp`) and (`test`.`t2i`.`K2` > `test`.`t2a`.`K2`)) or isnull(`test`.`t2i`.`K2`)))) where ((`test`.`t2a`.`K1r` = 1) and isnull(`test`.`t2i`.`K2`))
|
||||
CREATE VIEW v1 AS
|
||||
SELECT t2i.*
|
||||
FROM t1 as t1i LEFT JOIN t2 as t2i ON t2i.K1r = t1i.K1
|
||||
WHERE t1i.K1 = 1 ;
|
||||
SELECT
|
||||
t1a.*, t2a.*, t2b.K2 as K2B, t2b.K1r as K1rB,
|
||||
t2b.rowTimestamp as rowTimestampB, t2b.Event as EventB
|
||||
FROM
|
||||
t1 as t1a JOIN t2 as t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
v1 as t2b
|
||||
ON ((t2b.K1r = t1a.K1 AND t2b.rowTimestamp > t2a.rowTimestamp) OR
|
||||
(t2b.rowTimestamp = t2a.rowTimestamp AND t2b.K2 > t2a.K2))
|
||||
OR (t2b.K2 IS NULL)
|
||||
WHERE
|
||||
t1a.K1 = 1 AND
|
||||
t2b.K2 IS NULL;
|
||||
K1 Name K2 K1r rowTimestamp Event K2B K1rB rowTimestampB EventB
|
||||
1 T1Row1 3 1 2015-04-13 10:42:12 T1Row1Event3 NULL NULL NULL NULL
|
||||
EXPLAIN EXTENDED SELECT
|
||||
t1a.*, t2a.*, t2b.K2 as K2B, t2b.K1r as K1rB,
|
||||
t2b.rowTimestamp as rowTimestampB, t2b.Event as EventB
|
||||
FROM
|
||||
t1 as t1a JOIN t2 as t2a ON t2a.K1r = t1a.K1
|
||||
LEFT JOIN
|
||||
v1 as t2b
|
||||
ON ((t2b.K1r = t1a.K1 AND t2b.rowTimestamp > t2a.rowTimestamp) OR
|
||||
(t2b.rowTimestamp = t2a.rowTimestamp AND t2b.K2 > t2a.K2))
|
||||
OR (t2b.K2 IS NULL)
|
||||
WHERE
|
||||
t1a.K1 = 1 AND
|
||||
t2b.K2 IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1a const PRIMARY PRIMARY 4 const 1 100.00
|
||||
1 SIMPLE t2a ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t1i const PRIMARY PRIMARY 4 const 1 100.00 Using index
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 3 100.00 Using where; Not exists
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `K1`,'T1Row1' AS `Name`,`t2a`.`K2` AS `K2`,`t2a`.`K1r` AS `K1r`,`t2a`.`rowTimestamp` AS `rowTimestamp`,`t2a`.`Event` AS `Event`,`test`.`t2i`.`K2` AS `K2B`,`test`.`t2i`.`K1r` AS `K1rB`,`test`.`t2i`.`rowTimestamp` AS `rowTimestampB`,`test`.`t2i`.`Event` AS `EventB` from `test`.`t1` `t1a` join `test`.`t2` `t2a` left join (`test`.`t1` `t1i` left join `test`.`t2` `t2i` on((`test`.`t2i`.`K1r` = 1))) on(((`test`.`t1i`.`K1` = 1) and (((`test`.`t2i`.`K1r` = 1) and (`test`.`t2i`.`rowTimestamp` > `t2a`.`rowTimestamp`)) or ((`test`.`t2i`.`rowTimestamp` = `t2a`.`rowTimestamp`) and (`test`.`t2i`.`K2` > `t2a`.`K2`)) or isnull(`test`.`t2i`.`K2`)))) where ((`t2a`.`K1r` = 1) and isnull(`test`.`t2i`.`K2`))
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
set optimizer_search_depth= @tmp_mdev621;
|
||||
CREATE TABLE t5 (a int, b int, c int, PRIMARY KEY(a), KEY b_i (b));
|
||||
CREATE TABLE t6 (a int, b int, c int, PRIMARY KEY(a), KEY b_i (b));
|
||||
|
@ -5340,3 +5340,4 @@ DELIMITER ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE `a\"'``b` CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
||||
DROP DATABASE `a\"'``b`;
|
||||
FOUND /Database: mysql/ in bug11505.sql
|
||||
|
@ -732,6 +732,97 @@ SELECT * FROM t1 WHERE d = '1991-01-01';
|
||||
d
|
||||
1991-01-01
|
||||
DROP TABLE t1;
|
||||
set global default_storage_engine=default;
|
||||
#
|
||||
# MDEV-9455: [ERROR] mysqld got signal 11
|
||||
#
|
||||
CREATE TABLE `t1` (
|
||||
`DIARY_TOTAL_DAY_SEQ` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`IMORY_ID` bigint(20) NOT NULL,
|
||||
`NAME` varchar(75) DEFAULT NULL,
|
||||
`DATETIME` varchar(10) NOT NULL DEFAULT '',
|
||||
`DAILY_CALL_CNT` int(11) DEFAULT NULL,
|
||||
`DAILY_SMS_CNT` int(11) DEFAULT NULL,
|
||||
`NUMBER` varchar(64) DEFAULT NULL,
|
||||
`DURATION` varchar(16) DEFAULT NULL,
|
||||
PRIMARY KEY (`DIARY_TOTAL_DAY_SEQ`,`DATETIME`),
|
||||
KEY `IDX_t1_01` (`IMORY_ID`,`DATETIME`)
|
||||
) AUTO_INCREMENT=328702514 DEFAULT CHARSET=utf8mb4
|
||||
PARTITION BY RANGE COLUMNS(`DATETIME`)
|
||||
(PARTITION p0 VALUES LESS THAN ('2015-10-01') ENGINE = InnoDB,
|
||||
PARTITION p1 VALUES LESS THAN ('2015-11-01') ENGINE = InnoDB,
|
||||
PARTITION p2 VALUES LESS THAN ('2015-12-01') ENGINE = InnoDB,
|
||||
PARTITION p3 VALUES LESS THAN ('2016-01-01') ENGINE = InnoDB,
|
||||
PARTITION p4 VALUES LESS THAN ('2016-02-01') ENGINE = InnoDB,
|
||||
PARTITION p5 VALUES LESS THAN ('2016-03-01') ENGINE = InnoDB,
|
||||
PARTITION p6 VALUES LESS THAN ('2016-04-01') ENGINE = InnoDB,
|
||||
PARTITION p7 VALUES LESS THAN ('2016-05-01') ENGINE = InnoDB,
|
||||
PARTITION p8 VALUES LESS THAN ('2016-06-01') ENGINE = InnoDB,
|
||||
PARTITION p9 VALUES LESS THAN ('2016-07-01') ENGINE = InnoDB,
|
||||
PARTITION p10 VALUES LESS THAN ('2016-08-01') ENGINE = InnoDB)
|
||||
;
|
||||
CREATE TABLE `t2` (
|
||||
`DIARY_SEQ` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`IMORY_ID` bigint(20) NOT NULL,
|
||||
`CALL_TYPE` varchar(1) DEFAULT NULL,
|
||||
`DATA_TYPE` varchar(1) DEFAULT NULL,
|
||||
`FEATURES` varchar(1) DEFAULT NULL,
|
||||
`NAME` varchar(75) DEFAULT NULL,
|
||||
`NUMBER` varchar(64) DEFAULT NULL,
|
||||
`DATETIME` datetime NOT NULL,
|
||||
`REG_DATE` datetime NOT NULL,
|
||||
`TITLE` varchar(50) DEFAULT NULL,
|
||||
`BODY` varchar(4200) DEFAULT NULL,
|
||||
`MIME_TYPE` varchar(32) DEFAULT NULL,
|
||||
`DURATION` varchar(16) DEFAULT NULL,
|
||||
`DEVICE_ID` varchar(64) DEFAULT NULL,
|
||||
`DEVICE_NAME` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`DIARY_SEQ`,`DATETIME`,`REG_DATE`),
|
||||
KEY `IDX_TB_DIARY_01` (`IMORY_ID`,`DATETIME`,`CALL_TYPE`,`NUMBER`),
|
||||
KEY `IDX_TB_DIARY_02` (`REG_DATE`)
|
||||
) AUTO_INCREMENT=688799006 DEFAULT CHARSET=utf8mb4
|
||||
PARTITION BY RANGE COLUMNS(REG_DATE)
|
||||
(PARTITION p0 VALUES LESS THAN ('2015-10-01') ENGINE = InnoDB,
|
||||
PARTITION p1 VALUES LESS THAN ('2015-11-01') ENGINE = InnoDB,
|
||||
PARTITION p2 VALUES LESS THAN ('2015-12-01') ENGINE = InnoDB,
|
||||
PARTITION p3 VALUES LESS THAN ('2016-01-01') ENGINE = InnoDB,
|
||||
PARTITION p4 VALUES LESS THAN ('2016-02-01') ENGINE = InnoDB,
|
||||
PARTITION p5 VALUES LESS THAN ('2016-03-01') ENGINE = InnoDB,
|
||||
PARTITION p6 VALUES LESS THAN ('2016-04-01') ENGINE = InnoDB,
|
||||
PARTITION p7 VALUES LESS THAN ('2016-05-01') ENGINE = InnoDB,
|
||||
PARTITION p8 VALUES LESS THAN ('2016-06-01') ENGINE = InnoDB,
|
||||
PARTITION p9 VALUES LESS THAN ('2016-07-01') ENGINE = InnoDB,
|
||||
PARTITION p10 VALUES LESS THAN ('2016-08-01') ENGINE = InnoDB)
|
||||
;
|
||||
SELECT
|
||||
A.IMORY_ID,
|
||||
A.NUMBER,
|
||||
A.NAME,
|
||||
DATE_FORMAT(A.DATETIME, '%Y-%m-%d') AS TARGET_DATE,
|
||||
SUM( CASE WHEN A.DATA_TYPE='1' THEN 1 ELSE 0 END) AS CALL_CNT,
|
||||
SUM( CASE WHEN A.DATA_TYPE IN ('2', '3') THEN 1 ELSE 0 END) AS SMS_CNT,
|
||||
SUM(CAST(A.DURATION AS INT)) AS DURATION,
|
||||
( SELECT COUNT(*)
|
||||
FROM t1
|
||||
WHERE IMORY_ID=A.IMORY_ID
|
||||
AND NUMBER=A.NUMBER
|
||||
AND NAME=A.NAME
|
||||
AND DATETIME = DATE_FORMAT(A.DATETIME, '%Y-%m-%d')
|
||||
) STATS_COUNT
|
||||
FROM t2 A
|
||||
WHERE A.IMORY_ID = 55094102
|
||||
AND A.DATETIME LIKE (
|
||||
SELECT CONCAT (DATE_FORMAT(DATETIME, '%Y-%m-%d') ,'%')
|
||||
FROM t2
|
||||
WHERE IMORY_ID=55094102
|
||||
AND DIARY_SEQ IN ( 608351221, 608351225, 608351229 )
|
||||
group by DATE_FORMAT(DATETIME, '%Y-%m-%d')
|
||||
)
|
||||
GROUP BY A.IMORY_ID, A.NUMBER, A.NAME, DATE_FORMAT(A.DATETIME, '%Y-%m-%d')
|
||||
;
|
||||
IMORY_ID NUMBER NAME TARGET_DATE CALL_CNT SMS_CNT DURATION STATS_COUNT
|
||||
drop table t2, t1;
|
||||
set global default_storage_engine='innodb';
|
||||
#
|
||||
# MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503,
|
||||
# Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes"
|
||||
|
@ -230,6 +230,22 @@ PARTITION pMax VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1 VALUES (1, "Partition p1, first row");
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-10418 Assertion `m_extra_cache' failed
|
||||
# in ha_partition::late_extra_cache(uint)
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (f2 INT) ENGINE=MyISAM PARTITION BY RANGE(f2) (PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t2 VALUES (8);
|
||||
CREATE ALGORITHM = MERGE VIEW v AS SELECT f2 FROM t2, t1;
|
||||
UPDATE v SET f2 = 1;
|
||||
SELECT * FROM t2;
|
||||
f2
|
||||
1
|
||||
DROP VIEW v;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED
|
||||
# TABLE CORRUPTS MYISAM
|
||||
DROP TABLE if exists `t1`;
|
||||
|
@ -4107,4 +4107,76 @@ NULL
|
||||
NULL
|
||||
deallocate prepare stmt;
|
||||
drop table t1,t2,t3,t4;
|
||||
#
|
||||
# MDEV-11859: the plans for the first and the second executions
|
||||
# of PS are not the same
|
||||
#
|
||||
create table t1 (id int, c varchar(3), key idx(c))engine=myisam;
|
||||
insert into t1 values (3,'bar'), (1,'xxx'), (2,'foo'), (5,'yyy');
|
||||
prepare stmt1 from
|
||||
"explain extended
|
||||
select * from t1 where (1, 2) in ( select 3, 4 ) or c = 'foo'";
|
||||
execute stmt1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ref idx idx 6 const 1 100.00 Using index condition
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`c` = 'foo')
|
||||
execute stmt1;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ref idx idx 6 const 1 100.00 Using index condition
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`c` = 'foo')
|
||||
deallocate prepare stmt1;
|
||||
prepare stmt1 from
|
||||
"select * from t1 where (1, 2) in ( select 3, 4 ) or c = 'foo'";
|
||||
flush status;
|
||||
execute stmt1;
|
||||
id c
|
||||
2 foo
|
||||
show status like '%Handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 1
|
||||
Handler_read_prev 0
|
||||
Handler_read_retry 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
flush status;
|
||||
execute stmt1;
|
||||
id c
|
||||
2 foo
|
||||
show status like '%Handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 1
|
||||
Handler_read_prev 0
|
||||
Handler_read_retry 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
deallocate prepare stmt1;
|
||||
prepare stmt2 from
|
||||
"explain extended
|
||||
select * from t1 where (1, 2) in ( select 3, 4 )";
|
||||
execute stmt2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where 0
|
||||
execute stmt2;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`c` AS `c` from `test`.`t1` where 0
|
||||
deallocate prepare stmt2;
|
||||
drop table t1;
|
||||
# End of 5.5 tests
|
||||
|
@ -60,11 +60,11 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Population > 100000 AND Name LIKE 'Aba%' OR
|
||||
Country IN ('CAN', 'ARG') AND ID < 3800 OR
|
||||
Country < 'U' AND Name LIKE 'Zhu%' OR
|
||||
ID BETWEEN 3800 AND 3810;
|
||||
Country IN ('CAN', 'ARG') AND ID BETWEEN 120 AND 130 OR
|
||||
Country <= 'ALB' AND Name LIKE 'L%' OR
|
||||
ID BETWEEN 3807 AND 3810;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 132 Using sort_union(Name,Country,PRIMARY); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,PRIMARY,Country 35,4,3 NULL 31 Using sort_union(Name,PRIMARY,Country); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE (Population > 101000 AND Population < 115000);
|
||||
@ -1769,4 +1769,42 @@ a b
|
||||
167 9999
|
||||
168 10000
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-8603: Wrong result OR/AND condition over index fields
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id INT NOT NULL,
|
||||
state VARCHAR(64),
|
||||
capital VARCHAR(64),
|
||||
UNIQUE KEY (id),
|
||||
KEY state (state,id),
|
||||
KEY capital (capital, id)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1,'Arizona','Phoenix'),
|
||||
(2,'Hawaii','Honolulu'),
|
||||
(3,'Georgia','Atlanta'),
|
||||
(4,'Florida','Tallahassee'),
|
||||
(5,'Alaska','Juneau'),
|
||||
(6,'Michigan','Lansing'),
|
||||
(7,'Pennsylvania','Harrisburg'),
|
||||
(8,'Virginia','Richmond')
|
||||
;
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 FORCE KEY (state,capital)
|
||||
WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
|
||||
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range state,capital state 71 NULL 12 Using index condition; Using where
|
||||
SELECT * FROM t1 FORCE KEY (state,capital)
|
||||
WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
|
||||
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
|
||||
id state capital
|
||||
4 Florida Tallahassee
|
||||
3 Georgia Atlanta
|
||||
2 Hawaii Honolulu
|
||||
6 Michigan Lansing
|
||||
7 Pennsylvania Harrisburg
|
||||
8 Virginia Richmond
|
||||
DROP TABLE t1;
|
||||
set session optimizer_switch='index_merge_sort_intersection=default';
|
||||
|
@ -61,11 +61,11 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE Population > 100000 AND Name LIKE 'Aba%' OR
|
||||
Country IN ('CAN', 'ARG') AND ID < 3800 OR
|
||||
Country < 'U' AND Name LIKE 'Zhu%' OR
|
||||
ID BETWEEN 3800 AND 3810;
|
||||
Country IN ('CAN', 'ARG') AND ID BETWEEN 120 AND 130 OR
|
||||
Country <= 'ALB' AND Name LIKE 'L%' OR
|
||||
ID BETWEEN 3807 AND 3810;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 123 Using sort_union(Name,Country,PRIMARY); Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,3,4 NULL 33 Using sort_union(Name,Country,PRIMARY); Using where
|
||||
EXPLAIN
|
||||
SELECT * FROM City
|
||||
WHERE (Population > 101000 AND Population < 115000);
|
||||
@ -369,7 +369,7 @@ WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
|
||||
OR ((ID BETWEEN 100 AND 200) AND
|
||||
(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE City range PRIMARY,Population,Country,Name PRIMARY 4 NULL 200 Using where
|
||||
1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Population,PRIMARY 39,4,4 NULL 305 Using sort_union(Name,Population,PRIMARY); Using where
|
||||
SELECT * FROM City USE INDEX ()
|
||||
WHERE ((ID < 10) AND (Name LIKE 'H%' OR (Country > 'A' AND Country < 'ARG')))
|
||||
OR ((ID BETWEEN 100 AND 110) AND
|
||||
@ -1770,5 +1770,43 @@ a b
|
||||
167 9999
|
||||
168 10000
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-8603: Wrong result OR/AND condition over index fields
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id INT NOT NULL,
|
||||
state VARCHAR(64),
|
||||
capital VARCHAR(64),
|
||||
UNIQUE KEY (id),
|
||||
KEY state (state,id),
|
||||
KEY capital (capital, id)
|
||||
);
|
||||
INSERT INTO t1 VALUES
|
||||
(1,'Arizona','Phoenix'),
|
||||
(2,'Hawaii','Honolulu'),
|
||||
(3,'Georgia','Atlanta'),
|
||||
(4,'Florida','Tallahassee'),
|
||||
(5,'Alaska','Juneau'),
|
||||
(6,'Michigan','Lansing'),
|
||||
(7,'Pennsylvania','Harrisburg'),
|
||||
(8,'Virginia','Richmond')
|
||||
;
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 FORCE KEY (state,capital)
|
||||
WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
|
||||
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range state,capital state 71 NULL 10 Using index condition; Using where
|
||||
SELECT * FROM t1 FORCE KEY (state,capital)
|
||||
WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9
|
||||
OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas';
|
||||
id state capital
|
||||
4 Florida Tallahassee
|
||||
3 Georgia Atlanta
|
||||
2 Hawaii Honolulu
|
||||
6 Michigan Lansing
|
||||
7 Pennsylvania Harrisburg
|
||||
8 Virginia Richmond
|
||||
DROP TABLE t1;
|
||||
set session optimizer_switch='index_merge_sort_intersection=default';
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
||||
|
@ -7952,3 +7952,41 @@ set global table_open_cache= @tmp_toc;
|
||||
set global table_definition_cache= @tmp_tdc;
|
||||
drop procedure p1;
|
||||
drop table t1,t2,t3,t4,t5,t6;
|
||||
#
|
||||
# MDEV-11935: Queries in stored procedures with and
|
||||
# EXISTS(SELECT * FROM VIEW) crashes and closes hte conneciton.
|
||||
#
|
||||
CREATE TABLE ANY_TABLE (
|
||||
ENTITY_UID BIGINT NOT NULL
|
||||
);
|
||||
CREATE TABLE SECURITY_PATH(
|
||||
origid BIGINT UNSIGNED NOT NULL,
|
||||
destid BIGINT UNSIGNED NOT NULL,
|
||||
KEY (destid)
|
||||
);
|
||||
CREATE VIEW ENTITY_ACCESS (
|
||||
ENTITY_UID,
|
||||
OWNER_UID
|
||||
) AS
|
||||
SELECT SP1.origid,
|
||||
SP2.destid
|
||||
FROM SECURITY_PATH SP1
|
||||
JOIN SECURITY_PATH SP2 ON SP1.destid = SP2.origid
|
||||
;
|
||||
CREATE PROCEDURE SP_EXAMPLE_SELECT ()
|
||||
BEGIN
|
||||
SELECT *
|
||||
FROM ANY_TABLE AT1
|
||||
WHERE EXISTS ( SELECT *
|
||||
FROM ENTITY_ACCESS EA
|
||||
WHERE AT1.ENTITY_UID = EA.ENTITY_UID
|
||||
AND EA.OWNER_UID IS NULL );
|
||||
END
|
||||
//
|
||||
CALL SP_EXAMPLE_SELECT ();
|
||||
ENTITY_UID
|
||||
CALL SP_EXAMPLE_SELECT ();
|
||||
ENTITY_UID
|
||||
drop procedure SP_EXAMPLE_SELECT;
|
||||
drop view ENTITY_ACCESS;
|
||||
drop table ANY_TABLE, SECURITY_PATH;
|
||||
|
39
mysql-test/r/symlink-aria-11902.result
Normal file
39
mysql-test/r/symlink-aria-11902.result
Normal file
@ -0,0 +1,39 @@
|
||||
set default_storage_engine=Aria;
|
||||
call mtr.add_suppression("File.*t1.* not found");
|
||||
create table mysql.t1 (a int, b char(16), index(a));
|
||||
insert mysql.t1 values (100, 'test'),(101,'test');
|
||||
create table t1 (a int, b char(16), index(a))
|
||||
data directory="MYSQLTEST_VARDIR/tmp/foo";
|
||||
insert t1 values (200, 'some'),(201,'some');
|
||||
select * from t1;
|
||||
a b
|
||||
200 some
|
||||
201 some
|
||||
flush tables;
|
||||
set debug_sync='mi_open_datafile SIGNAL ok WAIT_FOR go';
|
||||
select * from t1;
|
||||
set debug_sync='now WAIT_FOR ok';
|
||||
set debug_sync='now SIGNAL go';
|
||||
ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MAD' not found (Errcode: 20 "Not a directory")
|
||||
flush tables;
|
||||
drop table if exists t1;
|
||||
create table t1 (a int, b char(16), index (a))
|
||||
index directory="MYSQLTEST_VARDIR/tmp/foo";
|
||||
insert t1 values (200, 'some'),(201,'some');
|
||||
explain select a from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 2 Using index
|
||||
select a from t1;
|
||||
a
|
||||
200
|
||||
201
|
||||
flush tables;
|
||||
set debug_sync='mi_open_kfile SIGNAL waiting WAIT_FOR run';
|
||||
select a from t1;
|
||||
set debug_sync='now WAIT_FOR waiting';
|
||||
set debug_sync='now SIGNAL run';
|
||||
ERROR HY000: Can't find file: './test/t1.MAI' (errno: 20 "Not a directory")
|
||||
flush tables;
|
||||
drop table if exists t1;
|
||||
drop table mysql.t1;
|
||||
set debug_sync='RESET';
|
38
mysql-test/r/symlink-myisam-11902.result
Normal file
38
mysql-test/r/symlink-myisam-11902.result
Normal file
@ -0,0 +1,38 @@
|
||||
call mtr.add_suppression("File.*t1.* not found");
|
||||
create table mysql.t1 (a int, b char(16), index(a));
|
||||
insert mysql.t1 values (100, 'test'),(101,'test');
|
||||
create table t1 (a int, b char(16), index(a))
|
||||
data directory="MYSQLTEST_VARDIR/tmp/foo";
|
||||
insert t1 values (200, 'some'),(201,'some');
|
||||
select * from t1;
|
||||
a b
|
||||
200 some
|
||||
201 some
|
||||
flush tables;
|
||||
set debug_sync='mi_open_datafile SIGNAL ok WAIT_FOR go';
|
||||
select * from t1;
|
||||
set debug_sync='now WAIT_FOR ok';
|
||||
set debug_sync='now SIGNAL go';
|
||||
ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MYD' not found (Errcode: 20 "Not a directory")
|
||||
flush tables;
|
||||
drop table if exists t1;
|
||||
create table t1 (a int, b char(16), index (a))
|
||||
index directory="MYSQLTEST_VARDIR/tmp/foo";
|
||||
insert t1 values (200, 'some'),(201,'some');
|
||||
explain select a from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL a 5 NULL 2 Using index
|
||||
select a from t1;
|
||||
a
|
||||
200
|
||||
201
|
||||
flush tables;
|
||||
set debug_sync='mi_open_kfile SIGNAL waiting WAIT_FOR run';
|
||||
select a from t1;
|
||||
set debug_sync='now WAIT_FOR waiting';
|
||||
set debug_sync='now SIGNAL run';
|
||||
ERROR HY000: Can't find file: './test/t1.MYI' (errno: 20 "Not a directory")
|
||||
flush tables;
|
||||
drop table if exists t1;
|
||||
drop table mysql.t1;
|
||||
set debug_sync='RESET';
|
@ -597,7 +597,8 @@ CREATE TABLE t1 (a int(11), b varchar(1)) ;
|
||||
INSERT IGNORE INTO t1 VALUES (0,'g');
|
||||
CREATE TABLE t3 ( a varchar(1)) ;
|
||||
INSERT IGNORE INTO t3 VALUES ('g');
|
||||
CREATE TABLE t2 ( a int(11) NOT NULL, PRIMARY KEY (a)) ;
|
||||
CREATE TABLE t2 ( a int(11) NOT NULL, PRIMARY KEY (a));
|
||||
INSERT INTO t2 VALUES (9), (10);
|
||||
create view v1 as SELECT t1.* FROM t1 LEFT JOIN t2 ON ( t1.a = t2.a ) WHERE t2.a <> 0;
|
||||
SELECT alias1.* FROM t3 LEFT JOIN v1 as alias1 ON ( t3.a = alias1.b );
|
||||
a b
|
||||
@ -606,7 +607,7 @@ EXPLAIN SELECT alias1.* FROM t3 LEFT JOIN v1 as alias1 ON ( t3.a = alias1.b );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 system NULL NULL NULL NULL 1
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 Using where
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using index
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
|
||||
drop view v1;
|
||||
DROP TABLE t1,t2,t3;
|
||||
#
|
||||
|
@ -5536,6 +5536,89 @@ Warnings:
|
||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-12099: usage of mergeable view with LEFT JOIN
|
||||
# that can be converted to INNER JOIN
|
||||
#
|
||||
create table t1 (a int, b int, key(a)) engine=myisam;
|
||||
insert into t1 values
|
||||
(3,20), (7,10), (2,10), (4,30), (8,70),
|
||||
(7,70), (9,100), (9,60), (8,80), (7,60);
|
||||
create table t2 (c int, d int, key (c)) engine=myisam;
|
||||
insert into t2 values
|
||||
(50,100), (20, 200), (10,300),
|
||||
(150,100), (120, 200), (110,300),
|
||||
(250,100), (220, 200), (210,300);
|
||||
create table t3(e int, f int not null, key(e), unique (f)) engine=myisam;
|
||||
insert into t3 values
|
||||
(100, 3), (300, 5), (400, 4), (300,7),
|
||||
(300,2), (600, 13), (800, 15), (700, 14),
|
||||
(600, 23), (800, 25), (700, 24);
|
||||
create view v1 as
|
||||
select * from t2 left join t3 on t3.e=t2.d where t3.f is not null;
|
||||
select *
|
||||
from t1 left join v1 on v1.c=t1.b
|
||||
where t1.a < 5;
|
||||
a b c d e f
|
||||
2 10 10 300 300 5
|
||||
2 10 10 300 300 7
|
||||
2 10 10 300 300 2
|
||||
3 20 NULL NULL NULL NULL
|
||||
4 30 NULL NULL NULL NULL
|
||||
select *
|
||||
from t1 left join ( t2 left join t3 on t3.e=t2.d )
|
||||
on t2.c=t1.b and t3.f is not null
|
||||
where t1.a < 5;
|
||||
a b c d e f
|
||||
2 10 10 300 300 5
|
||||
2 10 10 300 300 7
|
||||
2 10 10 300 300 2
|
||||
3 20 NULL NULL NULL NULL
|
||||
4 30 NULL NULL NULL NULL
|
||||
explain extended
|
||||
select *
|
||||
from t1 left join v1 on v1.c=t1.b
|
||||
where t1.a < 5;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 3 100.00 Using index condition
|
||||
1 SIMPLE t2 ref c c 5 test.t1.b 2 100.00 Using where
|
||||
1 SIMPLE t3 ref f,e e 5 test.t2.d 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t1` left join (`test`.`t2` join `test`.`t3`) on(((`test`.`t2`.`c` = `test`.`t1`.`b`) and (`test`.`t3`.`e` = `test`.`t2`.`d`) and (`test`.`t3`.`f` is not null) and (`test`.`t1`.`b` is not null) and (`test`.`t2`.`d` is not null))) where (`test`.`t1`.`a` < 5)
|
||||
explain extended
|
||||
select *
|
||||
from t1 left join ( t2 left join t3 on t3.e=t2.d )
|
||||
on t2.c=t1.b and t3.f is not null
|
||||
where t1.a < 5;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 3 100.00 Using index condition
|
||||
1 SIMPLE t2 ref c c 5 test.t1.b 2 100.00 Using where
|
||||
1 SIMPLE t3 ref f,e e 5 test.t2.d 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t1` left join (`test`.`t2` join `test`.`t3`) on(((`test`.`t2`.`c` = `test`.`t1`.`b`) and (`test`.`t3`.`e` = `test`.`t2`.`d`) and (`test`.`t3`.`f` is not null) and (`test`.`t1`.`b` is not null) and (`test`.`t2`.`d` is not null))) where (`test`.`t1`.`a` < 5)
|
||||
explain extended
|
||||
select *
|
||||
from t1 left join v1 on v1.c=t1.b and v1.f=t1.a
|
||||
where t1.a < 5;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 3 100.00 Using index condition
|
||||
1 SIMPLE t3 eq_ref f,e f 4 test.t1.a 1 100.00 Using where
|
||||
1 SIMPLE t2 ref c c 5 test.t1.b 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t1` left join (`test`.`t2` join `test`.`t3`) on(((`test`.`t2`.`c` = `test`.`t1`.`b`) and (`test`.`t3`.`f` = `test`.`t1`.`a`) and (`test`.`t2`.`d` = `test`.`t3`.`e`) and (`test`.`t1`.`a` is not null) and (`test`.`t1`.`a` is not null) and (`test`.`t1`.`b` is not null))) where (`test`.`t1`.`a` < 5)
|
||||
explain extended
|
||||
select *
|
||||
from t1 left join ( t2 left join t3 on t3.e=t2.d )
|
||||
on t2.c=t1.b and t3.f=t1.a and t3.f is not null
|
||||
where t1.a < 5;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range a a 5 NULL 3 100.00 Using index condition
|
||||
1 SIMPLE t3 eq_ref f,e f 4 test.t1.a 1 100.00 Using where
|
||||
1 SIMPLE t2 ref c c 5 test.t1.b 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t1` left join (`test`.`t2` join `test`.`t3`) on(((`test`.`t2`.`c` = `test`.`t1`.`b`) and (`test`.`t3`.`f` = `test`.`t1`.`a`) and (`test`.`t2`.`d` = `test`.`t3`.`e`) and (`test`.`t1`.`a` is not null) and (`test`.`t1`.`a` is not null) and (`test`.`t1`.`b` is not null))) where (`test`.`t1`.`a` < 5)
|
||||
drop view v1;
|
||||
drop table t1,t2,t3;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.5 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
@ -0,0 +1,22 @@
|
||||
#
|
||||
# MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings
|
||||
#
|
||||
CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200");
|
||||
SELECT @@global.max_binlog_stmt_cache_size;
|
||||
@@global.max_binlog_stmt_cache_size
|
||||
MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SET @cache_size= @@max_binlog_stmt_cache_size;
|
||||
SET @@global.max_binlog_stmt_cache_size= @cache_size+1;
|
||||
SELECT @@global.max_binlog_stmt_cache_size;
|
||||
@@global.max_binlog_stmt_cache_size
|
||||
MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SET @@global.max_binlog_stmt_cache_size = @cache_size+4095;
|
||||
SELECT @@global.max_binlog_stmt_cache_size;
|
||||
@@global.max_binlog_stmt_cache_size
|
||||
MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SET @@global.max_binlog_stmt_cache_size= @cache_size-1;
|
||||
SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096;
|
||||
@@global.max_binlog_stmt_cache_size = @cache_size-4096
|
||||
1
|
||||
SET @@global.max_binlog_stmt_cache_size= @cache_size;
|
||||
# End of test
|
@ -0,0 +1 @@
|
||||
--max_binlog_stmt_cache_size=18446744073709547520
|
@ -0,0 +1,36 @@
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4774: Strangeness with max_binlog_stmt_cache_size Settings
|
||||
--echo #
|
||||
|
||||
CALL mtr.add_suppression("unsigned value 18446744073709547520 adjusted to 4294963200");
|
||||
|
||||
--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SELECT @@global.max_binlog_stmt_cache_size;
|
||||
|
||||
# Save the initial value of @@global.max_binlog_stmt_cache_size.
|
||||
--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SET @cache_size= @@max_binlog_stmt_cache_size;
|
||||
|
||||
--disable_warnings
|
||||
SET @@global.max_binlog_stmt_cache_size= @cache_size+1;
|
||||
--enable_warnings
|
||||
--replace_result 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE 4294963200 MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SELECT @@global.max_binlog_stmt_cache_size;
|
||||
|
||||
--disable_warnings
|
||||
SET @@global.max_binlog_stmt_cache_size = @cache_size+4095;
|
||||
--enable_warnings
|
||||
--replace_result 4294963200 MAX_BINLOG_STMT_CACHE_SIZE 18446744073709547520 MAX_BINLOG_STMT_CACHE_SIZE
|
||||
SELECT @@global.max_binlog_stmt_cache_size;
|
||||
|
||||
--disable_warnings
|
||||
SET @@global.max_binlog_stmt_cache_size= @cache_size-1;
|
||||
--enable_warnings
|
||||
SELECT @@global.max_binlog_stmt_cache_size = @cache_size-4096;
|
||||
|
||||
# Restore @@global.max_binlog_stmt_cache_size to its initial value.
|
||||
SET @@global.max_binlog_stmt_cache_size= @cache_size;
|
||||
|
||||
--echo # End of test
|
||||
|
@ -61,6 +61,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--echo #
|
||||
--echo # Trigger a MyISAM system error during an INFORMATION_SCHEMA.TABLES query
|
||||
--echo #
|
||||
--replace_result 20 2
|
||||
SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, TABLE_ROWS, DATA_LENGTH, TABLE_COMMENT
|
||||
FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||
|
||||
|
47
mysql-test/suite/innodb/r/alter_key_block_size-11757.result
Normal file
47
mysql-test/suite/innodb/r/alter_key_block_size-11757.result
Normal file
@ -0,0 +1,47 @@
|
||||
set global innodb_file_format=barracuda;
|
||||
create table t1 (
|
||||
id1 bigint(20) not null,
|
||||
id2 bigint(20) not null,
|
||||
primary key (id1),
|
||||
unique key id2 (id2)
|
||||
) engine=innodb row_format=compressed key_block_size=8;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id1` bigint(20) NOT NULL,
|
||||
`id2` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`id1`),
|
||||
UNIQUE KEY `id2` (`id2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
|
||||
alter table t1 row_format=dynamic;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED.
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id1` bigint(20) NOT NULL,
|
||||
`id2` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`id1`),
|
||||
UNIQUE KEY `id2` (`id2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=8
|
||||
alter table t1 key_block_size=0;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id1` bigint(20) NOT NULL,
|
||||
`id2` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`id1`) KEY_BLOCK_SIZE=8,
|
||||
UNIQUE KEY `id2` (`id2`) KEY_BLOCK_SIZE=8
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
alter table t1 drop primary key, add primary key (id1),
|
||||
drop key id2, add unique (id2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id1` bigint(20) NOT NULL,
|
||||
`id2` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`id1`),
|
||||
UNIQUE KEY `id2` (`id2`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
drop table t1;
|
||||
set global innodb_file_format=default;
|
@ -26,7 +26,8 @@ KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB COMMENT="This is a comment about tables";
|
||||
# Restart mysqld --innodb_read_only_mode=1
|
||||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
|
||||
ERROR HY000: Can't lock file (errno: 165 "Table is read only")
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
Table Create Table
|
||||
crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
||||
@ -52,7 +53,6 @@ crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
|
||||
# Restart mysqld --innodb_read_only_mode=1
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
Table Create Table
|
||||
crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
||||
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression("InnoDB: The total blob data length");
|
||||
SET GLOBAL max_allowed_packet = 100*1024*1024;
|
||||
# Connection big_packets:
|
||||
CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;
|
||||
@ -10,9 +9,7 @@ INSERT INTO t1 (a, b) VALUES (5, '5');
|
||||
start transaction;
|
||||
INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
|
||||
ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
|
||||
# Connection default:
|
||||
# Quick shutdown and restart server
|
||||
# Connection default:
|
||||
# Kill and restart
|
||||
SELECT a FROM t1;
|
||||
a
|
||||
1
|
||||
|
@ -1,7 +1,4 @@
|
||||
drop table if exists t1;
|
||||
call mtr.add_suppression("option 'innodb-purge-threads': unsigned value 0 adjusted to*");
|
||||
set global innodb_stats_persistent = false;
|
||||
CREATE TABLE t1 (a int not null primary key) engine=InnoDB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
set global innodb_limit_optimistic_insert_debug = 2;
|
||||
insert into t1 values (1);
|
||||
insert into t1 values (5);
|
||||
|
@ -1,5 +1,3 @@
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
flush tables;
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
|
||||
COMMIT;
|
||||
@ -16,6 +14,7 @@ XA START '789';
|
||||
UPDATE t SET b=4*a WHERE a=32;
|
||||
XA END '789';
|
||||
XA PREPARE '789';
|
||||
# Kill and restart
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a b
|
||||
|
73
mysql-test/suite/innodb/r/log_file_size.result
Normal file
73
mysql-test/suite/innodb/r/log_file_size.result
Normal file
@ -0,0 +1,73 @@
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (42);
|
||||
# Kill and restart: --innodb-log-file-size=6M
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
INSERT INTO t1 VALUES (42);
|
||||
BEGIN;
|
||||
DELETE FROM t1;
|
||||
# Kill and restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
42
|
||||
INSERT INTO t1 VALUES (123);
|
||||
BEGIN;
|
||||
DELETE FROM t1;
|
||||
# Kill the server
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /syntax error in innodb_log_group_home_dir/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
|
||||
FOUND /InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
|
||||
FOUND /InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: innodb_read_only prevents crash recovery/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Starting an apply batch of log records/ in mysqld.1.err
|
||||
FOUND /InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Cannot create log files in read-only mode/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Only one log file found/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
FOUND /InnoDB: Setting log file .*ib_logfile[0-9]+ size to/ in mysqld.1.err
|
||||
FOUND /InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0/ in mysqld.1.err
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
42
|
||||
123
|
||||
DROP TABLE t1;
|
29
mysql-test/suite/innodb/r/read_only_recovery.result
Normal file
29
mysql-test/suite/innodb/r/read_only_recovery.result
Normal file
@ -0,0 +1,29 @@
|
||||
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t VALUES(1),(2);
|
||||
DELETE FROM t WHERE a=2;
|
||||
# Normal MariaDB shutdown would roll back the above transaction.
|
||||
# We want the transaction to remain open, so we will kill the server
|
||||
# after ensuring that any non-transactional files are clean.
|
||||
FLUSH TABLES;
|
||||
# Ensure that the above incomplete transaction becomes durable.
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
BEGIN;
|
||||
INSERT INTO t VALUES(0);
|
||||
ROLLBACK;
|
||||
# Kill and restart: --innodb-force-recovery=3
|
||||
SELECT * FROM t;
|
||||
a
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a
|
||||
1
|
||||
SELECT * FROM t;
|
||||
a
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
a
|
||||
1
|
||||
SELECT * FROM t;
|
||||
a
|
||||
DROP TABLE t;
|
@ -4,7 +4,7 @@ XA START 'x';
|
||||
UPDATE t1 set a=2;
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
# Kill and restart
|
||||
SELECT * FROM t1 LOCK IN SHARE MODE;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t1;
|
||||
|
23
mysql-test/suite/innodb/t/alter_key_block_size-11757.test
Normal file
23
mysql-test/suite/innodb/t/alter_key_block_size-11757.test
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# MDEV-11757 KEY_BLOCK_SIZE strangeness when UNCOMPRESSing COMPRESSed InnoDB tables
|
||||
#
|
||||
source include/have_innodb.inc;
|
||||
set global innodb_file_format=barracuda;
|
||||
|
||||
create table t1 (
|
||||
id1 bigint(20) not null,
|
||||
id2 bigint(20) not null,
|
||||
primary key (id1),
|
||||
unique key id2 (id2)
|
||||
) engine=innodb row_format=compressed key_block_size=8;
|
||||
show create table t1;
|
||||
alter table t1 row_format=dynamic;
|
||||
show create table t1;
|
||||
alter table t1 key_block_size=0;
|
||||
show create table t1;
|
||||
alter table t1 drop primary key, add primary key (id1),
|
||||
drop key id2, add unique (id2);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
set global innodb_file_format=default;
|
@ -33,19 +33,20 @@ CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repr
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB COMMENT="This is a comment about tables";
|
||||
|
||||
--echo # Restart mysqld --innodb_read_only_mode=1
|
||||
-- let $restart_parameters=--innodb-read-only-mode=1
|
||||
-- let $restart_parameters=--innodb-read-only
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--error ER_CANT_LOCK
|
||||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = 'innodb_read_only';
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
-- let $restart_parameters=
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
--echo # Restart mysqld --innodb_read_only_mode=1
|
||||
-- let $restart_parameters=--innodb-read-only-mode=1
|
||||
-- let $restart_parameters=--innodb-read-only
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
#
|
||||
@ -53,6 +54,7 @@ SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
#
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
-- let $restart_parameters=
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
DROP TABLE `repro`.`crew_role_assigned`;
|
||||
|
@ -2,11 +2,13 @@
|
||||
--source include/not_crashrep.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: The total blob data length");
|
||||
|
||||
let $old_max_allowed_packet = `select @@max_allowed_packet`;
|
||||
SET GLOBAL max_allowed_packet = 100*1024*1024;
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: The total blob data length");
|
||||
FLUSH TABLES;
|
||||
--enable_query_log
|
||||
|
||||
--echo # Connection big_packets:
|
||||
connect(big_packets,localhost,root,,);
|
||||
connection big_packets;
|
||||
@ -28,28 +30,12 @@ start transaction;
|
||||
--error ER_TOO_BIG_ROWSIZE
|
||||
INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
|
||||
|
||||
--echo # Connection default:
|
||||
connection default;
|
||||
|
||||
# We expect a restart.
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
--echo # Quick shutdown and restart server
|
||||
--shutdown_server 0
|
||||
|
||||
# Wait for the server to come back up, and reconnect.
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--echo # Connection default:
|
||||
connection default;
|
||||
--source include/kill_and_restart_mysqld.inc
|
||||
disconnect big_packets;
|
||||
|
||||
# We should see (1,2,3,4,5) here.
|
||||
SELECT a FROM t1;
|
||||
|
||||
# Clean up.
|
||||
DROP TABLE t1;
|
||||
|
||||
--disable_query_log
|
||||
eval set global max_allowed_packet = $old_max_allowed_packet;
|
||||
--enable_query_log
|
||||
|
@ -1 +0,0 @@
|
||||
--loose-innodb-purge-threads=0
|
@ -10,20 +10,12 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n
|
||||
|
||||
--disable_query_log
|
||||
set @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug;
|
||||
set @old_innodb_stats_persistent = @@innodb_stats_persistent;
|
||||
set @old_innodb_undo_logs = @@innodb_undo_logs;
|
||||
# Limit undo segments for stable progress of purge.
|
||||
set global innodb_undo_logs = 1;
|
||||
--enable_query_log
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
call mtr.add_suppression("option 'innodb-purge-threads': unsigned value 0 adjusted to*");
|
||||
|
||||
set global innodb_stats_persistent = false;
|
||||
|
||||
CREATE TABLE t1 (a int not null primary key) engine=InnoDB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
|
||||
#
|
||||
# make 4 leveled straight tree
|
||||
@ -139,6 +131,5 @@ drop table t1;
|
||||
|
||||
--disable_query_log
|
||||
set global innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug;
|
||||
set global innodb_stats_persistent = @old_innodb_stats_persistent;
|
||||
set global innodb_undo_logs = @old_innodb_undo_logs;
|
||||
--enable_query_log
|
||||
|
@ -2,11 +2,11 @@
|
||||
# Bug #59641 Prepared XA transaction causes shutdown hang after a crash
|
||||
|
||||
-- source include/not_embedded.inc
|
||||
# The server would issue this warning on restart.
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
|
||||
# Close tables used by other tests (to not get crashed myisam tables)
|
||||
flush tables;
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Found 3 prepared XA transactions");
|
||||
FLUSH TABLES;
|
||||
--enable_query_log
|
||||
|
||||
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
|
||||
@ -17,7 +17,6 @@ XA END '123';
|
||||
XA PREPARE '123';
|
||||
|
||||
CONNECT (con1,localhost,root,,);
|
||||
CONNECTION con1;
|
||||
|
||||
XA START '456';
|
||||
INSERT INTO t VALUES(3,47),(5,67);
|
||||
@ -26,7 +25,6 @@ XA END '456';
|
||||
XA PREPARE '456';
|
||||
|
||||
CONNECT (con2,localhost,root,,);
|
||||
CONNECTION con2;
|
||||
|
||||
XA START '789';
|
||||
UPDATE t SET b=4*a WHERE a=32;
|
||||
@ -34,30 +32,13 @@ XA END '789';
|
||||
XA PREPARE '789';
|
||||
|
||||
CONNECT (con3,localhost,root,,);
|
||||
CONNECTION con3;
|
||||
|
||||
# Kill the server without sending a shutdown command
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server 0
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
# Restart the server.
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
--source include/kill_and_restart_mysqld.inc
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
COMMIT;
|
||||
|
||||
# Shut down the server. This would hang because of the bug.
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
# Restart the server.
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
|
222
mysql-test/suite/innodb/t/log_file_size.test
Normal file
222
mysql-test/suite/innodb/t/log_file_size.test
Normal file
@ -0,0 +1,222 @@
|
||||
# Test resizing the InnoDB redo log.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Embedded server does not support crashing
|
||||
--source include/not_embedded.inc
|
||||
# Avoid CrashReporter popup on Mac
|
||||
--source include/not_crashrep.inc
|
||||
# DBUG_EXECUTE_IF is needed
|
||||
--source include/have_debug.inc
|
||||
|
||||
if (`SELECT @@innodb_log_file_size = 1048576`) {
|
||||
--skip Test requires innodb_log_file_size>1M.
|
||||
}
|
||||
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("InnoDB: Resizing redo log");
|
||||
call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
# This message is output by 10.0 and 10.1, not by 10.2
|
||||
call mtr.add_suppression("InnoDB: The log sequence number in the ibdata files is higher than the log sequence number in the ib_logfiles");
|
||||
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles");
|
||||
call mtr.add_suppression("syntax error in innodb_log_group_home_dir");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||
call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery");
|
||||
call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles");
|
||||
call mtr.add_suppression("InnoDB: Cannot create log files in read-only mode");
|
||||
call mtr.add_suppression("InnoDB: Only one log file found");
|
||||
call mtr.add_suppression("InnoDB: Log file .*ib_logfile[01].* size");
|
||||
call mtr.add_suppression("InnoDB: Unable to open .*ib_logfile0. to check native AIO read support");
|
||||
# InnoDB shutdown after refused startup is not clean in 10.0 or 10.1!
|
||||
call mtr.add_suppression("mysqld got signal 11");
|
||||
call mtr.add_suppression("Attempting backtrace");
|
||||
FLUSH TABLES;
|
||||
--enable_query_log
|
||||
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (42);
|
||||
|
||||
let $restart_parameters = --innodb-log-file-size=6M;
|
||||
--source include/kill_and_restart_mysqld.inc
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
INSERT INTO t1 VALUES (42);
|
||||
BEGIN;
|
||||
DELETE FROM t1;
|
||||
|
||||
let $restart_parameters = --innodb-log-files-in-group=3 --innodb-log-file-size=5M;
|
||||
--source include/kill_and_restart_mysqld.inc
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
INSERT INTO t1 VALUES (123);
|
||||
|
||||
let MYSQLD_DATADIR= `select @@datadir`;
|
||||
let SEARCH_RANGE= -50000;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
|
||||
BEGIN;
|
||||
DELETE FROM t1;
|
||||
|
||||
--source include/kill_mysqld.inc
|
||||
|
||||
--let $restart_parameters= --innodb-log-group-home-dir=foo\;bar
|
||||
--source include/start_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= syntax error in innodb_log_group_home_dir;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_1
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_3
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --innodb-read-only
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_4
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
|
||||
--source include/search_pattern_in_file.inc
|
||||
let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_5
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
|
||||
--source include/search_pattern_in_file.inc
|
||||
let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --innodb-read-only
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_6
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
|
||||
--source include/search_pattern_in_file.inc
|
||||
let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_7
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
# this aborts right after deleting all log files
|
||||
|
||||
--let $restart_parameters= --innodb-read-only
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Cannot create log files in read-only mode;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_8
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_9
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
|
||||
--source include/search_pattern_in_file.inc
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
# We should have perfectly synced files here.
|
||||
# Rename the log files, and trigger an error in recovery.
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
|
||||
|
||||
--let $restart_parameters=
|
||||
--source include/start_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Only one log file found;
|
||||
--source include/search_pattern_in_file.inc
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
|
||||
|
||||
perl;
|
||||
die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0");
|
||||
print FILE "garbage";
|
||||
close(FILE);
|
||||
EOF
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size;
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $MYSQLD_DATADIR/ib_logfile0
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
|
||||
|
||||
perl;
|
||||
die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile1");
|
||||
print FILE "junkfill" x 131072;
|
||||
close(FILE);
|
||||
EOF
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files;
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $MYSQLD_DATADIR/ib_logfile1
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
|
||||
--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
|
||||
|
||||
--let $restart_parameters= --debug=d,innodb_log_abort_10
|
||||
--source include/restart_mysqld.inc
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SELECT * FROM t1;
|
||||
|
||||
let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
|
||||
--source include/search_pattern_in_file.inc
|
||||
let SEARCH_PATTERN= InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0;
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
--let $restart_parameters=
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
36
mysql-test/suite/innodb/t/read_only_recovery.test
Normal file
36
mysql-test/suite/innodb/t/read_only_recovery.test
Normal file
@ -0,0 +1,36 @@
|
||||
--source include/have_innodb.inc
|
||||
# need to restart server
|
||||
--source include/not_embedded.inc
|
||||
|
||||
--connect(con1, localhost, root)
|
||||
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
BEGIN;
|
||||
# Generate insert_undo log.
|
||||
INSERT INTO t VALUES(1),(2);
|
||||
# Generate update_undo log.
|
||||
DELETE FROM t WHERE a=2;
|
||||
--connection default
|
||||
--echo # Normal MariaDB shutdown would roll back the above transaction.
|
||||
--echo # We want the transaction to remain open, so we will kill the server
|
||||
--echo # after ensuring that any non-transactional files are clean.
|
||||
FLUSH TABLES;
|
||||
--echo # Ensure that the above incomplete transaction becomes durable.
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
BEGIN;
|
||||
INSERT INTO t VALUES(0);
|
||||
ROLLBACK;
|
||||
--let $restart_parameters= --innodb-force-recovery=3
|
||||
--source include/kill_and_restart_mysqld.inc
|
||||
--disconnect con1
|
||||
SELECT * FROM t;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
--let $restart_parameters= --innodb-read-only
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT * FROM t;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
SELECT * FROM t;
|
||||
--let $restart_parameters=
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
@ -1,7 +1,3 @@
|
||||
if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins where plugin_name='innodb'`)
|
||||
{
|
||||
--skip Not fixed in InnoDB as of 5.6.24 or earlier
|
||||
}
|
||||
--source include/have_innodb.inc
|
||||
# Embedded server does not support restarting.
|
||||
--source include/not_embedded.inc
|
||||
@ -9,6 +5,7 @@ if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins wher
|
||||
# MDEV-8841 - close tables opened by previous tests,
|
||||
# so they don't get marked crashed when the server gets crashed
|
||||
--disable_query_log
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
FLUSH TABLES;
|
||||
--enable_query_log
|
||||
|
||||
@ -18,17 +15,7 @@ connect (con1,localhost,root);
|
||||
XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x';
|
||||
connection default;
|
||||
|
||||
call mtr.add_suppression("Found 1 prepared XA transactions");
|
||||
|
||||
# Kill and restart the server.
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- shutdown_server 0
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
-- enable_reconnect
|
||||
-- source include/wait_until_connected_again.inc
|
||||
-- disable_reconnect
|
||||
--source include/kill_and_restart_mysqld.inc
|
||||
|
||||
disconnect con1;
|
||||
connect (con1,localhost,root);
|
||||
|
168
mysql-test/suite/innodb_fts/r/create.result
Normal file
168
mysql-test/suite/innodb_fts/r/create.result
Normal file
@ -0,0 +1,168 @@
|
||||
SET NAMES utf8mb4;
|
||||
#
|
||||
# MDEV-11233 CREATE FULLTEXT INDEX with a token
|
||||
# longer than 127 bytes crashes server
|
||||
#
|
||||
CREATE TABLE t(t TEXT CHARACTER SET utf8mb3) ENGINE=InnoDB;
|
||||
INSERT INTO t SET t=REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5);
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc90,84);
|
||||
INSERT INTO t SET t=REPEAT('befor',17);
|
||||
INSERT INTO t SET t='BeforeTheIndexCreation';
|
||||
CREATE FULLTEXT INDEX ft ON t(t);
|
||||
Warnings:
|
||||
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
|
||||
INSERT INTO t SET t='this was inserted after creating the index';
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84);
|
||||
INSERT INTO t SET t=REPEAT('after',17);
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
|
||||
# The data below is not 3-byte UTF-8, but 4-byte chars.
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x96\x95\xF0\x9F...' for column 't' at row 1
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
|
||||
Warnings:
|
||||
Warning 1366 Incorrect string value: '\xF0\x9F\x96\x96\xF0\x9F...' for column 't' at row 1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST
|
||||
(REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5));
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('BeforeTheIndexCreation');
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('befor',17));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('after');
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('after',17));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 83));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 84));
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 85));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 83));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 84));
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 85));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 83));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 84));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 84));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 85));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT * FROM t;
|
||||
t
|
||||
็็็็้้้้้็็็็้้้้้็็็็้้้้้็็็็้้้้้็็็็้้้้้
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
beforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbefor
|
||||
BeforeTheIndexCreation
|
||||
this was inserted after creating the index
|
||||
111111111111111111111111111111111111111111111111111111111111111111111111111111111111
|
||||
afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter
|
||||
甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文
|
||||
????????????????????????????????????????????????????????????????????????????????????
|
||||
?????????????????????????????????????????????????????????????????????????????????????
|
||||
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
|
||||
len COUNT(*)
|
||||
252 6
|
||||
DROP TABLE t;
|
||||
CREATE TABLE t(t TEXT CHARACTER SET utf8mb4) ENGINE=InnoDB;
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc90,84);
|
||||
INSERT INTO t SET t=REPEAT('befor',17);
|
||||
INSERT INTO t SET t='BeforeTheIndexCreation';
|
||||
CREATE FULLTEXT INDEX ft ON t(t);
|
||||
Warnings:
|
||||
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
|
||||
INSERT INTO t SET t='this was inserted after creating the index';
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84);
|
||||
INSERT INTO t SET t=REPEAT('after',17);
|
||||
INSERT INTO t SET t=REPEAT(concat(repeat(_utf8mb3 0xE0B987, 4), repeat(_utf8mb3 0xE0B989, 5)), 5);
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
|
||||
# The token below exceeds the 84-character limit.
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15));
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('BeforeTheIndexCreation');
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('befor',17));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('after');
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('after',17));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 83));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 84));
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 85));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 83));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 84));
|
||||
COUNT(*)
|
||||
1
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 85));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 83));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 84));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 84));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 85));
|
||||
COUNT(*)
|
||||
0
|
||||
SELECT * FROM t;
|
||||
t
|
||||
甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文甲骨文
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
beforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbeforbefor
|
||||
BeforeTheIndexCreation
|
||||
this was inserted after creating the index
|
||||
111111111111111111111111111111111111111111111111111111111111111111111111111111111111
|
||||
afterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafterafter
|
||||
็็็็้้้้้็็็็้้้้้็็็็้้้้้็็็็้้้้้็็็็้้้้้
|
||||
🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕
|
||||
🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖🖖
|
||||
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
|
||||
len COUNT(*)
|
||||
336 6
|
||||
DROP TABLE t;
|
||||
CREATE TABLE t(t TEXT CHARACTER SET latin1, FULLTEXT INDEX(t))
|
||||
ENGINE=InnoDB;
|
||||
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
|
||||
len COUNT(*)
|
||||
84 6
|
||||
DROP TABLE t;
|
1
mysql-test/suite/innodb_fts/t/create.opt
Normal file
1
mysql-test/suite/innodb_fts/t/create.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-innodb-sys-columns
|
92
mysql-test/suite/innodb_fts/t/create.test
Normal file
92
mysql-test/suite/innodb_fts/t/create.test
Normal file
@ -0,0 +1,92 @@
|
||||
--source include/have_innodb.inc
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-11233 CREATE FULLTEXT INDEX with a token
|
||||
--echo # longer than 127 bytes crashes server
|
||||
--echo #
|
||||
|
||||
# This bug is the result of merging the Oracle MySQL follow-up fix
|
||||
# BUG#22963169 MYSQL CRASHES ON CREATE FULLTEXT INDEX
|
||||
# without merging a fix of Bug#79475 Insert a token of 84 4-bytes
|
||||
# chars into fts index causes server crash.
|
||||
|
||||
# Oracle did not publish tests for either of the above MySQL bugs.
|
||||
# The tests below were developed for MariaDB Server.
|
||||
# The maximum length of a fulltext-indexed word is 84 characters.
|
||||
|
||||
CREATE TABLE t(t TEXT CHARACTER SET utf8mb3) ENGINE=InnoDB;
|
||||
INSERT INTO t SET t=REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5);
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc90,84);
|
||||
INSERT INTO t SET t=REPEAT('befor',17); # too long, will not be indexed
|
||||
INSERT INTO t SET t='BeforeTheIndexCreation';
|
||||
CREATE FULLTEXT INDEX ft ON t(t);
|
||||
INSERT INTO t SET t='this was inserted after creating the index';
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84);
|
||||
INSERT INTO t SET t=REPEAT('after',17); # too long, will not be indexed
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
|
||||
--echo # The data below is not 3-byte UTF-8, but 4-byte chars.
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST
|
||||
(REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('BeforeTheIndexCreation');
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('befor',17));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('after');
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('after',17));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 83));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 85));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 83));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 85));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 83));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 85));
|
||||
SELECT * FROM t;
|
||||
|
||||
# The column length should be 252 bytes (84 characters * 3 bytes/character).
|
||||
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t(t TEXT CHARACTER SET utf8mb4) ENGINE=InnoDB;
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc90,84);
|
||||
INSERT INTO t SET t=REPEAT('befor',17); # too long, will not be indexed
|
||||
INSERT INTO t SET t='BeforeTheIndexCreation';
|
||||
CREATE FULLTEXT INDEX ft ON t(t);
|
||||
INSERT INTO t SET t='this was inserted after creating the index';
|
||||
INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84);
|
||||
INSERT INTO t SET t=REPEAT('after',17); # too long, will not be indexed
|
||||
INSERT INTO t SET t=REPEAT(concat(repeat(_utf8mb3 0xE0B987, 4), repeat(_utf8mb3 0xE0B989, 5)), 5);
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
|
||||
--echo # The token below exceeds the 84-character limit.
|
||||
INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('BeforeTheIndexCreation');
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('befor',17));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('after');
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT('after',17));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 83));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc90, 85));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 83));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8 0xefbc91, 85));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 83));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9695, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 84));
|
||||
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST (REPEAT(_utf8mb4 0xf09f9696, 85));
|
||||
SELECT * FROM t;
|
||||
|
||||
# The column length should be 336 bytes (84 characters * 4 bytes/character).
|
||||
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
|
||||
DROP TABLE t;
|
||||
|
||||
CREATE TABLE t(t TEXT CHARACTER SET latin1, FULLTEXT INDEX(t))
|
||||
ENGINE=InnoDB;
|
||||
|
||||
# The column length should be 84 bytes (84 characters * 1 byte/character).
|
||||
SELECT len,COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS where name='word' GROUP BY len;
|
||||
DROP TABLE t;
|
121
mysql-test/suite/parts/r/partition_bigint_innodb.result
Normal file
121
mysql-test/suite/parts/r/partition_bigint_innodb.result
Normal file
@ -0,0 +1,121 @@
|
||||
create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=-2;
|
||||
a
|
||||
delete from t1 where a=-2;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t1 where a=18446744073709551615;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
select * from t2 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t2 where a=18446744073709551615;
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
delete from t2;
|
||||
1024 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
1024
|
||||
drop table t2;
|
||||
create table t3 (a bigint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775806
|
||||
9223372036854775807
|
||||
select * from t3 where a=9223372036854775806;
|
||||
a
|
||||
9223372036854775806
|
||||
delete from t3 where a=9223372036854775806;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775807
|
||||
drop table t3;
|
121
mysql-test/suite/parts/r/partition_bigint_myisam.result
Normal file
121
mysql-test/suite/parts/r/partition_bigint_myisam.result
Normal file
@ -0,0 +1,121 @@
|
||||
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=-2;
|
||||
a
|
||||
delete from t1 where a=-2;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t1 where a=18446744073709551615;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
select * from t2 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t2 where a=18446744073709551615;
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
delete from t2;
|
||||
65535 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
65535
|
||||
drop table t2;
|
||||
create table t3 (a bigint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775806
|
||||
9223372036854775807
|
||||
select * from t3 where a=9223372036854775806;
|
||||
a
|
||||
9223372036854775806
|
||||
delete from t3 where a=9223372036854775806;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775807
|
||||
drop table t3;
|
82
mysql-test/suite/parts/r/partition_double_innodb.result
Normal file
82
mysql-test/suite/parts/r/partition_double_innodb.result
Normal file
@ -0,0 +1,82 @@
|
||||
create table t1 (a double not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t1 where a=1.5;
|
||||
a
|
||||
1.5
|
||||
delete from t1 where a=1.5;
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
drop table t1;
|
||||
create table t2 (a double not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 10;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 10 */
|
||||
insert into t2 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t2 where a=1234.567;
|
||||
a
|
||||
1234.567
|
||||
delete from t2 where a=1234.567;
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
2.2250738585072016e208
|
||||
delete from t2;
|
||||
1024*3 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
3072
|
||||
drop table t2;
|
82
mysql-test/suite/parts/r/partition_double_myisam.result
Normal file
82
mysql-test/suite/parts/r/partition_double_myisam.result
Normal file
@ -0,0 +1,82 @@
|
||||
create table t1 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t1 where a=1.5;
|
||||
a
|
||||
1.5
|
||||
delete from t1 where a=1.5;
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
drop table t1;
|
||||
create table t2 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 10;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 10 */
|
||||
insert into t2 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t2 where a=1234.567;
|
||||
a
|
||||
1234.567
|
||||
delete from t2 where a=1234.567;
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
2.2250738585072016e208
|
||||
delete from t2;
|
||||
16384*3 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
49152
|
||||
drop table t2;
|
@ -88,85 +88,3 @@ select count(*) from t2;
|
||||
count(*)
|
||||
3072
|
||||
drop table t2;
|
||||
create table t1 (a double not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t1 where a=1.5;
|
||||
a
|
||||
1.5
|
||||
delete from t1 where a=1.5;
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
drop table t1;
|
||||
create table t2 (a double not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 10;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 10 */
|
||||
insert into t2 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t2 where a=1234.567;
|
||||
a
|
||||
1234.567
|
||||
delete from t2 where a=1234.567;
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
2.2250738585072016e208
|
||||
delete from t2;
|
||||
1024*3 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
3072
|
||||
drop table t2;
|
||||
|
@ -88,85 +88,3 @@ select count(*) from t2;
|
||||
count(*)
|
||||
49152
|
||||
drop table t2;
|
||||
create table t1 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t1 where a=1.5;
|
||||
a
|
||||
1.5
|
||||
delete from t1 where a=1.5;
|
||||
select * from t1;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
drop table t1;
|
||||
create table t2 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 10;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 10 */
|
||||
insert into t2 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
1234.567
|
||||
2.2250738585072016e208
|
||||
select * from t2 where a=1234.567;
|
||||
a
|
||||
1234.567
|
||||
delete from t2 where a=1234.567;
|
||||
select * from t2;
|
||||
a
|
||||
-2.2250738585072016e208
|
||||
-1.5
|
||||
-1
|
||||
-2.2250738585072014e-208
|
||||
0
|
||||
1.5
|
||||
2.2250738585072016e208
|
||||
delete from t2;
|
||||
16384*3 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
49152
|
||||
drop table t2;
|
||||
|
@ -1,221 +1,3 @@
|
||||
create table t1 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t1 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t1 where a=253;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
254
|
||||
255
|
||||
drop table t1;
|
||||
create table t2 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (255), (254), (253), (252);
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t2 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t2 where a=253;
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
254
|
||||
255
|
||||
delete from t2;
|
||||
255 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
255
|
||||
drop table t2;
|
||||
create table t3 (a tinyint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` tinyint(4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
select * from t3 where a=125;
|
||||
a
|
||||
125
|
||||
delete from t3 where a=125;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
126
|
||||
127
|
||||
drop table t3;
|
||||
create table t1 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t1 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t1 where a=65533;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (65535), (65534), (65533), (65532);
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t2 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t2 where a=65533;
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
delete from t2;
|
||||
1024 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
1024
|
||||
drop table t2;
|
||||
create table t3 (a smallint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` smallint(6) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32765
|
||||
32766
|
||||
32767
|
||||
select * from t3 where a=32765;
|
||||
a
|
||||
32765
|
||||
delete from t3 where a=32765;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32766
|
||||
32767
|
||||
drop table t3;
|
||||
create table t1 (a int unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
@ -325,233 +107,3 @@ a
|
||||
2147483646
|
||||
2147483647
|
||||
drop table t3;
|
||||
create table t1 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t1 where a=16777213;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (16777215), (16777214), (16777213), (16777212);
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
select * from t2 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t2 where a=16777213;
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
delete from t2;
|
||||
1024 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
1024
|
||||
drop table t2;
|
||||
create table t3 (a mediumint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` mediumint(9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388605
|
||||
8388606
|
||||
8388607
|
||||
select * from t3 where a=8388605;
|
||||
a
|
||||
8388605
|
||||
delete from t3 where a=8388605;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388606
|
||||
8388607
|
||||
drop table t3;
|
||||
create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=-2;
|
||||
a
|
||||
delete from t1 where a=-2;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t1 where a=18446744073709551615;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
select * from t2 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t2 where a=18446744073709551615;
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
delete from t2;
|
||||
1024 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
1024
|
||||
drop table t2;
|
||||
create table t3 (a bigint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775806
|
||||
9223372036854775807
|
||||
select * from t3 where a=9223372036854775806;
|
||||
a
|
||||
9223372036854775806
|
||||
delete from t3 where a=9223372036854775806;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775807
|
||||
drop table t3;
|
||||
|
@ -1,221 +1,3 @@
|
||||
create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t1 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t1 where a=253;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
254
|
||||
255
|
||||
drop table t1;
|
||||
create table t2 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (255), (254), (253), (252);
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t2 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t2 where a=253;
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
254
|
||||
255
|
||||
delete from t2;
|
||||
255 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
255
|
||||
drop table t2;
|
||||
create table t3 (a tinyint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` tinyint(4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
select * from t3 where a=125;
|
||||
a
|
||||
125
|
||||
delete from t3 where a=125;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
126
|
||||
127
|
||||
drop table t3;
|
||||
create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t1 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t1 where a=65533;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (65535), (65534), (65533), (65532);
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t2 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t2 where a=65533;
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
delete from t2;
|
||||
65535 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
65535
|
||||
drop table t2;
|
||||
create table t3 (a smallint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` smallint(6) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32765
|
||||
32766
|
||||
32767
|
||||
select * from t3 where a=32765;
|
||||
a
|
||||
32765
|
||||
delete from t3 where a=32765;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32766
|
||||
32767
|
||||
drop table t3;
|
||||
create table t1 (a int unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
@ -325,233 +107,3 @@ a
|
||||
2147483646
|
||||
2147483647
|
||||
drop table t3;
|
||||
create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t1 where a=16777213;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (16777215), (16777214), (16777213), (16777212);
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
select * from t2 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t2 where a=16777213;
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
delete from t2;
|
||||
65535 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
65535
|
||||
drop table t2;
|
||||
create table t3 (a mediumint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` mediumint(9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388605
|
||||
8388606
|
||||
8388607
|
||||
select * from t3 where a=8388605;
|
||||
a
|
||||
8388605
|
||||
delete from t3 where a=8388605;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388606
|
||||
8388607
|
||||
drop table t3;
|
||||
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=-2;
|
||||
a
|
||||
delete from t1 where a=-2;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t1 where a=18446744073709551615;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
select * from t2 where a=18446744073709551615;
|
||||
a
|
||||
18446744073709551615
|
||||
delete from t2 where a=18446744073709551615;
|
||||
select * from t2;
|
||||
a
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
delete from t2;
|
||||
65535 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
65535
|
||||
drop table t2;
|
||||
create table t3 (a bigint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` bigint(20) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775806
|
||||
9223372036854775807
|
||||
select * from t3 where a=9223372036854775806;
|
||||
a
|
||||
9223372036854775806
|
||||
delete from t3 where a=9223372036854775806;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
0
|
||||
1
|
||||
9223372036854775804
|
||||
9223372036854775805
|
||||
9223372036854775807
|
||||
drop table t3;
|
||||
|
109
mysql-test/suite/parts/r/partition_mediumint_innodb.result
Normal file
109
mysql-test/suite/parts/r/partition_mediumint_innodb.result
Normal file
@ -0,0 +1,109 @@
|
||||
create table t1 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t1 where a=16777213;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (16777215), (16777214), (16777213), (16777212);
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
select * from t2 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t2 where a=16777213;
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
delete from t2;
|
||||
1024 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
1024
|
||||
drop table t2;
|
||||
create table t3 (a mediumint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` mediumint(9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388605
|
||||
8388606
|
||||
8388607
|
||||
select * from t3 where a=8388605;
|
||||
a
|
||||
8388605
|
||||
delete from t3 where a=8388605;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388606
|
||||
8388607
|
||||
drop table t3;
|
109
mysql-test/suite/parts/r/partition_mediumint_myisam.result
Normal file
109
mysql-test/suite/parts/r/partition_mediumint_myisam.result
Normal file
@ -0,0 +1,109 @@
|
||||
create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
select * from t1 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t1 where a=16777213;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
2
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (16777215), (16777214), (16777213), (16777212);
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777213
|
||||
16777214
|
||||
16777215
|
||||
select * from t2 where a=16777213;
|
||||
a
|
||||
16777213
|
||||
delete from t2 where a=16777213;
|
||||
select * from t2;
|
||||
a
|
||||
16777212
|
||||
16777214
|
||||
16777215
|
||||
delete from t2;
|
||||
65535 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
65535
|
||||
drop table t2;
|
||||
create table t3 (a mediumint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` mediumint(9) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (8388607), (8388606), (8388605), (8388604), (-8388608), (-8388607), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388605
|
||||
8388606
|
||||
8388607
|
||||
select * from t3 where a=8388605;
|
||||
a
|
||||
8388605
|
||||
delete from t3 where a=8388605;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
0
|
||||
1
|
||||
8388604
|
||||
8388606
|
||||
8388607
|
||||
drop table t3;
|
109
mysql-test/suite/parts/r/partition_smallint_innodb.result
Normal file
109
mysql-test/suite/parts/r/partition_smallint_innodb.result
Normal file
@ -0,0 +1,109 @@
|
||||
create table t1 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t1 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t1 where a=65533;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (65535), (65534), (65533), (65532);
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t2 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t2 where a=65533;
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
delete from t2;
|
||||
1024 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
1024
|
||||
drop table t2;
|
||||
create table t3 (a smallint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` smallint(6) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32765
|
||||
32766
|
||||
32767
|
||||
select * from t3 where a=32765;
|
||||
a
|
||||
32765
|
||||
delete from t3 where a=32765;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32766
|
||||
32767
|
||||
drop table t3;
|
109
mysql-test/suite/parts/r/partition_smallint_myisam.result
Normal file
109
mysql-test/suite/parts/r/partition_smallint_myisam.result
Normal file
@ -0,0 +1,109 @@
|
||||
create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t1 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t1 where a=65533;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
256
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
drop table t1;
|
||||
create table t2 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (65535), (65534), (65533), (65532);
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65533
|
||||
65534
|
||||
65535
|
||||
select * from t2 where a=65533;
|
||||
a
|
||||
65533
|
||||
delete from t2 where a=65533;
|
||||
select * from t2;
|
||||
a
|
||||
65532
|
||||
65534
|
||||
65535
|
||||
delete from t2;
|
||||
65535 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
65535
|
||||
drop table t2;
|
||||
create table t3 (a smallint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` smallint(6) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (32767), (32766), (32765), (32764), (-32768), (-32767), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32765
|
||||
32766
|
||||
32767
|
||||
select * from t3 where a=32765;
|
||||
a
|
||||
32765
|
||||
delete from t3 where a=32765;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
0
|
||||
1
|
||||
32764
|
||||
32766
|
||||
32767
|
||||
drop table t3;
|
109
mysql-test/suite/parts/r/partition_tinyint_innodb.result
Normal file
109
mysql-test/suite/parts/r/partition_tinyint_innodb.result
Normal file
@ -0,0 +1,109 @@
|
||||
create table t1 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
|
||||
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t1 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t1 where a=253;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
254
|
||||
255
|
||||
drop table t1;
|
||||
create table t2 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (255), (254), (253), (252);
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t2 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t2 where a=253;
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
254
|
||||
255
|
||||
delete from t2;
|
||||
255 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
255
|
||||
drop table t2;
|
||||
create table t3 (a tinyint not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` tinyint(4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
select * from t3 where a=125;
|
||||
a
|
||||
125
|
||||
delete from t3 where a=125;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
126
|
||||
127
|
||||
drop table t3;
|
109
mysql-test/suite/parts/r/partition_tinyint_myisam.result
Normal file
109
mysql-test/suite/parts/r/partition_tinyint_myisam.result
Normal file
@ -0,0 +1,109 @@
|
||||
create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 max_rows=20 min_rows=2,
|
||||
partition pa2 max_rows=30 min_rows=3,
|
||||
partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM,
|
||||
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM,
|
||||
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM,
|
||||
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
|
||||
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t1 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t1 where a=253;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
128
|
||||
2
|
||||
252
|
||||
254
|
||||
255
|
||||
drop table t1;
|
||||
create table t2 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 8;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 8 */
|
||||
insert into t2 values (255), (254), (253), (252);
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
253
|
||||
254
|
||||
255
|
||||
select * from t2 where a=253;
|
||||
a
|
||||
253
|
||||
delete from t2 where a=253;
|
||||
select * from t2;
|
||||
a
|
||||
252
|
||||
254
|
||||
255
|
||||
delete from t2;
|
||||
255 inserts;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
255
|
||||
drop table t2;
|
||||
create table t3 (a tinyint not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) partitions 7;
|
||||
show create table t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` tinyint(4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (a)
|
||||
PARTITIONS 7 */
|
||||
insert into t3 values (127), (126), (125), (124), (-128), (-127), (1), (-1), (0);
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
125
|
||||
126
|
||||
127
|
||||
select * from t3 where a=125;
|
||||
a
|
||||
125
|
||||
delete from t3 where a=125;
|
||||
select * from t3;
|
||||
a
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
0
|
||||
1
|
||||
124
|
||||
126
|
||||
127
|
||||
drop table t3;
|
46
mysql-test/suite/parts/t/partition_bigint_innodb.test
Normal file
46
mysql-test/suite/parts/t/partition_bigint_innodb.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_bigint_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# INNODB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_innodb #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_bigint.inc
|
46
mysql-test/suite/parts/t/partition_bigint_myisam.test
Normal file
46
mysql-test/suite/parts/t/partition_bigint_myisam.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_bigint_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# MyISAM branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_myisam #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
--source include/long_test.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'MYISAM';
|
||||
##### number of rows to be inserted
|
||||
let $maxrows=65535;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_bigint.inc
|
46
mysql-test/suite/parts/t/partition_double_innodb.test
Normal file
46
mysql-test/suite/parts/t/partition_double_innodb.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_double_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around float type #
|
||||
# INNODB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_float_innodb #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
##### Number of row to be inserted.
|
||||
let $maxrows=1024;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_double.inc
|
46
mysql-test/suite/parts/t/partition_double_myisam.test
Normal file
46
mysql-test/suite/parts/t/partition_double_myisam.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_double_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around float type #
|
||||
# MyISAM branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_float_myisam #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
--source include/long_test.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'MYISAM';
|
||||
##### Number of row to be inserted.
|
||||
let $maxrows=16384;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_double.inc
|
@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test for double type has been spawned into a separate test file #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@ -44,4 +44,3 @@ let $maxrows=1024;
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_float.inc
|
||||
--source suite/parts/inc/partition_double.inc
|
||||
|
@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test for double type has been spawned into a separate test file #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@ -44,4 +44,3 @@ let $maxrows=16384;
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_float.inc
|
||||
--source suite/parts/inc/partition_double.inc
|
||||
|
@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: Int subtypes (tinyint etc.) have been spawned into separate tests #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@ -43,8 +43,4 @@ let $maxrows=1024;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_tinyint.inc
|
||||
--source suite/parts/inc/partition_smallint.inc
|
||||
--source suite/parts/inc/partition_int.inc
|
||||
--source suite/parts/inc/partition_mediumint.inc
|
||||
--source suite/parts/inc/partition_bigint.inc
|
||||
|
@ -8,9 +8,9 @@
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: #
|
||||
# Change Date: #
|
||||
# Change: #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: Int subtypes (tinyint etc.) have been spawned into separate tests #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
@ -43,8 +43,4 @@ let $maxrows=65535;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_tinyint.inc
|
||||
--source suite/parts/inc/partition_smallint.inc
|
||||
--source suite/parts/inc/partition_int.inc
|
||||
--source suite/parts/inc/partition_mediumint.inc
|
||||
--source suite/parts/inc/partition_bigint.inc
|
||||
|
46
mysql-test/suite/parts/t/partition_mediumint_innodb.test
Normal file
46
mysql-test/suite/parts/t/partition_mediumint_innodb.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_mediumint_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# INNODB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_innodb #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mediumint.inc
|
46
mysql-test/suite/parts/t/partition_mediumint_myisam.test
Normal file
46
mysql-test/suite/parts/t/partition_mediumint_myisam.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_mediumint_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# MyISAM branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_myisam #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
--source include/long_test.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'MYISAM';
|
||||
##### number of rows to be inserted
|
||||
let $maxrows=65535;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mediumint.inc
|
46
mysql-test/suite/parts/t/partition_smallint_innodb.test
Normal file
46
mysql-test/suite/parts/t/partition_smallint_innodb.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_smallint_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# INNODB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_innodb #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_smallint.inc
|
46
mysql-test/suite/parts/t/partition_smallint_myisam.test
Normal file
46
mysql-test/suite/parts/t/partition_smallint_myisam.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_smallint_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# MyISAM branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_myisam #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
--source include/long_test.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'MYISAM';
|
||||
##### number of rows to be inserted
|
||||
let $maxrows=65535;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_smallint.inc
|
46
mysql-test/suite/parts/t/partition_tinyint_innodb.test
Normal file
46
mysql-test/suite/parts/t/partition_tinyint_innodb.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_tinyint_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# INNODB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_innodb #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
##### max rows to be inserted
|
||||
let $maxrows=1024;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_tinyint.inc
|
46
mysql-test/suite/parts/t/partition_tinyint_myisam.test
Normal file
46
mysql-test/suite/parts/t/partition_tinyint_myisam.test
Normal file
@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# t/partition_tinyint_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around integer type #
|
||||
# MyISAM branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: HH #
|
||||
# Original Date: 2006-08-01 #
|
||||
# Change Author: Elena Stepanova #
|
||||
# Change Date: 2017-02-18 #
|
||||
# Change: The test file is spawned from the mega-test partition_int_myisam #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
--source include/long_test.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'MYISAM';
|
||||
##### number of rows to be inserted
|
||||
let $maxrows=65535;
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_tinyint.inc
|
@ -0,0 +1,10 @@
|
||||
# threads are removed from:
|
||||
# - information_schema.processlist
|
||||
# - performance_schema.threads
|
||||
# at different times, so we may have to wait a little more
|
||||
# for the event_scheduler to shutdown
|
||||
#
|
||||
let $wait_condition=
|
||||
SELECT COUNT(*) = 0 FROM performance_schema.threads
|
||||
WHERE name like 'thread/sql/event%';
|
||||
--source include/wait_condition.inc
|
@ -0,0 +1,10 @@
|
||||
# threads are removed from:
|
||||
# - information_schema.processlist
|
||||
# - performance_schema.threads
|
||||
# at different times, so we may have to wait a little more
|
||||
# for the event_scheduler to shutdown
|
||||
#
|
||||
let $wait_condition=
|
||||
SELECT COUNT(*) = 1 FROM performance_schema.threads
|
||||
WHERE name like 'thread/sql/event%';
|
||||
--source include/wait_condition.inc
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user