mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
Merge 5.1 main to 5.1-build
This commit is contained in:
commit
f66e4b7337
188 changed files with 125331 additions and 6313 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ dist-hook:
|
|||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(distdir)/std_data/ndb_backup51_data_be
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(distdir)/std_data/ndb_backup51_data_le
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(distdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/*.MY* $(distdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(distdir)/lib/My
|
||||
|
@ -132,6 +133,7 @@ install-data-local:
|
|||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_be
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(DESTDIR)$(testdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/parts/*.MY* $(DESTDIR)$(testdir)/std_data/parts
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(DESTDIR)$(testdir)/std_data/funcs_1
|
||||
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
|
||||
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(DESTDIR)$(testdir)/lib/My
|
||||
|
|
|
@ -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
|
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;
|
|
@ -327,7 +327,6 @@ sub mtr_report_stats ($) {
|
|||
/Sort aborted/ or
|
||||
/Time-out in NDB/ or
|
||||
/One can only use the --user.*root/ or
|
||||
/Setting lower_case_table_names=2/ or
|
||||
/Table:.* on (delete|rename)/ or
|
||||
/You have an error in your SQL syntax/ or
|
||||
/deprecated/ or
|
||||
|
@ -402,7 +401,18 @@ sub mtr_report_stats ($) {
|
|||
)) or
|
||||
|
||||
# Test case for Bug#31590 produces the following error:
|
||||
/Out of sort memory; increase server sort buffer size/
|
||||
/Out of sort memory; increase server sort buffer size/ or
|
||||
|
||||
# Bug#35161, test of auto repair --myisam-recover
|
||||
/able.*_will_crash/ or
|
||||
|
||||
# lowercase_table3 using case sensitive option on
|
||||
# case insensitive filesystem (InnoDB error).
|
||||
/Cannot find or open table test\/BUG29839 from/ or
|
||||
|
||||
# When trying to set lower_case_table_names = 2
|
||||
# on a case sensitive file system. Bug#37402.
|
||||
/lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems./
|
||||
)
|
||||
{
|
||||
next; # Skip these lines
|
||||
|
|
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
|
||||
|
|
|
@ -1009,13 +1009,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 Ü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 <EFBFBD>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<EFBFBD>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 Ü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 <EFBFBD>bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest f<EFBFBD>r jemanden, der seine Zielsprache ernst nimmt:
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
CREATE TABLE federated.t1 (
|
||||
`a` int NOT NULL,
|
||||
|
@ -2118,6 +2118,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
|
||||
|
@ -2125,4 +2136,3 @@ DROP TABLE IF EXISTS federated.t1;
|
|||
DROP DATABASE IF EXISTS federated;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_CONCURRENT_INSERT;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -445,7 +445,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
|
||||
|
@ -461,7 +461,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;
|
||||
|
@ -154,10 +154,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;
|
||||
|
@ -171,10 +171,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;
|
||||
|
@ -878,8 +878,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 */
|
||||
----------------------------------------------------------------
|
||||
|
@ -891,8 +891,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,
|
||||
|
@ -1052,10 +1052,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
|
||||
----------------------------------------------------------------
|
||||
|
@ -1078,12 +1078,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
|
||||
|
@ -1133,12 +1133,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
|
||||
|
@ -1244,6 +1244,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
|
||||
# ------------------------------------------------------------------
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
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
|
@ -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;
|
797
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc2_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: 2
|
||||
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: 2
|
||||
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: 2
|
||||
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: 2
|
||||
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_lc2_memory.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc2_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: 2
|
||||
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: 2
|
||||
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: 2
|
||||
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: 2
|
||||
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_lc2_myisam.result
Normal file
797
mysql-test/suite/parts/r/partition_mgm_lc2_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: 2
|
||||
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: 2
|
||||
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: 2
|
||||
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: 2
|
||||
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_lc2_ndb.result
Normal file
204
mysql-test/suite/parts/r/partition_mgm_lc2_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: 2
|
||||
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;
|
56
mysql-test/suite/parts/r/partition_recover_myisam.result
Normal file
56
mysql-test/suite/parts/r/partition_recover_myisam.result
Normal file
|
@ -0,0 +1,56 @@
|
|||
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
|
||||
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
|
||||
FLUSH TABLES;
|
||||
# replacing t1.MYI with a corrupt + unclosed one created by doing:
|
||||
# 'create table t1 (a int key(a))' head -c1024 t1.MYI > corrupt_t1.MYI
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
Warnings:
|
||||
Error 145 Table './test/t1_will_crash' is marked as crashed and should be repaired
|
||||
Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired
|
||||
Error 1034 1 client is using or hasn't closed the table properly
|
||||
Error 1034 Size of indexfile is: 1024 Should be: 2048
|
||||
Error 1034 Size of datafile is: 77 Should be: 7
|
||||
Error 1034 Number of rows changed from 1 to 11
|
||||
DROP TABLE t1_will_crash;
|
||||
CREATE TABLE t1_will_crash (a INT, KEY (a))
|
||||
ENGINE=MyISAM
|
||||
PARTITION BY HASH(a)
|
||||
PARTITIONS 3;
|
||||
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
|
||||
FLUSH TABLES;
|
||||
# replacing t1#P#p1.MYI with a corrupt + unclosed one created by doing:
|
||||
# 'create table t1 (a int key(a)) partition by hash (a) partitions 3'
|
||||
# head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
Warnings:
|
||||
Error 145 Table './test/t1_will_crash#P#p1' is marked as crashed and should be repaired
|
||||
Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired
|
||||
Error 1034 1 client is using or hasn't closed the table properly
|
||||
Error 1034 Size of indexfile is: 1024 Should be: 2048
|
||||
Error 1034 Size of datafile is: 28 Should be: 7
|
||||
Error 1034 Number of rows changed from 1 to 4
|
||||
DROP TABLE t1_will_crash;
|
463
mysql-test/suite/parts/r/partition_repair_myisam.result
Normal file
463
mysql-test/suite/parts/r/partition_repair_myisam.result
Normal file
|
@ -0,0 +1,463 @@
|
|||
# REPAIR USE_FRM is not implemented for partitioned tables.
|
||||
# test of non partitioned myisam for reference
|
||||
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
|
||||
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
|
||||
FLUSH TABLES;
|
||||
# replacing t1.MYI with a corrupt + unclosed one created by doing:
|
||||
# 'create table t1 (a int key(a))' head -c1024 t1.MYI > corrupt_t1.MYI
|
||||
CHECK TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 77 Should be: 7
|
||||
test.t1_will_crash check error Corrupt
|
||||
REPAIR TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 1 to 11
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
DROP TABLE t1_will_crash;
|
||||
# test of check/repair of a damaged partition's MYI-file
|
||||
CREATE TABLE t1_will_crash (a INT, KEY (a))
|
||||
ENGINE=MyISAM
|
||||
PARTITION BY HASH (a)
|
||||
PARTITIONS 3;
|
||||
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
|
||||
FLUSH TABLES;
|
||||
# test with CHECK/REPAIR TABLE
|
||||
# replacing t1#P#p1.MYI with a corrupt + unclosed one created by doing:
|
||||
# 'create table t1 (a int key(a)) partition by hash (a) partitions 3'
|
||||
# head -c1024 t1#P#p1.MYI > corrupt_t1#P#p1.MYI
|
||||
CHECK TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 28 Should be: 7
|
||||
test.t1_will_crash check error Partition p1 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
REPAIR TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 1 to 4
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
FLUSH TABLES;
|
||||
# test with ALTER TABLE ... CHECK/REPAIR PARTITION
|
||||
# replacing t1_will_crash#P#p1.MYI with a corrupt + unclosed one
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p0, p2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check status OK
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p0, p1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 28 Should be: 7
|
||||
test.t1_will_crash check error Partition p1 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p1, p2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning Table is marked as crashed
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 28 Should be: 7
|
||||
test.t1_will_crash check error Partition p1 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p0, p2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair status OK
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p0, p1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 1 to 4
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
DROP TABLE t1_will_crash;
|
||||
# test of check/repair of a damaged subpartition's MYI-file
|
||||
CREATE TABLE t1_will_crash (a INT, KEY (a))
|
||||
ENGINE=MyISAM
|
||||
PARTITION BY RANGE (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
SUBPARTITIONS 2
|
||||
(PARTITION p0 VALUES LESS THAN (7),
|
||||
PARTITION p1 VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
FLUSH TABLES;
|
||||
# test with CHECK/REPAIR TABLE
|
||||
# replacing t1_will_crash#P#p1#SP#p1sp0.MYI with a corrupt + unclosed one
|
||||
CHECK TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 14 Should be: 7
|
||||
test.t1_will_crash check error Subpartition p1sp0 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
REPAIR TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 1 to 2
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
FLUSH TABLES;
|
||||
# test with ALTER TABLE ... CHECK/REPAIR PARTITION
|
||||
# replacing t1_will_crash#P#p1#SP#p1sp0.MYI with a corrupt + unclosed one
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p0;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check status OK
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION all;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 14 Should be: 7
|
||||
test.t1_will_crash check error Subpartition p1sp0 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning Table is marked as crashed
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check error Size of indexfile is: 1024 Should be: 2048
|
||||
test.t1_will_crash check warning Size of datafile is: 14 Should be: 7
|
||||
test.t1_will_crash check error Subpartition p1sp0 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p0;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair status OK
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p0, p1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 1 to 2
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT * FROM t1_will_crash;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
DROP TABLE t1_will_crash;
|
||||
# test of check/repair of crashed partitions in variuos states
|
||||
CREATE TABLE t1_will_crash (
|
||||
a VARCHAR(255),
|
||||
b INT,
|
||||
c LONGTEXT,
|
||||
PRIMARY KEY (a, b))
|
||||
ENGINE=MyISAM
|
||||
PARTITION BY HASH (b)
|
||||
PARTITIONS 7;
|
||||
SELECT COUNT(*) FROM t1_will_crash;
|
||||
COUNT(*)
|
||||
33
|
||||
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
|
||||
partition rows
|
||||
0 2
|
||||
1 5
|
||||
2 5
|
||||
3 5
|
||||
4 4
|
||||
5 4
|
||||
6 8
|
||||
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
|
||||
partition b a length(c)
|
||||
0 0 lost 64
|
||||
0 7 z lost 64
|
||||
1 1 abc 64
|
||||
1 8 tuw 64
|
||||
1 29 kkkkkkkkKkk 64
|
||||
1 71 1 broken when head -c1024 on datafile 1024
|
||||
1 71 eee 64
|
||||
2 2 def 64
|
||||
2 9 vxy 64
|
||||
2 23 lll 64
|
||||
2 30 2 crashed after _mi_mark_changed 64
|
||||
2 79 ccc 64
|
||||
3 3 ghi 64
|
||||
3 10 aaa 64
|
||||
3 17 nnn 64
|
||||
3 24 3 crashed after write_record 64
|
||||
3 73 ddd 64
|
||||
4 4 pqr 64
|
||||
4 11 bbb 64
|
||||
4 18 4 crashed after flush_cached_blocks 64
|
||||
4 67 fff 64
|
||||
5 5 mno 64
|
||||
5 19 mmm 64
|
||||
5 40 5 still here since crash in next row in multirow insert? 64
|
||||
5 89 a 64
|
||||
6 6 jkl 64
|
||||
6 13 ooo 64
|
||||
6 27 6 row 7 (crash before completely written to datafile) 128
|
||||
6 34 6 row 2 64
|
||||
6 48 6 row 4 64
|
||||
6 62 6 row 6 64
|
||||
6 83 64
|
||||
6 97 zzzzzZzzzzz 64
|
||||
FLUSH TABLES;
|
||||
# truncating p0 to simulate an empty datafile (not recovered!)
|
||||
# replacing p1 with only the first 1024 bytes (not recovered!)
|
||||
# replacing p3 with a crashed one at the last row in first insert
|
||||
# (crashed right after *share->write_record())
|
||||
# replacing p6 with a crashed MYD file (1) (splitted dynamic record)
|
||||
ANALYZE TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash analyze status OK
|
||||
OPTIMIZE TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash optimize warning Number of rows changed from 8 to 7
|
||||
test.t1_will_crash optimize status OK
|
||||
CHECK TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check error Size of datafile is: 0 Should be: 164
|
||||
test.t1_will_crash check error Partition p0 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
REPAIR TABLE t1_will_crash;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 2 to 0
|
||||
test.t1_will_crash repair info Found block that points outside data file at 344
|
||||
test.t1_will_crash repair warning Number of rows changed from 5 to 4
|
||||
test.t1_will_crash repair warning Number of rows changed from 0 to 5
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT COUNT(*) FROM t1_will_crash;
|
||||
COUNT(*)
|
||||
29
|
||||
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
|
||||
partition rows
|
||||
1 4
|
||||
2 5
|
||||
3 5
|
||||
4 4
|
||||
5 4
|
||||
6 7
|
||||
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
|
||||
partition b a length(c)
|
||||
1 1 abc 64
|
||||
1 8 tuw 64
|
||||
1 29 kkkkkkkkKkk 64
|
||||
1 71 eee 64
|
||||
2 2 def 64
|
||||
2 9 vxy 64
|
||||
2 23 lll 64
|
||||
2 30 2 crashed after _mi_mark_changed 64
|
||||
2 79 ccc 64
|
||||
3 3 ghi 64
|
||||
3 10 aaa 64
|
||||
3 17 nnn 64
|
||||
3 24 3 crashed after write_record 64
|
||||
3 73 ddd 64
|
||||
4 4 pqr 64
|
||||
4 11 bbb 64
|
||||
4 18 4 crashed after flush_cached_blocks 64
|
||||
4 67 fff 64
|
||||
5 5 mno 64
|
||||
5 19 mmm 64
|
||||
5 40 5 still here since crash in next row in multirow insert? 64
|
||||
5 89 a 64
|
||||
6 6 jkl 64
|
||||
6 13 ooo 64
|
||||
6 34 6 row 2 64
|
||||
6 48 6 row 4 64
|
||||
6 62 6 row 6 64
|
||||
6 83 64
|
||||
6 97 zzzzzZzzzzz 64
|
||||
FLUSH TABLES;
|
||||
#
|
||||
# replacing p2 with crashed files (after _mi_mark_changed)
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check status OK
|
||||
# crash was when index only marked as opened, no real corruption
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check status OK
|
||||
FLUSH TABLES;
|
||||
#
|
||||
# replacing p4 with updated but not closed index file
|
||||
ALTER TABLE t1_will_crash OPTIMIZE PARTITION p4;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash optimize error Found key at page 2048 that points to record outside datafile
|
||||
test.t1_will_crash optimize error Partition p4 returned error
|
||||
test.t1_will_crash optimize status Operation failed
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p4;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning Table is marked as crashed and last repair failed
|
||||
test.t1_will_crash check warning 1 client is using or hasn't closed the table properly
|
||||
test.t1_will_crash check warning Size of datafile is: 368 Should be: 252
|
||||
test.t1_will_crash check error Found 4 keys of 3
|
||||
test.t1_will_crash check error Partition p4 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p4;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 3 to 4
|
||||
test.t1_will_crash repair status OK
|
||||
FLUSH TABLES;
|
||||
#
|
||||
# replacing p6 with a crashed MYD file (2) (splitted dynamic record)
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p6;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning Size of datafile is: 868 Should be: 604
|
||||
test.t1_will_crash check error Unexpected byte: 0 at link: 340
|
||||
test.t1_will_crash check error Partition p6 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair info Delete link points outside datafile at 340
|
||||
test.t1_will_crash repair info Delete link points outside datafile at 340
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
|
||||
WHERE (b % 7) = 6
|
||||
ORDER BY partition, b, a;
|
||||
partition b a length(c)
|
||||
6 6 jkl 64
|
||||
6 13 ooo 64
|
||||
6 34 6 row 2 64
|
||||
6 48 6 row 4 64
|
||||
6 62 6 row 6 64
|
||||
6 83 64
|
||||
6 97 zzzzzZzzzzz 64
|
||||
FLUSH TABLES;
|
||||
#
|
||||
# replacing p6 with a crashed MYD file (3) (splitted dynamic record)
|
||||
# Different results from the corrupt table, which can lead to dropping
|
||||
# of the not completely written rows when using REBUILD on a corrupt
|
||||
# table, depending if one reads via index or direct on datafile.
|
||||
# Since crash when reuse of deleted row space, CHECK MEDIUM or EXTENDED
|
||||
# is required (MEDIUM is default) to verify correct behavior!
|
||||
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
|
||||
WHERE (b % 7) = 6
|
||||
ORDER BY partition, b, a;
|
||||
partition b a length(c)
|
||||
6 6 jkl 64
|
||||
6 13 ooo 64
|
||||
6 34 6 row 2 64
|
||||
6 83 64
|
||||
6 97 zzzzzZzzzzz 64
|
||||
SELECT (b % 7) AS partition, b, a FROM (SELECT b,a FROM t1_will_crash) q
|
||||
WHERE (b % 7) = 6
|
||||
ORDER BY partition, b, a;
|
||||
partition b a
|
||||
6 6 jkl
|
||||
6 13 ooo
|
||||
6 34 6 row 2
|
||||
6 48 6 row 4
|
||||
6 62 6 row 6
|
||||
6 83
|
||||
6 97 zzzzzZzzzzz
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION p6;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check warning Size of datafile is: 868 Should be: 604
|
||||
test.t1_will_crash check error Record-count is not ok; is 8 Should be: 7
|
||||
test.t1_will_crash check warning Found 10 key parts. Should be: 7
|
||||
test.t1_will_crash check error Partition p6 returned error
|
||||
test.t1_will_crash check error Corrupt
|
||||
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash repair warning Number of rows changed from 7 to 8
|
||||
test.t1_will_crash repair status OK
|
||||
SELECT COUNT(*) FROM t1_will_crash;
|
||||
COUNT(*)
|
||||
29
|
||||
SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
|
||||
partition rows
|
||||
1 4
|
||||
2 4
|
||||
3 5
|
||||
4 4
|
||||
5 4
|
||||
6 8
|
||||
SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
|
||||
partition b a length(c)
|
||||
1 1 abc 64
|
||||
1 8 tuw 64
|
||||
1 29 kkkkkkkkKkk 64
|
||||
1 71 eee 64
|
||||
2 2 def 64
|
||||
2 9 vxy 64
|
||||
2 23 lll 64
|
||||
2 79 ccc 64
|
||||
3 3 ghi 64
|
||||
3 10 aaa 64
|
||||
3 17 nnn 64
|
||||
3 24 3 crashed after write_record 64
|
||||
3 73 ddd 64
|
||||
4 4 pqr 64
|
||||
4 11 bbb 64
|
||||
4 18 4 crashed after flush_cached_blocks 64
|
||||
4 67 fff 64
|
||||
5 5 mno 64
|
||||
5 19 mmm 64
|
||||
5 40 5 still here since crash in next row in multirow insert? 64
|
||||
5 89 a 64
|
||||
6 6 jkl 64
|
||||
6 13 ooo 64
|
||||
6 27 6 row 7 (crash before completely written to datafile) 128
|
||||
6 34 6 row 2 64
|
||||
6 48 6 row 4 64
|
||||
6 62 6 row 6 64
|
||||
6 83 64
|
||||
6 97 zzzzzZzzzzz 64
|
||||
ALTER TABLE t1_will_crash CHECK PARTITION all EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1_will_crash check status OK
|
||||
DROP TABLE t1_will_crash;
|
|
@ -180,3 +180,18 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 a2 b2 c2 d2 e2 f2 g2 h2 a3 b3 c3 d3 e3 f
|
|||
1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 1983-12-31 cdef srtbvsr w 45634 13452.56 3452346456 127 liuugbzvdmrlti b itiortudirtfgtibm dfi
|
||||
1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 1975-01-01 abcde abcde m 1234 123.45 32412341234 113 tbhth nrzh ztfghgfh fzh ftzhj fztjh
|
||||
drop table t1;
|
||||
# Bug#34604 - Assertion 'inited==RND' failed in handler::ha_rnd_end
|
||||
CREATE TABLE t1 (
|
||||
a INT AUTO_INCREMENT,
|
||||
b VARCHAR(255),
|
||||
PRIMARY KEY (a))
|
||||
ENGINE = InnoDB
|
||||
PARTITION BY HASH (a)
|
||||
PARTITIONS 2;
|
||||
SET autocommit=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (NULL, 'first row t2');
|
||||
SET autocommit=OFF;
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 10;
|
||||
INSERT INTO t1 VALUES (NULL, 'second row t2');
|
||||
DROP TABLE t1;
|
||||
|
|
|
@ -7,5 +7,3 @@ partition_syntax_ndb : Bug#36735 Not supported
|
|||
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function
|
||||
partition_alter4_myisam : Bug#20129 / WL#4176
|
||||
partition_alter4_innodb : Bug#20129 / WL#4176
|
||||
|
|
42
mysql-test/suite/parts/t/partition_mgm_lc0_archive.test
Normal file
42
mysql-test/suite/parts/t/partition_mgm_lc0_archive.test
Normal file
|
@ -0,0 +1,42 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc0_archive.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# Archive branch + lower_case_table_names = 0 #
|
||||
# (usually Unix like, apart from Mac OS X) #
|
||||
# Also requires lower_case_file_system OFF #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase0.inc
|
||||
--source include/have_case_sensitive_file_system.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
let $have_bug37719= 1;
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_archive.inc
|
||||
let $engine= 'Archive';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
41
mysql-test/suite/parts/t/partition_mgm_lc0_innodb.test
Normal file
41
mysql-test/suite/parts/t/partition_mgm_lc0_innodb.test
Normal file
|
@ -0,0 +1,41 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc0_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# InnoDB branch + lower_case_table_names = 0 #
|
||||
# (usually Unix like, apart from Mac OS X) #
|
||||
# Also requires lower_case_file_system OFF #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase0.inc
|
||||
--source include/have_case_sensitive_file_system.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
41
mysql-test/suite/parts/t/partition_mgm_lc0_memory.test
Normal file
41
mysql-test/suite/parts/t/partition_mgm_lc0_memory.test
Normal file
|
@ -0,0 +1,41 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc0_memory.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# Memory branch + lower_case_table_names = 0 #
|
||||
# (usually Unix like, apart from Mac OS X) #
|
||||
# Also requires lower_case_file_system OFF #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase0.inc
|
||||
--source include/have_case_sensitive_file_system.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
#--source include/have_memory.inc
|
||||
let $engine= 'Memory';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
41
mysql-test/suite/parts/t/partition_mgm_lc0_myisam.test
Normal file
41
mysql-test/suite/parts/t/partition_mgm_lc0_myisam.test
Normal file
|
@ -0,0 +1,41 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc0_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# MyISAM branch + lower_case_table_names = 0 #
|
||||
# (usually Unix like, apart from Mac OS X) #
|
||||
# Also requires lower_case_file_system OFF #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase0.inc
|
||||
--source include/have_case_sensitive_file_system.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
#--source include/have_myisam.inc
|
||||
let $engine= 'MyISAM';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
47
mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test
Normal file
47
mysql-test/suite/parts/t/partition_mgm_lc0_ndb.test
Normal file
|
@ -0,0 +1,47 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc0_ndb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# NDB branch + lower_case_table_names = 0 #
|
||||
# (usually Unix like, apart from Mac OS X) #
|
||||
# Also requires lower_case_file_system OFF #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase0.inc
|
||||
--source include/have_case_sensitive_file_system.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
let $have_bug33158= 1;
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_ndb.inc
|
||||
connection default;
|
||||
# Use either $can_only_key or new=on option to run test.
|
||||
let $can_only_key= 1;
|
||||
# Allow hash/list/range partitioning with ndb
|
||||
#SET new=on;
|
||||
let $engine= 'NDBCluster';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
|
@ -0,0 +1 @@
|
|||
--lower_case_table_names=1
|
38
mysql-test/suite/parts/t/partition_mgm_lc1_archive.test
Normal file
38
mysql-test/suite/parts/t/partition_mgm_lc1_archive.test
Normal file
|
@ -0,0 +1,38 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc1_archive.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# Archive branch + lower_case_table_names = 1 (usually Windows) #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase1.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_archive.inc
|
||||
let $engine= 'Archive';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
|
@ -0,0 +1 @@
|
|||
--lower_case_table_names=1
|
38
mysql-test/suite/parts/t/partition_mgm_lc1_innodb.test
Normal file
38
mysql-test/suite/parts/t/partition_mgm_lc1_innodb.test
Normal file
|
@ -0,0 +1,38 @@
|
|||
################################################################################
|
||||
# t/partition_mgm_lc1_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Test of partitioning management functions (incl upper/lower case names): #
|
||||
# InnoDB branch + lower_case_table_names = 1 (usually Windows) #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mattiasj #
|
||||
# Original Date: 2008-06-27 #
|
||||
################################################################################
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
--source include/have_lowercase1.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_mgm.inc
|
|
@ -0,0 +1 @@
|
|||
--lower_case_table_names=1
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue