mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 5.1 main -> 5.1-rpl
This commit is contained in:
@ -389,6 +389,9 @@ client/readline.cpp
|
||||
client/rpl_constants.h
|
||||
client/rpl_record_old.cc
|
||||
client/rpl_record_old.h
|
||||
client/rpl_tblmap.h
|
||||
client/rpl_tblmap.cc
|
||||
client/rpl_utility.h
|
||||
client/select_test
|
||||
client/sql_string.cpp
|
||||
client/ssl_test
|
||||
|
@ -176,7 +176,7 @@ check_cpu () {
|
||||
fi
|
||||
|
||||
cc_ver=`$cc --version | sed 1q`
|
||||
cc_verno=`echo $cc_ver | sed -e 's/^.*gcc/gcc/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
|
||||
cc_verno=`echo $cc_ver | sed -e 's/^.*(GCC)//g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
|
||||
set -- `echo $cc_verno | tr '.' ' '`
|
||||
cc_major=$1
|
||||
cc_minor=$2
|
||||
|
@ -49,7 +49,7 @@ bin-dist: all
|
||||
$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
|
||||
|
||||
# Remove BK's "SCCS" subdirectories from source distribution
|
||||
# Create initial database files for Windows installations.
|
||||
# Create initial database files for Windows installations and check them.
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir) -type d -name SCCS -print`
|
||||
mkdir -p $(distdir)/win
|
||||
@ -57,6 +57,7 @@ dist-hook:
|
||||
--builddir=$(top_builddir) \
|
||||
--datadir=$(distdir)/win/data \
|
||||
--srcdir=$(top_srcdir)
|
||||
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
|
||||
|
||||
tags:
|
||||
support-files/build-tags
|
||||
|
@ -104,6 +104,7 @@ DEFS = -DUNDEF_THREADS_HACK \
|
||||
-DDATADIR="\"$(localstatedir)\""
|
||||
|
||||
sql_src=log_event.h mysql_priv.h rpl_constants.h \
|
||||
rpl_utility.h rpl_tblmap.h rpl_tblmap.cc \
|
||||
log_event.cc my_decimal.h my_decimal.cc \
|
||||
log_event_old.h log_event_old.cc \
|
||||
rpl_record_old.h rpl_record_old.cc
|
||||
|
@ -64,7 +64,8 @@ static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||
|
||||
static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
|
||||
static bool opt_hexdump= 0;
|
||||
const char *base64_output_mode_names[]= {"NEVER", "AUTO", "ALWAYS", NullS};
|
||||
const char *base64_output_mode_names[]=
|
||||
{"NEVER", "AUTO", "ALWAYS", "UNSPEC", "DECODE-ROWS", NullS};
|
||||
TYPELIB base64_output_mode_typelib=
|
||||
{ array_elements(base64_output_mode_names) - 1, "",
|
||||
base64_output_mode_names, NULL };
|
||||
@ -83,6 +84,8 @@ static const char* user = 0;
|
||||
static char* pass = 0;
|
||||
static char *charset= 0;
|
||||
|
||||
static uint verbose= 0;
|
||||
|
||||
static ulonglong start_position, stop_position;
|
||||
#define start_position_mot ((my_off_t)start_position)
|
||||
#define stop_position_mot ((my_off_t)stop_position)
|
||||
@ -1063,6 +1066,9 @@ that may lead to an endless loop.",
|
||||
{"user", 'u', "Connect to the remote server as username.",
|
||||
(uchar**) &user, (uchar**) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"verbose", 'v', "Reconstruct SQL statements out of row events. "
|
||||
"-v -v adds comments on column data types",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"open_files_limit", OPT_OPEN_FILES_LIMIT,
|
||||
@ -1258,6 +1264,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
(find_type_or_exit(argument, &base64_output_mode_typelib, opt->name)-1);
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
if (argument == disabled_my_option)
|
||||
verbose= 0;
|
||||
else
|
||||
verbose++;
|
||||
break;
|
||||
case 'V':
|
||||
print_version();
|
||||
exit(0);
|
||||
@ -1344,6 +1356,8 @@ static Exit_status dump_log_entries(const char* logname)
|
||||
fprintf(result_file, "DELIMITER /*!*/;\n");
|
||||
strmov(print_event_info.delimiter, "/*!*/;");
|
||||
|
||||
print_event_info.verbose= short_form ? 0 : verbose;
|
||||
|
||||
rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
|
||||
dump_local_log_entries(&print_event_info, logname));
|
||||
|
||||
|
@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
|
||||
#
|
||||
# When changing major version number please also check switch statement
|
||||
# in mysqlbinlog::check_master_version().
|
||||
AM_INIT_AUTOMAKE(mysql, 5.1.28)
|
||||
AM_INIT_AUTOMAKE(mysql, 5.1.30)
|
||||
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
||||
|
||||
PROTOCOL_VERSION=10
|
||||
|
@ -246,7 +246,7 @@ extern int NEAR my_umask, /* Default creation mask */
|
||||
NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
||||
NEAR my_dont_interrupt; /* call remember_intr when set */
|
||||
extern my_bool NEAR mysys_uses_curses, my_use_symdir;
|
||||
extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
|
||||
extern ulong my_default_record_cache_size;
|
||||
extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
|
||||
@ -577,6 +577,7 @@ extern int my_close(File Filedes,myf MyFlags);
|
||||
extern File my_dup(File file, myf MyFlags);
|
||||
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
|
||||
extern int my_readlink(char *to, const char *filename, myf MyFlags);
|
||||
extern int my_is_symlink(const char *filename);
|
||||
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,
|
||||
|
@ -256,6 +256,10 @@ extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
|
||||
extern my_off_t myisam_max_temp_length;
|
||||
extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
|
||||
|
||||
/* usually used to check if a symlink points into the mysql data home */
|
||||
/* which is normally forbidden */
|
||||
extern int (*myisam_test_invalid_symlink)(const char *filename);
|
||||
|
||||
/* Prototypes for myisam-functions */
|
||||
|
||||
extern int mi_close(struct st_myisam_info *file);
|
||||
|
@ -1103,6 +1103,9 @@ void Protocol_text::prepare_for_resend()
|
||||
data->embedded_info->prev_ptr= &cur->next;
|
||||
next_field=cur->data;
|
||||
next_mysql_field= data->embedded_info->fields_list;
|
||||
#ifndef DBUG_OFF
|
||||
field_pos= 0;
|
||||
#endif
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -4,354 +4,641 @@
|
||||
# Bug#3300
|
||||
# Designed and tested by Sinisa Milivojevic, sinisa@mysql.com
|
||||
#
|
||||
# two non-interfering UPDATE's not changing result set
|
||||
#
|
||||
# The variable
|
||||
# $engine_type -- storage engine to be tested
|
||||
# has to be set before sourcing this script.
|
||||
# These variables have to be set before sourcing this script:
|
||||
# TRANSACTION ISOLATION LEVEL REPEATABLE READ
|
||||
# innodb_locks_unsafe_for_binlog 0 (default) or 1 (by
|
||||
# --innodb_locks_unsafe_for_binlog)
|
||||
# $engine_type storage engine to be tested
|
||||
#
|
||||
# Last update:
|
||||
# 2006-08-02 ML test refactored
|
||||
# old name was t/innodb_concurrent.test
|
||||
# main code went into include/concurrent.inc
|
||||
# 2008-06-03 KP test refactored; removed name locks, added comments.
|
||||
# renamed wrapper t/concurrent_innodb.test ->
|
||||
# t/concurrent_innodb_unsafelog.test
|
||||
# new wrapper t/concurrent_innodb_safelog.test
|
||||
#
|
||||
|
||||
connection default;
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
|
||||
#
|
||||
# Show prerequisites for this test.
|
||||
#
|
||||
SELECT @@global.tx_isolation;
|
||||
SELECT @@global.innodb_locks_unsafe_for_binlog;
|
||||
#
|
||||
# When innodb_locks_unsafe_for_binlog is not set (zero), which is the
|
||||
# default, InnoDB takes "next-key locks"/"gap locks". This means it
|
||||
# locks the gap before the keys that it accessed to find the rows to
|
||||
# use for a statement. In this case we have to expect some more lock
|
||||
# wait timeouts in the tests below as if innodb_locks_unsafe_for_binlog
|
||||
# is set (non-zero). In the latter case no "next-key locks"/"gap locks"
|
||||
# are taken and locks on keys that do not match the WHERE conditon are
|
||||
# released. Hence less lock collisions occur.
|
||||
# We use the variable $keep_locks to set the expectations for
|
||||
# lock wait timeouts accordingly.
|
||||
#
|
||||
let $keep_locks= `SELECT NOT @@global.innodb_locks_unsafe_for_binlog`;
|
||||
--echo # keep_locks == $keep_locks
|
||||
|
||||
#
|
||||
# Set up privileges and remove user level locks, if exist.
|
||||
#
|
||||
GRANT USAGE ON test.* TO mysqltest@localhost;
|
||||
|
||||
#
|
||||
# Preparatory cleanup.
|
||||
#
|
||||
DO release_lock("hello");
|
||||
DO release_lock("hello2");
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",1);
|
||||
connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send update t1 set eta=1+get_lock("hello",1)*0 where tipo=11;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
update t1 set eta=2 where tipo=22;
|
||||
select release_lock("hello");
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
commit;
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# two UPDATE's running and one changing result set
|
||||
#
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
select release_lock("hello");
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
commit;
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** two UPDATE's running and both changing distinct result sets
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
--echo ** Get user level lock (ULL) for thread 1
|
||||
select get_lock("hello",10);
|
||||
|
||||
--echo ** connection thread2
|
||||
connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
--echo ** Start transaction for thread 2
|
||||
begin;
|
||||
--echo ** Update will cause a table scan and a new ULL will
|
||||
--echo ** be created and blocked on the first row where tipo=11.
|
||||
send update t1 set eta=1+get_lock("hello",10)*0 where tipo=11;
|
||||
sleep 1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Start new transaction for thread 1
|
||||
begin;
|
||||
--echo ** Update on t1 will cause a table scan which will be blocked because
|
||||
--echo ** the previously initiated table scan applied exclusive key locks on
|
||||
--echo ** all primary keys.
|
||||
--echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
--echo ** do not match the WHERE condition are released.
|
||||
if ($keep_locks)
|
||||
{
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set eta=2 where tipo=22;
|
||||
}
|
||||
if (!$keep_locks)
|
||||
{
|
||||
update t1 set eta=2 where tipo=22;
|
||||
}
|
||||
--echo ** Release user level name lock from thread 1. This will cause the ULL
|
||||
--echo ** on thread 2 to end its wait.
|
||||
select release_lock("hello");
|
||||
--echo ** Table is now updated with a new eta on tipo=22 for thread 1.
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Release the lock and collect result from update on thread 2
|
||||
reap;
|
||||
select release_lock("hello");
|
||||
--echo ** Table should have eta updates where tipo=11 but updates made by
|
||||
--echo ** thread 1 shouldn't be visible yet.
|
||||
select * from t1;
|
||||
--echo ** Sending commit on thread 2.
|
||||
commit;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Make sure table reads didn't change yet on thread 1.
|
||||
select * from t1;
|
||||
--echo ** And send final commit on thread 1.
|
||||
commit;
|
||||
--echo ** Table should now be updated by both updates in the order of
|
||||
--echo ** thread 1,2.
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Make sure the output is similar for t1.
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# One UPDATE and one INSERT .... Monty's test
|
||||
#
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** two UPDATE's running and one changing result set
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
--echo ** Get ULL "hello" on thread 1
|
||||
select get_lock("hello",10);
|
||||
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1 (a int not null, b int not null);
|
||||
insert into t1 values (1,1),(2,1),(3,1),(4,1);
|
||||
select get_lock("hello2",1000);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send update t1 set b=10+get_lock(concat("hello",a),1000)*0 where
|
||||
a=2;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
insert into t1 values (1,1);
|
||||
select release_lock("hello2");
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
sleep 1;
|
||||
connection thread2;
|
||||
reap;
|
||||
connection default;
|
||||
drop table t1;
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
--echo ** Start transaction on thread 2
|
||||
begin;
|
||||
--echo ** Update will cause a table scan.
|
||||
--echo ** This will cause a hang on the first row where tipo=1 until the
|
||||
--echo ** blocking ULL is released.
|
||||
send update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
|
||||
sleep 1;
|
||||
|
||||
#
|
||||
# one UPDATE changing result set and SELECT ... FOR UPDATE
|
||||
#
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send select * from t1 where tipo=2 FOR UPDATE;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
--error 1205
|
||||
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
commit;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
connection default;
|
||||
drop table t1;
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Start transaction on thread 1
|
||||
begin;
|
||||
--echo ** Update on t1 will cause a table scan which will be blocked because
|
||||
--echo ** the previously initiated table scan applied exclusive key locks on
|
||||
--echo ** all primary keys.
|
||||
--echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
--echo ** do not match the WHERE condition are released.
|
||||
if ($keep_locks)
|
||||
{
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
}
|
||||
if (!$keep_locks)
|
||||
{
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
}
|
||||
--echo ** Release ULL. This will release the next waiting ULL on thread 2.
|
||||
select release_lock("hello");
|
||||
--echo ** The table should still be updated with updates for thread 1 only:
|
||||
select * from t1;
|
||||
|
||||
#
|
||||
# one UPDATE not changing result set and SELECT ... FOR UPDATE
|
||||
#
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send select * from t1 where tipo=2 FOR UPDATE;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
--error 1205
|
||||
update t1 set tipo=11+get_lock("hello",10)*0 where tipo=22;
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
commit;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
connection default;
|
||||
drop table t1;
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Release the lock and collect result from thread 2:
|
||||
reap;
|
||||
select release_lock("hello");
|
||||
--echo ** Seen from thread 2 the table should have been updated on four
|
||||
--echo ** places.
|
||||
select * from t1;
|
||||
commit;
|
||||
|
||||
#
|
||||
# two SELECT ... FOR UPDATE
|
||||
#
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send select * from t1 where tipo=2 FOR UPDATE;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
--error 1205
|
||||
select * from t1 where tipo=1 FOR UPDATE;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
commit;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Thread 2 has committed but the result should remain the same for
|
||||
--echo ** thread 1 (updated on three places):
|
||||
select * from t1;
|
||||
commit;
|
||||
--echo ** After a commit the table should be merged with the previous
|
||||
--echo ** commit.
|
||||
--echo ** This select should show both updates:
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# one UPDATE changing result set and DELETE
|
||||
#
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send delete from t1 where tipo=2;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
--error 1205
|
||||
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
commit;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** One UPDATE and one INSERT .... Monty's test
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1 (a int not null, b int not null);
|
||||
insert into t1 values (1,1),(2,1),(3,1),(4,1);
|
||||
--echo ** Create ULL 'hello2'
|
||||
select get_lock("hello2",10);
|
||||
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
--echo ** Begin a new transaction on thread 2
|
||||
begin;
|
||||
--echo ** Update will create a table scan which creates a ULL where a=2;
|
||||
--echo ** this will hang waiting on thread 1.
|
||||
send update t1 set b=10+get_lock(concat("hello",a),10)*0 where a=2;
|
||||
sleep 1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Insert new values to t1 from thread 1; this created an implicit
|
||||
--echo ** commit since there are no on-going transactions.
|
||||
insert into t1 values (1,1);
|
||||
--echo ** Release the ULL (thread 2 updates will finish).
|
||||
select release_lock("hello2");
|
||||
--echo ** ..but thread 1 will still see t1 as if nothing has happend:
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Collect results from thread 2 and release the lock.
|
||||
reap;
|
||||
select release_lock("hello2");
|
||||
--echo ** The table should look like the original+updates for thread 2,
|
||||
--echo ** and consist of new rows:
|
||||
select * from t1;
|
||||
--echo ** Commit changes from thread 2
|
||||
commit;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# one UPDATE not changing result set and DELETE
|
||||
#
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send delete from t1 where tipo=2;
|
||||
sleep 1;
|
||||
connection thread1;
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=22;
|
||||
select * from t1;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
connection thread1;
|
||||
commit;
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** one UPDATE changing result set and SELECT ... FOR UPDATE
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
--echo ** Begin a new transaction on thread 2
|
||||
begin;
|
||||
--echo ** Select a range for update.
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Begin a new transaction on thread 1
|
||||
begin;
|
||||
--echo ** Update the same range which is marked for update on thread 2; this
|
||||
--echo ** will hang because of row locks.
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
--echo ** After the update the table will be unmodified because the previous
|
||||
--echo ** transaction failed and was rolled back.
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** The table should look unmodified from thread 2.
|
||||
select * from t1;
|
||||
--echo ** Sending a commit should release the row locks and enable
|
||||
--echo ** thread 1 to complete the transaction.
|
||||
commit;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Commit on thread 1.
|
||||
commit;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** The table should not have been changed.
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Even on thread 1:
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
sleep 1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** one UPDATE not changing result set and SELECT ... FOR UPDATE
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
--echo ** Starting new transaction on thread 2.
|
||||
begin;
|
||||
--echo ** Starting SELECT .. FOR UPDATE
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo
|
||||
--echo ** Starting new transaction on thread 1
|
||||
begin;
|
||||
--echo ** Updating single row using a table scan. This will time out
|
||||
--echo ** because of ongoing transaction on thread 1 holding lock on
|
||||
--echo ** all primary keys in the scan.
|
||||
--echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
--echo ** do not match the WHERE condition are released.
|
||||
if ($keep_locks)
|
||||
{
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set tipo=11 where tipo=22;
|
||||
}
|
||||
if (!$keep_locks)
|
||||
{
|
||||
update t1 set tipo=11 where tipo=22;
|
||||
}
|
||||
--echo ** After the time out the transaction is aborted; no rows should
|
||||
--echo ** have changed.
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** The same thing should hold true for the transaction on
|
||||
--echo ** thread 2
|
||||
select * from t1;
|
||||
send commit;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
commit;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Even after committing:
|
||||
reap;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** two SELECT ... FOR UPDATE
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
--echo ** Begin a new transaction on thread 2
|
||||
begin;
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Begin a new transaction on thread 1
|
||||
begin;
|
||||
--echo ** Selecting a range for update by table scan will be blocked
|
||||
--echo ** because of on-going transaction on thread 2.
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
select * from t1 where tipo=1 FOR UPDATE;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Table will be unchanged and the select command will not be
|
||||
--echo ** blocked:
|
||||
select * from t1;
|
||||
--echo ** Commit transacton on thread 2.
|
||||
commit;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Commit transaction on thread 1.
|
||||
commit;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
--echo ** Make sure table isn't blocked on thread 2:
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
--echo ** Make sure table isn't blocked on thread 1:
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** one UPDATE changing result set and DELETE
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send delete from t1 where tipo=2;
|
||||
sleep 1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
begin;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
commit;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo
|
||||
--echo **
|
||||
--echo ** one UPDATE not changing result set and DELETE
|
||||
--echo **
|
||||
--echo ** connection thread1
|
||||
#connect (thread1, localhost, mysqltest,,);
|
||||
connection thread1;
|
||||
--echo ** Set up table
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
|
||||
--echo ** connection thread2
|
||||
#connect (thread2, localhost, mysqltest,,);
|
||||
connection thread2;
|
||||
begin;
|
||||
send delete from t1 where tipo=2;
|
||||
sleep 1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
begin;
|
||||
--echo ** Update on t1 will cause a table scan which will be blocked because
|
||||
--echo ** the previously initiated table scan applied exclusive key locks on
|
||||
--echo ** all primary keys.
|
||||
--echo ** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
--echo ** do not match the WHERE condition are released.
|
||||
if ($keep_locks)
|
||||
{
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
update t1 set tipo=1 where tipo=22;
|
||||
}
|
||||
if (!$keep_locks)
|
||||
{
|
||||
update t1 set tipo=1 where tipo=22;
|
||||
}
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
send commit;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
commit;
|
||||
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
reap;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection thread1
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
|
||||
|
||||
disconnect thread1;
|
||||
disconnect thread2;
|
||||
|
||||
|
4
mysql-test/include/have_case_insensitive_file_system.inc
Normal file
4
mysql-test/include/have_case_insensitive_file_system.inc
Normal file
@ -0,0 +1,4 @@
|
||||
--require r/case_insensitive_file_system.require
|
||||
--disable_query_log
|
||||
show variables like "lower_case_file_system";
|
||||
--enable_query_log
|
@ -1,4 +1,4 @@
|
||||
--require r/lowercase0.require
|
||||
--disable_query_log
|
||||
show variables like 'lower_case_%';
|
||||
show variables like "lower_case_table_names";
|
||||
--enable_query_log
|
||||
|
4
mysql-test/include/have_lowercase2.inc
Normal file
4
mysql-test/include/have_lowercase2.inc
Normal file
@ -0,0 +1,4 @@
|
||||
--require r/lowercase2.require
|
||||
--disable_query_log
|
||||
show variables like 'lower_case_table_names';
|
||||
--enable_query_log
|
1922
mysql-test/include/mysqlbinlog_row_engine.inc
Normal file
1922
mysql-test/include/mysqlbinlog_row_engine.inc
Normal file
File diff suppressed because it is too large
Load Diff
25
mysql-test/include/ps_ddl_1.inc
Normal file
25
mysql-test/include/ps_ddl_1.inc
Normal file
@ -0,0 +1,25 @@
|
||||
# include/ps_ddl_1.inc
|
||||
#
|
||||
# Auxiliary script to be used in ps_ddl.test
|
||||
#
|
||||
|
||||
prepare stmt_sf from 'select f_12093();';
|
||||
prepare stmt_sp from 'call p_12093(f_12093())';
|
||||
execute stmt_sf;
|
||||
execute stmt_sp;
|
||||
|
||||
connection con1;
|
||||
eval $my_drop;
|
||||
#
|
||||
connection default;
|
||||
--echo # XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
--echo # XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
#
|
||||
--echo # XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
--echo # XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
|
||||
connection default;
|
2
mysql-test/r/case_insensitive_file_system.require
Normal file
2
mysql-test/r/case_insensitive_file_system.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
lower_case_file_system ON
|
803
mysql-test/r/concurrent_innodb_safelog.result
Normal file
803
mysql-test/r/concurrent_innodb_safelog.result
Normal file
@ -0,0 +1,803 @@
|
||||
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
SELECT @@global.tx_isolation;
|
||||
@@global.tx_isolation
|
||||
REPEATABLE-READ
|
||||
SELECT @@global.innodb_locks_unsafe_for_binlog;
|
||||
@@global.innodb_locks_unsafe_for_binlog
|
||||
0
|
||||
# keep_locks == 1
|
||||
GRANT USAGE ON test.* TO mysqltest@localhost;
|
||||
DO release_lock("hello");
|
||||
DO release_lock("hello2");
|
||||
drop table if exists t1;
|
||||
|
||||
**
|
||||
** two UPDATE's running and both changing distinct result sets
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** Get user level lock (ULL) for thread 1
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Start transaction for thread 2
|
||||
begin;
|
||||
** Update will cause a table scan and a new ULL will
|
||||
** be created and blocked on the first row where tipo=11.
|
||||
update t1 set eta=1+get_lock("hello",10)*0 where tipo=11;
|
||||
** connection thread1
|
||||
** Start new transaction for thread 1
|
||||
begin;
|
||||
** Update on t1 will cause a table scan which will be blocked because
|
||||
** the previously initiated table scan applied exclusive key locks on
|
||||
** all primary keys.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set eta=2 where tipo=22;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
** Release user level name lock from thread 1. This will cause the ULL
|
||||
** on thread 2 to end its wait.
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** Table is now updated with a new eta on tipo=22 for thread 1.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** Release the lock and collect result from update on thread 2
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** Table should have eta updates where tipo=11 but updates made by
|
||||
** thread 1 shouldn't be visible yet.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** Sending commit on thread 2.
|
||||
commit;
|
||||
** connection thread1
|
||||
** Make sure table reads didn't change yet on thread 1.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** And send final commit on thread 1.
|
||||
commit;
|
||||
** Table should now be updated by both updates in the order of
|
||||
** thread 1,2.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** Make sure the output is similar for t1.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** two UPDATE's running and one changing result set
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** Get ULL "hello" on thread 1
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Start transaction on thread 2
|
||||
begin;
|
||||
** Update will cause a table scan.
|
||||
** This will cause a hang on the first row where tipo=1 until the
|
||||
** blocking ULL is released.
|
||||
update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
|
||||
** connection thread1
|
||||
** Start transaction on thread 1
|
||||
begin;
|
||||
** Update on t1 will cause a table scan which will be blocked because
|
||||
** the previously initiated table scan applied exclusive key locks on
|
||||
** all primary keys.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
** Release ULL. This will release the next waiting ULL on thread 2.
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** The table should still be updated with updates for thread 1 only:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** Release the lock and collect result from thread 2:
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** Seen from thread 2 the table should have been updated on four
|
||||
** places.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
1 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
1 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** connection thread1
|
||||
** Thread 2 has committed but the result should remain the same for
|
||||
** thread 1 (updated on three places):
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** After a commit the table should be merged with the previous
|
||||
** commit.
|
||||
** This select should show both updates:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
1 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
1 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
1 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
1 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
1 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
1 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** One UPDATE and one INSERT .... Monty's test
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1 (a int not null, b int not null);
|
||||
insert into t1 values (1,1),(2,1),(3,1),(4,1);
|
||||
** Create ULL 'hello2'
|
||||
select get_lock("hello2",10);
|
||||
get_lock("hello2",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Begin a new transaction on thread 2
|
||||
begin;
|
||||
** Update will create a table scan which creates a ULL where a=2;
|
||||
** this will hang waiting on thread 1.
|
||||
update t1 set b=10+get_lock(concat("hello",a),10)*0 where a=2;
|
||||
** connection thread1
|
||||
** Insert new values to t1 from thread 1; this created an implicit
|
||||
** commit since there are no on-going transactions.
|
||||
insert into t1 values (1,1);
|
||||
** Release the ULL (thread 2 updates will finish).
|
||||
select release_lock("hello2");
|
||||
release_lock("hello2")
|
||||
1
|
||||
** ..but thread 1 will still see t1 as if nothing has happend:
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 1
|
||||
3 1
|
||||
4 1
|
||||
1 1
|
||||
** connection thread2
|
||||
** Collect results from thread 2 and release the lock.
|
||||
select release_lock("hello2");
|
||||
release_lock("hello2")
|
||||
1
|
||||
** The table should look like the original+updates for thread 2,
|
||||
** and consist of new rows:
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 10
|
||||
3 1
|
||||
4 1
|
||||
1 1
|
||||
** Commit changes from thread 2
|
||||
commit;
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE changing result set and SELECT ... FOR UPDATE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** connection thread2
|
||||
** Begin a new transaction on thread 2
|
||||
begin;
|
||||
** Select a range for update.
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread1
|
||||
** Begin a new transaction on thread 1
|
||||
begin;
|
||||
** Update the same range which is marked for update on thread 2; this
|
||||
** will hang because of row locks.
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
** After the update the table will be unmodified because the previous
|
||||
** transaction failed and was rolled back.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** The table should look unmodified from thread 2.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** Sending a commit should release the row locks and enable
|
||||
** thread 1 to complete the transaction.
|
||||
commit;
|
||||
** connection thread1
|
||||
** Commit on thread 1.
|
||||
commit;
|
||||
** connection thread2
|
||||
** The table should not have been changed.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
** Even on thread 1:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE not changing result set and SELECT ... FOR UPDATE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** connection thread2
|
||||
** Starting new transaction on thread 2.
|
||||
begin;
|
||||
** Starting SELECT .. FOR UPDATE
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread1
|
||||
|
||||
** Starting new transaction on thread 1
|
||||
begin;
|
||||
** Updating single row using a table scan. This will time out
|
||||
** because of ongoing transaction on thread 1 holding lock on
|
||||
** all primary keys in the scan.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set tipo=11 where tipo=22;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
** After the time out the transaction is aborted; no rows should
|
||||
** have changed.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** The same thing should hold true for the transaction on
|
||||
** thread 2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** connection thread1
|
||||
commit;
|
||||
** connection thread2
|
||||
** Even after committing:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** two SELECT ... FOR UPDATE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** connection thread2
|
||||
** Begin a new transaction on thread 2
|
||||
begin;
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread1
|
||||
** Begin a new transaction on thread 1
|
||||
begin;
|
||||
** Selecting a range for update by table scan will be blocked
|
||||
** because of on-going transaction on thread 2.
|
||||
select * from t1 where tipo=1 FOR UPDATE;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
** connection thread2
|
||||
** Table will be unchanged and the select command will not be
|
||||
** blocked:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** Commit transacton on thread 2.
|
||||
commit;
|
||||
** connection thread1
|
||||
** Commit transaction on thread 1.
|
||||
commit;
|
||||
** connection thread2
|
||||
** Make sure table isn't blocked on thread 2:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
** Make sure table isn't blocked on thread 1:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE changing result set and DELETE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** connection thread2
|
||||
begin;
|
||||
delete from t1 where tipo=2;
|
||||
** connection thread1
|
||||
begin;
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** connection thread1
|
||||
commit;
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE not changing result set and DELETE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** connection thread2
|
||||
begin;
|
||||
delete from t1 where tipo=2;
|
||||
** connection thread1
|
||||
begin;
|
||||
** Update on t1 will cause a table scan which will be blocked because
|
||||
** the previously initiated table scan applied exclusive key locks on
|
||||
** all primary keys.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set tipo=1 where tipo=22;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** connection thread1
|
||||
commit;
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
@ -1,109 +1,22 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
SELECT @@global.tx_isolation;
|
||||
@@global.tx_isolation
|
||||
REPEATABLE-READ
|
||||
SELECT @@global.innodb_locks_unsafe_for_binlog;
|
||||
@@global.innodb_locks_unsafe_for_binlog
|
||||
1
|
||||
# keep_locks == 0
|
||||
GRANT USAGE ON test.* TO mysqltest@localhost;
|
||||
DO release_lock("hello");
|
||||
DO release_lock("hello2");
|
||||
drop table if exists t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
|
||||
**
|
||||
** two UPDATE's running and both changing distinct result sets
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",1);
|
||||
get_lock("hello",1)
|
||||
1
|
||||
begin;
|
||||
update t1 set eta=1+get_lock("hello",1)*0 where tipo=11;
|
||||
begin;
|
||||
update t1 set eta=2 where tipo=22;
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
@ -116,16 +29,173 @@ insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** Get user level lock (ULL) for thread 1
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
0
|
||||
1
|
||||
** connection thread2
|
||||
** Start transaction for thread 2
|
||||
begin;
|
||||
update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
|
||||
** Update will cause a table scan and a new ULL will
|
||||
** be created and blocked on the first row where tipo=11.
|
||||
update t1 set eta=1+get_lock("hello",10)*0 where tipo=11;
|
||||
** connection thread1
|
||||
** Start new transaction for thread 1
|
||||
begin;
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
** Update on t1 will cause a table scan which will be blocked because
|
||||
** the previously initiated table scan applied exclusive key locks on
|
||||
** all primary keys.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set eta=2 where tipo=22;
|
||||
** Release user level name lock from thread 1. This will cause the ULL
|
||||
** on thread 2 to end its wait.
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
0
|
||||
1
|
||||
** Table is now updated with a new eta on tipo=22 for thread 1.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** Release the lock and collect result from update on thread 2
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** Table should have eta updates where tipo=11 but updates made by
|
||||
** thread 1 shouldn't be visible yet.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** Sending commit on thread 2.
|
||||
commit;
|
||||
** connection thread1
|
||||
** Make sure table reads didn't change yet on thread 1.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** And send final commit on thread 1.
|
||||
commit;
|
||||
** Table should now be updated by both updates in the order of
|
||||
** thread 1,2.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** Make sure the output is similar for t1.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** two UPDATE's running and one changing result set
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** Get ULL "hello" on thread 1
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Start transaction on thread 2
|
||||
begin;
|
||||
** Update will cause a table scan.
|
||||
** This will cause a hang on the first row where tipo=1 until the
|
||||
** blocking ULL is released.
|
||||
update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
|
||||
** connection thread1
|
||||
** Start transaction on thread 1
|
||||
begin;
|
||||
** Update on t1 will cause a table scan which will be blocked because
|
||||
** the previously initiated table scan applied exclusive key locks on
|
||||
** all primary keys.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
** Release ULL. This will release the next waiting ULL on thread 2.
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** The table should still be updated with updates for thread 1 only:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -139,6 +209,13 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** Release the lock and collect result from thread 2:
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** Seen from thread 2 the table should have been updated on four
|
||||
** places.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -152,7 +229,10 @@ eta tipo c
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
commit;
|
||||
** connection thread1
|
||||
** Thread 2 has committed but the result should remain the same for
|
||||
** thread 1 (updated on three places):
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -167,19 +247,9 @@ eta tipo c
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 1 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 1 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** After a commit the table should be merged with the previous
|
||||
** commit.
|
||||
** This select should show both updates:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -193,6 +263,7 @@ eta tipo c
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -206,19 +277,50 @@ eta tipo c
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
1 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 1 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
1 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 1 fffffffffffffffffffffffffffffffffffffffffff
|
||||
1 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 1 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
1 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** One UPDATE and one INSERT .... Monty's test
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1 (a int not null, b int not null);
|
||||
insert into t1 values (1,1),(2,1),(3,1),(4,1);
|
||||
select get_lock("hello2",1000);
|
||||
get_lock("hello2",1000)
|
||||
** Create ULL 'hello2'
|
||||
select get_lock("hello2",10);
|
||||
get_lock("hello2",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Begin a new transaction on thread 2
|
||||
begin;
|
||||
update t1 set b=10+get_lock(concat("hello",a),1000)*0 where
|
||||
a=2;
|
||||
** Update will create a table scan which creates a ULL where a=2;
|
||||
** this will hang waiting on thread 1.
|
||||
update t1 set b=10+get_lock(concat("hello",a),10)*0 where a=2;
|
||||
** connection thread1
|
||||
** Insert new values to t1 from thread 1; this created an implicit
|
||||
** commit since there are no on-going transactions.
|
||||
insert into t1 values (1,1);
|
||||
** Release the ULL (thread 2 updates will finish).
|
||||
select release_lock("hello2");
|
||||
release_lock("hello2")
|
||||
1
|
||||
** ..but thread 1 will still see t1 as if nothing has happend:
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
@ -226,6 +328,13 @@ a b
|
||||
3 1
|
||||
4 1
|
||||
1 1
|
||||
** connection thread2
|
||||
** Collect results from thread 2 and release the lock.
|
||||
select release_lock("hello2");
|
||||
release_lock("hello2")
|
||||
1
|
||||
** The table should look like the original+updates for thread 2,
|
||||
** and consist of new rows:
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
@ -233,90 +342,17 @@ a b
|
||||
3 1
|
||||
4 1
|
||||
1 1
|
||||
commit;
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
begin;
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** Commit changes from thread 2
|
||||
commit;
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE changing result set and SELECT ... FOR UPDATE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
@ -329,17 +365,24 @@ insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Begin a new transaction on thread 2
|
||||
begin;
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
** Select a range for update.
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread1
|
||||
** Begin a new transaction on thread 1
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
update t1 set tipo=11+get_lock("hello",10)*0 where tipo=22;
|
||||
** Update the same range which is marked for update on thread 2; this
|
||||
** will hang because of row locks.
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
** After the update the table will be unmodified because the previous
|
||||
** transaction failed and was rolled back.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -353,10 +396,8 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread2
|
||||
** The table should look unmodified from thread 2.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -370,8 +411,14 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** Sending a commit should release the row locks and enable
|
||||
** thread 1 to complete the transaction.
|
||||
commit;
|
||||
** connection thread1
|
||||
** Commit on thread 1.
|
||||
commit;
|
||||
** connection thread2
|
||||
** The table should not have been changed.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -385,6 +432,8 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
** Even on thread 1:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -398,7 +447,15 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE not changing result set and SELECT ... FOR UPDATE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
@ -411,21 +468,127 @@ insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
** Starting new transaction on thread 2.
|
||||
begin;
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
** Starting SELECT .. FOR UPDATE
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread1
|
||||
|
||||
** Starting new transaction on thread 1
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
** Updating single row using a table scan. This will time out
|
||||
** because of ongoing transaction on thread 1 holding lock on
|
||||
** all primary keys in the scan.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set tipo=11 where tipo=22;
|
||||
** After the time out the transaction is aborted; no rows should
|
||||
** have changed.
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 11 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
** The same thing should hold true for the transaction on
|
||||
** thread 2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** connection thread1
|
||||
commit;
|
||||
** connection thread2
|
||||
** Even after committing:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 11 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
8 8 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
10 1 ccccccccccccccccccccccccccccccccccccccccccc
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
30 1 eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
50 1 ggggggggggggggggggggggggggggggggggggggggggg
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 11 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** two SELECT ... FOR UPDATE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
|
||||
insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||
insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
|
||||
insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
|
||||
insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
** connection thread2
|
||||
** Begin a new transaction on thread 2
|
||||
begin;
|
||||
select * from t1 where tipo=2 FOR UPDATE;
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread1
|
||||
** Begin a new transaction on thread 1
|
||||
begin;
|
||||
** Selecting a range for update by table scan will be blocked
|
||||
** because of on-going transaction on thread 2.
|
||||
select * from t1 where tipo=1 FOR UPDATE;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
eta tipo c
|
||||
20 2 ddddddddddddddddddddddddddddddddddddddddddd
|
||||
40 2 fffffffffffffffffffffffffffffffffffffffffff
|
||||
60 2 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||||
** connection thread2
|
||||
** Table will be unchanged and the select command will not be
|
||||
** blocked:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -439,8 +602,13 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
** Commit transacton on thread 2.
|
||||
commit;
|
||||
** connection thread1
|
||||
** Commit transaction on thread 1.
|
||||
commit;
|
||||
** connection thread2
|
||||
** Make sure table isn't blocked on thread 2:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -454,6 +622,8 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
** Make sure table isn't blocked on thread 1:
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -467,7 +637,15 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE changing result set and DELETE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
@ -480,16 +658,12 @@ insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
begin;
|
||||
delete from t1 where tipo=2;
|
||||
delete from t1 where tipo=2;
|
||||
** connection thread1
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
|
||||
update t1 set tipo=1 where tipo=2;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
@ -504,6 +678,7 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -514,8 +689,10 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
commit;
|
||||
** connection thread1
|
||||
commit;
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -526,6 +703,7 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -536,7 +714,15 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
||||
|
||||
**
|
||||
** one UPDATE not changing result set and DELETE
|
||||
**
|
||||
** connection thread1
|
||||
** Set up table
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
@ -549,16 +735,17 @@ insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
|
||||
insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
|
||||
insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
|
||||
insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
|
||||
select get_lock("hello",10);
|
||||
get_lock("hello",10)
|
||||
1
|
||||
** connection thread2
|
||||
begin;
|
||||
delete from t1 where tipo=2;
|
||||
delete from t1 where tipo=2;
|
||||
** connection thread1
|
||||
begin;
|
||||
select release_lock("hello");
|
||||
release_lock("hello")
|
||||
1
|
||||
update t1 set tipo=1+get_lock("hello",10)*0 where tipo=22;
|
||||
** Update on t1 will cause a table scan which will be blocked because
|
||||
** the previously initiated table scan applied exclusive key locks on
|
||||
** all primary keys.
|
||||
** Not so if innodb_locks_unsafe_for_binlog is set. The locks that
|
||||
** do not match the WHERE condition are released.
|
||||
update t1 set tipo=1 where tipo=22;
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -572,6 +759,7 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -582,8 +770,10 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
commit;
|
||||
commit;
|
||||
** connection thread1
|
||||
commit;
|
||||
** connection thread2
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -594,6 +784,7 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection thread1
|
||||
select * from t1;
|
||||
eta tipo c
|
||||
7 7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
@ -604,4 +795,5 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** connection default
|
||||
drop table t1;
|
@ -5388,4 +5388,10 @@ select * from t1;
|
||||
c1
|
||||
That
|
||||
drop table t1;
|
||||
create table t1 (a int not null) engine=csv;
|
||||
lock tables t1 read;
|
||||
select * from t1;
|
||||
ERROR HY000: File './test/t1.CSV' not found (Errcode: 2)
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
@ -115,3 +115,21 @@ SELECT 1 REGEXP NULL;
|
||||
1 REGEXP NULL
|
||||
NULL
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1(a INT, b CHAR(4));
|
||||
INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0');
|
||||
PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1";
|
||||
EXECUTE stmt1;
|
||||
a
|
||||
1
|
||||
EXECUTE stmt1;
|
||||
a
|
||||
1
|
||||
EXECUTE stmt1;
|
||||
a
|
||||
1
|
||||
EXECUTE stmt1;
|
||||
a
|
||||
1
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -2372,3 +2372,79 @@ a MIN(b) MAX(b) AVG(b)
|
||||
2 1 3 2.0000
|
||||
1 1 3 2.0000
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM;
|
||||
insert into t1 (a,b) values
|
||||
(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),
|
||||
(0,7),(0,8),(0,9),(0,10),(0,11),(0,12),(0,13),
|
||||
(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),
|
||||
(1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),
|
||||
(2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),
|
||||
(2,7),(2,8),(2,9),(2,10),(2,11),(2,12),(2,13),
|
||||
(3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),
|
||||
(3,7),(3,8),(3,9),(3,10),(3,11),(3,12),(3,13);
|
||||
insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
|
||||
select * from t1;
|
||||
a b
|
||||
0 0
|
||||
0 1
|
||||
0 2
|
||||
0 3
|
||||
0 4
|
||||
0 5
|
||||
0 6
|
||||
0 7
|
||||
0 8
|
||||
0 9
|
||||
0 10
|
||||
0 11
|
||||
0 12
|
||||
0 13
|
||||
0 14
|
||||
1 0
|
||||
1 1
|
||||
1 2
|
||||
1 3
|
||||
1 4
|
||||
1 5
|
||||
1 6
|
||||
1 7
|
||||
1 8
|
||||
1 9
|
||||
1 10
|
||||
1 11
|
||||
1 12
|
||||
1 13
|
||||
2 0
|
||||
2 1
|
||||
2 2
|
||||
2 3
|
||||
2 4
|
||||
2 5
|
||||
2 6
|
||||
2 7
|
||||
2 8
|
||||
2 9
|
||||
2 10
|
||||
2 11
|
||||
2 12
|
||||
2 13
|
||||
3 0
|
||||
3 1
|
||||
3 2
|
||||
3 3
|
||||
3 4
|
||||
3 5
|
||||
3 6
|
||||
3 7
|
||||
3 8
|
||||
3 9
|
||||
3 10
|
||||
3 11
|
||||
3 12
|
||||
3 13
|
||||
explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 range PRIMARY,index PRIMARY 4 NULL 3 100.00 Using where; Using index for group-by; Using temporary
|
||||
Warnings:
|
||||
Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a`
|
||||
drop table t1;
|
||||
|
@ -484,6 +484,7 @@ c1
|
||||
handler t1 close;
|
||||
read the result from the other connection
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
proceed with the normal connection
|
||||
drop table t1;
|
||||
@ -698,6 +699,7 @@ handler a2 read a first;
|
||||
a
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
handler a1 close;
|
||||
ERROR 42S02: Unknown table 'a1' in HANDLER
|
||||
|
@ -3,4 +3,5 @@ create table t1(a int not null auto_increment primary key) engine=innodb;
|
||||
insert into t1 set a = -1;
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
|
171
mysql-test/r/innodb-autoinc.result
Normal file
171
mysql-test/r/innodb-autoinc.result
Normal file
@ -0,0 +1,171 @@
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (9223372036854775807, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
9223372036854775807 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (127, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
127 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (255, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
255 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (32767, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
32767 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (65535, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
65535 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (8388607, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
8388607 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (16777215, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
16777215 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (2147483647, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
2147483647 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (4294967295, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
4294967295 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (9223372036854775807, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
9223372036854775807 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (18446744073709551615, null);
|
||||
INSERT INTO t1 (c2) VALUES ('innodb');
|
||||
Got one of the listed errors
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
18446744073709551615 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
SELECT c1 FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
|
||||
TRUNCATE TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
SELECT c1 FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
SELECT c1 FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
|
||||
DELETE FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
INSERT INTO t1 VALUES (NULL), (NULL), (NULL);
|
||||
SELECT c1 FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
@ -166,6 +166,7 @@ level id parent_id
|
||||
1 1007 101
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
@ -190,6 +191,7 @@ create table t1 (a int) engine=innodb;
|
||||
insert into t1 values (1), (2);
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
delete from t1 where a = 1;
|
||||
select * from t1;
|
||||
@ -738,6 +740,7 @@ world 2
|
||||
hello 1
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
@ -3109,6 +3112,7 @@ BEGIN;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
|
||||
@ -3263,3 +3267,14 @@ AUTO_INCREMENT
|
||||
200
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 int default NULL,
|
||||
c2 int default NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
TRUNCATE TABLE t1;
|
||||
affected rows: 0
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
affected rows: 5
|
||||
info: Records: 5 Duplicates: 0 Warnings: 0
|
||||
TRUNCATE TABLE t1;
|
||||
affected rows: 0
|
||||
DROP TABLE t1;
|
||||
|
4
mysql-test/r/innodb_bug34300.result
Normal file
4
mysql-test/r/innodb_bug34300.result
Normal file
@ -0,0 +1,4 @@
|
||||
f4 f8
|
||||
xxx zzz
|
||||
f4 f8
|
||||
xxx zzz
|
@ -577,6 +577,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
OPTIMIZE TABLE t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t2 optimize status OK
|
||||
EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -750,8 +750,8 @@ ERROR 42S22: Unknown column 't1.b' in 'on clause'
|
||||
select * from information_schema.statistics join information_schema.columns
|
||||
using(table_name,column_name) where table_name='user';
|
||||
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
|
||||
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
|
||||
user User NULL mysql 0 mysql PRIMARY 2 A 3 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
|
||||
user Host NULL mysql 0 mysql PRIMARY 1 A # NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
|
||||
user User NULL mysql 0 mysql PRIMARY 2 A # NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
@ -1,3 +1,2 @@
|
||||
Variable_name Value
|
||||
lower_case_file_system ON
|
||||
lower_case_table_names 0
|
||||
|
@ -108,11 +108,11 @@ id
|
||||
1
|
||||
select * from v1 group by id limit 0;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 v1 id id 3 10 0 Y 32768 0 63
|
||||
def test v1 v1 id id 3 10 0 Y 32768 0 63
|
||||
id
|
||||
select * from v1 where id=1000 group by id;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 v1 id id 3 10 0 Y 32768 0 63
|
||||
def test v1 v1 id id 3 10 0 Y 32768 0 63
|
||||
id
|
||||
select * from v1 where id=1 group by id;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
@ -126,7 +126,7 @@ renamed
|
||||
1
|
||||
select * from v3 where renamed=1 group by renamed;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def v3 renamed 8 12 0 Y 32896 0 63
|
||||
def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
|
||||
renamed
|
||||
drop table t1;
|
||||
drop view v1,v2,v3;
|
||||
@ -156,8 +156,8 @@ c1
|
||||
3
|
||||
SELECT v1.c1, v2.c2 FROM v1 JOIN v2 ON c1=c2;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 v1 c1 c1 254 1 1 Y 0 0 8
|
||||
def test t2 v2 c2 c2 254 1 1 Y 0 0 8
|
||||
def test v1 v1 c1 c1 254 1 1 Y 0 0 8
|
||||
def test v2 v2 c2 c2 254 1 1 Y 0 0 8
|
||||
c1 c2
|
||||
1 1
|
||||
2 2
|
||||
|
@ -1831,6 +1831,28 @@ id ref
|
||||
3 2
|
||||
4 5
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (a INT) ENGINE=MyISAM CHECKSUM=1 ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
UPDATE t1 SET a=1;
|
||||
SELECT a FROM t1;
|
||||
a
|
||||
1
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
INSERT INTO t1 VALUES (0), (5), (4), (2);
|
||||
UPDATE t1 SET a=2;
|
||||
SELECT a FROM t1;
|
||||
a
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t1 (a int not null, key `a` (a) key_block_size=1024);
|
||||
show create table t1;
|
||||
|
4137
mysql-test/r/mysqlbinlog_row.result
Normal file
4137
mysql-test/r/mysqlbinlog_row.result
Normal file
File diff suppressed because it is too large
Load Diff
74
mysql-test/r/mysqlbinlog_row_big.result
Normal file
74
mysql-test/r/mysqlbinlog_row_big.result
Normal file
@ -0,0 +1,74 @@
|
||||
#
|
||||
# Preparatory cleanup.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
#
|
||||
# We need a fixed timestamp to avoid varying results.
|
||||
#
|
||||
SET timestamp=1000000000;
|
||||
#
|
||||
# We need big packets.
|
||||
#
|
||||
SET @@session.max_allowed_packet= 1024*1024*1024;
|
||||
#
|
||||
# Delete all existing binary logs.
|
||||
#
|
||||
RESET MASTER;
|
||||
#
|
||||
# Create a test table.
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 LONGTEXT
|
||||
) ENGINE=MyISAM DEFAULT CHARSET latin1;
|
||||
#
|
||||
# Show how much rows are affected by each statement.
|
||||
#
|
||||
#
|
||||
# Insert a big row.
|
||||
#
|
||||
INSERT INTO t1 VALUES (REPEAT('ManyMegaByteBlck', 2097152));
|
||||
affected rows: 1
|
||||
#
|
||||
# Show what we have in the table.
|
||||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 33554432
|
||||
affected rows: 1
|
||||
#
|
||||
# Grow the row by updating.
|
||||
#
|
||||
UPDATE t1 SET c1 = CONCAT(c1, c1);
|
||||
affected rows: 1
|
||||
info: Rows matched: 1 Changed: 1 Warnings: 0
|
||||
#
|
||||
# Show what we have in the table.
|
||||
# Do not display the column value itself, just its length.
|
||||
#
|
||||
SELECT LENGTH(c1) FROM t1;
|
||||
LENGTH(c1) 67108864
|
||||
affected rows: 1
|
||||
#
|
||||
# Delete the row.
|
||||
#
|
||||
DELETE FROM t1 WHERE c1 >= 'ManyMegaByteBlck';
|
||||
affected rows: 1
|
||||
#
|
||||
# Hide how much rows are affected by each statement.
|
||||
#
|
||||
#
|
||||
# Flush all log buffers to the log file.
|
||||
#
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Call mysqlbinlog to display the log file contents.
|
||||
# NOTE: The output of mysqlbinlog is redirected to
|
||||
# $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out
|
||||
# If you want to examine it, disable remove_file
|
||||
# at the bottom of the test script.
|
||||
#
|
||||
#
|
||||
# Cleanup.
|
||||
#
|
||||
DROP TABLE t1;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_big_1.out
|
4859
mysql-test/r/mysqlbinlog_row_innodb.result
Normal file
4859
mysql-test/r/mysqlbinlog_row_innodb.result
Normal file
File diff suppressed because it is too large
Load Diff
4899
mysql-test/r/mysqlbinlog_row_myisam.result
Normal file
4899
mysql-test/r/mysqlbinlog_row_myisam.result
Normal file
File diff suppressed because it is too large
Load Diff
500
mysql-test/r/mysqlbinlog_row_trans.result
Normal file
500
mysql-test/r/mysqlbinlog_row_trans.result
Normal file
@ -0,0 +1,500 @@
|
||||
#
|
||||
# Preparatory cleanup.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
#
|
||||
# We need a fixed timestamp to avoid varying results.
|
||||
#
|
||||
SET timestamp=1000000000;
|
||||
#
|
||||
# Delete all existing binary logs.
|
||||
#
|
||||
RESET MASTER;
|
||||
#
|
||||
# Create test tables.
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 INT,
|
||||
c2 VARCHAR(20)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET latin1;
|
||||
CREATE TABLE t2 (
|
||||
c1 INT,
|
||||
c2 VARCHAR(20)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET latin1;
|
||||
#
|
||||
# Start transaction #1, transactional table only, commit.
|
||||
#
|
||||
START TRANSACTION;
|
||||
#
|
||||
# Do some statements.
|
||||
#
|
||||
INSERT INTO t1 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3');
|
||||
UPDATE t1 SET c1 = c1 + 10;
|
||||
DELETE FROM t1 WHERE c1 = 12;
|
||||
#
|
||||
# Commit transaction.
|
||||
#
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
11 varchar-1
|
||||
13 varchar-3
|
||||
TRUNCATE TABLE t1;
|
||||
#
|
||||
# Start transaction #2, transactional table only, rollback.
|
||||
#
|
||||
START TRANSACTION;
|
||||
#
|
||||
# Do some statements.
|
||||
#
|
||||
INSERT INTO t1 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3');
|
||||
UPDATE t1 SET c1 = c1 + 10;
|
||||
DELETE FROM t1 WHERE c1 = 12;
|
||||
#
|
||||
# Rollback transaction.
|
||||
#
|
||||
ROLLBACK;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
TRUNCATE TABLE t1;
|
||||
#
|
||||
# Start transaction #3, both tables, commit.
|
||||
#
|
||||
START TRANSACTION;
|
||||
#
|
||||
# Do some statements on the transactional table.
|
||||
#
|
||||
INSERT INTO t1 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3');
|
||||
UPDATE t1 SET c1 = c1 + 10;
|
||||
DELETE FROM t1 WHERE c1 = 12;
|
||||
#
|
||||
# Do some statements on the non-transactional table.
|
||||
#
|
||||
INSERT INTO t2 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3');
|
||||
UPDATE t2 SET c1 = c1 + 10;
|
||||
DELETE FROM t2 WHERE c1 = 12;
|
||||
#
|
||||
# Commit transaction.
|
||||
#
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
11 varchar-1
|
||||
13 varchar-3
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
11 varchar-1
|
||||
13 varchar-3
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
#
|
||||
# Start transaction #4, both tables, rollback.
|
||||
#
|
||||
START TRANSACTION;
|
||||
#
|
||||
# Do some statements on the transactional table.
|
||||
#
|
||||
INSERT INTO t1 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3');
|
||||
UPDATE t1 SET c1 = c1 + 10;
|
||||
DELETE FROM t1 WHERE c1 = 12;
|
||||
#
|
||||
# Do some statements on the non-transactional table.
|
||||
#
|
||||
INSERT INTO t2 VALUES (1,'varchar-1'), (2,'varchar-2'), (3,'varchar-3');
|
||||
UPDATE t2 SET c1 = c1 + 10;
|
||||
DELETE FROM t2 WHERE c1 = 12;
|
||||
#
|
||||
# Rollback transaction.
|
||||
#
|
||||
ROLLBACK;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
11 varchar-1
|
||||
13 varchar-3
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
#
|
||||
# Flush all log buffers to the log file.
|
||||
#
|
||||
FLUSH LOGS;
|
||||
#
|
||||
# Call mysqlbinlog to display the log file contents.
|
||||
#
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
|
||||
ROLLBACK/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=#/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
||||
SET @@session.lc_time_names=0/*!*/;
|
||||
SET @@session.collation_database=DEFAULT/*!*/;
|
||||
CREATE TABLE t1 (
|
||||
c1 INT,
|
||||
c2 VARCHAR(20)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET latin1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
CREATE TABLE t2 (
|
||||
c1 INT,
|
||||
c2 VARCHAR(20)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET latin1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=11 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM test.t1
|
||||
### WHERE
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=11 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM test.t1
|
||||
### WHERE
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO test.t2
|
||||
### SET
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t2
|
||||
### SET
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t2
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE test.t2
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=11 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t2
|
||||
### WHERE
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t2
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM test.t2
|
||||
### WHERE
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t2
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t1
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=11 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t1
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM test.t1
|
||||
### WHERE
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
|
||||
### INSERT INTO test.t2
|
||||
### SET
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t2
|
||||
### SET
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### INSERT INTO test.t2
|
||||
### SET
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
|
||||
### UPDATE test.t2
|
||||
### WHERE
|
||||
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=11 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-1' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t2
|
||||
### WHERE
|
||||
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### UPDATE test.t2
|
||||
### WHERE
|
||||
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
### SET
|
||||
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
|
||||
### DELETE FROM test.t2
|
||||
### WHERE
|
||||
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
|
||||
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
ROLLBACK
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t1
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Xid = #
|
||||
COMMIT/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
TRUNCATE TABLE t2
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
#
|
||||
# Cleanup.
|
||||
#
|
||||
DROP TABLE t1, t2;
|
@ -538,7 +538,7 @@ PARTITION BY LIST (a)
|
||||
(PARTITION x1 VALUES IN (10), PARTITION x2 VALUES IN (20));
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
drop table t1;
|
||||
create table t1
|
||||
(a int)
|
||||
@ -1239,7 +1239,11 @@ SHOW TABLE STATUS;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Fixed 1 14 14 0 0 7 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
ALTER TABLE t1 OPTIMIZE PARTITION p0;
|
||||
ERROR 42000: The storage engine for the table doesn't support optimize partition
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
SHOW TABLE STATUS;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Fixed 1 7 7 0 1024 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int, index(a)) PARTITION BY KEY(a);
|
||||
ALTER TABLE t1 DISABLE KEYS;
|
||||
@ -1499,13 +1503,17 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
||||
ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1
|
||||
ALTER TABLE t1 ANALYZE PARTITION p1;
|
||||
ERROR 42000: The storage engine for the table doesn't support analyze partition
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
ALTER TABLE t1 CHECK PARTITION p1;
|
||||
ERROR 42000: The storage engine for the table doesn't support check partition
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
ALTER TABLE t1 REPAIR PARTITION p1;
|
||||
ERROR 42000: The storage engine for the table doesn't support repair partition
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
ALTER TABLE t1 OPTIMIZE PARTITION p1;
|
||||
ERROR 42000: The storage engine for the table doesn't support optimize partition
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (s1 BIGINT UNSIGNED)
|
||||
PARTITION BY RANGE (s1) (
|
||||
@ -1604,4 +1612,29 @@ t1 CREATE TABLE `t1` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (id) SUBPARTITION BY HASH (id) SUBPARTITIONS 2 (PARTITION pa1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION pa2 VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
`ID` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`createdDate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`number` int,
|
||||
PRIMARY KEY (`ID`, number)
|
||||
)
|
||||
PARTITION BY RANGE (number) (
|
||||
PARTITION p0 VALUES LESS THAN (6),
|
||||
PARTITION p1 VALUES LESS THAN (11)
|
||||
);
|
||||
create table t2 (
|
||||
`ID` bigint(20),
|
||||
`createdDate` TIMESTAMP,
|
||||
`number` int
|
||||
);
|
||||
INSERT INTO t1 SET number=1;
|
||||
insert into t2 select * from t1;
|
||||
SELECT SLEEP(1);
|
||||
SLEEP(1)
|
||||
0
|
||||
UPDATE t1 SET number=6;
|
||||
select count(*) from t1, t2 where t1.createdDate = t2.createdDate;
|
||||
count(*)
|
||||
1
|
||||
drop table t1, t2;
|
||||
End of 5.1 tests
|
||||
|
@ -113,9 +113,9 @@ set @@sql_mode=@org_mode;
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
ERROR 42000: Incorrect table name 'part-data'
|
||||
Got one of the listed errors
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0,
|
||||
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
ERROR 42000: Incorrect table name 'part-data'
|
||||
Got one of the listed errors
|
||||
|
@ -446,7 +446,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 14 N 1 31 8
|
||||
@ -462,7 +462,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 5 Y 0 31 8
|
||||
def possible_keys 253 4096 7 Y 0 31 8
|
||||
def key 253 64 7 Y 0 31 8
|
||||
def key_len 253 1365 1 Y 0 31 8
|
||||
def key_len 253 4096 1 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 27 N 1 31 8
|
||||
|
@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 0 N 1 31 8
|
||||
|
@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 0 N 1 31 8
|
||||
|
@ -1159,7 +1159,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 0 N 1 31 8
|
||||
|
@ -1201,7 +1201,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 0 N 1 31 8
|
||||
@ -4222,7 +4222,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 0 N 1 31 8
|
||||
|
@ -1567,11 +1567,13 @@ drop table if exists t_12093;
|
||||
drop function if exists f_12093;
|
||||
drop function if exists f_12093_unrelated;
|
||||
drop procedure if exists p_12093;
|
||||
drop view if exists v_12093_unrelated;
|
||||
create table t_12093 (a int);
|
||||
create function f_12093() returns int return (select count(*) from t_12093);
|
||||
create procedure p_12093(a int) select * from t_12093;
|
||||
create function f_12093_unrelated() returns int return 2;
|
||||
create procedure p_12093_unrelated() begin end;
|
||||
create view v_12093_unrelated as select * from t_12093;
|
||||
prepare stmt_sf from 'select f_12093();';
|
||||
prepare stmt_sp from 'call p_12093(f_12093())';
|
||||
execute stmt_sf;
|
||||
@ -1580,6 +1582,27 @@ f_12093()
|
||||
execute stmt_sp;
|
||||
a
|
||||
drop function f_12093_unrelated;
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
f_12093()
|
||||
0
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
a
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
f_12093()
|
||||
0
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
a
|
||||
prepare stmt_sf from 'select f_12093();';
|
||||
prepare stmt_sp from 'call p_12093(f_12093())';
|
||||
execute stmt_sf;
|
||||
f_12093()
|
||||
0
|
||||
execute stmt_sp;
|
||||
a
|
||||
drop procedure p_12093_unrelated;
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
@ -1595,7 +1618,29 @@ f_12093()
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
a
|
||||
call p_verify_reprepare_count(2);
|
||||
prepare stmt_sf from 'select f_12093();';
|
||||
prepare stmt_sp from 'call p_12093(f_12093())';
|
||||
execute stmt_sf;
|
||||
f_12093()
|
||||
0
|
||||
execute stmt_sp;
|
||||
a
|
||||
drop view v_12093_unrelated;
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
f_12093()
|
||||
0
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
a
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sf;
|
||||
f_12093()
|
||||
0
|
||||
# XXX: used to be a bug
|
||||
execute stmt_sp;
|
||||
a
|
||||
call p_verify_reprepare_count(6);
|
||||
SUCCESS
|
||||
|
||||
drop table t_12093;
|
||||
|
@ -12,51 +12,51 @@ insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
|
||||
-- after Bug#29394 is implemented.
|
||||
check table t1 fast;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 5 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 27 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 5 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 27 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status Table is already up to date
|
||||
check table t1 fast;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 5 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 27 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 5 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 27 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status Table is already up to date
|
||||
check table t1 changed;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 5 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 5 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
insert into t1 values (5,5,5);
|
||||
check table t1 changed;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 5 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 5 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
check table t1 medium;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 5 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 5 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
check table t1 extended;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 5 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 5 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
show index from t1;
|
||||
@ -84,10 +84,10 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
|
||||
-- after Bug#29394 is implemented.
|
||||
optimize table t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 8 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 8 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
optimize table t1;
|
||||
@ -155,10 +155,10 @@ insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0
|
||||
-- after Bug#29394 is implemented.
|
||||
analyze table t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 7 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 7 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
show index from t1;
|
||||
@ -172,10 +172,10 @@ t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE
|
||||
-- after Bug#29394 is implemented.
|
||||
repair table t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 42 7 Y 0 31 8
|
||||
def Op 253 3 6 Y 0 31 8
|
||||
def Msg_type 253 3 6 Y 0 31 8
|
||||
def Msg_text 253 85 2 Y 0 31 8
|
||||
def Table 253 128 7 Y 0 31 8
|
||||
def Op 253 10 6 Y 0 31 8
|
||||
def Msg_type 253 10 6 Y 0 31 8
|
||||
def Msg_text 253 255 2 Y 0 31 8
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
show index from t1;
|
||||
@ -879,8 +879,8 @@ latin1_bin latin1 47 Yes 1
|
||||
----------------------------------------------------------------
|
||||
SHOW CREATE DATABASE mysqltest1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Database 253 63 10 N 1 31 33
|
||||
def Create Database 253 1023 69 N 1 31 33
|
||||
def Database 253 192 10 N 1 31 33
|
||||
def Create Database 253 3072 69 N 1 31 33
|
||||
Database Create Database
|
||||
mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
|
||||
----------------------------------------------------------------
|
||||
@ -892,8 +892,8 @@ mysqltest1
|
||||
----------------------------------------------------------------
|
||||
SHOW CREATE TABLE t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 63 2 N 1 31 33
|
||||
def Create Table 253 1023 102 N 1 31 33
|
||||
def Table 253 192 2 N 1 31 33
|
||||
def Create Table 253 3072 102 N 1 31 33
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` int(11) NOT NULL,
|
||||
@ -1053,10 +1053,10 @@ NULL test t1_bi INSERT NULL test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW
|
||||
----------------------------------------------------------------
|
||||
SHOW CREATE VIEW v1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def View 253 63 2 N 1 31 33
|
||||
def Create View 253 1023 103 N 1 31 33
|
||||
def character_set_client 253 30 6 N 1 31 33
|
||||
def collation_connection 253 30 6 N 1 31 33
|
||||
def View 253 192 2 N 1 31 33
|
||||
def Create View 253 3072 103 N 1 31 33
|
||||
def character_set_client 253 96 6 N 1 31 33
|
||||
def collation_connection 253 96 6 N 1 31 33
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` binary binary
|
||||
----------------------------------------------------------------
|
||||
@ -1079,12 +1079,12 @@ NULL test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary
|
||||
----------------------------------------------------------------
|
||||
SHOW CREATE PROCEDURE p1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Procedure 253 63 2 N 1 31 33
|
||||
def Procedure 253 192 2 N 1 31 33
|
||||
def sql_mode 253 0 0 N 1 31 33
|
||||
def Create Procedure 253 1023 59 Y 0 31 33
|
||||
def character_set_client 253 30 6 N 1 31 33
|
||||
def collation_connection 253 30 6 N 1 31 33
|
||||
def Database Collation 253 30 17 N 1 31 33
|
||||
def Create Procedure 253 3072 59 Y 0 31 33
|
||||
def character_set_client 253 96 6 N 1 31 33
|
||||
def collation_connection 253 96 6 N 1 31 33
|
||||
def Database Collation 253 96 17 N 1 31 33
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||
SELECT 1 binary binary latin1_swedish_ci
|
||||
@ -1134,12 +1134,12 @@ p1 NULL test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL D
|
||||
----------------------------------------------------------------
|
||||
SHOW CREATE FUNCTION f1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Function 253 63 2 N 1 31 33
|
||||
def Function 253 192 2 N 1 31 33
|
||||
def sql_mode 253 0 0 N 1 31 33
|
||||
def Create Function 253 1023 74 Y 0 31 33
|
||||
def character_set_client 253 30 6 N 1 31 33
|
||||
def collation_connection 253 30 6 N 1 31 33
|
||||
def Database Collation 253 30 17 N 1 31 33
|
||||
def Create Function 253 3072 74 Y 0 31 33
|
||||
def character_set_client 253 96 6 N 1 31 33
|
||||
def collation_connection 253 96 6 N 1 31 33
|
||||
def Database Collation 253 96 17 N 1 31 33
|
||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||
f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
|
||||
RETURN 1 binary binary latin1_swedish_ci
|
||||
@ -1245,6 +1245,36 @@ Slow_queries 2
|
||||
show variables like 'myisam_recover_options';
|
||||
Variable_name Value
|
||||
myisam_recover_options OFF
|
||||
CREATE TABLE t1 (
|
||||
Codigo int(10) unsigned NOT NULL auto_increment,
|
||||
Nombre varchar(255) default NULL,
|
||||
Telefono varchar(255) default NULL,
|
||||
Observaciones longtext,
|
||||
Direccion varchar(255) default NULL,
|
||||
Dni varchar(255) default NULL,
|
||||
CP int(11) default NULL,
|
||||
Provincia varchar(255) default NULL,
|
||||
Poblacion varchar(255) default NULL,
|
||||
PRIMARY KEY (Codigo)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
|
||||
show create table t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def Table 253 64 2 N 1 31 7
|
||||
def Create Table 253 1024 445 N 1 31 7
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`Codigo` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`Nombre` varchar(255) DEFAULT NULL,
|
||||
`Telefono` varchar(255) DEFAULT NULL,
|
||||
`Observaciones` longtext,
|
||||
`Direccion` varchar(255) DEFAULT NULL,
|
||||
`Dni` varchar(255) DEFAULT NULL,
|
||||
`CP` int(11) DEFAULT NULL,
|
||||
`Provincia` varchar(255) DEFAULT NULL,
|
||||
`Poblacion` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`Codigo`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
SHOW AUTHORS;
|
||||
create database mysqltest;
|
||||
|
@ -6820,6 +6820,22 @@ ttt
|
||||
2
|
||||
drop function func30787;
|
||||
drop table t1;
|
||||
create table t1(c1 INT);
|
||||
create function f1(p1 int) returns varchar(32)
|
||||
return 'aaa';
|
||||
create view v1 as select f1(c1) as parent_control_name from t1;
|
||||
create procedure p1()
|
||||
begin
|
||||
select parent_control_name as c1 from v1;
|
||||
end //
|
||||
call p1();
|
||||
c1
|
||||
call p1();
|
||||
c1
|
||||
drop procedure p1;
|
||||
drop function f1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
# ------------------------------------------------------------------
|
||||
# -- End of 5.0 tests
|
||||
# ------------------------------------------------------------------
|
||||
|
@ -4409,4 +4409,43 @@ pk a
|
||||
3 30
|
||||
2 20
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a), KEY b (b));
|
||||
INSERT INTO t1 VALUES (1,NULL), (9,NULL);
|
||||
CREATE TABLE t2 (
|
||||
a int,
|
||||
b int,
|
||||
c int,
|
||||
d int,
|
||||
PRIMARY KEY (a),
|
||||
UNIQUE KEY b (b,c,d),
|
||||
KEY b_2 (b),
|
||||
KEY c (c),
|
||||
KEY d (d)
|
||||
);
|
||||
INSERT INTO t2 VALUES
|
||||
(43, 2, 11 ,30),
|
||||
(44, 2, 12 ,30),
|
||||
(45, 1, 1 ,10000),
|
||||
(46, 1, 2 ,10000),
|
||||
(556,1, 32 ,10000);
|
||||
CREATE TABLE t3 (
|
||||
a int,
|
||||
b int,
|
||||
c int,
|
||||
PRIMARY KEY (a),
|
||||
UNIQUE KEY b (b,c),
|
||||
KEY c (c),
|
||||
KEY b_2 (b)
|
||||
);
|
||||
INSERT INTO t3 VALUES (1,1,1), (2,32,1);
|
||||
explain
|
||||
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t3 index b,b_2 b 10 NULL 2 Using index
|
||||
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.b 1 Using index
|
||||
2 DEPENDENT SUBQUERY t2 index b,b_2,c d 5 NULL 1 Using where
|
||||
SELECT t1.a, (SELECT 1 FROM t2 WHERE t2.b=t3.c AND t2.c=t1.a ORDER BY t2.d LIMIT 1) AS incorrect FROM t1, t3 WHERE t3.b=t1.a;
|
||||
a incorrect
|
||||
1 1
|
||||
DROP TABLE t1,t2,t3;
|
||||
End of 5.1 tests.
|
||||
|
@ -1,4 +1,4 @@
|
||||
drop table if exists t0, t1, t2, t3, t4;
|
||||
drop table if exists t0, t1, t2, t3, t4, t5;
|
||||
create table t1 (oref int, grp int, ie int) ;
|
||||
insert into t1 (oref, grp, ie) values
|
||||
(1, 1, 1),
|
||||
@ -780,3 +780,29 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN (SELECT 1 FROM t1, t2 WHERE 0);
|
||||
1
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.0 tests
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (
|
||||
a int(11) default null,
|
||||
b int(11) default null,
|
||||
key (a)
|
||||
);
|
||||
insert into t1 select A.a+10*(B.a+10*C.a),A.a+10*(B.a+10*C.a) from t0 A, t0 B, t0 C;
|
||||
create table t2 (a int(11) default null);
|
||||
insert into t2 values (0),(1);
|
||||
create table t3 (a int(11) default null);
|
||||
insert into t3 values (0),(1);
|
||||
create table t4 (a int(11) default null);
|
||||
insert into t4 values (0),(1);
|
||||
create table t5 (a int(11) default null);
|
||||
insert into t5 values (0),(1),(0),(1);
|
||||
select * from t2, t3
|
||||
where
|
||||
t2.a < 10 and
|
||||
t3.a+1 = 2 and
|
||||
t3.a in (select t1.b from t1
|
||||
where t1.a+1=t1.a+1 and
|
||||
t1.a < (select t4.a+10
|
||||
from t4, t5 limit 2));
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
drop table t0, t1, t2, t3, t4, t5;
|
||||
|
@ -55,13 +55,9 @@ t9 CREATE TABLE `t9` (
|
||||
`d` int(11) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
|
||||
create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp";
|
||||
Got one of the listed errors
|
||||
create database mysqltest;
|
||||
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
|
||||
Got one of the listed errors
|
||||
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
|
||||
Got one of the listed errors
|
||||
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="MYSQLTEST_VARDIR/run";
|
||||
Got one of the listed errors
|
||||
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp";
|
||||
|
@ -19,6 +19,7 @@ a b
|
||||
THE LION 13
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
select trigger_schema, trigger_name, event_object_schema,
|
||||
event_object_table, action_statement from information_schema.triggers
|
||||
|
@ -684,6 +684,30 @@ SELECT 1 FROM t1 GROUP BY a;
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (b BIT NOT NULL, i2 INTEGER NOT NULL, s VARCHAR(255) NOT NULL);
|
||||
INSERT INTO t1 VALUES(0x01,100,''), (0x00,300,''), (0x01,200,''), (0x00,100,'');
|
||||
SELECT HEX(b), i2 FROM t1 WHERE (i2>=100 AND i2<201) AND b=TRUE;
|
||||
HEX(b) i2
|
||||
1 100
|
||||
1 200
|
||||
CREATE TABLE t2 (b1 BIT NOT NULL, b2 BIT NOT NULL, i2 INTEGER NOT NULL,
|
||||
s VARCHAR(255) NOT NULL);
|
||||
INSERT INTO t2 VALUES (0x01,0x00,100,''), (0x00,0x01,300,''),
|
||||
(0x01,0x00,200,''), (0x00,0x01,100,'');
|
||||
SELECT HEX(b1), i2 FROM t2 WHERE (i2>=100 AND i2<201) AND b1=TRUE;
|
||||
HEX(b1) i2
|
||||
1 100
|
||||
1 200
|
||||
SELECT HEX(b2), i2 FROM t2 WHERE (i2>=100 AND i2<201) AND b2=FALSE;
|
||||
HEX(b2) i2
|
||||
0 100
|
||||
0 200
|
||||
SELECT HEX(b1), HEX(b2), i2 FROM t2
|
||||
WHERE (i2>=100 AND i2<201) AND b1=TRUE AND b2=FALSE;
|
||||
HEX(b1) HEX(b2) i2
|
||||
1 0 100
|
||||
1 0 200
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.0 tests
|
||||
create table t1(a bit(7));
|
||||
insert into t1 values(0x40);
|
||||
|
@ -1529,6 +1529,11 @@ SELECT f1 FROM t1;
|
||||
f1
|
||||
99999999999999999999999999999.999999999999999999999999999999
|
||||
DROP TABLE t1;
|
||||
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
|
||||
1.01500000 * 1.01500000 * 0.99500000);
|
||||
(1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
|
||||
1.01500000 * 1.01500000 * 0.99500000)
|
||||
0.812988073953673124592306939480
|
||||
End of 5.0 tests
|
||||
select cast(143.481 as decimal(4,1));
|
||||
cast(143.481 as decimal(4,1))
|
||||
|
BIN
mysql-test/std_data/corrupt_t1#P#p1.MYI
Normal file
BIN
mysql-test/std_data/corrupt_t1#P#p1.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/corrupt_t1.MYI
Normal file
BIN
mysql-test/std_data/corrupt_t1.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p1_first_1024.MYD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p2.MYD
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p2.MYD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p2.MYI
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p2.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p3.MYI
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p3.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p4.MYI
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p4.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p6.MYD
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p6.MYD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p6_2.MYD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD
Normal file
BIN
mysql-test/std_data/parts/t1_will_crash#P#p6_3.MYD
Normal file
Binary file not shown.
@ -1002,13 +1002,13 @@ Warning 1101 BLOB/TEXT column 'blurb' can't have a default value
|
||||
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
|
||||
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
|
||||
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
|
||||
INSERT INTO federated.t1 VALUES(4, "Die <20>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<>r jemanden, der seine Zielsprache ernst nimmt:");
|
||||
INSERT INTO federated.t1 VALUES(4, "Die <20>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<>r jemanden, der seine Zielsprache ernst nimmt:");
|
||||
SELECT * FROM federated.t1;
|
||||
blurb_id blurb
|
||||
1 MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.
|
||||
2 All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.
|
||||
3 A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined.
|
||||
4 Die <20>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<>r jemanden, der seine Zielsprache ernst nimmt:
|
||||
4 Die <20>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<>r jemanden, der seine Zielsprache ernst nimmt:
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
CREATE TABLE federated.t1 (
|
||||
`a` int NOT NULL,
|
||||
@ -2111,6 +2111,17 @@ DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a LONGBLOB, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', NULL);
|
||||
CREATE TABLE t1
|
||||
(a LONGBLOB, b LONGBLOB) ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
|
||||
CHECKSUM TABLE t1;
|
||||
Table Checksum
|
||||
test.t1 2465757603
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create server 's1' foreign data wrapper 'mysql' options (port 3306);
|
||||
drop server 's1';
|
||||
End of 5.1 tests
|
||||
|
@ -680,7 +680,7 @@ eval CREATE TABLE federated.t1 (
|
||||
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
|
||||
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
|
||||
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
|
||||
INSERT INTO federated.t1 VALUES(4, "Die <20>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<>r jemanden, der seine Zielsprache ernst nimmt:");
|
||||
INSERT INTO federated.t1 VALUES(4, "Die <20>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<>r jemanden, der seine Zielsprache ernst nimmt:");
|
||||
SELECT * FROM federated.t1;
|
||||
|
||||
connection slave;
|
||||
@ -1073,20 +1073,20 @@ SELECT HEX(a) FROM federated.t1;
|
||||
# CREATE TABLE federated.t1 (a char(20)) charset=cp1251;
|
||||
# #
|
||||
# connection master;
|
||||
# INSERT INTO federated.t1 values (_cp1251'<27>-<2D><><EFBFBD>-1');
|
||||
# INSERT INTO federated.t1 values (_cp1251'<27>-<2D><><EFBFBD>-2');
|
||||
# INSERT INTO federated.t1 values (_cp1251'<27>-<2D><><EFBFBD>-1');
|
||||
# INSERT INTO federated.t1 values (_cp1251'<27>-<2D><><EFBFBD>-2');
|
||||
# SELECT * FROM federated.t1;
|
||||
# SET names cp1251;
|
||||
# INSERT INTO federated.t1 values ('<27>-<2D><><EFBFBD>-3');
|
||||
# INSERT INTO federated.t1 values ('<27>-Ũ<>-4');
|
||||
# INSERT INTO federated.t1 values ('<27>-<2D><><EFBFBD>-3');
|
||||
# INSERT INTO federated.t1 values ('<27>-Ũ<>-4');
|
||||
# SELECT * FROM federated.t1;
|
||||
# SELECT hex(a) from federated.t1;
|
||||
# SELECT hex(a) from federated.t1 ORDER BY a desc;
|
||||
# UPDATE federated.t1 SET a='<27>-<2D><><EFBFBD>-1<><31><EFBFBD><EFBFBD><EFBFBD>' WHERE a='<27>-<2D><><EFBFBD>-1';
|
||||
# UPDATE federated.t1 SET a='<27>-<2D><><EFBFBD>-1<><31><EFBFBD><EFBFBD><EFBFBD>' WHERE a='<27>-<2D><><EFBFBD>-1';
|
||||
# SELECT * FROM federated.t1;
|
||||
# DELETE FROM federated.t1 WHERE a='<27>-Ũ<>-4';
|
||||
# DELETE FROM federated.t1 WHERE a='<27>-Ũ<>-4';
|
||||
# SELECT * FROM federated.t1;
|
||||
# DELETE FROM federated.t1 WHERE a>'<27>-';
|
||||
# DELETE FROM federated.t1 WHERE a>'<27>-';
|
||||
# SELECT * FROM federated.t1;
|
||||
# SET names default;
|
||||
# DROP TABLE IF EXISTS federated.t1;
|
||||
@ -1855,9 +1855,29 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
#
|
||||
# Coverage testing of CREATE SERVER.
|
||||
# Bug #34779: crash in checksum table on federated tables with blobs
|
||||
# containing nulls
|
||||
#
|
||||
connection slave;
|
||||
CREATE TABLE t1 (a LONGBLOB, b LONGBLOB);
|
||||
INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', NULL);
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval CREATE TABLE t1
|
||||
(a LONGBLOB, b LONGBLOB) ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
|
||||
CHECKSUM TABLE t1;
|
||||
connection slave;
|
||||
DROP TABLE t1;
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
connection default;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
create server 's1' foreign data wrapper 'mysql' options (port 3306);
|
||||
drop server 's1';
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +1 @@
|
||||
<EFBFBD>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\<5C>\
|
||||
|
||||
|
@ -9,5 +9,3 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
jp_convert_sjis : Bug#36597 Testsuite "jp": Suspicious results for some tests
|
||||
jp_select_sjis : Bug#36597 Testsuite "jp": Suspicious results for some tests
|
||||
|
@ -192,14 +192,30 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int primary key)
|
||||
ENGINE=NDB
|
||||
PARTITION BY KEY(a);
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
ALTER TABLE t1 OPTIMIZE PARTITION p0;
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
ALTER TABLE t1 CHECK PARTITION p0;
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
ALTER TABLE t1 REPAIR PARTITION p0;
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
ALTER TABLE t1 ANALYZE PARTITION p0;
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
ALTER TABLE t1 REBUILD PARTITION p0;
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
DROP TABLE t1;
|
||||
|
@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
|
||||
def type 253 10 3 Y 0 31 8
|
||||
def possible_keys 253 4096 0 Y 0 31 8
|
||||
def key 253 64 0 Y 0 31 8
|
||||
def key_len 253 1365 0 Y 0 31 8
|
||||
def key_len 253 4096 0 Y 0 31 8
|
||||
def ref 253 1024 0 Y 0 31 8
|
||||
def rows 8 10 1 Y 32928 0 63
|
||||
def Extra 253 255 0 N 1 31 8
|
||||
|
@ -175,15 +175,15 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int primary key)
|
||||
ENGINE=NDB
|
||||
PARTITION BY KEY(a);
|
||||
--error 1031
|
||||
ANALYZE TABLE t1;
|
||||
CHECK TABLE t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
REPAIR TABLE t1;
|
||||
ALTER TABLE t1 OPTIMIZE PARTITION p0;
|
||||
--error 1031
|
||||
ALTER TABLE t1 CHECK PARTITION p0;
|
||||
--error 1031
|
||||
ALTER TABLE t1 REPAIR PARTITION p0;
|
||||
--error 1031
|
||||
ALTER TABLE t1 ANALYZE PARTITION p0;
|
||||
--error 1031
|
||||
--error ER_ILLEGAL_HA
|
||||
ALTER TABLE t1 REBUILD PARTITION p0;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -31,6 +31,9 @@ let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10
|
||||
--echo # 1.4 ALTER ... ANALYZE PARTITION part_1,part_1,part_1;
|
||||
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
--echo # 1.5 ALTER ... ANALYZE PARTITION ALL;
|
||||
let $alter= ALTER TABLE t1 ANALYZE PARTITION ALL;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 2 ALTER ... CHECK PARTITION
|
||||
@ -47,6 +50,9 @@ let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
|
||||
--echo # 2.4 ALTER ... CHECK PARTITION part_1,part_1,part_1;
|
||||
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
--echo # 2.5 ALTER ... CHECK PARTITION ALL;
|
||||
let $alter= ALTER TABLE t1 CHECK PARTITION ALL;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 3 ALTER ... OPTIMIZE PARTITION
|
||||
@ -63,6 +69,9 @@ let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_1
|
||||
--echo # 3.4 ALTER ... OPTIMIZE PARTITION part_1,part_1,part_1;
|
||||
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
--echo # 3.5 ALTER ... OPTIMIZE PARTITION ALL;
|
||||
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION ALL;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 4 ALTER ... REBUILD PARTITION
|
||||
@ -79,6 +88,9 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10
|
||||
--echo # 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
|
||||
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
--echo # 4.5 ALTER ... REBUILD PARTITION ALL;
|
||||
let $alter= ALTER TABLE t1 REBUILD PARTITION ALL;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 5 ALTER ... REPAIR PARTITION
|
||||
@ -95,6 +107,9 @@ let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
|
||||
--echo # 5.4 ALTER ... REPAIR PARTITION part_1,part_1,part_1;
|
||||
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
--echo # 5.5 ALTER ... REPAIR PARTITION ALL;
|
||||
let $alter= ALTER TABLE t1 REPAIR PARTITION ALL;
|
||||
--source suite/parts/inc/partition_alter_41.inc
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 6 ALTER ... REMOVE PARTITIONING
|
||||
|
548
mysql-test/suite/parts/inc/partition_mgm.inc
Normal file
548
mysql-test/suite/parts/inc/partition_mgm.inc
Normal file
@ -0,0 +1,548 @@
|
||||
################################################################################
|
||||
# inc/partition_mgm.inc #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partition management functions including different Upper/Lower #
|
||||
# case names of databases, tables and partitions #
|
||||
# #
|
||||
# #
|
||||
# Uses following variables: #
|
||||
# engine Use specified storage engine #
|
||||
# can_only_key Storage engine only able to use HASH/KEY (not range/list) #
|
||||
# (E.g. not ndbcluster) #
|
||||
# part_optA-D Extra partitioning options (E.g. INDEX/DATA DIR) #
|
||||
# #
|
||||
# have_bug33158 NDB case insensitive create, but case sensitive rename #
|
||||
# have_bug37719 Archive, crash when rename and then select #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
--enable_abort_on_error
|
||||
|
||||
let $old_db= `SELECT DATABASE()`;
|
||||
--echo # Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
--echo # 1.0 KEY partitioning mgm
|
||||
--echo # Creating KEY partitioned table
|
||||
eval CREATE TABLE TableA (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partB $part_optB,
|
||||
PARTITION Partc $part_optC,
|
||||
PARTITION PartD $part_optD);
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Test of ADD/COALESCE PARTITIONS
|
||||
--echo # expecting duplicate partition name
|
||||
--error ER_SAME_NAME_PARTITION
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of REORGANIZE PARTITIONS
|
||||
--echo # Should not work on HASH/KEY
|
||||
--error ER_REORG_HASH_ONLY_ON_SAME_NO
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA $part_optA,
|
||||
PARTITION partc $part_optC);
|
||||
--error ER_CONSECUTIVE_REORG_PARTITIONS
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB $part_optA,
|
||||
PARTITION parta $part_optC);
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB $part_optA COMMENT="Previusly named parta",
|
||||
PARTITION parta $part_optB COMMENT="Previusly named partB");
|
||||
if ($fixed_bug20129)
|
||||
{
|
||||
ALTER TABLE TableA ANALYZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA CHECK PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA OPTIMIZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA REPAIR PARTITION parta, partB, Partc;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
--sorted_result
|
||||
SELECT * FROM TableB;
|
||||
RENAME TABLE TableB to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Checking name comparision Upper vs Lower case
|
||||
--echo # Error if lower_case_table_names != 0
|
||||
let $lower_case_table_names= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'lower_case_table_names'`;
|
||||
--echo # lower_case_table_names: $lower_case_table_names
|
||||
if ($lower_case_table_names)
|
||||
{
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partB $part_optB,
|
||||
PARTITION Partc $part_optC,
|
||||
PARTITION PartD $part_optD);
|
||||
SHOW TABLES;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE TableA to tablea;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE tablea to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
SHOW CREATE TABLE tablea;
|
||||
}
|
||||
if (!$lower_case_table_names)
|
||||
{
|
||||
if (!$have_bug33158)
|
||||
{
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partB $part_optB,
|
||||
PARTITION Partc $part_optC,
|
||||
PARTITION PartD $part_optD);
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
RENAME TABLE TableA to tableA;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
--sorted_result
|
||||
SELECT * FROM tableA;
|
||||
RENAME TABLE tableA to TableA;
|
||||
}
|
||||
SHOW CREATE TABLE tablea;
|
||||
DROP TABLE tablea;
|
||||
}
|
||||
}
|
||||
|
||||
--echo # Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
|
||||
if (!$can_only_key)
|
||||
{
|
||||
--echo # 2.0 HASH partitioning mgm
|
||||
--echo # expecting duplicate partition name
|
||||
--error ER_SAME_NAME_PARTITION
|
||||
eval CREATE TABLE TableA (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partA $part_optB,
|
||||
PARTITION Parta $part_optC,
|
||||
PARTITION PartA $part_optD);
|
||||
|
||||
--echo # Creating Hash partitioned table
|
||||
eval CREATE TABLE TableA (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partB $part_optB,
|
||||
PARTITION Partc $part_optC,
|
||||
PARTITION PartD $part_optD);
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Test of ADD/COALESCE PARTITIONS
|
||||
--echo # expecting duplicate partition name
|
||||
--error ER_SAME_NAME_PARTITION
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of REORGANIZE PARTITIONS
|
||||
--echo # Should not work on HASH/KEY
|
||||
--error ER_REORG_HASH_ONLY_ON_SAME_NO
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA $part_optA,
|
||||
PARTITION partc $part_optC);
|
||||
--error ER_CONSECUTIVE_REORG_PARTITIONS
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB $part_optA,
|
||||
PARTITION parta $part_optC);
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB $part_optA COMMENT="Previusly named parta",
|
||||
PARTITION parta $part_optB COMMENT="Previusly named partB");
|
||||
if ($fixed_bug20129)
|
||||
{
|
||||
ALTER TABLE TableA ANALYZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA CHECK PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA OPTIMIZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA REPAIR PARTITION parta, partB, Partc;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
--sorted_result
|
||||
SELECT * FROM TableB;
|
||||
RENAME TABLE TableB to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Checking name comparision Upper vs Lower case
|
||||
--echo # Error if lower_case_table_names != 0
|
||||
let $lower_case_table_names= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'lower_case_table_names'`;
|
||||
--echo # lower_case_table_names: $lower_case_table_names
|
||||
if ($lower_case_table_names)
|
||||
{
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partB $part_optB,
|
||||
PARTITION Partc $part_optC,
|
||||
PARTITION PartD $part_optD);
|
||||
SHOW TABLES;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE TableA to tablea;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE tablea to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
SHOW CREATE TABLE tablea;
|
||||
}
|
||||
if (!$lower_case_table_names)
|
||||
{
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta $part_optA,
|
||||
PARTITION partB $part_optB,
|
||||
PARTITION Partc $part_optC,
|
||||
PARTITION PartD $part_optD);
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
RENAME TABLE TableA to tableA;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
--sorted_result
|
||||
SELECT * FROM tableA;
|
||||
RENAME TABLE tableA to TableA;
|
||||
}
|
||||
SHOW CREATE TABLE tablea;
|
||||
DROP TABLE tablea;
|
||||
}
|
||||
|
||||
--echo # Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
|
||||
|
||||
--echo # 3.0 RANGE partitioning mgm
|
||||
--echo # Creating RANGE partitioned table
|
||||
eval CREATE TABLE TableA (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) $part_optA,
|
||||
PARTITION partB VALUES LESS THAN (7) $part_optB,
|
||||
PARTITION Partc VALUES LESS THAN (10) $part_optC,
|
||||
PARTITION PartD VALUES LESS THAN (13) $part_optD);
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Test of ADD/DROP PARTITIONS
|
||||
--echo # expecting duplicate partition name
|
||||
--error ER_SAME_NAME_PARTITION
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of REORGANIZE PARTITIONS
|
||||
--echo # Error since it must reorganize a consecutive range
|
||||
--error ER_CONSECUTIVE_REORG_PARTITIONS
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) $part_optA,
|
||||
PARTITION parta VALUES LESS THAN (11) $part_optC);
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8) $part_optB
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11) $part_optC
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE) $part_optD
|
||||
COMMENT="Previously partly PartD");
|
||||
if ($fixed_bug20129)
|
||||
{
|
||||
ALTER TABLE TableA ANALYZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA CHECK PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA OPTIMIZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA REPAIR PARTITION parta, partB, Partc;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
--sorted_result
|
||||
SELECT * FROM TableB;
|
||||
RENAME TABLE TableB to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Checking name comparision Upper vs Lower case
|
||||
--echo # Error if lower_case_table_names != 0
|
||||
let $lower_case_table_names= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'lower_case_table_names'`;
|
||||
--echo # lower_case_table_names: $lower_case_table_names
|
||||
if ($lower_case_table_names)
|
||||
{
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) $part_optA,
|
||||
PARTITION partB VALUES LESS THAN (7) $part_optB,
|
||||
PARTITION Partc VALUES LESS THAN (10) $part_optC,
|
||||
PARTITION PartD VALUES LESS THAN (13) $part_optD);
|
||||
SHOW TABLES;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE TableA to tablea;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE tablea to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
SHOW CREATE TABLE tablea;
|
||||
}
|
||||
if (!$lower_case_table_names)
|
||||
{
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) $part_optA,
|
||||
PARTITION partB VALUES LESS THAN (7) $part_optB,
|
||||
PARTITION Partc VALUES LESS THAN (10) $part_optC,
|
||||
PARTITION PartD VALUES LESS THAN (13) $part_optD);
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
RENAME TABLE TableA to tableA;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
--sorted_result
|
||||
SELECT * FROM tableA;
|
||||
RENAME TABLE tableA to TableA;
|
||||
}
|
||||
SHOW CREATE TABLE tablea;
|
||||
DROP TABLE tablea;
|
||||
}
|
||||
|
||||
--echo # Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
|
||||
--echo # 4.0 LIST partitioning mgm
|
||||
--echo # Creating LIST partitioned table
|
||||
eval CREATE TABLE TableA (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) $part_optA,
|
||||
PARTITION partB VALUES IN (2,10,11) $part_optB,
|
||||
PARTITION Partc VALUES IN (3,4,7) $part_optC,
|
||||
PARTITION PartD VALUES IN (5,6,12) $part_optD);
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Test of ADD/DROP PARTITIONS
|
||||
--echo # expecting duplicate partition name
|
||||
--error ER_SAME_NAME_PARTITION
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of REORGANIZE PARTITIONS
|
||||
--error ER_CONSECUTIVE_REORG_PARTITIONS
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7) $part_optA
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9) $part_optC
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8) $part_optC
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
eval ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7) $part_optA
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9) $part_optC
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8) $part_optC
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
if ($fixed_bug20129)
|
||||
{
|
||||
ALTER TABLE TableA ANALYZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA CHECK PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA OPTIMIZE PARTITION parta, partB, Partc;
|
||||
ALTER TABLE TableA REPAIR PARTITION parta, partB, Partc;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
--sorted_result
|
||||
SELECT * FROM TableB;
|
||||
RENAME TABLE TableB to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
|
||||
--echo # Checking name comparision Upper vs Lower case
|
||||
--echo # Error if lower_case_table_names != 0
|
||||
let $lower_case_table_names= `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'lower_case_table_names'`;
|
||||
--echo # lower_case_table_names: $lower_case_table_names
|
||||
if ($lower_case_table_names)
|
||||
{
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) $part_optA,
|
||||
PARTITION partB VALUES IN (2,10,11) $part_optB,
|
||||
PARTITION Partc VALUES IN (3,4,7) $part_optC,
|
||||
PARTITION PartD VALUES IN (5,6,12) $part_optD);
|
||||
SHOW TABLES;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE TableA to tablea;
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
RENAME TABLE tablea to TableA;
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
SHOW CREATE TABLE tablea;
|
||||
}
|
||||
if (!$lower_case_table_names)
|
||||
{
|
||||
eval CREATE TABLE tablea (a INT)
|
||||
ENGINE = $engine
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) $part_optA,
|
||||
PARTITION partB VALUES IN (2,10,11) $part_optB,
|
||||
PARTITION Partc VALUES IN (3,4,7) $part_optC,
|
||||
PARTITION PartD VALUES IN (5,6,12) $part_optD);
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
RENAME TABLE TableA to tableA;
|
||||
}
|
||||
--sorted_result
|
||||
SELECT * FROM tablea;
|
||||
if (!$have_bug37719)
|
||||
{
|
||||
--sorted_result
|
||||
SELECT * FROM tableA;
|
||||
RENAME TABLE tableA to TableA;
|
||||
}
|
||||
SHOW CREATE TABLE tablea;
|
||||
DROP TABLE tablea;
|
||||
}
|
||||
|
||||
--echo # Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
--sorted_result
|
||||
SELECT * FROM TableA;
|
||||
SHOW CREATE TABLE TableA;
|
||||
|
||||
--echo # Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
}
|
||||
# End of $can_only_key
|
||||
|
||||
--echo # Cleaning up before exit
|
||||
eval USE $old_db;
|
||||
DROP DATABASE MySQL_Test_DB;
|
File diff suppressed because it is too large
Load Diff
@ -541,20 +541,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1062,20 +1062,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1597,20 +1597,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2124,20 +2124,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2653,20 +2653,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3186,20 +3186,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3721,20 +3721,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4254,20 +4254,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4770,20 +4770,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5291,20 +5291,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5826,20 +5826,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6353,20 +6353,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6882,20 +6882,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7415,20 +7415,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7950,20 +7950,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8483,20 +8483,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
|
@ -833,16 +833,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -1322,16 +1323,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -1819,16 +1821,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -2312,16 +2315,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -2805,16 +2809,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -3300,16 +3305,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -3797,16 +3803,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -4290,16 +4297,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -4780,16 +4788,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -5269,16 +5278,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -5766,16 +5776,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -6259,16 +6270,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -6752,16 +6764,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -7247,16 +7260,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -7744,16 +7758,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -8237,16 +8252,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -8744,16 +8760,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -9249,16 +9266,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -9762,16 +9780,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -10271,16 +10290,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -10780,16 +10800,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -11291,16 +11312,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -11804,16 +11826,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -12313,16 +12336,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -12819,16 +12843,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -13324,16 +13349,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -13837,16 +13863,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -14346,16 +14373,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -14855,16 +14883,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -15366,16 +15395,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -15879,16 +15909,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -16388,16 +16419,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@ -700,20 +700,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1221,20 +1221,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1756,20 +1756,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2283,20 +2283,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2814,20 +2814,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3347,20 +3347,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3882,20 +3882,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4415,20 +4415,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4931,20 +4931,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5452,20 +5452,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5987,20 +5987,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6514,20 +6514,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7045,20 +7045,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7578,20 +7578,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8113,20 +8113,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8646,20 +8646,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -487,20 +487,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -956,20 +956,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1439,20 +1439,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1914,20 +1914,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2393,20 +2393,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2874,20 +2874,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3357,20 +3357,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3838,20 +3838,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4306,20 +4306,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4775,20 +4775,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5258,20 +5258,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5733,20 +5733,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6210,20 +6210,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6691,20 +6691,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7174,20 +7174,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7655,20 +7655,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8119,20 +8119,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8588,20 +8588,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -9071,20 +9071,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -9546,20 +9546,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10023,20 +10023,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10504,20 +10504,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10987,20 +10987,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -11468,20 +11468,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -11932,20 +11932,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -12401,20 +12401,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -12884,20 +12884,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -13359,20 +13359,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -13836,20 +13836,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -14317,20 +14317,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -14800,20 +14800,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -15281,20 +15281,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -488,20 +488,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -952,20 +952,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1430,20 +1430,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1900,20 +1900,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2374,20 +2374,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2850,20 +2850,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3332,20 +3332,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3808,20 +3808,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4268,20 +4268,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4732,20 +4732,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5210,20 +5210,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5680,20 +5680,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6152,20 +6152,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6628,20 +6628,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7106,20 +7106,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7582,20 +7582,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8099,20 +8099,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8616,20 +8616,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -9147,20 +9147,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -9670,20 +9670,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10197,20 +10197,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10726,20 +10726,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -11261,20 +11261,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -11790,20 +11790,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -12307,20 +12307,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -12824,20 +12824,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -13355,20 +13355,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -13878,20 +13878,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -14403,20 +14403,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -14932,20 +14932,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -15463,20 +15463,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -15992,20 +15992,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
|
@ -502,20 +502,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -991,20 +991,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1493,20 +1493,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1987,20 +1987,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2485,20 +2485,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2981,20 +2981,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3499,20 +3499,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3999,20 +3999,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4469,20 +4469,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4958,20 +4958,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5460,20 +5460,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5954,20 +5954,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6450,20 +6450,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -6946,20 +6946,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7464,20 +7464,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -7964,20 +7964,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -8491,20 +8491,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -9033,20 +9033,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -9588,20 +9588,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10135,20 +10135,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -10686,20 +10686,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -11235,20 +11235,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -11806,20 +11806,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -12359,20 +12359,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -12886,20 +12886,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -13428,20 +13428,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -13983,20 +13983,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -14530,20 +14530,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -15079,20 +15079,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -15628,20 +15628,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -16199,20 +16199,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -16752,20 +16752,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -17273,20 +17273,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -17805,20 +17805,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -18353,20 +18353,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -18888,20 +18888,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -19427,20 +19427,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -19968,20 +19968,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -20529,20 +20529,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
|
@ -473,16 +473,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -927,16 +928,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -1380,16 +1382,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -1896,16 +1899,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -2388,16 +2392,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -2841,16 +2846,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -3296,16 +3302,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -3749,16 +3756,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -4205,16 +4213,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -4656,16 +4665,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
@ -5105,16 +5115,17 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@ -483,20 +483,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -947,20 +947,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1414,20 +1414,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -1944,20 +1944,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2450,20 +2450,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -2917,20 +2917,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3382,20 +3382,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -3849,20 +3849,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4319,20 +4319,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -4778,20 +4778,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
@ -5237,20 +5237,20 @@ AND f_int2 <> CAST(f_char1 AS SIGNED INT)
|
||||
AND f_charbig = '####updated per insert trigger####';
|
||||
ANALYZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze note The storage engine for the table doesn't support analyze
|
||||
test.t1 analyze status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check note The storage engine for the table doesn't support check
|
||||
test.t1 check status OK
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 <some_value>
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
test.t1 optimize status OK
|
||||
# check layout success: 1
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair note The storage engine for the table doesn't support repair
|
||||
test.t1 repair status OK
|
||||
# check layout success: 1
|
||||
TRUNCATE t1;
|
||||
|
||||
|
834
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
Normal file
834
mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
Normal file
@ -0,0 +1,834 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE, PARTITION partE ENGINE = ARCHIVE, PARTITION Partf ENGINE = ARCHIVE, PARTITION PartG ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE, PARTITION partE ENGINE = ARCHIVE, PARTITION Partf ENGINE = ARCHIVE, PARTITION PartG ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE, PARTITION partE VALUES LESS THAN (16) ENGINE = ARCHIVE, PARTITION Partf VALUES LESS THAN (19) ENGINE = ARCHIVE, PARTITION PartG VALUES LESS THAN (22) ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = ARCHIVE, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION partE VALUES IN (16) ENGINE = ARCHIVE, PARTITION Partf VALUES IN (19) ENGINE = ARCHIVE, PARTITION PartG VALUES IN (22) ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = ARCHIVE, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = ARCHIVE, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
1
|
||||
10
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
7
|
||||
8
|
||||
8
|
||||
9
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
829
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
Normal file
829
mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
Normal file
@ -0,0 +1,829 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB, PARTITION PartD ENGINE = InnoDB, PARTITION partE ENGINE = InnoDB, PARTITION Partf ENGINE = InnoDB, PARTITION PartG ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB, PARTITION PartD ENGINE = InnoDB) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB, PARTITION PartD ENGINE = InnoDB, PARTITION partE ENGINE = InnoDB, PARTITION Partf ENGINE = InnoDB, PARTITION PartG ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB, PARTITION PartD ENGINE = InnoDB) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB, PARTITION partE VALUES LESS THAN (16) ENGINE = InnoDB, PARTITION Partf VALUES LESS THAN (19) ENGINE = InnoDB, PARTITION PartG VALUES LESS THAN (22) ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB, PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB, PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION partE VALUES IN (16) ENGINE = InnoDB, PARTITION Partf VALUES IN (19) ENGINE = InnoDB, PARTITION PartG VALUES IN (22) ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB, PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB, PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION PartE VALUES IN (13) ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION PartE VALUES IN (13) ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB, PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB, PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
829
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
Normal file
829
mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
Normal file
@ -0,0 +1,829 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY, PARTITION PartD ENGINE = MEMORY, PARTITION partE ENGINE = MEMORY, PARTITION Partf ENGINE = MEMORY, PARTITION PartG ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY, PARTITION PartD ENGINE = MEMORY) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY, PARTITION PartD ENGINE = MEMORY, PARTITION partE ENGINE = MEMORY, PARTITION Partf ENGINE = MEMORY, PARTITION PartG ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY, PARTITION PartD ENGINE = MEMORY) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY, PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY, PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY, PARTITION partE VALUES LESS THAN (16) ENGINE = MEMORY, PARTITION Partf VALUES LESS THAN (19) ENGINE = MEMORY, PARTITION PartG VALUES LESS THAN (22) ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY, PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY, PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY, PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY, PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY, PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY, PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION partE VALUES IN (16) ENGINE = MEMORY, PARTITION Partf VALUES IN (19) ENGINE = MEMORY, PARTITION PartG VALUES IN (22) ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY, PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY, PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION PartE VALUES IN (13) ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION PartE VALUES IN (13) ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY, PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY, PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
829
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
Normal file
829
mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
Normal file
@ -0,0 +1,829 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM, PARTITION PartD ENGINE = MyISAM, PARTITION partE ENGINE = MyISAM, PARTITION Partf ENGINE = MyISAM, PARTITION PartG ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM, PARTITION PartD ENGINE = MyISAM) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM, PARTITION PartD ENGINE = MyISAM, PARTITION partE ENGINE = MyISAM, PARTITION Partf ENGINE = MyISAM, PARTITION PartG ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM, PARTITION PartD ENGINE = MyISAM) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM, PARTITION partE VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION Partf VALUES LESS THAN (19) ENGINE = MyISAM, PARTITION PartG VALUES LESS THAN (22) ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM, PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM, PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION partE VALUES IN (16) ENGINE = MyISAM, PARTITION Partf VALUES IN (19) ENGINE = MyISAM, PARTITION PartG VALUES IN (22) ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM, PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM, PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION PartE VALUES IN (13) ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION PartE VALUES IN (13) ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO tablea VALUES (1), (2), (7), (8), (9), (10);
|
||||
SHOW TABLES;
|
||||
Tables_in_MySQL_Test_DB
|
||||
TableA
|
||||
tablea
|
||||
RENAME TABLE TableA to tableA;
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
2
|
||||
7
|
||||
8
|
||||
9
|
||||
SELECT * FROM tableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE tableA to TableA;
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM, PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM, PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM) */
|
||||
DROP TABLE tablea;
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
170
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result
Normal file
170
mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result
Normal file
@ -0,0 +1,170 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'NDBCluster'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ndbcluster, PARTITION partB ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster, PARTITION PartD ENGINE = ndbcluster, PARTITION partE ENGINE = ndbcluster, PARTITION Partf ENGINE = ndbcluster, PARTITION PartG ENGINE = ndbcluster) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ndbcluster, PARTITION partB ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 0
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
797
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
Normal file
@ -0,0 +1,797 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE, PARTITION partE ENGINE = ARCHIVE, PARTITION Partf ENGINE = ARCHIVE, PARTITION PartG ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE, PARTITION partE ENGINE = ARCHIVE, PARTITION Partf ENGINE = ARCHIVE, PARTITION PartG ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE, PARTITION partE VALUES LESS THAN (16) ENGINE = ARCHIVE, PARTITION Partf VALUES LESS THAN (19) ENGINE = ARCHIVE, PARTITION PartG VALUES LESS THAN (22) ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = ARCHIVE, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = ARCHIVE, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION partE VALUES IN (16) ENGINE = ARCHIVE, PARTITION Partf VALUES IN (19) ENGINE = ARCHIVE, PARTITION PartG VALUES IN (22) ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = ARCHIVE, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = ARCHIVE, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = ARCHIVE, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = ARCHIVE, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
797
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
Normal file
@ -0,0 +1,797 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB, PARTITION PartD ENGINE = InnoDB, PARTITION partE ENGINE = InnoDB, PARTITION Partf ENGINE = InnoDB, PARTITION PartG ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB, PARTITION PartD ENGINE = InnoDB, PARTITION partE ENGINE = InnoDB, PARTITION Partf ENGINE = InnoDB, PARTITION PartG ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = InnoDB, PARTITION partB ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = InnoDB, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = InnoDB, PARTITION Partc ENGINE = InnoDB) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB, PARTITION partE VALUES LESS THAN (16) ENGINE = InnoDB, PARTITION Partf VALUES LESS THAN (19) ENGINE = InnoDB, PARTITION PartG VALUES LESS THAN (22) ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION Partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION PartD VALUES LESS THAN (13) ENGINE = InnoDB, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = InnoDB, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = InnoDB, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = InnoDB) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB, PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB, PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION partE VALUES IN (16) ENGINE = InnoDB, PARTITION Partf VALUES IN (19) ENGINE = InnoDB, PARTITION PartG VALUES IN (22) ENGINE = InnoDB) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = InnoDB, PARTITION partB VALUES IN (2,10,11) ENGINE = InnoDB, PARTITION Partc VALUES IN (3,4,7) ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION PartE VALUES IN (13) ENGINE = InnoDB) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION PartE VALUES IN (13) ENGINE = InnoDB) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'InnoDB'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = InnoDB, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = InnoDB, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = InnoDB, PARTITION PartD VALUES IN (5,6,12) ENGINE = InnoDB, PARTITION PartE VALUES IN (13) ENGINE = InnoDB) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
797
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
Normal file
@ -0,0 +1,797 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY, PARTITION PartD ENGINE = MEMORY, PARTITION partE ENGINE = MEMORY, PARTITION Partf ENGINE = MEMORY, PARTITION PartG ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY, PARTITION PartD ENGINE = MEMORY, PARTITION partE ENGINE = MEMORY, PARTITION Partf ENGINE = MEMORY, PARTITION PartG ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MEMORY, PARTITION partB ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MEMORY, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MEMORY, PARTITION Partc ENGINE = MEMORY) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY, PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY, PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY, PARTITION partE VALUES LESS THAN (16) ENGINE = MEMORY, PARTITION Partf VALUES LESS THAN (19) ENGINE = MEMORY, PARTITION PartG VALUES LESS THAN (22) ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (7) ENGINE = MEMORY, PARTITION Partc VALUES LESS THAN (10) ENGINE = MEMORY, PARTITION PartD VALUES LESS THAN (13) ENGINE = MEMORY, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MEMORY, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MEMORY, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MEMORY, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MEMORY) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY, PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY, PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION partE VALUES IN (16) ENGINE = MEMORY, PARTITION Partf VALUES IN (19) ENGINE = MEMORY, PARTITION PartG VALUES IN (22) ENGINE = MEMORY) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MEMORY, PARTITION partB VALUES IN (2,10,11) ENGINE = MEMORY, PARTITION Partc VALUES IN (3,4,7) ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION PartE VALUES IN (13) ENGINE = MEMORY) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION PartE VALUES IN (13) ENGINE = MEMORY) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Memory'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MEMORY, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MEMORY, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MEMORY, PARTITION PartD VALUES IN (5,6,12) ENGINE = MEMORY, PARTITION PartE VALUES IN (13) ENGINE = MEMORY) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
797
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
Normal file
@ -0,0 +1,797 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM, PARTITION PartD ENGINE = MyISAM, PARTITION partE ENGINE = MyISAM, PARTITION Partf ENGINE = MyISAM, PARTITION PartG ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM, PARTITION PartD ENGINE = MyISAM, PARTITION partE ENGINE = MyISAM, PARTITION Partf ENGINE = MyISAM, PARTITION PartG ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = MyISAM, PARTITION partB ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = MyISAM, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = MyISAM, PARTITION Partc ENGINE = MyISAM) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM, PARTITION partE VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION Partf VALUES LESS THAN (19) ENGINE = MyISAM, PARTITION PartG VALUES LESS THAN (22) ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION Partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION PartD VALUES LESS THAN (13) ENGINE = MyISAM, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = MyISAM, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = MyISAM, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = MyISAM) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM, PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM, PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION partE VALUES IN (16) ENGINE = MyISAM, PARTITION Partf VALUES IN (19) ENGINE = MyISAM, PARTITION PartG VALUES IN (22) ENGINE = MyISAM) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = MyISAM, PARTITION partB VALUES IN (2,10,11) ENGINE = MyISAM, PARTITION Partc VALUES IN (3,4,7) ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION PartE VALUES IN (13) ENGINE = MyISAM) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION PartE VALUES IN (13) ENGINE = MyISAM) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'MyISAM'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = MyISAM, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = MyISAM, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = MyISAM, PARTITION PartD VALUES IN (5,6,12) ENGINE = MyISAM, PARTITION PartE VALUES IN (13) ENGINE = MyISAM) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
204
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result
Normal file
204
mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result
Normal file
@ -0,0 +1,204 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'NDBCluster'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ndbcluster, PARTITION partB ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster, PARTITION PartD ENGINE = ndbcluster, PARTITION partE ENGINE = ndbcluster, PARTITION Partf ENGINE = ndbcluster, PARTITION PartG ENGINE = ndbcluster) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ndbcluster, PARTITION partB ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 1
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'NDBCluster'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
tablea
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ndbcluster, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ndbcluster, PARTITION Partc ENGINE = ndbcluster) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
797
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc2_archive.result
Normal file
@ -0,0 +1,797 @@
|
||||
# Creating database MySQL_TEST_DB
|
||||
CREATE DATABASE MySQL_Test_DB;
|
||||
USE MySQL_Test_DB;
|
||||
# 1.0 KEY partitioning mgm
|
||||
# Creating KEY partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE, PARTITION partE ENGINE = ARCHIVE, PARTITION Partf ENGINE = ARCHIVE, PARTITION PartG ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 2
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY KEY (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
TableA
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'TableA' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after KEY PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 2.0 HASH partitioning mgm
|
||||
# expecting duplicate partition name
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partA ,
|
||||
PARTITION Parta ,
|
||||
PARTITION PartA );
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
# Creating Hash partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/COALESCE PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA,
|
||||
PARTITION Parta,
|
||||
PARTITION PartA);
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE,
|
||||
PARTITION Partf,
|
||||
PARTITION PartG);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE, PARTITION PartD ENGINE = ARCHIVE, PARTITION partE ENGINE = ARCHIVE, PARTITION Partf ENGINE = ARCHIVE, PARTITION PartG ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA COALESCE PARTITION 4;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION parta ENGINE = ARCHIVE, PARTITION partB ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Should not work on HASH/KEY
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION PARTA ,
|
||||
PARTITION partc );
|
||||
ERROR HY000: REORGANISE PARTITION can only be used to reorganise partitions not to change their numbers
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB ,
|
||||
PARTITION parta );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB INTO
|
||||
(PARTITION partB COMMENT="Previusly named parta",
|
||||
PARTITION parta COMMENT="Previusly named partB");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 2
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY HASH (a)
|
||||
(PARTITION parta ,
|
||||
PARTITION partB ,
|
||||
PARTITION Partc ,
|
||||
PARTITION PartD );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
TableA
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'TableA' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION partB COMMENT = 'Previusly named parta' ENGINE = ARCHIVE, PARTITION parta COMMENT = 'Previusly named partB' ENGINE = ARCHIVE, PARTITION Partc ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after HASH PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 3.0 RANGE partitioning mgm
|
||||
# Creating RANGE partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES LESS THAN (MAXVALUE));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES LESS THAN (16),
|
||||
PARTITION Partf VALUES LESS THAN (19),
|
||||
PARTITION PartG VALUES LESS THAN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE, PARTITION partE VALUES LESS THAN (16) ENGINE = ARCHIVE, PARTITION Partf VALUES LESS THAN (19) ENGINE = ARCHIVE, PARTITION PartG VALUES LESS THAN (22) ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES LESS THAN (MAXVALUE));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (7) ENGINE = ARCHIVE, PARTITION Partc VALUES LESS THAN (10) ENGINE = ARCHIVE, PARTITION PartD VALUES LESS THAN (13) ENGINE = ARCHIVE, PARTITION PartE VALUES LESS THAN MAXVALUE ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
# Error since it must reorganize a consecutive range
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION partB VALUES LESS THAN (3) ,
|
||||
PARTITION parta VALUES LESS THAN (11) );
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION partB,Partc,PartD,PartE INTO
|
||||
(PARTITION partD VALUES LESS THAN (8)
|
||||
COMMENT="Previously partB and partly Partc",
|
||||
PARTITION partB VALUES LESS THAN (11)
|
||||
COMMENT="Previously partly Partc and partly PartD",
|
||||
PARTITION partC VALUES LESS THAN (MAXVALUE)
|
||||
COMMENT="Previously partly PartD");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = ARCHIVE, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 2
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY RANGE (a)
|
||||
(PARTITION parta VALUES LESS THAN (4) ,
|
||||
PARTITION partB VALUES LESS THAN (7) ,
|
||||
PARTITION Partc VALUES LESS THAN (10) ,
|
||||
PARTITION PartD VALUES LESS THAN (13) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
TableA
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'TableA' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION parta VALUES LESS THAN (4) ENGINE = ARCHIVE, PARTITION partD VALUES LESS THAN (8) COMMENT = 'Previously partB and partly Partc' ENGINE = ARCHIVE, PARTITION partB VALUES LESS THAN (11) COMMENT = 'Previously partly Partc and partly PartD' ENGINE = ARCHIVE, PARTITION partC VALUES LESS THAN MAXVALUE COMMENT = 'Previously partly PartD' ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after RANGE PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# 4.0 LIST partitioning mgm
|
||||
# Creating LIST partitioned table
|
||||
CREATE TABLE TableA (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
INSERT INTO TableA VALUES (1), (2), (7), (8), (9), (10);
|
||||
INSERT INTO TableA VALUES (3), (4), (5), (6), (11), (12);
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Test of ADD/DROP PARTITIONS
|
||||
# expecting duplicate partition name
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partA VALUES IN (0));
|
||||
ERROR HY000: Duplicate partition name parta
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION partE VALUES IN (16),
|
||||
PARTITION Partf VALUES IN (19),
|
||||
PARTITION PartG VALUES IN (22));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION partE VALUES IN (16) ENGINE = ARCHIVE, PARTITION Partf VALUES IN (19) ENGINE = ARCHIVE, PARTITION PartG VALUES IN (22) ENGINE = ARCHIVE) */
|
||||
ALTER TABLE TableA DROP PARTITION partE, PartG;
|
||||
ALTER TABLE TableA DROP PARTITION Partf;
|
||||
ALTER TABLE TableA ADD PARTITION
|
||||
(PARTITION PartE VALUES IN (13));
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
10
|
||||
11
|
||||
12
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION parta VALUES IN (1,8,9) ENGINE = ARCHIVE, PARTITION partB VALUES IN (2,10,11) ENGINE = ARCHIVE, PARTITION Partc VALUES IN (3,4,7) ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of REORGANIZE PARTITIONS
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION partF VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
ERROR HY000: When reorganising a set of partitions they must be in consecutive order
|
||||
ALTER TABLE TableA REORGANIZE PARTITION parta,partB,Partc INTO
|
||||
(PARTITION Partc VALUES IN (1,7)
|
||||
COMMENT = "Mix 1 of old parta and Partc",
|
||||
PARTITION parta VALUES IN (3,9)
|
||||
COMMENT = "Mix 2 of old parta and Partc",
|
||||
PARTITION partB VALUES IN (4,8)
|
||||
COMMENT = "Mix 3 of old parta and Partc");
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = ARCHIVE, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = ARCHIVE, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of RENAME TABLE
|
||||
RENAME TABLE TableA to TableB;
|
||||
SELECT * FROM TableB;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
RENAME TABLE TableB to TableA;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
# Checking name comparision Upper vs Lower case
|
||||
# Error if lower_case_table_names != 0
|
||||
# lower_case_table_names: 2
|
||||
CREATE TABLE tablea (a INT)
|
||||
ENGINE = 'Archive'
|
||||
PARTITION BY LIST (a)
|
||||
(PARTITION parta VALUES IN (1,8,9) ,
|
||||
PARTITION partB VALUES IN (2,10,11) ,
|
||||
PARTITION Partc VALUES IN (3,4,7) ,
|
||||
PARTITION PartD VALUES IN (5,6,12) );
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
SHOW TABLES;
|
||||
Tables_in_mysql_test_db
|
||||
TableA
|
||||
RENAME TABLE TableA to tablea;
|
||||
ERROR 42S01: Table 'tablea' already exists
|
||||
RENAME TABLE tablea to TableA;
|
||||
ERROR 42S01: Table 'TableA' already exists
|
||||
SELECT * FROM tablea;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE tablea;
|
||||
Table Create Table
|
||||
tablea CREATE TABLE `tablea` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION Partc VALUES IN (1,7) COMMENT = 'Mix 1 of old parta and Partc' ENGINE = ARCHIVE, PARTITION parta VALUES IN (3,9) COMMENT = 'Mix 2 of old parta and Partc' ENGINE = ARCHIVE, PARTITION partB VALUES IN (4,8) COMMENT = 'Mix 3 of old parta and Partc' ENGINE = ARCHIVE, PARTITION PartD VALUES IN (5,6,12) ENGINE = ARCHIVE, PARTITION PartE VALUES IN (13) ENGINE = ARCHIVE) */
|
||||
# Test of REMOVE PARTITIONING
|
||||
ALTER TABLE TableA REMOVE PARTITIONING;
|
||||
SELECT * FROM TableA;
|
||||
a
|
||||
1
|
||||
12
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
SHOW CREATE TABLE TableA;
|
||||
Table Create Table
|
||||
TableA CREATE TABLE `TableA` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
# Cleaning up after LIST PARTITIONING test
|
||||
DROP TABLE TableA;
|
||||
# Cleaning up before exit
|
||||
USE test;
|
||||
DROP DATABASE MySQL_Test_DB;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user